Rebuild as InnungsApp project: replace stadtwerke analysis with full documentation
- PRD: vollständige Produktspezifikation (5 Module, Scope, Akzeptanzkriterien) - ARCHITECTURE: Tech Stack, Ordnerstruktur, Multi-Tenancy, Push, Kosten - DATABASE_SCHEMA: Vollständiges SQL-Schema mit RLS Policies und Views - USER_STORIES: 40+ Stories nach Rolle (Admin, Mitglied, Azubi, Obermeister) - PERSONAS: 5 detaillierte Nutzerprofile mit Alltag, Zitaten und Erwartungen - BUSINESS_MODEL: Preistabellen, Unit Economics, Revenue-Projektionen, Distribution - ROADMAP: 6 Phasen, Sprint-Planung, Meilensteine und KPIs - COMPETITIVE_ANALYSIS: Wettbewerbsmatrix, USPs, Preispositionierung - API_DESIGN: Supabase Query Patterns, Edge Functions, Realtime Subscriptions - ONBOARDING_FLOWS: 7 User Flows von Setup bis Fehlerfall - GTM_STRATEGY: 3-Phasen-Vertrieb, Outreach-Sequenz, Einwandbehandlung - AZUBI_MODULE: Video-Feed, 1-Click-Apply, Chat, Berichtsheft, Quiz - DSGVO_KONZEPT: Rechtsgrundlagen, TOMs, AVV, Minderjährige, Incident Response - FEATURES_BACKLOG: 72 Features nach MoSCoW + Technische Schulden Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2
innungsapp/packages/shared/src/index.ts
Normal file
2
innungsapp/packages/shared/src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export { prisma } from './lib/prisma'
|
||||
export * from './types/index'
|
||||
18
innungsapp/packages/shared/src/lib/prisma.ts
Normal file
18
innungsapp/packages/shared/src/lib/prisma.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
|
||||
const globalForPrisma = globalThis as unknown as {
|
||||
prisma: PrismaClient | undefined
|
||||
}
|
||||
|
||||
export const prisma =
|
||||
globalForPrisma.prisma ??
|
||||
new PrismaClient({
|
||||
log:
|
||||
process.env.NODE_ENV === 'development'
|
||||
? ['query', 'error', 'warn']
|
||||
: ['error'],
|
||||
})
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
globalForPrisma.prisma = prisma
|
||||
}
|
||||
71
innungsapp/packages/shared/src/types/index.ts
Normal file
71
innungsapp/packages/shared/src/types/index.ts
Normal file
@@ -0,0 +1,71 @@
|
||||
// Re-export Prisma types for use across apps
|
||||
export type {
|
||||
User,
|
||||
Session,
|
||||
Account,
|
||||
Organization,
|
||||
Member,
|
||||
UserRole,
|
||||
News,
|
||||
NewsRead,
|
||||
NewsAttachment,
|
||||
Stelle,
|
||||
Termin,
|
||||
TerminAnmeldung,
|
||||
Plan,
|
||||
MemberStatus,
|
||||
OrgRole,
|
||||
NewsKategorie,
|
||||
TerminTyp,
|
||||
} from '@prisma/client'
|
||||
|
||||
// =============================================
|
||||
// UI Display Helpers
|
||||
// =============================================
|
||||
|
||||
export const NEWS_KATEGORIE_LABELS: Record<string, string> = {
|
||||
Wichtig: 'Wichtig',
|
||||
Pruefung: 'Prüfung',
|
||||
Foerderung: 'Förderung',
|
||||
Veranstaltung: 'Veranstaltung',
|
||||
Allgemein: 'Allgemein',
|
||||
}
|
||||
|
||||
export const TERMIN_TYP_LABELS: Record<string, string> = {
|
||||
Pruefung: 'Prüfung',
|
||||
Versammlung: 'Versammlung',
|
||||
Kurs: 'Kurs',
|
||||
Event: 'Event',
|
||||
Sonstiges: 'Sonstiges',
|
||||
}
|
||||
|
||||
export const MEMBER_STATUS_LABELS: Record<string, string> = {
|
||||
aktiv: 'Aktiv',
|
||||
ruhend: 'Ruhend',
|
||||
ausgetreten: 'Ausgetreten',
|
||||
}
|
||||
|
||||
export const PLAN_LABELS: Record<string, string> = {
|
||||
pilot: 'Pilot',
|
||||
standard: 'Standard',
|
||||
pro: 'Pro',
|
||||
verband: 'Verband',
|
||||
}
|
||||
|
||||
// =============================================
|
||||
// Shared Zod schemas (for validation on both apps)
|
||||
// =============================================
|
||||
|
||||
export const SPARTEN = [
|
||||
'Elektrotechnik',
|
||||
'Informationstechnik',
|
||||
'Sanitär',
|
||||
'Heizung',
|
||||
'Klimatechnik',
|
||||
'Maler',
|
||||
'Schreiner',
|
||||
'Metallbau',
|
||||
'Sonstiges',
|
||||
] as const
|
||||
|
||||
export type Sparte = (typeof SPARTEN)[number]
|
||||
Reference in New Issue
Block a user