Mobile-first WebApp für Krafttraining im Leichtathletik-Verein. Inspiriert von der UX von RP Strength mit Fokus auf extrem schnelles Logging während des Trainings.
- Framework: Next.js 16 (App Router)
- Sprache: TypeScript
- UI: Tailwind CSS + Radix UI
- Auth & DB: Supabase (PostgreSQL mit RLS)
- Forms: react-hook-form + Zod
- Offline: IndexedDB (idb) + Zustand
- Hosting: Vercel
git clone https://github.com/theAC1/Training-App.git
cd Training-Appnpm install- Erstelle ein Projekt auf supabase.com
- Führe die Migration aus:
supabase/migrations/001_initial_schema.sql - Erstelle einen Storage Bucket namens
exercises(public)
Kopiere .env.example zu .env.local und fülle die Werte:
cp .env.example .env.localBenötigte Variablen:
NEXT_PUBLIC_SUPABASE_URL- Supabase Project URLNEXT_PUBLIC_SUPABASE_ANON_KEY- Supabase Anon KeySUPABASE_SERVICE_ROLE_KEY- Supabase Service Role KeyNEXT_PUBLIC_APP_URL- App URL (z.B. http://localhost:3000)
npm run devApp öffnen: http://localhost:3000
Da die App Invite-Only ist, musst du den ersten Trainer manuell erstellen:
- Registriere einen User über Supabase Dashboard → Authentication → Users → Add User
- Aktualisiere das Profil in der DB:
UPDATE profiles SET role = 'trainer' WHERE id = 'USER_ID';- PRODUCT.md - User Flows, UX-Prinzipien, Route Map
- ARCHITECTURE.md - Stack, Security, Offline-Konzept
- DATA_MODEL.md - Datenmodell, RLS Policies
- ROADMAP.md - Milestones und Tasks
- Verbinde das GitHub Repo mit Vercel
- Setze die Environment Variables in den Vercel Projekteinstellungen:
- Gehe zu: Projekt Settings → Environment Variables
- Füge folgende Variablen hinzu (für alle Environments: Production, Preview, Development):
NEXT_PUBLIC_SUPABASE_URL- Deine Supabase Project URLNEXT_PUBLIC_SUPABASE_ANON_KEY- Dein Supabase Anon KeySUPABASE_SERVICE_ROLE_KEY- Dein Supabase Service Role KeyNEXT_PUBLIC_APP_URL- Deine Vercel App URL (z.B. https://your-app.vercel.app)
- Deploy oder Re-deploy das Projekt
Wichtig: Ohne diese Environment Variables wird die App mit einem Server-Fehler starten!
src/
├── app/ # Next.js App Router
│ ├── (auth)/ # Login, Signup
│ ├── (app)/ # Geschützte App-Routen
│ └── api/ # API Routes
├── components/
│ ├── ui/ # Basis-Komponenten
│ └── layout/ # Layout-Komponenten
├── lib/
│ ├── supabase/ # Supabase Client
│ └── utils.ts # Utilities
├── hooks/ # Custom Hooks
└── stores/ # Zustand Stores
npm run dev- Development Servernpm run build- Production Buildnpm run lint- ESLintnpm run format- Prettiernpm run type-check- TypeScript Check
Privat - Nur für den Leichtathletik-Verein