formatting

This commit is contained in:
lila 2026-04-10 20:20:09 +02:00
parent b3b32167c9
commit 2bcf9d7a97
7 changed files with 25 additions and 21 deletions

View file

@ -19,7 +19,7 @@ Stack: Express API, React frontend, Drizzle ORM, Postgres, Valkey, WebSockets.
The core mental model established for the entire API:
```
```text
HTTP Request
Router — maps URL + HTTP method to a controller
@ -126,7 +126,7 @@ touches the database. A service never reads `req.body`. A model never knows what
A staged ETL pipeline was built to enrich translation records with CEFR levels and
difficulty ratings:
```
```text
Raw source files
extract-*.py — normalise each source to standard JSON
@ -171,7 +171,7 @@ as a potential constraint for the distractor algorithm at high difficulty.
### Planned schemas (not yet implemented)
```
```text
QuizQuestion — prompt, optional gloss, 4 options (no correct answer)
QuizOption — optionId + text
AnswerSubmission — questionId + selectedOptionId
@ -182,7 +182,7 @@ AnswerResult — correct boolean, correctOptionId, selectedOptionId
## API Endpoints
```
```text
POST /api/v1/game/start GameRequest → QuizQuestion[]
POST /api/v1/game/answer AnswerSubmission → AnswerResult
```
@ -191,7 +191,7 @@ POST /api/v1/game/answer AnswerSubmission → AnswerResult
## Current File Structure (apps/api)
```
```text
apps/api/src/
├── app.ts — Express app, express.json() middleware
├── server.ts — starts server on PORT
@ -209,7 +209,7 @@ apps/api/src/
## Current File Structure (packages/db)
```
```text
packages/db/src/
├── db/
│ └── schema.ts — Drizzle schema (terms, translations, users, decks...)