chore: rename project from glossa to lila
- Update all package names from @glossa/* to @lila/* - Update all imports, container names, volume names - Update documentation references - Recreate database with new credentials
This commit is contained in:
parent
1699f78f0b
commit
3f7bc4111e
37 changed files with 116 additions and 182 deletions
|
|
@ -1,4 +1,4 @@
|
|||
# Glossa — Roadmap
|
||||
# lila — Roadmap
|
||||
|
||||
Each phase produces a working increment. Nothing is built speculatively.
|
||||
|
||||
|
|
@ -28,6 +28,7 @@ Each phase produces a working increment. Nothing is built speculatively.
|
|||
**Done when:** API returns quiz sessions with distractors, error handling and tests in place.
|
||||
|
||||
### Data pipeline
|
||||
|
||||
- [x] Run `extract-en-it-nouns.py` locally → generates JSON
|
||||
- [x] Write Drizzle schema: `terms`, `translations`, `term_glosses`, `decks`, `deck_terms`
|
||||
- [x] Write and run migration (includes CHECK constraints)
|
||||
|
|
@ -37,11 +38,13 @@ Each phase produces a working increment. Nothing is built speculatively.
|
|||
- [x] Expand data pipeline — import all OMW languages and POS
|
||||
|
||||
### Schemas
|
||||
|
||||
- [x] Define `GameRequestSchema` in `packages/shared`
|
||||
- [x] Define `AnswerOption`, `GameQuestion`, `GameSession`, `AnswerSubmission`, `AnswerResult` schemas
|
||||
- [x] Derived types exported from constants (`SupportedLanguageCode`, `SupportedPos`, `DifficultyLevel`)
|
||||
|
||||
### Model layer
|
||||
|
||||
- [x] `getGameTerms()` with POS / language / difficulty / limit filters
|
||||
- [x] Double join on `translations` (source + target language)
|
||||
- [x] Gloss left join
|
||||
|
|
@ -49,21 +52,25 @@ Each phase produces a working increment. Nothing is built speculatively.
|
|||
- [x] Models correctly placed in `packages/db`
|
||||
|
||||
### Service layer
|
||||
|
||||
- [x] `createGameSession()` — fetches terms, fetches distractors, shuffles options, stores session
|
||||
- [x] `evaluateAnswer()` — looks up session, compares submitted optionId to stored correct answer
|
||||
- [x] `GameSessionStore` interface + `InMemoryGameSessionStore` (swappable to Valkey)
|
||||
|
||||
### API endpoints
|
||||
|
||||
- [x] `POST /api/v1/game/start` — route, controller, service
|
||||
- [x] `POST /api/v1/game/answer` — route, controller, service
|
||||
- [x] End-to-end pipeline verified with test script
|
||||
|
||||
### Error handling
|
||||
|
||||
- [x] Typed error classes: `AppError`, `ValidationError` (400), `NotFoundError` (404)
|
||||
- [x] Central error middleware in `app.ts`
|
||||
- [x] Controllers cleaned up: validate → call service → `next(error)` on failure
|
||||
|
||||
### Tests
|
||||
|
||||
- [x] Unit tests for `createGameSession` (question shape, options, distractors, gloss)
|
||||
- [x] Unit tests for `evaluateAnswer` (correct, incorrect, missing session, missing question)
|
||||
- [x] Integration tests for both endpoints via supertest (200, 400, 404)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue