Skip to content

Commit 8028ef4

Browse files
authored
Merge pull request bbwheroes#28 from bbwheroes/refactor/clean_up_readmes
Cleanup READMEs
2 parents 3bd0f51 + c7e0256 commit 8028ef4

6 files changed

Lines changed: 540 additions & 551 deletions

File tree

CONTRIBUTING.md

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
# Contributing / Development Setup
2+
3+
## Voraussetzungen
4+
5+
- [Node.js](https://nodejs.org/) (für Frontend)
6+
- [Bun](https://bun.sh/) (für Backend)
7+
- [PostgreSQL](https://www.postgresql.org/) oder Docker
8+
9+
## Installation
10+
11+
### 1. Repository klonen und Dependencies installieren
12+
13+
```bash
14+
git clone https://github.com/bbwheroes/324-ruts-ipa_noten_rechner-jannismilz
15+
cd 324-ruts-ipa_noten_rechner-jannismilz
16+
17+
# Frontend Dependencies
18+
npm --prefix ./frontend install ./frontend
19+
20+
# Backend Dependencies
21+
bun install --cwd ./backend
22+
```
23+
24+
### 2. Umgebungsvariablen konfigurieren
25+
26+
```bash
27+
cp frontend/.env.example frontend/.env
28+
cp backend/.env.example backend/.env
29+
```
30+
31+
Passe die `.env` Dateien nach Bedarf an (Datenbank-Verbindung, JWT Secret, etc.).
32+
33+
### 3. Datenbank einrichten
34+
35+
```bash
36+
cd backend
37+
bun run migrate # Datenbank-Migrationen ausführen
38+
bun run seed # (Optional) Testdaten einfügen
39+
```
40+
41+
### 4. Benutzer erstellen
42+
43+
```bash
44+
cd backend
45+
bun run create-user
46+
```
47+
48+
Interaktives CLI zum Erstellen eines neuen Benutzers.
49+
50+
## Development Server starten
51+
52+
### Backend
53+
54+
```bash
55+
cd backend
56+
bun run dev # Mit Hot Reload auf Port 3001
57+
# oder
58+
bun run start # Produktionsmodus
59+
```
60+
61+
### Frontend
62+
63+
```bash
64+
cd frontend
65+
npm run dev # Vite Dev Server auf Port 5173
66+
```
67+
68+
## Docker
69+
70+
Alternativ kann das Backend mit PostgreSQL via Docker gestartet werden:
71+
72+
```bash
73+
docker-compose up -d # Starten
74+
docker-compose down # Stoppen
75+
```
76+
77+
## Linting & Formatting
78+
79+
### Frontend
80+
81+
```bash
82+
cd frontend
83+
npm run lint # Fehler prüfen
84+
npm run lint:fix # Fehler automatisch beheben
85+
npm run format # Code formatieren
86+
npm run format:check # Formatierung prüfen
87+
```
88+
89+
### Backend
90+
91+
```bash
92+
cd backend
93+
bun run lint # Fehler prüfen
94+
bun run lint:fix # Fehler automatisch beheben
95+
bun run format # Code formatieren
96+
bun run format:check # Formatierung prüfen
97+
```
98+
99+
## Tests ausführen
100+
101+
### Backend
102+
103+
```bash
104+
cd backend
105+
bun test # Alle Tests
106+
bun test --watch # Watch Mode
107+
```
108+
109+
### Frontend
110+
111+
```bash
112+
cd frontend
113+
npm run test # Unit & Integration Tests
114+
npm run test:e2e # E2E Tests (Playwright)
115+
npm run test:e2e:ui # E2E Tests mit UI
116+
```
117+
118+
Siehe [Testkonzept](./docs/TESTKONZEPT.md) für Details.
119+
120+
## API Endpoints
121+
122+
| Endpoint | Methode | Beschreibung | Auth |
123+
|----------|---------|--------------|------|
124+
| `/api/auth/login` | POST | Benutzer anmelden | - |
125+
| `/api/users/profile` | GET | Profil abrufen ||
126+
| `/api/users/profile` | PUT | Profil aktualisieren ||
127+
| `/api/evaluations/criteria` | GET | Kriterienkatalog laden | - |
128+
| `/api/evaluations` | GET | Evaluierungen abrufen ||
129+
| `/api/evaluations/:id` | POST | Evaluierung speichern ||
130+
| `/api/evaluations/calculate` | GET | Noten berechnen ||
131+
132+
Authentifizierung erfolgt via JWT Token im `Authorization: Bearer <token>` Header.
133+
134+
## Projektstruktur
135+
136+
```
137+
├── backend/
138+
│ ├── src/
139+
│ │ ├── db/ # Datenbank (Migrations, Seeds)
140+
│ │ ├── middleware/ # Express Middleware
141+
│ │ ├── routes/ # API Routes
142+
│ │ └── test/ # Backend Tests
143+
│ └── Dockerfile
144+
├── frontend/
145+
│ ├── src/
146+
│ │ ├── components/ # React Komponenten
147+
│ │ ├── context/ # React Context (Auth)
148+
│ │ ├── pages/ # Seiten-Komponenten
149+
│ │ ├── services/ # API & Storage Services
150+
│ │ └── test/ # Frontend Tests
151+
│ ├── e2e/ # Playwright E2E Tests
152+
│ └── Dockerfile
153+
├── shared/ # Geteilter Code (Notenberechnung)
154+
├── docs/ # Dokumentation
155+
└── criterias.json # Kriterienkatalog
156+
```
157+
158+
## Git Workflow
159+
160+
1. Feature-Branch erstellen: `git checkout -b feature/mein-feature`
161+
2. Änderungen committen mit aussagekräftigen Messages
162+
3. Pull Request erstellen
163+
4. Code Review abwarten
164+
5. Nach Approval: Merge in `main`
165+
166+
## CI/CD
167+
168+
Bei jedem Push werden automatisch ausgeführt:
169+
- Linting (ESLint, Prettier)
170+
- Backend Tests (Bun)
171+
- Frontend Tests (Vitest)
172+
- E2E Tests (Playwright)
173+
- Deployment auf Staging (bei erfolgreichem Build)

README.md

Lines changed: 42 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,64 @@
11
# IPA Noten Rechner
22

3-
Die Voraussetzungen für dieses Projekt sind zum Teil in [Projektbeschreibung](Projektbeschreibung.html) beschrieben.
3+
Eine Web-Applikation zur Selbstbewertung anhand des offiziellen [IPA Kriterienkatalogs](https://www.ict-berufsbildung.ch/resources/Kriterienkatalog_QV_BiVO2021_DE-20251025.pdf).
44

5-
**Zudem soll folgendes implementiert werden:**
6-
- Optionale Authentifizierung/Login (nur für uns, keine Registrierung möglich)
7-
- Onboarding (optional nach Anmeldung) soll kommen, wenn Personendaten noch nicht erfasst wurden
8-
- Hybridge Datenspeicherung (wenn angemeldet, über API in DB und sonst im LocalStorage mit Export funktion)
9-
- Es wird ein langer Kriterienkatalog zusammengetragen in einer JSON Datei, welche dann angezeigt wird
10-
- Jedes Kriterium soll in seine Kategorien eingeteilt werden
11-
- Jedes Kriterium und jede Kategorie soll zusammenklappbar sein
12-
- Am Anfang dieses Formulars soll eine kleine Übersicht sein, die den Fortschritt anzeigt und den Fortschritt in die Kategorien aufteilt
13-
- Es soll möglich sein, die Noten live anzusehen in der Übersicht am Anfang
5+
## Features
146

15-
## Get Started
7+
- 📋 Vollständiger Kriterienkatalog mit allen Bewertungskriterien
8+
- 📊 Live-Notenberechnung mit Fortschrittsanzeige
9+
- 💾 Hybride Datenspeicherung (LocalStorage oder Datenbank)
10+
- 🔐 Optionale Authentifizierung
11+
- 📤 Export/Import Funktionalität
12+
- 🎯 Unterstützung für Agile und Lineare Projektmethoden
1613

17-
Dependencies for
18-
```
19-
npm, bun
20-
```
14+
## Quick Start
2115

22-
Install
23-
24-
1. Clone and Install
2516
```bash
17+
# Repository klonen
2618
git clone https://github.com/bbwheroes/324-ruts-ipa_noten_rechner-jannismilz
27-
npm --prefix ./frontend install ./frontend && bun install --cwd ./backend
28-
```
19+
cd 324-ruts-ipa_noten_rechner-jannismilz
2920

21+
# Dependencies installieren
22+
npm --prefix ./frontend install ./frontend
23+
bun install --cwd ./backend
3024

31-
2. Copy .env examples
32-
```bash
33-
cp frontend/.env.example frontend/.env && cp backend/.env.example backend/.env
34-
```
25+
# Umgebungsvariablen konfigurieren
26+
cp frontend/.env.example frontend/.env
27+
cp backend/.env.example backend/.env
3528

36-
3. Run database migrations:
37-
```bash
38-
bun run migrate
39-
```
29+
# Datenbank einrichten
30+
cd backend && bun run migrate
4031

41-
4. (Optional) Seed the database:
42-
```bash
43-
bun run seed
32+
# Server starten
33+
bun run dev # Backend (Port 3001)
34+
cd ../frontend && npm run dev # Frontend (Port 5173)
4435
```
4536

46-
read more in [backend README](./backend/README.md)
47-
48-
Start
37+
Für detaillierte Anweisungen siehe [CONTRIBUTING.md](./CONTRIBUTING.md).
4938

50-
Für Backend
51-
```bash
52-
cd backend
53-
bun start
54-
```
39+
## Dokumentation
5540

56-
Es läuft auf localhost:3001
41+
| Dokument | Beschreibung |
42+
|----------|--------------|
43+
| [CONTRIBUTING.md](./CONTRIBUTING.md) | Setup, Development, API Endpoints |
44+
| [Kriterienkatalog Spezifikation](./docs/KRITERIENKATALOG.md) | JSON-Format des Kriterienkatalogs |
45+
| [Testkonzept](./docs/TESTKONZEPT.md) | Teststrategie, Testfälle, Abdeckung |
46+
| [KI-Nutzung](./docs/KI_NUTZUNG.md) | Dokumentation der KI-Unterstützung |
47+
| [Backend README](./backend/README.md) | Backend-spezifische Dokumentation |
5748

49+
## Projektstruktur
5850

59-
Für Frontend
60-
```bash
61-
cd backend
62-
npm run dev
6351
```
64-
65-
Es läuft auf localhost:5173
66-
67-
68-
## Linter & Formatter
69-
70-
*Frontend:*
71-
```bash
72-
npm run lint # Check for errors
73-
npm run lint:fix # Auto-fix errors
74-
npm run format # Format code
75-
npm run format:check # Check formatting
76-
```
77-
78-
*Backend:*
79-
```bash
80-
bun run lint # Check for errors
81-
bun run lint:fix # Auto-fix errors
82-
bun run format # Format code
83-
bun run format:check # Check formatting
84-
```
85-
86-
## Kriterienkatalog Spezifikation
87-
88-
Für den [offiziellen Kriterienkatalog](https://www.ict-berufsbildung.ch/resources/Kriterienkatalog_QV_BiVO2021_DE-20251025.pdf).
89-
90-
```json
91-
{
92-
"categories_with_weigth": [
93-
{
94-
"id": "hkb", // Eindeutige ID
95-
"name": "Handlungskompetenzen",
96-
"weight": 0.5, // 50% Gewichtung
97-
"part": "Teil 1" // Teil 1 oder 2 für die Notenberechnung
98-
},
99-
],
100-
"criterias": [
101-
{
102-
"id": "A01", // Eindeutige ID
103-
// id aus categories_with_weigth
104-
"category": "hkb",
105-
"title": "Auftragsanalyse und Wahl einer Projektmethode",
106-
"subtitle": "Wie erfolgt die Auftragsanalyse? Welche Projektmethode kommtzum Einsatz?",
107-
"selection": "multiple", // multiple (checkbox), single (radio)
108-
// Selbe Reihenfolge wie im Kriterienkatalog
109-
"requirements": [
110-
"Der Projektauftrag wurde analysiert und die Erkenntnisse mittels geeigneter Darstellungsmethoden (z. B. Zielstruktur, Use-Case- oder Kontextdiagramm, Anforderungstabelle) schriftlich dokumentiert.",
111-
"Dokumentation aus Punkt 1 liefert die Grundlage, um die Projektziele konsequent zu verfolgen.",
112-
"Eine zur Aufgabe passende Projektmethode wurde ausgewählt.",
113-
"Die Wahl der Projektmethode ist nachvollziehbar und schriftlich begründet."
114-
],
115-
"stages": {
116-
// Gütestufe 3
117-
"3": {
118-
// Alle Felder sind optional, aber es muss mindestens ein Feld definiert sein
119-
"all": true, // Alle Bedingungen erfüllt
120-
"count": 1, // 1 Bedingung erfüllt
121-
"counts": [2, 3], // 2 oder 3 Bedingungen erfüllt
122-
"count_less_than": 2, // Weniger als 2 Bedingungen erfüllt
123-
"must": 4 // Genau Bedingung 4 erfüllt
124-
},
125-
// ...
126-
"0": {
127-
// ...
128-
}
129-
}
130-
}
131-
// ...
132-
]
133-
}
52+
├── backend/ # Express.js API mit Bun
53+
├── frontend/ # React + Vite
54+
├── shared/ # Geteilte Logik (Notenberechnung)
55+
├── docs/ # Dokumentation
56+
└── criterias.json # Kriterienkatalog
13457
```
13558

136-
### Validierung
59+
## Tech Stack
13760

138-
```bash
139-
bun run helpers/validate-criterias.js
140-
```
61+
- **Frontend:** React, Vite, Lucide Icons
62+
- **Backend:** Express.js, Bun, PostgreSQL
63+
- **Testing:** Bun Test, Vitest, Playwright
64+
- **CI/CD:** GitHub Actions, Docker

0 commit comments

Comments
 (0)