FDISK sync: - fix(sync): strip 'KFZ-Führerschein / ' prefix from license class select option text before whitelist validation - fix(sync): fix navigateAndGetTableRows to pick date column with most matches (prevents sidebar tables from hijacking dateColIdx for Beförderungen) - fix(sync): input.value fallback now falls through to textContent when value is empty - feat(sync): expand Ausbildungen to capture Kursnummer, Kurz, Kurs (full name), Erfolgscode from FDISK table; add migration 086 External orders (Bestellungen): - fix(bestellungen): allow erhalten_menge editing in lieferung_pruefen status (resolves deadlock preventing order completion) - fix(bestellungen): show cost/received warnings for bestellt/teillieferung/lieferung_pruefen, not just when abgeschlossen is next - feat(bestellungen): rename status labels to Eingereicht, Genehmigt, Teilweise geliefert, Vollständig geliefert - fix(bestellungen): remove duplicate Bestelldatum from PDF export - feat(bestellungen): add catalog item autocomplete to creation form (auto-fills bezeichnung + artikelnummer) Internal orders (Ausruestungsanfrage): - fix(ausruestung): untracked items with zuweisung_typ='keine' now appear in Nicht-zugewiesen tab (frontend filter was too strict) - feat(ausruestung): load user-specific personal items when ordering for another user - feat(ausruestung): auto-set ist_ersatz=true for items from personal equipment list; add toggle for catalog/free-text items - feat(ausruestung): load item eigenschaften when personal item with artikel_id is checked Ausbildungen display: - feat(mitglieder): show kursname (full), kurs_kurzbezeichnung chip, erfolgscode chip (color-coded) per Ausbildung entry Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Feuerwehr Dashboard Backend
Description
Backend API for the Feuerwehr Dashboard application built with Node.js, Express, and TypeScript.
Tech Stack
- Node.js
- Express
- TypeScript
- PostgreSQL
- Winston (Logging)
- JWT (Authentication)
- Helmet (Security)
- Zod (Validation)
Prerequisites
- Node.js (v18 or higher)
- PostgreSQL (v14 or higher)
- npm or yarn
Installation
npm install
Configuration
Create a .env.development file in the root directory:
NODE_ENV=development
PORT=3000
DB_HOST=localhost
DB_PORT=5432
DB_NAME=feuerwehr_dev
DB_USER=dev_user
DB_PASSWORD=dev_password
JWT_SECRET=your-secret-key-change-in-production
JWT_EXPIRES_IN=24h
CORS_ORIGIN=http://localhost:3001
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX=100
LOG_LEVEL=info
Development
# Run in development mode with hot reload
npm run dev
# Build TypeScript to JavaScript
npm run build
# Run production build
npm start
Project Structure
backend/
├── src/
│ ├── config/ # Configuration files
│ ├── controllers/ # Route controllers
│ ├── database/ # Database migrations
│ ├── middleware/ # Express middleware
│ ├── models/ # Data models
│ ├── routes/ # API routes
│ ├── services/ # Business logic
│ ├── types/ # TypeScript types
│ ├── utils/ # Utility functions
│ ├── app.ts # Express app setup
│ └── server.ts # Server entry point
├── dist/ # Compiled JavaScript
├── logs/ # Application logs
└── package.json
API Endpoints
Health Check
GET /health- Server health status
Scripts
npm run dev- Start development server with hot reloadnpm run build- Build TypeScript to JavaScriptnpm start- Run production servernpm test- Run tests (not yet implemented)
License
ISC