managarten/packages/shared-types/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
..
ai-schemas.ts refactor: rename nutriphi module to food (Essen) 2026-04-14 15:30:07 +02:00
auth.ts style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00
common.ts style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00
contact.ts feat(contacts): integrate contacts into Todo and Calendar apps 2025-12-11 18:14:35 +01:00
index.ts feat(spaces): validate space metadata on Better Auth organization hooks 2026-04-20 16:05:38 +02:00
landing-config.ts chore: complete ManaCore → Mana rename (docs, go modules, plists, images) 2026-04-07 12:26:10 +02:00
spaces.ts feat(spaces): validate space metadata on Better Auth organization hooks 2026-04-20 16:05:38 +02:00
theme.ts style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00
ui.ts style: auto-format codebase with Prettier 2025-11-27 18:33:16 +01:00