Files
admin 1a0fe18e89 Umstellung auf Next.js (App Router), Design analog werte-next
Führt das getrennte React/Vite-Frontend und Express/MongoDB-Backend in
eine einzelne Next.js-Anwendung zusammen:

- UI: React-Client-Komponenten (TabLayout, AppointmentForm, -List,
  ConfirmationModal) im Look von werte-next (Farben #CCCCFF/#85B7D7/
  #FFFFDD, Rahmenbox, Tabellen-Liste, Footer mit Version/Datum)
- API: Next.js Route Handler unter /api/appointments (GET/POST/PUT/DELETE,
  Soft-Delete beibehalten)
- DB: MongoDB via lib/db.ts (gecachter Client, Standard appointmentsdb)
- Tailwind 4 + TypeScript, Standalone-Docker-Build wie werte-next
- Druckansicht der aktuellen offenen Termine beibehalten
- Deployment: Dockerfile (multi-stage), docker-compose(.prod), deploy.sh

Entfernt die alten frontend/- und backend/-Verzeichnisse.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 14:24:34 +02:00

48 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Arzt-Termine (Next.js)
Verwaltung von Arzt-Terminen als Next.js-Anwendung (App Router) mit MongoDB als
Datenspeicher. Design und Layout orientieren sich am Projekt `werte-next`.
Vormals bestand das Projekt aus einem getrennten React/Vite-Frontend und einem
Express-Backend. Beides wurde in eine einzelne Next.js-App zusammengeführt:
- **UI** React-Client-Komponenten in `components/`, Seite in `app/page.tsx`
- **API** Next.js Route Handler unter `app/api/appointments`
- **DB** MongoDB-Zugriff in `lib/db.ts`
## Funktionen
- Termine anlegen, bearbeiten, als erledigt markieren und (soft) löschen
- Felder: Arztname, Fachrichtung, Datum/Uhrzeit, Bemerkungen
- Druckansicht mit den aktuellen (offenen) Terminen ab heute
## Entwicklung
```bash
cp .env.example .env # MONGO_URI setzen
npm install
npm run dev # http://localhost:3000
```
## Produktion (Docker)
```bash
cp .env.example .env # MONGO_ROOT_USER / MONGO_ROOT_PASSWD setzen
docker compose up -d --build
```
## Deploy zur Registry
```bash
./deploy.sh [tag] # baut & pusht docker.citysensor.de/aerzte-next
```
## Umgebungsvariablen
| Variable | Beschreibung |
| ------------------- | ----------------------------------------------- |
| `MONGO_URI` | MongoDB-Verbindung inkl. Datenbankname |
| `MONGO_ROOT_USER` | Root-User für den MongoDB-Container (Compose) |
| `MONGO_ROOT_PASSWD` | Root-Passwort für den MongoDB-Container |
| `APP_PORT` | Host-Port der App (Standard: 3000) |