An AI-powered active recall engine that turns any content into a precision-engineered learning experience.
Features โข Architecture โข Getting Started โข Documentation
Sift is a minimalist active recall engine designed for students, professionals, and lifelong learners who want to truly master what they studyโnot just passively consume it. Built on the science of active recall and spaced repetition, Sift transforms your study materials into an engaging, flow-state learning experience.
"Friction is the Enemy" โ The time between "I have content" and "I'm being quizzed" should be less than 10 seconds.
Sift prioritizes:
- ๐ฏ Grounded Intelligence: AI generates questions strictly from your contentโno hallucinations
- โก Zero Friction: Upload โ Generate โ Learn in seconds
- ๐ง Zen Mode: Distraction-free, flow-state study sessions
- ๐ฑ Mobile-First: Progressive Web App that works everywhere
- ๐จ Beautiful Design: Clean, dark-mode-first interface that reduces eye strain
- Upload PDFs, Markdown, or text files
- Paste text directly or URLs for instant processing
- Future: Audio transcription and video content support
- Automatically generates questions from your content using Google's Gemini AI
- Multiple question formats:
- Flashcards for recall practice
- Multiple Choice for recognition testing
- Socratic Questions for deep understanding
- Configurable depth: Shallow (key concepts) vs. Deep (detailed coverage)
- Create structured, long-term learning goals (e.g., "Master React")
- AI generates progressive curriculum based on your progress
- Tracks what you've learned to suggest next steps
- Continuity across multiple study sessions
- Track performance per topic across all sources
- Visual "knowledge heatmap" showing strengths and weaknesses
- Intelligent prioritization of weak areas in future quizzes
- Spaced repetition system to prevent knowledge decay
- Google OAuth integration via Better-Auth
- Email/password authentication
- Session management and protected routes
- Save all your sources and study materials
- View history of all completed "Sifts" (study sessions)
- Track scores and progress over time
- Archive old materials while keeping your knowledge graph
- Keyboard-Driven Interface: Fast shortcuts for power users
- Gesture Support: Intuitive swipe controls on mobile
- Instant Feedback: See source snippets for wrong answers
- Source Anchoring: Every answer links back to your original material
- Progressive Web App: Install on any device, works offline
- Dark Mode First: Reduced eye strain for long study sessions
Frontend
- Next.js 16 - React 19, Server Components, Server Actions
- TypeScript 5 - Full type safety
- Tailwind CSS 4 - Utility-first styling
- shadcn/ui - Beautiful, accessible components
- Framer Motion - Smooth animations and transitions
- Radix UI - Accessible component primitives
Backend & Data
- Drizzle ORM - Type-safe database queries
- PostgreSQL - Primary database
- Better-Auth - Modern authentication
- Vercel AI SDK - AI integration layer
AI & Content Processing
- Google Gemini - Question generation
- Firebase - File storage and real-time features
- Cloudflare R2 - Object storage
Development Tools
- Turborepo - Monorepo build system
- Biome - Fast linter and formatter
- pnpm - Fast, disk-efficient package manager
sift/
โโโ apps/
โ โโโ web/ # Main Next.js application
โ โโโ src/
โ โ โโโ app/ # Next.js App Router
โ โ โ โโโ api/ # API routes
โ โ โ โโโ dashboard/ # User dashboard
โ โ โ โโโ sift/ # Quiz interface
โ โ โ โโโ learn/ # Learning paths
โ โ โ โโโ explore/ # Content exploration
โ โ โโโ components/ # React components
โ โ โ โโโ blocks/ # Landing page sections
โ โ โ โโโ media/ # Media components
โ โ โ โโโ ui/ # shadcn components
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ lib/ # Utilities and helpers
โ โโโ public/ # Static assets
โ
โโโ packages/
โ โโโ auth/ # Authentication configuration
โ โ โโโ src/
โ โ โโโ index.ts # Better-Auth setup
โ โ โโโ types/ # Auth types
โ โ
โ โโโ db/ # Database layer
โ โ โโโ src/
โ โ โโโ schema/ # Drizzle schema definitions
โ โ โ โโโ auth.ts # User & session tables
โ โ โ โโโ sources.ts # Content sources
โ โ โ โโโ sifts.ts # Quiz sessions
โ โ โ โโโ echoes.ts # Knowledge tracking
โ โ โ โโโ flashcards.ts
โ โ โ โโโ learning-paths.ts
โ โ โโโ queries/ # Database query functions
โ โ โโโ types/ # Type definitions
โ โ
โ โโโ env/ # Environment variable validation
โ โโโ config/ # Shared TypeScript configs
โ
โโโ docs/ # Documentation
โ โโโ soul.md # Product vision (v1)
โ โโโ soul_v2.md # Updated product vision
โ โโโ learning_system_plan.md # Technical planning
โ โโโ future.md # Future enhancements
โ
โโโ turbo.json # Turborepo configuration
โโโ pnpm-workspace.yaml # Workspace configuration
โโโ biome.json # Linting & formatting rules
โโโ package.json # Root package configuration
sources - User-uploaded content
- id: string (primary key)
- userId: string (foreign key)
- title: string
- type: 'pdf' | 'text' | 'url' | 'audio' | 'markdown' | 'json'
- content: text (extracted content)
- metadata: json (page count, duration, etc.)
- timestamps: createdAt, updatedAtsifts - Generated quiz sessions
- id: string (primary key)
- userId: string (foreign key)
- sourceId: string (foreign key)
- status: 'in_progress' | 'completed' | 'abandoned'
- config: json (depth, format settings)
- takeaways: json[] (key learnings)
- timestamps: createdAt, updatedAtquestions - Quiz questions
- id: string (primary key)
- siftId: string (foreign key)
- sectionId: string (optional foreign key)
- question: string
- answer: string (correct answer)
- options: json (for MCQs)
- explanation: text (source context)
- tags: string[] (topics covered)echoes - Knowledge tracking
- id: string (primary key)
- userId: string (foreign key)
- sourceId: string (foreign key)
- topic: string
- masteryLevel: int (0-100)
- lastReviewedAt: timestamp
- Unique constraint: (userId, sourceId, topic)learning_paths - Long-term learning goals
- id: string (primary key)
- userId: string (foreign key)
- title: string
- goal: string (user's original prompt)
- summary: text (AI progress summary)
- timestamps: createdAt, updatedAtsift_sessions - Session tracking
- id: string (primary key)
- siftId: string (foreign key)
- userId: string (foreign key)
- status: 'in_progress' | 'completed'
- score: int
- startedAt, completedAt: timestamp- Node.js 20+ (LTS recommended)
- pnpm 10.28.0+
- PostgreSQL 14+ database
- Google Cloud Account (for Gemini AI API)
-
Clone the repository
git clone https://github.com/Vashishta-Mithra-Reddy/sift.git cd sift -
Install dependencies
pnpm install
-
Set up environment variables
Create
apps/web/.envfile:# Database DATABASE_URL="postgresql://user:password@localhost:5432/sift" DATABASE_URL_UNPOOLED="postgresql://user:password@localhost:5432/sift" # Authentication BETTER_AUTH_SECRET="your-secret-key-min-32-chars" BETTER_AUTH_URL="http://localhost:3001" GOOGLE_OAUTH_CLIENT_ID="your-google-oauth-client-id" GOOGLE_OAUTH_CLIENT_SECRET="your-google-oauth-secret" # AI GOOGLE_GENERATIVE_AI_API_KEY="your-gemini-api-key" # Storage (Optional - for file uploads) CLOUDFLARE_R2_ACCOUNT_ID="your-r2-account-id" CLOUDFLARE_R2_ACCESS_KEY_ID="your-access-key" CLOUDFLARE_R2_SECRET_ACCESS_KEY="your-secret-key" CLOUDFLARE_R2_BUCKET_NAME="sift-uploads" NEXT_PUBLIC_R2_URL="https://your-bucket-url.r2.dev"
-
Set up the database
# Push schema to database pnpm run db:push # Or run migrations pnpm run db:migrate
-
Start the development server
pnpm run dev
-
Open the application
Navigate to http://localhost:3001
# Start PostgreSQL with Docker
docker run -d \
--name sift-postgres \
-e POSTGRES_PASSWORD=password \
-e POSTGRES_DB=sift \
-p 5432:5432 \
postgres:16| Command | Description |
|---|---|
pnpm run dev |
Start all applications in development mode |
pnpm run dev:web |
Start only the web application |
pnpm run build |
Build all applications for production |
pnpm run check-types |
Type-check all packages |
pnpm run check |
Run Biome linter and formatter |
pnpm run db:push |
Push schema changes to database |
pnpm run db:studio |
Open Drizzle Studio (database GUI) |
pnpm run db:generate |
Generate new migration files |
pnpm run db:migrate |
Run pending migrations |
| Endpoint | Method | Description |
|---|---|---|
/api/ai/generate |
POST | Generate study plan or questions |
/api/sift/process |
POST | Process uploaded content |
/api/sift/[id]/status |
GET | Get sift status and results |
/api/notifications/action |
POST | Handle push notifications |
/api/auth/[...all] |
ALL | Better-Auth routes |
Required Variables
DATABASE_URL- PostgreSQL connection string (pooled)DATABASE_URL_UNPOOLED- PostgreSQL connection string (direct)BETTER_AUTH_SECRET- Secret key for auth (min 32 chars)BETTER_AUTH_URL- Base URL of your applicationGOOGLE_GENERATIVE_AI_API_KEY- Gemini API key
OAuth Variables
GOOGLE_OAUTH_CLIENT_ID- Google OAuth client IDGOOGLE_OAUTH_CLIENT_SECRET- Google OAuth client secret
Storage Variables (Optional)
CLOUDFLARE_R2_ACCOUNT_ID- Cloudflare R2 account IDCLOUDFLARE_R2_ACCESS_KEY_ID- R2 access keyCLOUDFLARE_R2_SECRET_ACCESS_KEY- R2 secret keyCLOUDFLARE_R2_BUCKET_NAME- R2 bucket nameCLOUDFLARE_R2_ENDPOINT- R2 endpoint URLNEXT_PUBLIC_R2_URL- Public R2 URL
This project uses Biome for linting and formatting:
# Check and auto-fix issues
pnpm run check
# The configuration follows these rules:
# - Tabs for indentation
# - Double quotes for strings
# - Organized imports
# - Sorted Tailwind classes# Make changes to schema files in packages/db/src/schema/
# Generate migration
pnpm run db:generate
# Apply migration
pnpm run db:migrate
# Or push directly (for development)
pnpm run db:push
# Explore data with GUI
pnpm run db:studioTurborepo caches build outputs for faster subsequent builds:
- Build outputs:
.next/,dist/ - Cache location:
.turbo/ - Cache is local by default (can be configured for remote caching)
- Connect your GitHub repository to Vercel
- Configure environment variables in project settings
- Set build command:
pnpm run build - Set output directory:
apps/web/.next - Deploy ๐
# Coming soon - Dockerfile for containerized deploymentRecommended PostgreSQL hosting providers:
- Neon - Serverless Postgres
- Supabase - Open source Firebase alternative
- Vercel Postgres - Integrated with Vercel
- Railway - Simple infrastructure
- Authentication system (Google OAuth + Email)
- Responsive PWA layout
- Content ingestion (text, files)
- AI-powered quiz generation
- Basic mastery tracking (Echoes)
- Polished quiz interface
- Learning Paths implementation
- Robust PDF/DOCX extraction
- Detailed performance analytics
- Spaced repetition scheduling
- Knowledge heatmap visualization
- Public Sift Packs (shareable study materials)
- Community-contributed content
- Social learning features
- Mobile app (React Native)
- Audio transcription and processing
- Video content support
- Collaborative study sessions
- Advanced analytics and insights
- Multi-language support
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and follow the code style
- Run linting:
pnpm run check - Test your changes thoroughly
- Commit:
git commit -m 'Add amazing feature' - Push:
git push origin feature/amazing-feature - Open a Pull Request
- Follow the existing code style (Biome enforces this)
- Write meaningful commit messages
- Update documentation for significant changes
- Add comments for complex logic
- Test on both desktop and mobile viewports
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Better-T-Stack
- Inspired by the science of active recall and spaced repetition
- UI components from shadcn/ui
- Icons from HugeIcons
- GitHub Issues: Report bugs or request features
- Discussions: Join the conversation
Made with โค๏ธ by Vashishta Mithra Reddy