Skip to content
ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

735 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


Live Demo License: MIT Next.js Stars Forks PRs Welcome Discord


๐Ÿง  An open-source, interactive DSA learning platform that brings algorithms to life through step-by-step animations, structured learning paths, and progress tracking.

Built for students, developers, and interview candidates who want to see how algorithms work โ€” not just read about them.

โœจ Features ยท ๐Ÿ“ท Screenshots ยท ๐Ÿ›  Tech Stack ยท ๐Ÿš€ Quick Start ยท ๐Ÿ“ Project Structure ยท ๐Ÿค Contributing ยท ๐Ÿ“œ License



๐ŸŽฏ Why AlgoBuddy?

"Tell me and I forget, teach me and I remember, involve me and I learn." โ€” Benjamin Franklin

Most DSA resources are walls of text and static diagrams. AlgoBuddy changes that by letting you interact with every data structure and algorithm in real time.

๐Ÿ˜ซ The Problem

  • Static textbooks don't show algorithm flow
  • Copying code doesn't build understanding
  • No feedback loop on what you've mastered
  • Hard to stay motivated without visible progress

โœ… The AlgoBuddy Way

  • Watch algorithms execute step-by-step
  • Interact with data structures directly
  • Track your learning journey with streaks
  • Read companion blogs for deeper theory

โœจ Features

๐Ÿ”ฎ Algorithm Visualizer

Animated, step-by-step visualizations for a wide range of DSA topics:

๐Ÿ”„ Sorting

๐Ÿ” Searching

๐Ÿ“š Stack

๐Ÿšถ Queue

๐Ÿ”— Linked List

  • Bubble Sort
  • Insertion Sort
  • Selection Sort
  • Merge Sort
  • Quick Sort
  • Linear Search
  • Binary Search
  • Sorting Comparison Mode
  • Sliding Window Technique
  • Push / Pop
  • Peek / isEmpty
  • Polish Notation
  • Array & LL impl.
  • Enqueue / Dequeue
  • Circular Queue
  • Priority Queue
  • Double-ended
  • Array & LL impl.
  • Singly Linked
  • Doubly Linked
  • Circular
  • Insert / Delete
  • Reverse / Merge

๐ŸŒณ Trees

#๏ธโƒฃ HashMap

๐Ÿ“Š Complexity Graphs

  • Binary Tree types
  • In-order Traversal
  • BST operations
  • Heaps & Tries
  • Insert / Search / Delete
  • Collision handling
  • Visual hash buckets
  • Time & Space analysis
  • Side-by-side comparisons
  • Powered by Recharts

๐Ÿ‘ค User System & Progress Tracking

Feature Description
๐Ÿ” Auth Email/password with Cloudflare Turnstile captcha + Google OAuth
๐Ÿ“Š Dashboard Module-level progress tracking per data structure
๐Ÿ”ฅ Streaks Activity heatmap (last 90 days) + daily streak counter
๐Ÿค– AI Assistant Built-in chatbot powered by Gemini for concept help


๐Ÿ“ Blog Platform

Feature Description
๐Ÿท Categories Filter articles by DSA topic
๐Ÿ”Ž Full-text Search Instantly find relevant articles
โฑ Reading Time Estimated reading time on every article
๐Ÿ“– Rich Content In-depth articles on core DSA concepts


๐ŸŽจ UX & Design

Feature Description
๐ŸŒ— Dark/Light Mode Theme toggle persisted to localStorage
๐Ÿ“ฑ Responsive Optimized for mobile, tablet, and desktop
๐ŸŽฌ Animations Smooth visualizations via GSAP + Framer Motion
โœจ Particle Effects Interactive background using tsParticles


๐Ÿ“ธ Screenshots

๐Ÿ  Home Page

Home Page


๐Ÿ” Authentication Page

Login Page


๐Ÿง  Visualizer Dashboard

Visualizer


๐Ÿ”„ Queue Visualization

Queue Visualization


๐Ÿ“š Queue Operations

Queue Operations



๐Ÿ›  Tech Stack

