stadtwerke/innungsapp
Timo Knuth c53a71a5f9 feat: Implement mobile application and lead processing utilities. 2026-02-19 14:21:51 +01:00
..
apps feat: Implement mobile application and lead processing utilities. 2026-02-19 14:21:51 +01:00
packages/shared Rebuild as InnungsApp project: replace stadtwerke analysis with full documentation 2026-02-18 19:03:37 +01:00
.env.example Rebuild as InnungsApp project: replace stadtwerke analysis with full documentation 2026-02-18 19:03:37 +01:00
.gitignore Rebuild as InnungsApp project: replace stadtwerke analysis with full documentation 2026-02-18 19:03:37 +01:00
CLAUDE.md feat: Implement mobile application and lead processing utilities. 2026-02-19 14:21:51 +01:00
README.md feat: Implement mobile application and lead processing utilities. 2026-02-19 14:21:51 +01:00
package.json feat: Implement mobile application and lead processing utilities. 2026-02-19 14:21:51 +01:00
pnpm-lock.yaml feat: Implement mobile application and lead processing utilities. 2026-02-19 14:21:51 +01:00
pnpm-workspace.yaml Rebuild as InnungsApp project: replace stadtwerke analysis with full documentation 2026-02-18 19:03:37 +01:00
turbo.json Rebuild as InnungsApp project: replace stadtwerke analysis with full documentation 2026-02-18 19:03:37 +01:00

README.md

InnungsApp

Die digitale Plattform für Innungen — News, Mitgliederverzeichnis, Termine und Lehrlingsbörse.

Stack

Schicht Technologie
Monorepo pnpm Workspaces + Turborepo
Mobile App Expo (React Native) + Expo Router
Admin Dashboard Next.js 15 (App Router)
API tRPC v11
Auth better-auth (Magic Links)
Datenbank PostgreSQL + Prisma ORM
Styling Mobile NativeWind v4 (Tailwind CSS)
Styling Admin Tailwind CSS
State Management Zustand (Mobile) + React Query (beide Apps)

Projekt-Struktur

innungsapp/
├── apps/
│   ├── mobile/          # Expo React Native App (iOS + Android)
│   └── admin/           # Next.js Admin Dashboard
├── packages/
│   └── shared/          # TypeScript-Typen + Prisma Client
└── ...

Setup

Voraussetzungen

  • Node.js >= 20
  • pnpm >= 9
  • PostgreSQL-Datenbank
  • SMTP-Server (für Magic Links)

1. Abhängigkeiten installieren

pnpm install

2. Umgebungsvariablen

cp .env.example apps/admin/.env.local
# .env.local befüllen (DATABASE_URL, BETTER_AUTH_SECRET, SMTP_*)

3. Datenbank einrichten

# Prisma Client generieren
pnpm db:generate

# Migrationen anwenden
pnpm db:migrate

# Demo-Daten einspielen (optional)
pnpm db:seed

4. Entwicklung starten

# Admin Dashboard (http://localhost:3000)
pnpm --filter @innungsapp/admin dev

# Mobile App (Expo DevTools)
pnpm --filter @innungsapp/mobile dev

Oder alles parallel:

pnpm dev

Datenbank-Schema

Das Schema befindet sich in packages/shared/prisma/schema.prisma.

Wichtige Tabellen:

  • organizations — Innungen (Multi-Tenancy)
  • members — Mitglieder (verknüpft mit Auth-User nach Einladung)
  • user_roles — Berechtigungen (admin | member)
  • news, news_reads, news_attachments — News-System
  • termine, termin_anmeldungen — Terminverwaltung
  • stellen — Lehrlingsbörse (öffentlich lesbar)

Auth-Flow

  1. Admin einrichten: Seed-Daten oder manuell in der DB
  2. Mitglied einladen: Admin erstellt Mitglied → "Einladung senden" → Magic Link per E-Mail
  3. Mitglied loggt ein: Magic Link → Session → App-Zugang

API (tRPC)

Alle API-Endpunkte sind typsicher über tRPC definiert:

  • organizations.* — Org-Einstellungen, Stats, AVV
  • members.* — CRUD, Einladungen
  • news.* — CRUD, Lesestatus, Push-Benachrichtigungen
  • termine.* — CRUD, Anmeldungen
  • stellen.* — Public + Auth-geschützte Endpunkte

Deployment

Admin (Vercel)

# Umgebungsvariablen in Vercel setzen:
# DATABASE_URL, BETTER_AUTH_SECRET, BETTER_AUTH_URL, SMTP_*

# Deploy
vercel --cwd apps/admin

Mobile (EAS Build)

cd apps/mobile
eas build --platform all --profile production
eas submit --platform all

DSGVO / AVV

  • AVV-Akzeptanz in Admin → Einstellungen (Pflichtfeld vor Go-Live)
  • Alle personenbezogenen Daten in EU-Region (Datenbankserver in Deutschland empfohlen)
  • Keine Daten an Dritte außer Expo Push API (anonymisierte Token)

Roadmap

Siehe innung-app-mvp.md für die vollständige Roadmap.