managarten/services
Till JS 0a544ac410 feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction
Builds out the Cards spinoff end-to-end so the standalone app at
cards.mana.how shares its data layer with the in-mana cards module
through a single pure-utility package.

Why a spinoff and not just a deeper module: per the GUIDELINES, Cards
gets its own brand + URL while reusing mana-auth, mana-sync, and the
mana-credits/billing stack. The in-mana module under mana.how/cards
stays untouched as the integrated experience.

Phase 0 — mana-modul foundation
  • New tables cardReviews + cardStudyBlocks (Dexie v61) + plaintext
    classification in the crypto registry.
  • LocalCard learns a {type, fields} shape; legacy front/back columns
    kept as a back-compat mirror so older builds keep rendering.
  • FSRS v6 scheduler + Cloze parser + Markdown render pipeline.
  • UI in apps/mana/.../routes/(app)/cards/ gets a learn session
    (learn/[deckId]), 4-type card editor, due-counter, markdown lists.

Phase 1 — standalone (apps/cards/apps/web)
  • SvelteKit 2 + Svelte 5 + Tailwind 4, port 5180.
  • Own Dexie 'cards' DB with a slim 5-table schema.
  • Own sync engine: pending-changes hooks, 1 s push / 5 s pull against
    POST /sync/cards, server-apply with suppression to avoid ping-pong.
  • Auth-Gate via @mana/shared-auth-ui (LoginPage / RegisterPage).
  • Encryption hooks at every write/read/apply path, currently no-op
    stubs — flipping to real vault-backed AES-GCM is a single-file
    change in src/lib/data/crypto.ts.

Shared package — @mana/cards-core
  • Pulls types, cloze, card-reviews, FSRS wrapper, and Markdown
    renderer out of the mana module so both frontends import from one
    source. mana-modul keeps thin re-export shims so consumers don't
    need to change imports.
  • 19 vitest tests carried over from the mana module.

Server-side wiring
  • cards.mana.how added to mana-auth PRODUCTION_TRUSTED_ORIGINS and
    its CORS_ORIGINS env (sso-config.spec.ts stays green).
  • New cards-web container in docker-compose.macmini.yml (mirrors
    manavoxel-web pattern, 128m, depends on mana-auth healthy).
  • cloudflared-config.yml repoints cards.mana.how from :5000 (the
    unified mana-web container) to :5180. mana.how/cards is unchanged.

Cleanup
  • Removed an unrelated 2026-03/04 NestJS+Supabase+Expo experiment
    that was lingering under apps/cards/ (apps/landing, supabase/,
    .github/workflows, MANA_CORE_*.md, etc.). It predated this plan
    and would have confused future readers.

Validation
  • svelte-check on mana-web: 0 errors over 7697 files
  • svelte-check on cards-web: 0 errors over 3481 files
  • vitest on cards-core: 19/19 pass
  • pnpm check:crypto: 214 tables classified
  • bun test sso-config.spec.ts: 8/8 pass
  • vite build on cards-web: green

Not done in this commit (deliberate)
  • Real encryption (vault roundtrip) — Phase 2.
  • WebSocket-driven pull (5 s polling for now).
  • Mobile/landing standalone surfaces — Phase 2/3.
  • The actual production cutover on the Mac mini (build, deploy,
    cloudflared sync) — config is staged, deploy is a user action.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 01:20:43 +02:00
..
mana-ai fix(articles, mana-ai): rollout-block hardening for sync_changes projections 2026-04-29 00:53:39 +02:00
mana-analytics fix(feedback): keine doppelte Anzeige von Title + Body 2026-04-28 17:37:51 +02:00
mana-api-gateway chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
mana-auth feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction 2026-05-07 01:20:43 +02:00
mana-crawler fix(mana-crawler): default DATABASE_URL to mana_platform in dev 2026-04-15 18:18:19 +02:00
mana-credits fix(mana-credits): correct pnpm workspace filter (@mana/credits-service, not @mana/credits) 2026-04-27 14:27:18 +02:00
mana-events chore(mana-events): move from port 3065 to 3115 — collision with platform mana-media 2026-05-06 20:38:46 +02:00
mana-geocoding fix(geocoding): bump PROVIDER_TIMEOUT_MS to 20s for cold cross-LAN 2026-04-28 22:19:21 +02:00
mana-image-gen feat(mana-image-gen): replace Mac flux2.c implementation with Windows GPU diffusers 2026-04-08 13:02:42 +02:00
mana-landing-builder fix(tsconfig): unblock shared-types consumers 2026-04-21 18:53:55 +02:00
mana-llm fix(mana-llm): copy aliases.yaml into Docker image 2026-04-28 15:47:48 +02:00
mana-mail feat(forms): M10d headless wave-cron — server-worker + private internal_meta 2026-05-06 17:18:05 +02:00
mana-mcp docs(mana-mcp,mana-ai): CLAUDE.md coverage for M1 agent-loop primitives 2026-04-23 14:25:14 +02:00
mana-media fix(mana-media): HEIC uploads from Chrome — sniff + transcode at the edge 2026-04-25 13:46:13 +02:00
mana-notify fix(mana-auth) + chore: rewrite /api/v1/auth/login JWT mint, remove Matrix stack 2026-04-08 16:32:13 +02:00
mana-persona-runner feat(personas): move admin + internal endpoints from mana-auth to apps/api 2026-05-06 20:38:29 +02:00
mana-research feat(llm-aliases): M5 — migrate consumers to MANA_LLM aliases 2026-04-26 21:26:03 +02:00
mana-search chore(docker): drop obsolete services/mana-search/docker-compose.dev.yml 2026-04-23 15:27:19 +02:00
mana-stt chore(mac-mini): remove all AI service infrastructure (moved to Windows GPU) 2026-04-08 13:06:40 +02:00
mana-subscriptions chore(db): enforce pgSchema isolation with a lint script 2026-04-20 14:45:59 +02:00
mana-sync docs(plans): mark llm-fallback-aliases SHIPPED, add M-by-M commit table 2026-04-26 21:27:57 +02:00
mana-tts feat(profile): voice interview with pre-rendered TTS audio + Orpheus/Zonos backends 2026-04-17 15:22:52 +02:00
mana-user refactor(shared-tailwind): rewrite themes.css to single-layer shadcn convention 2026-04-09 01:13:06 +02:00
mana-video-gen chore(matrix): final scrub of stale matrix references 2026-04-08 16:47:54 +02:00
mana-voice-bot fix(mana-voice-bot): move default port 3050 → 3024 + Windows GPU deployment notes 2026-04-08 13:14:57 +02:00
news-ingester refactor(shared-rss): extract RSS parsing + Readability into one package 2026-04-15 22:30:44 +02:00