AI-powered flashcard platform with spaced repetition, versus mode, and offline-first architecture.
Live: flashlearnai.witus.online
- AI Generation. Create flashcards from topics, PDFs, YouTube videos, audio files, and images (OCR).
- Spaced Repetition. SM-2 algorithm schedules reviews at optimal intervals.
- 3 Study Modes. Classic flip cards, multiple choice, type-your-answer with AI grading.
- Rich cards. Authored multiple-choice options (scored by option id) and images or video on either side with alt text, all settable through the API so any partner can build "identify the image" questions. Media uploads via a Cloudinary-backed endpoint or any partner CDN URL.
- Versus Mode. Head-to-head challenges with composite scoring (accuracy, speed, confidence, streaks) and ELO ratings.
- Offline-First. PowerSync + IndexedDB with automatic sync and conflict resolution.
- Teams & Classrooms. Study groups with join codes, shared sets, team chat, and teacher-led classrooms.
- Public API. A REST API for building on top of FlashLearnAI, including card media upload and per-student progress for partners.
- Ecosystem API for cross-product partners. Spaced-repetition and comprehension backend for any consumer-facing learning product. Learner-scoped scheduled sessions, per-standard mastery rollups, cascade-delete, and signed outbound webhooks. Powers Wanderlearn and BVC classes.
- Signed outbound webhooks. HMAC-SHA256 signed callbacks with 7-attempt exponential backoff, dead-letter, AES-256-GCM secret encryption at rest, and a self-service developer dashboard with replay.
- White-label app. Branded study platform for schools and companies (sold separately).
- Marketing & link tracking. Switchy.io short links with pixel attribution on all shared content.
- Admin dashboard. Revenue analytics, user management, content moderation, promo campaigns, SEO tools.
- Framework: Next.js 15 (App Router), React 19, TypeScript
- Database: MongoDB Atlas, Mongoose
- Auth: NextAuth.js with JWT sessions
- Payments: Stripe (subscriptions + metered billing)
- Email: Mailgun, Resend
- AI: Switchable provider layer (
lib/ai/) via the Vercel AI SDK.LLM_PROVIDERselects the text backend — Cerebras (default), OpenRouter, Mistral, Together, or Google Gemini. Image generation uses a vision provider (default Mistralmistral-small); audio stays on Gemini. - Offline: PowerSync (SQLite via wa-sqlite), IndexedDB
- Rate Limiting: Upstash Redis
- Background Jobs: Upstash QStash (delayed delivery + webhook retries)
- Hosting: Vercel
- Link Tracking: Switchy.io
- Node.js 18+
- MongoDB database
- Mailgun account
git clone https://github.com/dapperAuteur/flashlearn-ai.git
cd flashlearn-ai
cp .env.sample .env.local # Configure your environment variables
npm install
npm run devOpen http://localhost:3000.
See .env.sample for the full annotated set. Required minimums for local dev:
MONGODB_URI= # MongoDB connection string
NEXTAUTH_SECRET= # openssl rand -base64 32
NEXTAUTH_URL= # http://localhost:3000
LLM_PROVIDER=cerebras # Text AI backend: cerebras | openrouter | mistral | together | gemini
CEREBRAS_API_KEY= # Key for the selected LLM_PROVIDER (CEREBRAS_/OPENROUTER_/MISTRAL_/TOGETHER_API_KEY)
LLM_VISION_PROVIDER=mistral # Provider for image flashcards (text-only providers can't accept images)
GEMINI_API_KEY_PUBLIC= # Google Gemini key — still required for audio flashcards + as fallback
UPSTASH_REDIS_REST_URL= # Rate limiting + webhook milestone dedupe
UPSTASH_REDIS_REST_TOKEN=
STRIPE_SECRET_KEY= # Stripe secret key
MAILGUN_API_KEY= # Mailgun API key
MAILGUN_DOMAIN= # Your Mailgun domain
SWITCHY_API_TOKEN= # Switchy.io API token
SWITCHY_DOMAIN= # Custom short link domain
CRON_SECRET= # openssl rand -hex 32 (for Vercel Cron)Required for ecosystem outbound webhooks and delayed session scheduling:
WEBHOOK_ENCRYPTION_KEY= # openssl rand -hex 32 (AES-256-GCM key for per-endpoint signing secrets)
UPSTASH_QSTASH_TOKEN= # Upstash QStash publishing token
UPSTASH_QSTASH_CURRENT_SIGNING_KEY= # For verifying QStash callbacks
UPSTASH_QSTASH_NEXT_SIGNING_KEY= # For zero-downtime signing-key rotation| Plan | Price |
|---|---|
| Free | $0 (limited AI generations) |
| Monthly Pro | $10.60/month |
| Lifetime Learner | $103.29 one-time (first 100 users) |
Two key types share the tier table. Choose based on your use case:
- Public (
fl_pub_). For apps building on top of FlashLearnAI (study apps, LMS integrations). - Ecosystem (
fl_eco_). For cross-product partners using FlashLearnAI as their backend. Two paths: the child/curriculum flow (learner-scoped sessions, mastery, cascade-delete, signed webhooks) and the standard Sets + Study API for authored decks with per-student progress viaexternalStudentId. Admin-issued.
| Tier | Price | Generations/mo | API calls/mo | Burst/min |
|---|---|---|---|---|
| Free | $0 | 100 (public) / 1,000 (ecosystem) | 1,000 / 10,000 | 10 / 60 |
| Developer | $19/mo | 5,000 / 10,000 | 50,000 / 100,000 | 60 / 120 |
| Pro | $49/mo | 25,000 / 50,000 | 250,000 / 500,000 | 120 / 300 |
| Enterprise | Custom | Unlimited | Unlimited | 300 / 600 |
| License | Price |
|---|---|
| Standard | $499 one-time (1 domain) |
| School & Enterprise | $999/year (unlimited domains, priority support) |
- API Getting Started
- Interactive API Reference. All 27 endpoints.
- Ecosystem API (cross-product partners)
- Webhooks. Signing, retry, replay.
- Roadmap
- Changelog
- Help Center
Proprietary. All rights reserved.
White-Label Starter App (standalone/flashlearn-starter/) is sold under a commercial license. See white-label pricing.
A WitUS.Online product by B4C LLC.