Files
dashboard/backend
Matthias Hochmeister 02cf5138cf fix: dashboard layout, widget caching, and backend stability
Layout:
- Remove Container maxWidth cap so widgets scale fluidly on wide screens
- Fix ActivityFeed Card missing height:100% and overflow:hidden that caused
  the timeline connector pseudo-element to bleed outside the card boundary

Performance (frontend):
- Migrate VehicleDashboardCard, EquipmentDashboardCard, AtemschutzDashboardCard,
  UpcomingEventsWidget, and PersonalWarningsBanner from useEffect+useState to
  TanStack Query — cached for 5 min, so navigating back to the dashboard no
  longer re-fires all 9 API requests
- Add gcTime:10min and refetchOnWindowFocus:false to QueryClient defaults to
  prevent spurious refetches on tab-switch

Backend stability:
- Raise default RATE_LIMIT_MAX from 100 to 300 req/15min — the previous limit
  was easily exceeded by a single active user during normal dashboard navigation
- Increase DB connectionTimeoutMillis from 2s to 5s to handle burst-load
  scenarios where multiple requests compete for pool slots simultaneously

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 12:55:16 +01:00
..
2026-02-23 17:34:26 +01:00
2026-02-23 17:08:58 +01:00
2026-02-26 15:09:27 +01:00
2026-02-27 20:46:21 +01:00
2026-02-23 17:08:58 +01:00
2026-02-26 14:53:03 +01:00
2026-03-01 14:12:28 +01:00
2026-02-23 17:08:58 +01:00
2026-02-23 17:08:58 +01:00

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 reload
  • npm run build - Build TypeScript to JavaScript
  • npm start - Run production server
  • npm test - Run tests (not yet implemented)

License

ISC