193 lines
4.3 KiB
Markdown
193 lines
4.3 KiB
Markdown
# SaveTheMoment Atlas
|
|
|
|
Modernes Buchungs- und Tourenmanagement-System für Save the Moment Fotoboxen.
|
|
|
|
## Features (Phase 1 - Fundament)
|
|
|
|
✅ Benutzer-Authentifizierung mit Rollen (Admin/Fahrer)
|
|
✅ Admin-Dashboard mit Übersicht
|
|
✅ Fahrer-Dashboard
|
|
✅ Standort-Verwaltung (5 Standorte)
|
|
✅ Fotobox-Modell-Verwaltung
|
|
✅ Preiskonfiguration pro Standort
|
|
✅ Moderne, responsive UI mit Tailwind CSS
|
|
✅ PostgreSQL Datenbank mit Prisma ORM
|
|
|
|
## Technologie-Stack
|
|
|
|
- **Frontend:** Next.js 14 (App Router), React, TypeScript, Tailwind CSS
|
|
- **Backend:** Next.js API Routes, NextAuth.js
|
|
- **Datenbank:** PostgreSQL mit Prisma ORM
|
|
- **Authentifizierung:** NextAuth.js mit Credentials Provider
|
|
- **UI:** Tailwind CSS, React Icons
|
|
|
|
## Voraussetzungen
|
|
|
|
- Node.js 18+
|
|
- PostgreSQL 14+
|
|
- npm oder yarn
|
|
|
|
## Installation
|
|
|
|
1. **Repository klonen:**
|
|
```bash
|
|
git clone <repository-url>
|
|
cd SaveTheMomentAtlas
|
|
```
|
|
|
|
2. **Dependencies installieren:**
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
3. **Umgebungsvariablen einrichten:**
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
|
|
Dann `.env` bearbeiten und folgende Werte anpassen:
|
|
```env
|
|
DATABASE_URL="postgresql://user:password@localhost:5432/savethemoment?schema=public"
|
|
NEXTAUTH_SECRET="dein-zufälliger-geheimer-schlüssel"
|
|
NEXTAUTH_URL="http://localhost:3000"
|
|
```
|
|
|
|
4. **Datenbank einrichten:**
|
|
```bash
|
|
# Prisma Client generieren
|
|
npx prisma generate
|
|
|
|
# Datenbank-Schema pushen
|
|
npx prisma db push
|
|
|
|
# Testdaten einfügen
|
|
npx tsx prisma/seed.ts
|
|
```
|
|
|
|
5. **Entwicklungsserver starten:**
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
Öffne [http://localhost:3000](http://localhost:3000) im Browser.
|
|
|
|
## Test-Accounts
|
|
|
|
Nach dem Seeding sind folgende Test-Accounts verfügbar:
|
|
|
|
**Admin:**
|
|
- E-Mail: `admin@savethemoment.de`
|
|
- Passwort: `admin123`
|
|
|
|
**Fahrer 1:**
|
|
- E-Mail: `fahrer1@savethemoment.de`
|
|
- Passwort: `driver123`
|
|
|
|
**Fahrer 2:**
|
|
- E-Mail: `fahrer2@savethemoment.de`
|
|
- Passwort: `driver123`
|
|
|
|
## Projektstruktur
|
|
|
|
```
|
|
SaveTheMomentAtlas/
|
|
├── app/ # Next.js App Router
|
|
│ ├── api/ # API Routes
|
|
│ ├── dashboard/ # Admin Dashboard
|
|
│ ├── driver/ # Fahrer Dashboard
|
|
│ ├── login/ # Admin Login
|
|
│ ├── driver-login/ # Fahrer Login
|
|
│ └── page.tsx # Startseite
|
|
├── components/ # React Komponenten
|
|
├── lib/ # Utility-Funktionen
|
|
│ ├── prisma.ts # Prisma Client
|
|
│ └── auth.ts # NextAuth Konfiguration
|
|
├── prisma/ # Datenbank
|
|
│ ├── schema.prisma # Datenbank-Schema
|
|
│ └── seed.ts # Seed-Daten
|
|
└── types/ # TypeScript Typen
|
|
```
|
|
|
|
## Datenbank-Schema
|
|
|
|
### Hauptmodelle:
|
|
|
|
- **User** - Benutzer (Admins & Fahrer)
|
|
- **Location** - Standorte (Lübeck, Hamburg, Kiel, Potsdam, Rostock)
|
|
- **PriceConfig** - Preiskonfiguration pro Standort und Modell
|
|
- **Photobox** - Fotobox-Inventar
|
|
- **Booking** - Buchungen
|
|
- **Tour** - Touren für Fahrer
|
|
- **Notification** - Benachrichtigungen
|
|
|
|
### Fotobox-Modelle:
|
|
- Vintage Smile
|
|
- Vintage Photos
|
|
- Nostalgie
|
|
- Magic Mirror
|
|
|
|
## Nützliche Commands
|
|
|
|
```bash
|
|
# Entwicklungsserver
|
|
npm run dev
|
|
|
|
# Production Build
|
|
npm run build
|
|
npm start
|
|
|
|
# Prisma Studio (Datenbank-GUI)
|
|
npx prisma studio
|
|
|
|
# Datenbank zurücksetzen
|
|
npx prisma db push --force-reset
|
|
npx tsx prisma/seed.ts
|
|
|
|
# TypeScript Check
|
|
npx tsc --noEmit
|
|
```
|
|
|
|
## Roadmap
|
|
|
|
### Phase 2 - Buchungsmanagement
|
|
- [ ] E-Mail-Parser für Ninjaforms
|
|
- [ ] Kalender-Integration
|
|
- [ ] Verfügbarkeitscheck
|
|
- [ ] Reservierungsverwaltung
|
|
|
|
### Phase 3 - Automatisierung
|
|
- [ ] Lexoffice-Integration
|
|
- [ ] PDF-Generierung (Mietvertrag)
|
|
- [ ] Angebotserstellung
|
|
- [ ] Benachrichtigungssystem
|
|
|
|
### Phase 4 - Tourenplanung
|
|
- [ ] Google Maps Integration
|
|
- [ ] Routenoptimierung
|
|
- [ ] Progressive Web App für Fahrer
|
|
- [ ] Live-Navigation
|
|
|
|
### Phase 5 - Optimierung
|
|
- [ ] Kundenportal
|
|
- [ ] Erweiterte Statistiken
|
|
- [ ] Native Mobile App
|
|
- [ ] Performance-Optimierungen
|
|
|
|
## Standorte
|
|
|
|
- **Lübeck** - fotobox-luebeck.de
|
|
- **Hamburg** - hamburg-fotobox.de
|
|
- **Kiel** - fotobox-kiel.de
|
|
- **Potsdam** - fotobox-potsdam.de
|
|
- **Rostock** - fotobox-rostock.de
|
|
|
|
## Support
|
|
|
|
Bei Fragen oder Problemen wende dich an das Entwicklerteam.
|
|
|
|
---
|
|
|
|
**Version:** 0.1.0
|
|
**Status:** Phase 1 - Fundament
|
|
**Letzte Aktualisierung:** 2025-11-11
|