managarten/packages/shared-branding/src
Till JS 166d6c6ffb feat(spaces): validate space metadata on Better Auth organization hooks
Moves the canonical SpaceType + SPACE_MODULE_ALLOWLIST to @mana/shared-types
(framework-free) so the Bun services can consume them without pulling in
Svelte. shared-branding keeps only the UI-facing labels and descriptions
and re-exports the canonical types for frontend convenience.

Wires two Better Auth organization hooks in mana-auth:
- beforeCreateOrganization asserts metadata.type is a valid SpaceType,
  rejecting the create with a BAD_REQUEST otherwise.
- beforeDeleteOrganization rejects deletion of the personal space.

Covered by bun tests (11 assertions) for the helper module.

No migration and no schema change — type lives in the existing
organization.metadata jsonb column.

Plan: docs/plans/spaces-foundation.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 16:05:38 +02:00
..
logos refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
app-icons.ts feat(invoices): M1 skeleton — module registration + empty ListView 2026-04-20 15:28:09 +02:00
AppLogo.svelte style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00
AppLogoWithName.svelte style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00
config.ts refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00
index.ts feat(spaces): validate space metadata on Better Auth organization hooks 2026-04-20 16:05:38 +02:00
mana-apps.spec.ts refactor(shared-branding): derive APP_URLS from APP_ICONS 2026-04-09 15:14:52 +02:00
mana-apps.ts feat(invoices): M1 skeleton — module registration + empty ListView 2026-04-20 15:28:09 +02:00
ManaIcon.svelte style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00
spaces.ts feat(spaces): validate space metadata on Better Auth organization hooks 2026-04-20 16:05:38 +02:00
types.ts refactor: rename zitare -> quotes (Zitate) 2026-04-14 20:59:16 +02:00