A learning app that mixes the Duolingo and Quizlet styles: varied, bite-sized exercises on top of a spaced repetition system (SRS), with light gamification. Built with Next.js 16, TypeScript, and Turso database. Features AI-powered item generation and Pro subscription plans. Available in English and German.
A deck holds items of nine types. The app turns each item into fitting exercises:
| Item | Exercises |
|---|---|
| Question & answer | Multiple choice, match pairs, type the answer, self-graded flashcard |
| Multiple choice | Single or "select all" choice |
| Cloze | Fill the blanks from a word bank, then type the missing word |
| Passage | Build the sentence from tiles, then type the first letter of each word |
| List | Name every member of a set in any order |
| Sequence | Put steps or events in order |
| Number | Multiple choice, then type the number with tolerance and higher/lower hints |
| Pairs | Match terms and their counterparts |
| Diagram | Label markers on an uploaded image, then tap the right spot |
- Spaced Repetition: SuperMemo-2 schedules every item, and each exercise maps to an SM-2 grade
- Mastery Stages: Items move from New to Learning, Familiar and Mastered. Exercises get harder with each stage (recognition first, then recall)
- Mistakes Come Back: A missed exercise returns later in the same session
- Four Modes per Deck: Learn (adaptive), Flashcards (classic flip cards), Match (timed game with personal best) and Practice test (no effect on the schedule)
- XP and Daily Goal: Earn XP per exercise with combo bonuses and pick a daily goal
- Streaks: Timezone-aware day streak with one streak freeze
- Achievements: 13 badges for milestones
- Progress: Mastery bars, activity heatmap and an end-of-session summary
- AI Item Generation: Create items of mixed types from text prompts or PDF documents
- Intelligent Content Processing: Automatically extract key concepts and definitions
- Quality Validation: AI-generated content is validated for educational value
- Unlimited AI Generation: Pro users get unlimited AI flashcard creation
- Advanced Features: Enhanced study modes and detailed analytics
- Secure Billing: Powered by Stripe with automatic payment recovery
- Deck Management: Organize flashcards into themed collections
- Import and Export: JSON import and export of all item types (classic
{ front, back }cards still work) - Multi-language Support: Available in English and German
- Responsive Design: Works seamlessly on desktop and mobile
- Node.js 22.12+ and pnpm
- Turso database
- Resend for emails
- Google AI API key (for AI features)
- Stripe account (for subscriptions)
Create .env.local from .env.local.example:
# Core Configuration
NEXT_PUBLIC_SITE_URL="http://localhost:3000"
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-secret-key"
# Database
DATABASE_URL="your-turso-url"
DATABASE_AUTH_TOKEN="your-turso-token"
# Email Service
RESEND_API_KEY="your-resend-key"
EMAIL_FROM="learn@yourdomain.com"
# AI Features (Optional)
GOOGLE_GENERATIVE_AI_API_KEY="your-google-ai-key"
GOOGLE_AI_MODEL="gemini-3-flash-preview" # optional, model for AI generation
# Stripe Subscriptions (Optional)
STRIPE_SECRET_KEY="your-stripe-secret-key"
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="your-stripe-publishable-key"
STRIPE_WEBHOOK_SECRET="your-webhook-secret"
# Rate Limiting (Optional)
REDIS_URL="your-redis-url"
# Diagram images and PDF upload for AI generation (Optional, public Vercel Blob store)
BLOB_READ_WRITE_TOKEN="your-blob-token"- Clone and install dependencies:
git clone https://github.com/Fx64b/learn.git
cd learn
pnpm install- Set up the database:
pnpm db:migrate- Start development server:
pnpm devVisit http://localhost:3000 to start learning!
- Framework: Next.js 16 with App Router
- Language: TypeScript with strict type checking
- Database: Turso (LibSQL) with Drizzle ORM
- Authentication: NextAuth.js
- UI Components: shadcn/ui with Tailwind CSS
- AI Integration: Google AI (Gemini)
- Payments: Stripe
- Email: Resend
- Deployment: Vercel
Manual Creation:
- Create a new deck or select an existing one
- Pick an item type and fill in its form. Use the preview to see the exercise
- Start learning immediately
AI Generation (Pro Feature):
- Open a deck and click the "AI" tab
- Enter a topic and optionally upload a PDF document
- Choose the item types the AI may use
- The AI picks the best fitting type for each piece of knowledge
- Open a deck and choose Learn, Flashcards, Match or Practice test, or use "Continue learning" on the dashboard for all due items
- Answer the exercises. Missed ones come back later in the session
- The SRS adjusts future review intervals automatically
- Track XP, streak, mastery and achievements on the dashboard and in your profile
- Free Plan: Basic flashcard functionality
- Pro Plan: Unlimited AI generation, priority support
- Billing: Secure payment processing with automatic recovery
- Build the project:
pnpm build- Set production environment variables
- Start the server:
pnpm start(Docker support is planned for future releases)
- Vercel Analytics: Automatic performance monitoring
- Rate Limit Status: Monitor API usage
- Database Metrics: Available through Turso dashboard
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to your fork
- Submit a pull request
MIT License - see LICENSE for details
- Issues: GitHub Issues
- Email: learn@fx64b.dev
- Documentation: Coming soon
- Technical Documentation: fx64b.dev/projects/flashcard-app
- shadcn/ui for the component library
- Turso for the database platform
- Resend for email infrastructure
- Google AI for AI-powered features
- Stripe for secure payment processing
- The spaced repetition algorithm is based on SuperMemo-2
Built with ❤️ by Fx64b
