managarten/packages/shared-branding/src/index.ts
Till JS b737240ec1 feat(auth): add access tier system for phased app releases
Introduces a tiered access control system so apps can be released
gradually (founder → alpha → beta → public) without extra infrastructure.
Users are gated at the AuthGate level based on their tier vs the app's
requiredTier. All apps remain deployed and reachable, but only users
with sufficient tier can enter.

- Add accessTier enum + column to users schema (default: 'public')
- Add tier claim to JWT payload in better-auth config
- Add requiredTier field to ManaApp interface + all 25 apps
- Add hasAppAccess(), getAccessibleManaApps(), ACCESS_TIER_LABELS
- Update AuthGate with tier check + access denied screen
- Update getPillAppItems + Home page to filter by user tier
- Update all 22 app layouts to pass user tier to PillNav
- Add admin API: GET/PUT /api/v1/admin/users/:id/tier
- Document access tier system in CLAUDE.md

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 21:50:06 +02:00

72 lines
1.5 KiB
TypeScript

/**
* Shared branding components and configuration for the Mana ecosystem
*
* This package provides:
* - App logos (AppLogo, AppLogoWithName)
* - Pre-configured app logos (MemoroLogo, ManaCoreLogo, etc.)
* - Mana icon (ManaIcon)
* - Branding configuration (colors, names, taglines)
*/
// Generic Components
export { default as AppLogo } from './AppLogo.svelte';
export { default as AppLogoWithName } from './AppLogoWithName.svelte';
export { default as ManaIcon } from './ManaIcon.svelte';
// Pre-configured App Logos
export {
MemoroLogo,
ManaCoreLogo,
ManaDeckLogo,
UloadLogo,
ChatLogo,
PresiLogo,
NutriPhiLogo,
ZitareLogo,
ContactsLogo,
CalendarLogo,
StorageLogo,
TodoLogo,
MailLogo,
MoodlitLogo,
InventoryLogo,
ClockLogo,
QuestionsLogo,
SkillTreeLogo,
PlantaLogo,
PlaygroundLogo,
LightWriteLogo,
MukkeLogo,
ContextLogo,
CitycornersLogo,
} from './logos';
// Configuration
export { APP_BRANDING, getAppBranding, getAllAppBrandings } from './config';
// App Icons (SVG data URLs)
export { APP_ICONS, type AppIconId } from './app-icons';
// Mana Apps Configuration
export {
MANA_APPS,
getManaApp,
getManaAppsByStatus,
getAvailableManaApps,
getActiveManaApps,
getAccessibleManaApps,
hasAppAccess,
getTierLevel,
APP_STATUS_LABELS,
APP_SLIDER_LABELS,
APP_URLS,
ACCESS_TIER_LABELS,
getPillAppItems,
type ManaApp,
type AppStatus,
type AccessTier,
type PillAppItemConfig,
} from './mana-apps';
// Types
export type { AppId, AppBranding, LogoProps, AppLogoWithNameProps } from './types';