Powered by advanced AI models β’ SM-2 Spaced Repetition β’ Real-time Analytics
git clone https://github.com/kinshukkush/recallai.git
cd recallai
npm install
npm run devOpen http://localhost:3000 in your browser.
| Feature | Description |
|---|---|
| π PDF Upload & Parsing | Drag and drop any PDF β textbooks, notes, papers with automatic text extraction |
| π€ AI Flashcard Generation | Advanced AI creates targeted Q&A with dynamic difficulty levels |
| π Active Recall Practice | Animated 3D flip cards test your knowledge one question at a time |
| β‘ Spaced Repetition (SM-2) | Proven algorithm schedules reviews at optimal intervals |
| π Progress Dashboard | Track mastery, weak spots, and cards due today with beautiful analytics |
| π‘ "Explain Better" AI Mode | Ask AI to simplify complex answers with plain language |
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RecallAI Processing Pipeline β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β [PDF Upload] β [Parse & Extract] β [AI Generation] β
β β β
β [Supabase DB] β
β β β
β [Review Practice] β [SM-2 Algorithm] β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
RecallAI leverages Ollama with Gemma-4 for local, privacy-first AI processing:
- π Privacy: All processing happens locally on your machine
- β‘ Performance: Lightning-fast inference with optimized models
- π° Cost-effective: No expensive API calls
- π― Specialized: Fine-tuned for reasoning and code generation
-
Install Ollama from ollama.ai
-
Pull the Gemma-4 model:
ollama pull gemma4
-
Alternative models available:
ollama pull gemma4:26b # Mixture of Experts (4B active) ollama pull gemma4:e4b # Efficient 4B variant ollama pull gemma4:e2b # Efficient 2B variant (mobile)
-
Run with Claude Code (optional IDE integration):
ollama launch claude --model gemma4
-
Environment Configuration:
# .env.local OLLAMA_API_URL=http://localhost:11434 OLLAMA_MODEL=gemma4
| Model | Size | Context | Best For |
|---|---|---|---|
| gemma4:latest | 9.6GB | 128K | Balanced performance |
| gemma4:26b | 18GB | 256K | High-quality output |
| gemma4:31b | 20GB | 256K | Frontier performance |
| gemma4:e4b | 7.2GB | 128K | Efficient inference |
| gemma4:e2b | 5.1GB | 128K | Mobile/Edge devices |
β
Reasoning - Multi-step problem solving
β
Coding - Generate and explain code
β
Vision - Image understanding (supported models)
β
Audio - Audio processing (supported models)
β
Tools - Native function-calling support
β
Native System Prompts - Structured conversations
| Benchmark | Gemma-4 31B | Gemma-4 E4B |
|---|---|---|
| MMLU Pro | 85.2% | 69.4% |
| AIME 2026 | 89.2% | 42.5% |
| LiveCodeBench | 80.0% | 52.0% |
| Codeforces ELO | 2150 | 940 |
| Endpoint | Method | Purpose |
|---|---|---|
/api/generate-cards |
POST |
Process PDF and generate AI flashcards |
/api/review-card |
POST |
Submit review and apply SM-2 algorithm |
/api/explain |
POST |
Simplify complex flashcard answers |
/api/decks |
GET |
Retrieve all user decks |
/api/decks |
DELETE |
Delete deck and associated cards |
/api/decks/[id] |
GET |
Fetch specific deck with cards |
- Node.js 18+ & npm
- Ollama (for local AI processing)
- Supabase account
Create a .env.local file:
# Ollama Configuration
OLLAMA_API_URL=http://localhost:11434
OLLAMA_MODEL=gemma4
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your_anon_key
SUPABASE_DB_PASSWORD=your_db_password- Create a Supabase project
- Run the schema from
supabase/schema.sql - Configure RLS policies (included in schema)
# 1. Clone repository
git clone https://github.com/kinshukkush/recallai.git
cd recallai
# 2. Install dependencies
npm install
# 3. Start Ollama (in separate terminal)
ollama serve
# 4. Pull Gemma model
ollama pull gemma4
# 5. Configure environment variables
cp .env.example .env.local
# Edit .env.local with your settings
# 6. Start development server
npm run devUser PDF Upload
β
PDF Parse
β
Extract Text
β
Ollama/Gemma-4 AI
β
Generate Q&A Cards
β
Store in Supabase
β
User Reviews
β
SM-2 Algorithm
β
Update Intervals
- β¨ 3D Card Animations - Smooth flip and tilt effects
- π Glassmorphism Design - Modern frosted glass aesthetic
- π― Responsive Layouts - Mobile-first design
- β‘ Framer Motion - Smooth entrance and hover animations
- π Gradient Accents - Eye-catching color transitions
- Image Optimization - Next.js automatic image compression
- Code Splitting - Dynamic imports for faster load times
- Caching Strategy - Efficient cache headers
- Database Indexing - Optimized Supabase queries
- β Row-Level Security (RLS) in Supabase
- β Environment variable protection
- β Secure API route handling
- β Input validation and sanitization
RecallAI provides comprehensive insights:
- Mastery Percentage - Overall progress tracking
- Due Cards - Cards scheduled for today
- Learning Streak - Consistent practice motivation
- Difficulty Breakdown - Identify weak areas
- Time Analytics - Study duration trends
- Upload - Drag and drop your PDF
- Parse - RecallAI extracts and cleans text
- Generate - Gemma-4 AI creates smart questions
- Review - Practice with animated flashcards
- Learn - SM-2 adapts to your pace
Contributions are welcome! Please follow our code style and submit PRs with clear descriptions.
# Fork the repo, then:
git checkout -b feature/your-feature
git commit -m "Add your feature"
git push origin feature/your-featureMIT License - see LICENSE file for details
