0Algo is a high-performance, full-stack DSA tracker designed to help engineers ace technical interviews. Unlike generic trackers, 0Algo focuses on company-specific questions and features an AI-powered Assistant to guide users through complex algorithms and system design concepts.
- 🤖 AI Study Assistant: Context-aware chatbot for problem explanation, debugging, and system design queries.
- 🏢 Company-Centric Filtering: Target specific companies (Google, Amazon, Meta) and filter questions by recency.
- 💾 Hybrid Persistence: Syncs progress to Supabase via Drizzle ORM with Optimistic UI for instant feedback.
- 📊 Live Statistics: Dashboard visualizing progress across Easy, Medium, and Hard difficulties.
- 🎥 Integrated Video Solutions: One-click access to video explanations.
- 🛠 System Design Hub: Dedicated section for curated system design resources and roadmaps.
| System Design Hub | AI Chatbot | Video Solutions |
|---|---|---|
![]() |
![]() |
![]() |
| Curated roadmaps & resources | Context-aware explanations | Integrated video player |
| Category | Technology |
|---|---|
| Framework | Next.js 15 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS + Shadcn/UI |
| Database | Supabase (PostgreSQL) |
| ORM | Drizzle ORM |
| AI Integration | OpenAI API / Vercel AI SDK |
| Auth | Clerk |
| State Mgmt | React Hooks + Optimistic Updates |
| Deployment | Vercel |
├── app/
│ ├── actions.ts # Server Actions (DB writes)
│ ├── api/ # Route Handlers
│ │ ├── chat/ # AI Chatbot Endpoint
│ │ └── user-progress/ # User Progress Sync
│ ├── dashboard/ # Protected Dashboard Client Page
│ └── system-design/ # System Design resources
├── components/
│ ├── Chatbot.tsx # AI Chat Interface
│ ├── LeetCodeDashboard.tsx # Main Question Table
│ └── VideoDialog.tsx # Video Solution Modal
├── lib/
│ ├── db.ts # Drizzle Client Connection
│ └── schema.ts # Database Schema (Questions, Progress, Chats)
└── public/ # Static assets (images, icons)Follow these steps to run 0Algo locally.
- Clone the Repository
git clone https://github.com/MrAsacker/0Algo.git
cd 0Algo
We recommend using pnpm.
pnpm install
# or
npm install
Create a .env.local file in the root directory and add the following keys:
# Authentication (Clerk)
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
# Database (Supabase + Drizzle)
# Note: Use the Transaction Pooler URL (port 6543)
DATABASE_URL=postgresql://postgres.xxxx:[password]@aws-0-region.pooler.supabase.com:6543/postgres
# AI Chatbot
OPENAI_API_KEY=sk-proj-...
Push the Drizzle schema to your Supabase instance:
npx drizzle-kit push
- Run the Development Server Bash
pnpm dev Open http://localhost:3000 to view the app.
🔄 Data Flow & Architecture 0Algo uses a modern Next.js Server Action pattern for data mutation:
Read: When the dashboard loads, it fetches static question data + user progress + chat history via parallel API requests.
Write: When a user checks a box, an Optimistic Update flips the UI instantly.
Sync: A Server Action (toggleQuestionProgress) runs asynchronously to INSERT or DELETE the record in Supabase.
AI Context: The Chatbot utilizes the userChats table to store conversation history (JSONB), allowing users to revisit previous discussions.
🤝 Contributing Contributions are welcome!
Fork the project.
Create your feature branch:
Bash
git checkout -b feature/AmazingFeature Commit your changes:
Bash
git commit -m 'Add some AmazingFeature' Push to your branch:
Bash
git push origin feature/AmazingFeature Open a Pull Request.
📄 License Distributed under the MIT License. See LICENSE for more information.



