LeetVault Pro is a production-grade personal knowledge base, revision scheduler, and developer productivity platform designed to help software engineers save, catalog, analyze, and master their LeetCode solutions. It is designed to look like a premium SaaS dashboard (blending Notion, GitHub, and VS Code) and is fully optimized for top-tier recruiter portfolios.
- Monaco Editor Workbench: VS-Code matching coding workspace equipped with autocomplete, syntax highlighting, and fullscreen tab selectors.
-
Git-like Solution Versioning: Catalog solution revisions (Brute Force
$\rightarrow$ Better$\rightarrow$ Optimal DP) and review differences using a commit slider. -
SuperMemo Spaced Repetition (SRS): Smart spaced repetition scheduler (Again
$\rightarrow$ Hard$\rightarrow$ Good$\rightarrow$ Easy) that calculates next due dates based on recall quality. -
LeetCode Sync & Auto-Fetch:
-
URL Auto-Fetch: Paste a problem link (e.g.,
two-sum), and the server action auto-fills numbers, titles, difficulty levels, and topic tags. - Profile Sync: Connects to public API endpoints to sync solves statistics, streaks, and global rankings in real-time.
-
URL Auto-Fetch: Paste a problem link (e.g.,
- Framer Motion & Recharts Dashboards: Sleek glassmorphic card grids, GitHub-style coding activity heatmaps, and Recharts topic radar coverage charts.
-
Scalable Firestore Joins: Utilizes a separate join schema (
collectionItems/) rather than storing arrays inside collection documents to completely bypass the 1MB Firestore size limit. - PWA Installer & Offline Support: Standalone desktop/mobile installer configurations with offline caching.
- Simulated AI FAANG Interviewer: Compiles Technical interview diagnostic boards (Space/Time audits, alternative architectures, and Google follow-up questions) with dual-mode LLM/mock support.
- Frontend: Next.js 15+ App Router, React 19, TypeScript, Tailwind CSS v4, Zustand, Recharts, Framer Motion, Sonner, React Hook Form, Zod, TanStack Query.
- Backend: Firebase Auth, Cloud Firestore (Compound indexes detailed in
firestore.indexes.json), Cloud Storage. - Code Sandbox: Monaco Editor (
@monaco-editor/react). - Visual diagrams: Mermaid (
mermaid.js).
src/
├── actions/ # Next.js 15 Server Actions ("use server")
│ ├── ai-actions.ts # Dynamic interview boards & mock insights
│ ├── collection-actions.ts # Custom folders & checklist toggle operations
│ ├── leetcode-actions.ts # URL auto-fetch & Profile Sync routines
│ ├── revision-actions.ts # SuperMemo Spaced repetition (SRS) timeline calcs
│ └── solution-actions.ts # Problem CRUD & Git version commits
├── app/ # Next.js App Router Pages & Layouts
│ ├── (auth)/ # Validation portals (Login, Register, Recovery)
│ ├── (dashboard)/ # Protected views (Dashboard, Problems, SRS, Tracks, Stats)
│ ├── globals.css # Tailwind CSS v4 variables & custom glassmorphisms
│ └── layout.tsx # Global Providers Wrapper shell
├── components/ # Reusable UI widgets
│ ├── CommandPalette.tsx # Ctrl+K searching & global theme switcher
│ └── MonacoEditor.tsx # Client-side VS Code playground wrapper
├── lib/ # Core Third-Party Configs
│ └── firebase.ts # Auth & Firestore connection detectors
├── providers/ # Shared Context Providers
│ ├── AuthProvider.tsx # Dual-mode (Firebase/LocalStorage) Session tracker
│ ├── QueryProvider.tsx # TanStack request cache mapping
│ ├── SonnerProvider.tsx # Alert alert overlays
│ └── ThemeProvider.tsx # Responsive Theme toggles (Dark, Light, System)
├── store/ # Zustand Global State
│ ├── useVaultStore.ts # In-memory Local Database & filters
│ └── useOfflineStore.ts # Persisted Offline synchronization buffers
└── types/ # Rigid TypeScript Declarations
├── collection.ts # Folder & collectionItems join schemas
├── revision.ts # Revision log timelines
├── solution.ts # Problem catalog & git history interfaces
└── user.ts # Streak stats & settings profile schemas
We define strict collection formats to support thousands of active solutions:
interface SolutionEntry {
id: string;
userId: string;
problemNumber: number;
problemTitle: string;
leetcodeUrl: string;
difficulty: 'Easy' | 'Medium' | 'Hard';
programmingLanguage: string;
solutionCode: string;
timeComplexity: string;
spaceComplexity: string;
explanation: string;
notes: string;
mistakesMade: string;
topicTags: string[];
companyTags: string[];
revisionStatus: 'Need Revision' | 'Learning' | 'Revised' | 'Mastered';
favoriteStatus: boolean;
archived: boolean;
createdAt: number;
updatedAt: number;
}interface SolutionVersion {
id: string;
userId: string;
solutionId: string;
versionTitle: string;
code: string;
timeComplexity: string;
spaceComplexity: string;
explanation: string;
createdAt: number;
}interface CollectionItem {
id: string; // generated as collectionId_solutionId
collectionId: string;
solutionId: string;
userId: string;
createdAt: number;
}If no Firebase environment keys are declared in .env.local, the application automatically executes in fallback mode. All page operations (Dashboard widgets, Monaco versioning commits, curating tracks, Spaced-repetition reviews, and stats radar) run on an in-memory client-side database backed by localStorage persistence.
This enables recruiters to open the portal and interact with 100% of the UI immediately without having to register databases first.
-
Install Vercel CLI:
npm install -g vercel
-
Configure Database Indexes: Firestore requires indexes to run compound filtering queries. Apply the schema index defined in
firestore.indexes.jsoninside your Firebase Console, or deploy via Firebase CLI:firebase deploy --only firestore:indexes
-
Deploy to Vercel: Run the vercel login and setup routine in the project root:
vercel
Follow the CLI wizard to link the workspace.
-
Register Variables: Open Vercel Dashboard
$\rightarrow$ Settings$\rightarrow$ Environment Variables, and copy all credentials listed in.env.example:NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_PROJECT_IDGEMINI_API_KEY
-
Production Build:
vercel --prod