managarten/apps/cards
Till JS ec8abfe6b8 feat(cards-web): Phase β.2 — author onboarding + publish flow
End-to-end "publish my local deck to the marketplace" surface in
the Cards standalone app. Hooks into cards-server (Phase β) so a
user can take a deck they've been editing locally and put it under
cards.mana.how/d/<slug> with one modal.

Pipeline:
  • lib/api/cards-api.ts — typed fetch wrapper around the cards-server
    /v1 surface. Reads the JWT from authStore, never from storage
    directly. CardsApiError carries `{status, message, details}`
    so UI can branch on 401/409/etc.
  • lib/stores/author.svelte.ts — lazy-loaded author state. Caches
    `cardsApi.authors.me()` on first access; resets cleanly on logout.
  • lib/util/slug.ts — best-effort slugify mirror of the server-side
    validator (server still has final say).
  • lib/components/PublishDeckModal.svelte — three-stage flow:
    become-author (slug + displayName + pseudonym), deck-meta (title,
    description, language, license picker, semver, changelog), then
    publishing → done with moderation-flag surface if AI mod returned
    'flag'. Keys off authorStore.isAuthor to skip stage 1 for
    returning authors.
  • routes/decks/[id]/+page.svelte gets a "🌍 Veröffentlichen" button
    next to "Lernen". Disabled until the deck has cards.

Wiring:
  • hooks.server.ts injects __PUBLIC_CARDS_API_URL__ on every SSR'd
    page so the client knows where cards-server lives.
  • compose adds PUBLIC_CARDS_API_URL_CLIENT=https://cards-api.mana.how
    to the cards-web container.

Validated: svelte-check 0/0, vite build green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 16:53:17 +02:00
..
apps/web feat(cards-web): Phase β.2 — author onboarding + publish flow 2026-05-07 16:53:17 +02:00
docs docs(cards): Marktplatz Plan — Vollvision mit mana-credits + dual verification 2026-05-07 15:48:45 +02:00
COMPETITORS_2026-05.md docs(cards): competitor analysis Mai 2026 2026-05-07 15:28:02 +02:00
GUIDELINES.md feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction 2026-05-07 01:20:43 +02:00
package.json feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction 2026-05-07 01:20:43 +02:00
README.md feat(cards): Phase-1 Spinoff — standalone cards.mana.how + cards-core extraction 2026-05-07 01:20:43 +02:00

Cards

Spaced-repetition flashcards on cards.mana.how.

Phase-1 standalone web app. The frontend lives here; data, auth, and sync are shared with the rest of the Mana stack:

  • Auth: mana-auth (SSO), *.mana.how
  • Sync: mana-sync, app-id cards
  • Storage: mana_platform.cards.* (Postgres, RLS)

The same cards data backs the mana built-in Cards module at mana.how/cards. Schema changes ship to both frontends together — see apps/cards/GUIDELINES.md.

Layout

apps/cards/
├── apps/
│   └── web/        # SvelteKit 2 + Svelte 5 — the Phase-1 surface
├── GUIDELINES.md   # Project rules (read first)
└── README.md

apps/cards/apps/mobile/ and any production apps/cards/apps/landing/ will land in Phase 2/3.

Quick start

pnpm install
pnpm --filter @cards/web dev      # cards.mana.how on http://localhost:5180