|
1 | | -# HablaFlow (spanish-open-source) |
| 1 | +# Lumbre |
2 | 2 |
|
3 | | -Open-source Spaanse leerapp met Duolingo-achtige mechanics, gebouwd met Next.js App Router + TypeScript + Tailwind + Drizzle + PostgreSQL + Docker. |
| 3 | +Lumbre is an open-source Spanish learning platform (Next.js + TypeScript + Drizzle + PostgreSQL) with a curriculum-first exercise engine, SM-2 SRS, XP/streak progression, and Docker support. |
4 | 4 |
|
5 | | -## Features |
6 | | -- 120 lessen (A1/A2) |
7 | | -- 2640 zinnen (offline seedbaar) |
8 | | -- 10 exercise types |
9 | | -- XP + streak + SM-2 SRS |
10 | | -- Admin panel (`/admin`) |
11 | | -- Vocabulary browser (`/vocab`) |
12 | | -- API endpoints voor progress en admin |
| 5 | +## Why the name? |
| 6 | +**Lumbre** means flame/glow. The product focus is steady mastery and momentum, not gamified noise. |
13 | 7 |
|
14 | | -## Local run |
| 8 | +## Core capabilities |
| 9 | +- 120 lessons (A1/A2) |
| 10 | +- 2640 seeded sentences |
| 11 | +- 10 supported exercise types |
| 12 | +- XP + streak + SM-2 SRS progression |
| 13 | +- Admin panel (`/admin`) and vocabulary browser (`/vocab`) |
| 14 | +- Resilient API surface (`/api/health`, `/api/progress`, `/api/streak`, `/api/srs/review`, `/api/lesson/[slug]`) |
| 15 | + |
| 16 | +## Local development |
15 | 17 | ```bash |
| 18 | +cp .env.example .env |
16 | 19 | npm install |
17 | 20 | npm run lint |
18 | 21 | npm run test |
19 | 22 | npm run build |
20 | | -docker build -t spanish-open-source . |
| 23 | +npm run dev |
| 24 | +``` |
| 25 | + |
| 26 | +## Production-like run (with DB migrate + seed on startup) |
| 27 | +```bash |
21 | 28 | docker compose up --build |
22 | 29 | ``` |
23 | 30 |
|
24 | | -## Database |
| 31 | +This starts: |
| 32 | +- `lumbre-db` (PostgreSQL 16) |
| 33 | +- `lumbre-app` (Next.js app) |
| 34 | + |
| 35 | +The app startup path automatically runs: |
| 36 | +1. `npm run db:migrate` (with DB readiness retries) |
| 37 | +2. `npm run db:seed` |
| 38 | +3. `next start` |
| 39 | + |
| 40 | +## API quick checks |
25 | 41 | ```bash |
26 | | -cp .env.example .env |
27 | | -npm run db:generate |
28 | | -npm run db:migrate |
29 | | -npm run db:seed |
| 42 | +curl http://localhost:3000/api/health |
| 43 | +curl -X POST http://localhost:3000/api/progress -H 'content-type: application/json' -d '{"correct":8,"total":10,"quality":4,"streak":3}' |
| 44 | +curl -X POST http://localhost:3000/api/streak -H 'content-type: application/json' -d '{"streak":4,"lastActiveAt":"2026-03-01T00:00:00.000Z"}' |
30 | 45 | ``` |
31 | 46 |
|
32 | | -## Offline curriculum artifact |
| 47 | +## Known limits |
| 48 | +- Current curriculum text is synthetic and not CEFR-reviewed by native teachers yet. |
| 49 | +- Startup migrates/seeds each container boot by design (safe via conflict handling, but slower cold starts). |
| 50 | +- No auth layer yet; admin APIs/pages are currently open in local/dev setups. |
| 51 | + |
| 52 | +## Useful scripts |
33 | 53 | ```bash |
| 54 | +npm run lint |
| 55 | +npm run test |
| 56 | +npm run build |
| 57 | +npm run db:generate |
| 58 | +npm run db:migrate |
| 59 | +npm run db:seed |
34 | 60 | npm run seed:offline |
35 | 61 | ``` |
0 commit comments