Layer Technology Purpose
โšก Framework Next.js App Router, SSR, API routes
๐ŸŽจ Styling Tailwind Utility-first CSS framework
๐Ÿ—„ Database Supabase PostgreSQL + Auth + Realtime
๐ŸŽฌ Animation GSAP Framer Visualizer animations
๐Ÿ“Š Charts Recharts Complexity comparison graphs
โœ๏ธ Editor Monaco In-browser code editor
๐Ÿ“ง Email Nodemailer Transactional emails via Gmail
๐Ÿ›ก Captcha Cloudflare Bot protection on auth
๐Ÿ“ˆ Analytics GA4 Usage tracking
โฑ Rate Limiting Upstash API rate limiting
๐Ÿš€ Deployment Vercel Serverless hosting
๐Ÿ” CI/CD GitHub Actions Multi-OS testing pipeline

๐Ÿ— Architecture

graph TB
    subgraph Client["๐Ÿ–ฅ Client โ€” Next.js 14 App Router"]
        UI["UI Components<br/>(React + Tailwind)"]
        VIS["Visualizer Engine<br/>(GSAP + Framer Motion)"]
        CHARTS["Complexity Graphs<br/>(Recharts)"]
        EDITOR["Code Editor<br/>(Monaco)"]
        THEME["Theme System<br/>(Dark/Light)"]
    end
    subgraph API["โšก API Layer"]
        AUTH_API["Auth Routes"]
        CONTACT["Contact API"]
        REVIEW["Review API"]
        CHATBOT["AI Assistant<br/>(Gemini API)"]
    end
    subgraph Services["โ˜๏ธ External Services"]
        SUPA["Supabase<br/>(DB + Auth)"]
        CF["Cloudflare<br/>Turnstile"]
        GA["Google<br/>Analytics"]
        REDIS["Upstash<br/>Redis"]
        MAIL["Gmail<br/>(Nodemailer)"]
        GEMINI["Google<br/>Gemini API"]
    end
    UI --> VIS
    UI --> CHARTS
    UI --> EDITOR
    UI --> THEME
    UI --> API
    UI --> SUPA
    AUTH_API --> SUPA
    AUTH_API --> CF
    CONTACT --> MAIL
    CONTACT --> CF
    REVIEW --> MAIL
    REVIEW --> CF
    CHATBOT --> REDIS
    CHATBOT --> GEMINI
    UI --> GA
    style Client fill:#1e1b4b,stroke:#818cf8,stroke-width:3px,color:#e0e7ff
    style API fill:#1e3a5f,stroke:#38bdf8,stroke-width:3px,color:#e0f2fe
    style Services fill:#064e3b,stroke:#34d399,stroke-width:3px,color:#d1fae5
Loading

๐Ÿš€ Quick Start

Prerequisites

Tool Version
Node.js >= 20.x
npm >= 10.x
Git Latest

1๏ธโƒฃ Clone the Repository

git clone https://github.com/PankajSingh34/AlgoBuddy.git
cd AlgoBuddy

2๏ธโƒฃ Install Dependencies

npm install

3๏ธโƒฃ Configure Environment Variables

Create a .env.local file in the project root:

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Email โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-google-app-password
REVIEW_INBOX_EMAIL=optional-inbox@gmail.com

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Supabase โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_KEY=your-supabase-service-key

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Cloudflare Turnstile โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
NEXT_PUBLIC_TURNSTILE_SITE_KEY=your-turnstile-site-key
TURNSTILE_SECRET_KEY=your-turnstile-secret-key

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Google Analytics โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ AI Chatbot โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
GEMINI_API_KEY=your-gemini-api-key

# โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Rate Limiting (Production) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
UPSTASH_REDIS_REST_URL=your-upstash-url
UPSTASH_REDIS_REST_TOKEN=your-upstash-token

๐Ÿ’ก Tip: See EnvExample.txt for a complete reference of all environment variables.

4๏ธโƒฃ Start the Development Server

npm run dev

Open http://localhost:3000 and start visualizing! ๐ŸŽ‰

5๏ธโƒฃ Other Commands

npm run build          # Production build
npm run start          # Start production server
npm run lint           # Run ESLint
npm run test           # Run lint + security tests
npm run test:security  # Run XSS security tests only


๐Ÿ“ Project Structure

