Stop grinding through notes the hard way. DeepTerm uses AI to turn your PDFs and study material into flashcards, reviewers, and practice tests in seconds. Study smarter, not harder.
-
Flashcard Maker - Upload PDF or paste text to automatically extract key terms and definitions using Google Gemini AI. Supports spaced repetition with card status tracking (new, learning, review, mastered).
-
Reviewer Maker - Transform dense content into organized, categorized study materials with three extraction modes:
- Full Mode: Complete definitions with examples and context
- Sentence Mode: Concise one-sentence summaries
- Keywords Mode: Key phrases and concepts only
- Flashcards - Interactive flashcard review with flip animations
- Learn Mode - Adaptive learning with progress tracking
- Match Game - Memory matching game for term-definition pairs
- Practice Test - Mixed question types based on card mastery level
- Edit Terms - Add, edit, and delete terms/definitions directly in the app
- Category Management - Organize reviewer terms into categories with color coding
- Delete Categories - Remove entire categories with all associated terms
- Drag & Drop Reorder - Reorder flashcard terms with drag and drop
- PDF Export - Export reviewers and flashcards to compact two-column PDF format
- DOCX Export - Export to Microsoft Word format with proper formatting
- Share Links - Generate shareable links with custom codes for materials
- Copy to Library - Allow others to copy shared materials to their account
-
Pomodoro Timer - Customizable focus timer with:
- Configurable work/break durations (25/5/15 min defaults)
- Session tracking and streak counting
- Task list integration
- Global notification system for phase transitions
-
Achievement System - Gamified progress with unlockable achievements
-
XP & Leveling - Experience points system with level progression and rank titles (Novice to Grandmaster)
- Google OAuth - Sign in with Google account
- Daily Rate Limits - 10 AI generations per day per user (with unlimited user whitelist support)
- Help Center - In-app documentation and support
- Account Deletion - Self-service account deletion
- Framework: Next.js 16 (App Router) with React 19
- Language: TypeScript 5
- Styling: Tailwind CSS 4
- Database: Supabase (PostgreSQL) with Row Level Security
- Authentication: Supabase Auth (Google OAuth)
- AI: Google Gemini 2.5 Flash-Lite (with multi-key rotation)
- State Management: Zustand 5
- Animations: Framer Motion, GSAP
- PDF Generation: jsPDF
- DOCX Generation: docx
- Validation: Zod 4
- Testing: Vitest 4 with fast-check for property-based testing
- Deployment: Vercel
src/
├── app/ # Next.js App Router pages
│ ├── (dashboard)/ # Protected dashboard routes
│ │ ├── account/ # Account settings
│ │ ├── achievements/ # Achievements page
│ │ ├── dashboard/ # Main dashboard
│ │ ├── materials/ # Materials management
│ │ ├── pomodoro/ # Pomodoro timer
│ │ ├── practice/ # Practice mode
│ │ └── reviewer/ # Reviewer view
│ ├── api/ # API routes
│ │ ├── generate-cards/ # Flashcard generation endpoint
│ │ ├── generate-reviewer/ # Reviewer generation endpoint
│ │ ├── materials/ # Materials CRUD
│ │ └── share/ # Sharing endpoints
│ ├── auth/ # Auth callback
│ ├── help/ # Help center
│ ├── share/ # Public share pages
│ └── ... # Static pages
├── components/ # React components
│ ├── Dashboard/ # Dashboard widgets
│ ├── Header/ # Header component
│ └── Sidebar/ # Navigation sidebar
├── config/ # Configuration
│ └── supabase/ # Supabase client setup
├── lib/ # Core libraries
│ ├── schemas/ # Zod validation schemas
│ ├── stores/ # Zustand state stores
│ └── supabase/ # Database schema
├── services/ # Business logic
│ ├── activity.ts # Activity tracking
│ ├── geminiClient.ts # AI client with key rotation
│ └── rateLimit.ts # Rate limiting
├── styles/ # Global styles
├── tests/ # Test files
└── utils/ # Utility functions
The application uses Zustand stores for client-side state:
- profileStore - User profile data
- uiStore - UI state (sidebar, menus)
- materialsStore - Study materials with filtering
- achievementsStore - Achievement progress
- activityStore - Study activity calendar
- pomodoroStore - Timer state and settings
- xpStore - XP and leveling system
Key tables in Supabase:
profiles- User profilesflashcard_sets/flashcards- Flashcard datareviewers/reviewer_categories/reviewer_terms- Reviewer dataquizzes/quiz_questions/quiz_attempts- Quiz systemstudy_activity/user_stats- Activity trackingpomodoro_sessions- Pomodoro historyachievement_definitions/user_achievements- Achievementsmaterial_shares- Sharing systemai_usage/unlimited_users- Rate limiting
- Row Level Security (RLS) on all tables
- Atomic rate limiting with database functions
- Input validation with Zod schemas
- XP bounds checking (1-100 per operation)
- Secure share access via RPC functions
- Content Security Policy headers
- HTTPS enforcement with HSTS
- Node.js 18+
- Supabase account
- Google Gemini API key(s)
Create a .env.local file:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# Support for multiple API keys with rotation
GEMINI_API_KEY_1=your_gemini_api_key_1
GEMINI_API_KEY_2=your_gemini_api_key_2
GEMINI_API_KEY_3=your_gemini_api_key_3
GEMINI_API_KEY_4=your_gemini_api_key_4
GEMINI_API_KEY_5=your_gemini_api_key_5- Go to Google Cloud Console
- Create a new project or select an existing one
- Navigate to APIs & Services > OAuth consent screen
- Choose "External" user type
- Fill in app name, user support email, and developer contact
- Add scopes:
email,profile,openid - Add test users if in testing mode
- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select "Web application"
- Add authorized redirect URI:
https://<your-supabase-project>.supabase.co/auth/v1/callback - Copy the Client ID and Client Secret
- Create a new Supabase project at supabase.com
- Run
src/lib/supabase/schema.sqlandsupabase-rls-policies.sqlin the SQL Editor (Dashboard > SQL Editor) - Configure Google OAuth:
- Go to Authentication > Providers > Google
- Enable Google provider
- Paste your Google Client ID and Client Secret
- Save changes
npm install
npm run devOpen http://localhost:3000 to view the application.
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run start |
Start production server |
npm run lint |
Run ESLint |
npm run test |
Run tests with Vitest |
npm run test:watch |
Run tests in watch mode |
AI generation is rate-limited to 10 requests per user per day to manage API costs. The limit resets at midnight UTC. Users in the unlimited_users table bypass this limit.
The system uses atomic check-and-increment operations to prevent race conditions.
Generate flashcards from PDF or text content.
- Input: FormData with
file(PDF) ortextContent(string) - Output:
{ cards: [{term, definition}], remaining: number } - Rate Limited: Yes (10/day)
Generate categorized reviewer content from PDF or text.
- Input: FormData with
file,textContent, andextractionMode(full/sentence/keywords) - Output:
{ title, extractionMode, categories: [{name, color, terms}], remaining } - Rate Limited: Yes (10/day)
- GET: Get share info for a material
- POST: Create or update share link
- PATCH: Toggle active status or change code
- DELETE: Remove share
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
npm run test,npm run build,npx eslint src/ - Submit a pull request