A personalized language learning platform powered by AI, built with Next.js, Supabase, and OpenAI.
Discens started as a 48-hour hackathon prototype. The goal was to explore how AI, spaced repetition, and voice interaction can support language learning in a practical product workflow.
The project focuses on rapid product execution, clear UX flows, and integration of modern web and AI tooling. It combines Next.js, Supabase, OpenAI, ElevenLabs, and FSRS-based spaced repetition to support personalized learning, AI-generated quizzes, and voice-based practice.
It was developed and improved with Cursor, which sped up scaffolding, implementation exploration, refactoring, and documentation. However, final decisions, review, testing, and product trade-offs continued to be guided by humans.
- Rapid full-stack product development under time constraints
- AI feature integration with OpenAI and ElevenLabs
- User authentication and data persistence with Supabase
- FSRS-based spaced repetition for review scheduling
- Modern frontend implementation with Next.js and Tailwind CSS
- Practical use of coding agents in a real product prototype
- Product thinking around onboarding, learning sessions, review flows, and progress tracking
This project is a hackathon-origin prototype, not a polished commercial product. Some flows were refined after the initial build, but the main value of the project is demonstrating fast execution, product architecture, AI integration, AI-assisted development workflow, and frontend/backend implementation.
- Add stronger test coverage for core learning flows
- Improve observability for AI-generated content
- Add better guardrails for hallucinated quiz content
- Polish onboarding and subscription flows
- Add E2E tests for review and conversation sessions
- Improve deployment and environment setup documentation
- π§ 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/itisAliRH/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