No description
Find a file
2026-04-06 17:32:53 +02:00
backend Initial commit: Mathe-App Phase 1-3 2026-04-06 17:24:35 +02:00
docker Initial commit: Mathe-App Phase 1-3 2026-04-06 17:24:35 +02:00
frontend Fix: nginx.conf in frontend build context 2026-04-06 17:32:53 +02:00
.env.example Initial commit: Mathe-App Phase 1-3 2026-04-06 17:24:35 +02:00
.gitignore Initial commit: Mathe-App Phase 1-3 2026-04-06 17:24:35 +02:00
deploy.sh Initial commit: Mathe-App Phase 1-3 2026-04-06 17:24:35 +02:00
docker-compose.yml Initial commit: Mathe-App Phase 1-3 2026-04-06 17:24:35 +02:00
package.json Initial commit: Mathe-App Phase 1-3 2026-04-06 17:24:35 +02:00
README.md Initial commit: Mathe-App Phase 1-3 2026-04-06 17:24:35 +02:00

Mathe im Alltag

Mathe-Lern-App mit Gamification. Aufgaben aus dem echten Leben — Zinsen, Physik, Verkehr, Shopping und mehr.

Features

  • 7 Themenkategorien, 21 Topics, wachsender Aufgabenpool
  • XP, Level, tägliche Streaks
  • Leaderboard
  • Benutzerkonten mit JWT-Auth
  • Docker-basiert, läuft auf einem einzelnen Server

Tech-Stack

Schicht Tech
Frontend React + Vite
Backend Node.js + Express
Datenbank PostgreSQL 16
Auth JWT
Deployment docker-compose + nginx

Lokale Entwicklung

Voraussetzungen

  • Node.js 22+
  • Docker + docker-compose

Setup

# Abhängigkeiten installieren
cd frontend && npm install
cd ../backend && npm install

# Umgebungsvariablen
cp .env.example .env
# .env anpassen (DB_PASSWORD, JWT_SECRET, etc.)

# Starten
docker compose up -d

Frontend läuft auf http://localhost:3100

Backend ohne Docker

cd backend
npm run dev

Deployment

Erste Inbetriebnahme

# .env anlegen (aus .env.example)
cp .env.example .env
nano .env

# Starten (baut Images und initialisiert DB)
docker compose up -d --build

Update

git pull
docker compose down && docker compose up -d --build

NPM (Nginx Proxy Manager)

  • Domain: mathe.motocamp.de
  • Forward Hostname: 10.47.11.10
  • Forward Port: 3100
  • SSL: Let's Encrypt

Umgebungsvariablen

Variable Beschreibung
DB_HOST PostgreSQL Host (default: db)
DB_NAME Datenbankname
DB_USER Datenbankbenutzer
DB_PASSWORD Datenbankpasswort
JWT_SECRET Signierungsschlüssel für Access-Tokens
FRONTEND_URL Erlaubte CORS-Origin
PORT Backend-Port (default: 3001)

Projektstruktur

mathe-app/
├── frontend/          React+Vite App
│   └── src/
│       ├── api/       fetch-Client (kein axios)
│       ├── pages/     Seiten (Home, Login, Dashboard, TopicPage)
│       └── components/TaskCard — Aufgaben lösen
├── backend/           Express API
│   └── src/
│       ├── routes/    auth, users, topics, tasks, health
│       ├── middleware/ JWT-Auth
│       ├── db/        PostgreSQL Pool
│       └── utils/xp.js Level-Berechnung
├── docker/
│   ├── init.sql       DB-Schema + Seed-Daten
│   ├── Dockerfile.frontend
│   ├── Dockerfile.backend
│   └── nginx.conf
└── docker-compose.yml

Themen

Kategorie Topics
💰 Finanzen Zinsen & Sparen, Kredite & Raten, Rabatte & Steuern
📐 Geometrie Flächen, Volumina, Winkel & Trigonometrie
⚖️ Verhältnisse & Zeit Dreisatz, Zeitrechnung, Prozente
Physik Mechanik, Elektrizität, Wärme & Energie
💻 Informatik Binär & Hex, Dateigrößen, Algorithmen
🚗 Verkehr Fahrtzeit & Tempo, Spritverbrauch, Bremswege
🛒 Shopping Preisvergleich, Einheitspreis, Ratenkauf