Darija learning app
# Learn Darija
A personal Moroccan Darija speaking-practice app: log phrases after class, drill them with spaced repetition, practice live conversations with an LLM roleplay partner, and import new vocabulary straight from class slides or transcripts.
This runs entirely on your own machine — your phrases, chat history, and any audio you record stay local to you. Each person who wants to use it should set up their own copy following the steps below (it doesn't support multiple people sharing one running copy).
## Setup
### 1. Install Node.js
You need Node 20+. If you don't have it, the easiest way is nvm:
```bash
curl -o-
raw.githubusercontent.com | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
nvm install --lts
```
Check it worked: `node -v`
### 2. Install dependencies
From the project folder:
```bash
npm install
```
### 3. Set up your `.env`
Copy the example file:
```bash
cp .env.example .env
```
Then add your own Anthropic API key (needed only for Roleplay Chat and the phrase-import feature — My Phrases and Speaking Drill work without it):
1. Get a key at console.anthropic.com (pay-as-you-go; a small prepaid credit is required).
2. Open `.env` and set:
```
ANTHROPIC_API_KEY="sk-ant-your-key-here"
```
Don't commit `.env` or share your key — it's already gitignored.
### 4. Set up the database
Each person gets their own local SQLite database, seeded with the 5 default roleplay scenarios:
```bash
npx prisma migrate dev
npm run db:seed
```
## Run it
```bash
npm run dev
```
Open
localhost — it's mobile-first, so it's worth trying at phone width (or on your phone, via your computer's local network address, which `npm run dev` prints on startup).
## How it works
- **My Phrases** — add/edit/delete phrases (Arabic script + Latin transliteration + English + optional notes/tag), filter by tag. Each phrase can have your own recorded or uploaded audio attached (mic reco …