AlgoBuddy/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ app/                          # Next.js App Router
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ api/                      # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ auth/                    #   โ”œโ”€โ”€ Authentication endpoints
โ”‚   โ”‚   โ”œโ”€โ”€ contact/                 #   โ”œโ”€โ”€ Contact form handler
โ”‚   โ”‚   โ”œโ”€โ”€ chatbot/                 #   โ”œโ”€โ”€ AI chatbot endpoint
โ”‚   โ”‚   โ””โ”€โ”€ send-review/             #   โ””โ”€โ”€ Review submission
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ dashboard/                # User dashboard
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ login/                    # Auth pages
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ visualizer/               # Algorithm visualizer pages
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ ๐Ÿ“‚ components/               # Shared UI components
โ”‚   โ”‚   โ”œโ”€โ”€ dashboard/               #   โ”œโ”€โ”€ Heatmap, streaks
โ”‚   โ”‚   โ”œโ”€โ”€ models/                  #   โ”œโ”€โ”€ Data structure models
โ”‚   โ”‚   โ””โ”€โ”€ ui/                      #   โ””โ”€โ”€ Reusable UI primitives
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ layout.jsx                   # Root layout
โ”‚   โ””โ”€โ”€ page.jsx                     # Landing page
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ lib/                          # Utility libraries
โ”‚   โ”œโ”€โ”€ supabase.js                  #   โ”œโ”€โ”€ Supabase client config
โ”‚   โ”œโ”€โ”€ activity.js                  #   โ”œโ”€โ”€ Activity tracking logic
โ”‚   โ””โ”€โ”€ gtag.js                      #   โ””โ”€โ”€ Google Analytics helper
โ”‚
โ”œโ”€โ”€ ๐Ÿ“‚ utils/                        # Helper functions
โ”œโ”€โ”€ ๐Ÿ“‚ public/                       # Static assets
โ”œโ”€โ”€ ๐Ÿ“‚ docs/                         # Documentation
โ”œโ”€โ”€ ๐Ÿ“‚ security-tests/               # Security test suite
โ”œโ”€โ”€ ๐Ÿ“‚ .github/                      # GitHub Actions workflows
โ”‚
โ”œโ”€โ”€ middleware.js                     # Next.js middleware (auth, rate limiting)
โ”œโ”€โ”€ tailwind.config.js                # Tailwind configuration
โ”œโ”€โ”€ next.config.mjs                   # Next.js configuration
โ”œโ”€โ”€ eslint.config.mjs                 # ESLint configuration
โ”œโ”€โ”€ package.json                      # Dependencies & scripts
โ””โ”€โ”€ next-sitemap.config.js            # SEO sitemap generation

๐Ÿค Contributing

We ๐Ÿ’œ contributions! AlgoBuddy is built by the community, for the community.

Contribution Areas

Area What you can do
๐Ÿ› Bug Fixes Squash bugs and resolve issues
๐ŸŽจ UI/UX Improve responsiveness, accessibility, design
๐Ÿ”ฎ New Visualizers Add new DSA visualizers & animations
๐Ÿ“– Documentation Improve guides, README, contributor docs
โšก Performance Optimize app performance & efficiency
๐ŸŒ— Themes Enhance dark/light mode experience

Getting Started

# 1. Fork this repo and clone your fork
git clone https://github.com/YOUR_USERNAME/AlgoBuddy.git

# 2. Create a feature branch
git checkout -b feature/your-feature-name

# 3. Make your changes and commit
git commit -m "feat: describe your change"

# 4. Push and open a PR
git push origin feature/your-feature-name

๐Ÿ“– For detailed guidelines, please read our Contributing Guide and Code of Conduct.

Issue Assignment Process

  1. ๐Ÿ” Browse open issues or create a new one
  2. ๐Ÿ’ฌ Comment asking to be assigned
  3. โณ Wait for maintainer assignment before starting
  4. ๐Ÿ”€ Submit a PR referencing the issue number

๐Ÿ’ฌ Community

Discord

Ask questions, share ideas, show off your contributions, and connect with fellow learners!


๐ŸŒŸ Star History

If AlgoBuddy helped you learn, please consider giving it a โญ โ€” it means a lot!

Star History Chart


๐Ÿ‘ฅ Contributors


๐Ÿ“œ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.



Built with ๐Ÿ’œ by the AlgoBuddy community


๐ŸŒ Website ยท ๐Ÿ“ข Discord ยท ๐Ÿ› Issues ยท ๐Ÿ”€ Pull Requests

About

DSA visualizer join our discord https://discord.gg/PqnazRxPc. Connect us : https://www.linkedin.com/company/algobuddy

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages