AI-powered study app for Tunisian students — scan notes, get AI summaries/flashcards/quizzes, gamified learning, marketplace.
# EasyLearn
EasyLearn is a mobile-first learning companion built with Next.js 16, React 19, Supabase Auth/Postgres, and Groq-powered study tools.
## Requirements
- Node.js 22
- npm
- A Supabase project
- A Groq API key
## Local setup
```powershell
npm ci
Copy-Item .env.example .env.local
npm run dev
```
Fill `.env.local` with your own values. Never commit that file or paste real secret keys into source code.
Required variables:
| Variable | Visibility | Purpose |
| --- | --- | --- |
| `GROQ_API_KEY` | Server only | AI generation |
| `GROQ_VISION_MODEL` | Server only | Optional vision model override |
| `GROQ_TEXT_MODEL` | Server only | Optional text model override |
| `NEXT_PUBLIC_SUPABASE_URL` | Public | Supabase project URL |
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Public | Supabase publishable key; never use a service-role key here |
| `NEXT_PUBLIC_WHATSAPP_NUMBER` | Public | Contact/payment number |
## Quality checks
```bash
npm run check
```
This runs ESLint, TypeScript validation, and the optimized Next.js production build. GitHub Actions runs the same checks for every push and pull request.
## Supabase migration
Apply database migrations before the first production deployment:
```bash
npx supabase login
npx supabase link --project-ref YOUR_PROJECT_REF
npx supabase db push
```
The included security migration enables owner-scoped profile policies, limits browser-editable profile columns, and protects activation codes.
## Deploy with GitHub and Vercel
1. Push the repository to GitHub. Local screenshots, archives, database files, `.env.local`, and Vercel metadata are excluded by `.gitignore`.
2. Import the GitHub repository in Vercel as a Next.js project.
3. Add every variable from `.env.example` in **Vercel → Project Settings → Environment Variables**. Use separate Supabase projects or credentials for Preview and Production when possible.
4. Deploy a Preview first and verify authentication, scanning, quizzes, recordings, activation codes, and sign-o …