A personalized language learning platform powered by AI, built with Next.js, Supabase, and OpenAI.
- 🧠 Memory-based Learning: Personalized vocabulary and grammar storage
- 🗣️ AI Conversations: Practice real-world scenarios with voice or text
- 📚 Smart Reviews: Spaced repetition using FSRS algorithm
- 🎯 Adaptive Quizzes: AI-generated exercises based on your level
- 🌍 Multi-language: Support for English and German
- 🎨 Beautiful UI: Dark/light mode with modern design
- 🔊 Voice Support: ElevenLabs integration for realistic conversations
- 📊 Progress Tracking: Streaks, badges, and XP system
- Framework: Next.js 16 with App Router
- Language: TypeScript
- Database: Supabase (PostgreSQL)
- Authentication: Supabase Auth (Google, Apple, Email)
- AI: OpenAI GPT-4o & GPT-4o-mini
- Voice: ElevenLabs API
- Styling: Tailwind CSS v4
- Icons: React Icons (Lucide)
- Spaced Repetition: ts-fsrs
- Node.js 20 or higher
- npm or yarn
- A Supabase account
- An OpenAI API key
- (Optional) ElevenLabs API key for voice features
- Clone the repository
git clone https://github.com/yourusername/discens.git
cd discens- Install dependencies
npm install- Set up environment variables
Copy env.example to .env.local and fill in your credentials:
cp env.example .env.localRequired environment variables:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key
# ElevenLabs Configuration (Optional - for voice conversations)
ELEVENLABS_API_KEY=your_elevenlabs_api_key
# App Configuration
NEXT_PUBLIC_APP_URL=http://localhost:3000- Set up Supabase
- Create a new Supabase project
- Run the migrations in
supabase/migrations/folder - Configure authentication providers (Google, Apple, Email)
- Add your local URL to redirect URLs:
http://localhost:3000/callback
- Run the development server
npm run devOpen http://localhost:3000 to see the app.
See our comprehensive Cloudflare Deployment Guide for step-by-step instructions on deploying to Cloudflare Pages via the dashboard. No GitHub Actions required - just connect your repo and deploy!
- Click the button above or go to Vercel
- Import your repository
- Add environment variables (same as
.env.local) - Deploy!
discens/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── (auth)/ # Authentication pages
│ │ ├── (main)/ # Main app pages (dashboard, learn, etc.)
│ │ └── api/ # API routes
│ ├── components/ # React components
│ │ └── ui/ # UI components
│ ├── lib/ # Utilities and configurations
│ │ ├── ai/ # AI providers and logic
│ │ ├── auth/ # Authentication hooks
│ │ ├── fsrs/ # Spaced repetition logic
│ │ └── supabase/ # Supabase client configs
│ └── types/ # TypeScript types
├── supabase/
│ └── migrations/ # Database migrations
├── public/ # Static assets
└── docs/ # Documentation
The core of Discens is the "Memory" - a personalized database of words, phrases, and grammar rules that grows as you learn. Each material has:
- Mastery level (0-5)
- CEFR level (A1-C2)
- Categories (travel, work, food, etc.)
- Examples and synonyms
- FSRS review scheduling
Practice real-world scenarios with AI characters:
- Café ordering
- Doctor appointments
- Job interviews
- And more!
Choose voice or text mode, with background ambiance for immersion.
Uses the FSRS (Free Spaced Repetition Scheduler) algorithm to show you materials at optimal intervals for retention.
- Daily streaks
- XP and levels
- Badges for achievements
- Gems system (future: marketplace)
npm testnpm run lintnpm run buildnpx supabase gen types typescript --project-id YOUR_PROJECT_ID > src/types/database.tsContributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes using Conventional Commits (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
- 📧 Email: support@discens.app
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- Built for the Hamburg Cursor Hackathon
- Powered by OpenAI and ElevenLabs
- UI inspired by modern language learning apps
- FSRS algorithm by Jarrett Ye
Made with ❤️ by the Discens Team