mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 18:41:08 +02:00
Mirror of github.com/Memo-2023/mana-monorepo
Plan: docs/plans/forms-module.md M10. Erste Hälfte (Datenshape +
Submit-Stamping + ResponsesView-Filter); cron-basierter
Broadcast-Versand bleibt M10b.
- types.ts:
- FormSettings.recurrence?: { frequency: 'weekly'|'monthly',
startedAt?, sendVia? }. Im Settings-Blob mitverschlüsselt.
- LocalFormResponse.cohort?: string. Plaintext (sortier-/filter-
Feld, kein PII). FormResponse.cohort: string|null.
- queries.toFormResponse maps null durch.
- lib/cohort.ts (pure):
- computeCohort(iso, frequency) → "YYYY-WNN" (ISO-Woche, padded für
lex-sort) | "YYYY-MM". Behandelt Year-Boundary korrekt
(2027-01-01 → 2026-W53).
- cohortLabel(cohort, frequency, now=new Date()) → "Diese Woche" /
"Letzte Woche" / "KW NN / YYYY" für weekly; "Dieser Monat" /
"Letzter Monat" / "Monatsname YYYY" für monthly. Falsche Keys
fallen auf Roh-Wert zurück (inkl. Bounds-Check 1-12 für month).
- sortCohortsDesc(): immutable, lex-sort newest-first.
- 15/15 Vitest-Cases (compute, label-current/prev/older, malformed,
sort, no-mutation).
- buildFormBlob (data/unlisted/resolvers.ts) zieht recurrence.frequency
in den Public-Snapshot. Frequenz ist nicht-sensitive Metadaten —
kann öffentlich diskoverabel sein, der Server braucht es zum
cohort-stamping.
- apps/api/src/modules/forms/public-routes.ts:
- Inline computeCohort (Mirror der pure-Funktion — apps/api kann
apps/mana nicht importieren).
- Bei jeder Submission: wenn snapshot.recurrence.frequency gesetzt,
stamp data.cohort = computeCohort(submittedAt, freq). Cohort
landet im sync_changes-Insert und reist zum Owner-Client.
- errorResponse-Aufrufe: { code, field } → { code, details: { field } }
weil der Hono-helper die details-Struktur erzwingt (M3b
type-safety-fix mitgenommen).
- SettingsPanel: Recurrence-Block mit Dropdown (Einmalig / Wöchentlich
/ Monatlich) + Hint-Erklärung. Setzt startedAt automatisch beim
Aktivieren.
- ResponsesView: cohort-chip-bar oberhalb der Status-Tabs. Zeigt
"Alle Wellen" + ein Chip pro distincter cohort (newest-first), je
mit Anzahl. Klick filtert die responses-Liste — alle bestehenden
Status-Counts berechnen sich auf den cohort-gefilterten Set, also
CSV-Export + Detail-Modal-Status-Pills bleiben konsistent.
- 8 neue i18n-Keys × 5 Locales (forms.builder.recurrence.* +
forms.responses.cohort.all). i18n-parity 6483 keys aligned.
Tests: 41/41 forms-tests grün (5 csv + 11 branching + 10 auto-sync +
15 cohort). svelte-check 0 errors. apps/api buildet.
M10b open: cron-worker in mana-ai oder mana-notify, der
recurrence-Forms scant + Share-Link via broadcasts an die
Recipients-Liste sendet. Schemata stehen, Pipeline fehlt noch.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .changeset | ||
| .claude | ||
| .github | ||
| .husky | ||
| apps | ||
| docker | ||
| docs | ||
| load-tests | ||
| NewAppIdeas/Roblox Reimagined | ||
| packages | ||
| patches | ||
| scripts | ||
| services | ||
| tests | ||
| .dockerignore | ||
| .editorconfig | ||
| .env.development | ||
| .env.macmini.example | ||
| .env.secrets.example | ||
| .gitignore | ||
| .npmrc | ||
| .nvmrc | ||
| .prettierignore | ||
| .prettierrc.json | ||
| CLAUDE.md | ||
| cloudflared-config.yml | ||
| docker-compose.dev.yml | ||
| docker-compose.macmini.yml | ||
| docker-compose.test.yml | ||
| eslint.config.mjs | ||
| gift-codes-2026-02-14.txt | ||
| lint-staged.config.js | ||
| package.json | ||
| playwright.config.ts | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| README.md | ||
| SYNC_DEBUG.md | ||
| TROUBLESHOOTING.md | ||
| turbo.json | ||
| vitest.config.ts | ||
Mana Monorepo
Monorepo containing all Mana projects — a self-hosted multi-app ecosystem with shared packages and unified tooling.
Projects
| Project | Description | Apps |
|---|---|---|
| mana | Multi-app ecosystem platform | Expo mobile, SvelteKit web |
| chat | AI chat application | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
| todo | Task management | NestJS backend, SvelteKit web, Astro landing |
| calendar | Calendar & scheduling | NestJS backend, SvelteKit web, Astro landing |
| clock | Pomodoro & time tracking | NestJS backend, SvelteKit web, Astro landing |
| contacts | Contact management | NestJS backend, SvelteKit web |
| picture | AI image generation | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
| cards | Card/deck management | NestJS backend, Expo mobile, SvelteKit web |
| quotes | Daily inspiration quotes | NestJS backend, Expo mobile, SvelteKit web, Astro landing |
| mukke | Music player | NestJS backend, SvelteKit web |
| plants | Plant care tracker | NestJS backend, SvelteKit web |
| storage | Cloud storage | NestJS backend, SvelteKit web |
| questions | Q&A with web search | SvelteKit web |
| skilltree | Skill tree visualization | NestJS backend, SvelteKit web |
| food | Nutrition tracking | NestJS backend, SvelteKit web |
| citycorners | City guide | NestJS backend, SvelteKit web, Astro landing |
| presi | Presentation tool | NestJS backend, SvelteKit web |
| photos | Photo management | NestJS backend, SvelteKit web |
Getting Started
Prerequisites
- Node.js 20+
- pnpm 9.15.0+
- Docker (for PostgreSQL, Redis, MinIO)
Installation
pnpm install
Development
# Start infrastructure (PostgreSQL, Redis, MinIO)
pnpm docker:up
# Start any app with auto DB setup
pnpm dev:chat:full
pnpm dev:todo:full
pnpm dev:calendar:full
pnpm dev:contacts:full
# Build & quality
pnpm run build
pnpm run type-check
pnpm run format
See CLAUDE.md for comprehensive development documentation.
Architecture
mana-monorepo/
├── apps/ # Product applications
├── services/ # Microservices (auth, search, LLM, bots)
├── packages/ # Shared packages
├── docker/ # Docker configuration
└── scripts/ # Development & deployment scripts
Tooling
- Package Manager: pnpm 9.15.0
- Build System: Turborepo
- Formatting: Prettier (tabs, single quotes, 100 char width)
- Hosting: Mac Mini (self-hosted) via Docker + Cloudflare Tunnel
- Analytics: Umami (stats.mana.how)
License
Private - All rights reserved