Next.js Frontend für die Geoperf Performance Monitoring Platform.
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Linting: ESLint
cd frontend
npm installcp .env.example .envPasse die .env Datei nach Bedarf an:
NEXT_PUBLIC_API_URL=http://localhost:8080npm run devDas Frontend ist nun erreichbar unter: http://localhost:3000
npm run dev- Startet den Development Servernpm run build- Erstellt einen Production Buildnpm start- Startet den Production Servernpm run lint- Führt ESLint ausnpm run type-check- Prüft TypeScript Typen
frontend/
├── app/ # Next.js App Router
│ ├── layout.tsx # Root Layout
│ ├── page.tsx # Homepage
│ ├── globals.css # Globale Styles
│ └── dashboard/ # Dashboard Seite
├── components/ # Wiederverwendbare UI-Komponenten
│ └── Button.tsx
├── lib/ # Utility-Funktionen und Konfiguration
│ └── api-client.ts # API Client für Backend-Kommunikation
├── types/ # TypeScript Type Definitionen
│ └── index.ts
└── public/ # Statische Assets
Der API Client (lib/api-client.ts) bietet eine typisierte Schnittstelle zum Go Backend:
import { api } from "@/lib/api-client";
// Beispiel: Events abrufen
const events = await api.get("/api/v1/events");
// Beispiel: Projekt erstellen
const project = await api.post("/api/v1/projects", {
name: "Mein Projekt",
tenantId: "tenant-123",
});- ✅ TypeScript für Type Safety
- ✅ Tailwind CSS für schnelles Styling
- ✅ Dark Mode Support
- ✅ API Client für Backend-Integration
- ✅ Responsive Design
- ✅ ESLint Konfiguration
Das Frontend verbindet sich standardmäßig mit dem Backend unter http://localhost:8080.
Stelle sicher, dass das Go Backend läuft:
cd ..
make servenpm run build
npm start# Beispiel Dockerfile
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
EXPOSE 3000
CMD ["npm", "start"]- Authentication implementieren
- Dashboard mit echten Daten verbinden
- Event Monitoring UI
- Execution Pipeline Visualisierung
- Billing Integration mit Stripe
- Testing Setup (Jest/Vitest + React Testing Library)