Skip to content

0Algo is a modern, lightweight, and AI-powered interview-prep platform that brings together everything you need to crack tech interviews: Company-wise DSA problem lists with timeframes Structured System Design preparation AI-integrated coding assistant Minimal, fast, and distraction-free interface

License

Notifications You must be signed in to change notification settings

MrAsacker/0Algo

Repository files navigation

🚀 0Algo - Master DSA & System Design

0Algo DSA Dashboard

Built with TypeScript Next.js Tailwind CSS Supabase Drizzle ORM Vercel OpenAI


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.

Live Demo →


✨ Key Features

  • 🤖 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.

📸 Feature Preview

System Design Hub AI Chatbot Video Solutions
System Design Chatbot Video
Curated roadmaps & resources Context-aware explanations Integrated video player

🛠 Tech Stack

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

📂 Project Structure

├── 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)

🚀 Getting Started

Follow these steps to run 0Algo locally.

  1. Clone the Repository
 git clone https://github.com/MrAsacker/0Algo.git
 cd 0Algo

2. Install Dependencies

We recommend using pnpm.

pnpm install
# or
npm install

3. Environment Setup

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-...

4. Database Migration

Push the Drizzle schema to your Supabase instance:

npx drizzle-kit push
  1. 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.

Built with Love

About

0Algo is a modern, lightweight, and AI-powered interview-prep platform that brings together everything you need to crack tech interviews: Company-wise DSA problem lists with timeframes Structured System Design preparation AI-integrated coding assistant Minimal, fast, and distraction-free interface

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published