AI-Powered Spaced Repetition Study Platform
Transform your learning with AI-generated flashcards and proven spaced repetition algorithms
- Multi-Provider Support: OpenAI, Anthropic, Ollama, LM Studio, DeepSeek, and custom endpoints
- BYO API Keys: Secure client-side key storage - never stored on our servers
- PDF to Flashcards: Extract and generate study materials from any PDF document
- Intelligent Parsing: Advanced content chunking and context-aware generation
- Evidence-Based Algorithms: Optimized intervals based on memory science
- Adaptive Learning: Personalized scheduling based on your performance
- Progress Tracking: Detailed analytics on learning patterns and retention
- Study Sessions: Structured practice with immediate feedback
- Project Organization: Group flashcards by subject or topic
- Flexible Import/Export: JSON, CSV, and Anki-compatible formats
- Duplicate Detection: Smart identification of similar content
- Bulk Operations: Efficient management of large flashcard collections
- Row Level Security (RLS): Database-level user isolation
- Client-Side Keys: API keys stored locally, never on servers
- Open Source: Full transparency and community-driven development
- Self-Hostable: Deploy on your own infrastructure
- Node.js 18+ and pnpm
- Supabase account and project
- AI Provider API key (OpenAI, Anthropic, etc.)
-
Clone and Install
git clone https://github.com/chaosweasl/cognify.git cd cognify pnpm install
-
Environment Setup
cp .env.example .env.local
Configure your environment variables:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
-
Database Setup
# Run migrations in your Supabase dashboard or via CLI # Schema is provided in schema-dump.sql
-
Development Server
pnpm dev
Visit http://localhost:3000
Cognify supports multiple AI providers. Set up your preferred provider:
- Navigate to Settings β AI Configuration
- Choose Provider: OpenAI, Anthropic, Ollama, etc.
- Enter API Key: Stored securely in your browser's localStorage
- Test Connection: Verify your configuration works
- β Your Keys, Your Control: API keys never leave your browser
- β No Usage Limits: Use your own quotas and billing
- β Provider Choice: Switch between providers anytime
β οΈ Security Notice: Keys are stored in localStorage - clear them when using shared computers
- Create a Project: Organize flashcards by topic
- Add Content:
- Upload PDF documents for AI generation
- Import JSON/CSV files
- Create flashcards manually
- Review & Edit: Preview AI-generated content before saving
- Start Studying: Begin spaced repetition sessions
- Study Session: Practice flashcards with SRS scheduling
- Self-Assessment: Rate difficulty (Easy/Medium/Hard)
- Progress Tracking: Monitor retention and performance
- Adaptive Scheduling: System adjusts based on your responses
- Frontend: Next.js 15 (App Router), React 18, TypeScript
- Backend: Supabase (PostgreSQL, Auth, RLS)
- Styling: Tailwind CSS, ShadCN/ui components
- AI Integration: Multi-provider support with client-side calls
- State Management: Zustand for global state
- Deployment: Vercel-ready, self-hostable
cognify/
βββ app/ # Next.js App Router
β βββ (main)/ # Authenticated routes
β βββ api/ # API endpoints
β βββ auth/ # Authentication pages
βββ components/ # Reusable UI components
βββ hooks/ # Custom React hooks
βββ lib/ # Core libraries
β βββ ai/ # AI provider integrations
β βββ srs/ # Spaced repetition logic
β βββ supabase/ # Database utilities
βββ src/ # Feature components
We welcome contributions! This project follows a BYO (Bring Your Own) AI model for security and flexibility.
- Fork & Clone: Create your feature branch
- Install Dependencies:
pnpm install
- Start Development:
pnpm dev
- Run Tests:
pnpm test
(when available) - Type Check:
npx tsc --noEmit
- Submit PR: Include tests and documentation
- Security First: Never store API keys server-side
- RLS Compliance: All database operations respect Row Level Security
- Draft-First UX: AI-generated content requires user acceptance
- Provider Agnostic: Support multiple AI providers equally
- No Server Storage: API keys remain in your browser's localStorage
- Explicit Consent: Clear warnings before persisting keys locally
- Ephemeral Mode: Use keys without saving for maximum security
- Open Source: Full code transparency for security auditing
- π Use API Keys with Limited Scope: Create keys with minimal permissions
- π Rotate Keys Regularly: Update keys periodically for security
- π§Ή Clear Keys on Shared Devices: Remove keys from localStorage when done
- π± Use Device-Specific Keys: Different keys for different devices
- β Multi-provider AI integration
- β PDF to flashcard generation
- β Spaced repetition system
- β Secure key management
- π Cheatsheet & Quiz Generation: Beyond just flashcards
- π Documentation Site: Copy/paste prompts for non-developers
- π CORS Fallback: Manual workflow when browser calls fail
- π± Mobile App: React Native application
- π Browser Extension: Quick content capture
- YouTube Integration: Generate content from video transcripts
- Collaboration: Share study sets and team learning
- Advanced Analytics: ML-powered learning insights
- Community Marketplace: Share and discover study materials
This project is licensed under the MIT License - see the LICENSE file for details.
- Spaced Repetition Research: Built on decades of memory science
- Open Source Community: ShadCN/ui, Tailwind CSS, and countless libraries
- AI Providers: OpenAI, Anthropic, and the broader AI community
- Early Users: Thank you for testing and providing feedback
- π§ Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Documentation: Project Wiki
- π― Roadmap: Project Board
Transform your learning with AI-powered spaced repetition. Start studying smarter, not harder. π