Zum Hauptinhalt springen

Lokale Entwicklungsumgebung

Voraussetzungen

  • Node.js >= 20.9
  • npm (kommt mit Node.js)
  • Git

Setup

# Repository klonen
git clone <repo-url>
cd roestify

# App-Dependencies installieren
cd roestify-app
npm install

# Environment-Variablen konfigurieren
cp .env.local.example .env.local
# → DATABASE_URL, Resend, Stripe etc. eintragen (siehe Umgebungsvariablen)

# Entwicklungsserver starten (Turbopack)
npm run dev

Die App ist unter http://localhost:3000 erreichbar.

Docs lokal starten

cd roestify-docs
npm install
npm start

Die Dokumentation ist unter http://localhost:3001 erreichbar.

Tests ausführen

cd roestify-app

# Unit-Tests (Vitest)
npm test

# Watch-Mode
npm run test:watch

# Coverage
npm run test:coverage

# E2E-Tests (Playwright)
npx playwright test

Unit-Tests: Vitest 4.0.18. E2E-Tests: Playwright 1.58.2.

Build

cd roestify-app
npm run build

Output: Standalone (Docker-fähig).

Linting

npm run lint

ESLint 9 mit eslint-config-next.

Projektstruktur

roestify/
├── roestify-app/ # Next.js 16.1 Anwendung
│ ├── src/
│ │ ├── app/ # App Router (Pages + API)
│ │ ├── server/ # Auth, DB, tRPC
│ │ ├── components/ # React-Komponenten
│ │ ├── lib/ # Utilities, Validierungen, PDF
│ │ ├── hooks/ # Custom React Hooks
│ │ └── types/ # TypeScript-Typen
│ ├── drizzle/ # SQL-Migrationen (Drizzle Kit)
│ ├── e2e/ # Playwright E2E-Tests
│ └── features/ # Feature-Specs (completed/)
├── roestify-docs/ # Docusaurus 3.9 Dokumentation
└── .claude/ # Claude Code Regeln & Skills