Learn anything. Prove it by teaching.
DuckLab is an AI-powered learning platform that helps you master any topic using the Feynman Technique. It builds personalized knowledge graphs, curates high-quality resources, and tests your understanding by having you "teach" concepts back to a skeptical AI duck.
- Dynamic Knowledge Graphs: Visualize any topic as a dependency graph. Nodes light up as you master concepts.
- AI-Curated Courses: Generates structured study modules with intuition, definitions, examples, and edge cases using Exa search and MiniMax LLMs.
- "Teach the Duck" Assessment: Prove your understanding by explaining concepts to an AI persona that catches jargon and probes for depth.
- Visual Learning: Rich study materials with AI-generated illustrations, Mermaid diagrams, and interactive analogies.
- Spaced Repetition: Tracks your mastery level (Confused, Getting it, Got it) and schedules reviews.
- Framework: Next.js 16 (App Router, Turbopack)
- Language: TypeScript
- Styling: Tailwind CSS v4, shadcn/ui, Framer Motion
- Database & Auth: Supabase (PostgreSQL, Auth, Storage)
- AI & Data:
- MiniMax: Text and Image generation models.
- Exa: Neural search for high-quality educational resources.
- Visualization:
react-force-graph-2d,d3-force,mermaid.
- Node.js 18+
- npm or pnpm
- A Supabase project
- API keys for MiniMax and Exa
-
Clone the repository
git clone https://github.com/yourusername/ducklab.git cd ducklab -
Install dependencies
npm install # or pnpm install -
Set up Environment Variables Create a
.envfile in the root directory and add the following keys:# Supabase NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key # AI Providers MINIMAX_API_KEY=your_minimax_key MINIMAX_GROUP_ID=your_minimax_group_id EXA_API_KEY=your_exa_key # App URL (for Auth redirects) NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Run Database Migrations Apply the SQL migrations found in
migrations/to your Supabase project (SQL Editor). -
Run the Development Server
npm run dev
Open http://localhost:3000 with your browser to see the result.
├── app/ # Next.js App Router pages and layouts
├── components/ # React components
│ ├── graph/ # Knowledge graph visualization
│ ├── study/ # Study course modules & interactive elements
│ ├── ui/ # Reusable UI components (shadcn)
│ └── ...
├── lib/ # Utilities and clients
│ ├── agents/ # AI agent logic (curriculum, scorer, etc.)
│ ├── exa/ # Exa search client
│ ├── minimax/ # MiniMax LLM & Image client
│ ├── supabase/ # Database queries & clients
│ └── schemas/ # Zod validation schemas
├── migrations/ # SQL migration files
└── public/ # Static assets
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
