Skip to content

Manthanvinzuda007/AlgoVault-React-Node.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›οΈ AlgoVault

Where Logic Meets Peace.

A full-stack LeetCode-style competitive programming and algorithm learning platform β€” calm, cozy, and focused. Built with React JS, Node.js, and JSON file storage.


✨ Features

  • 🎨 Cozy Study Theme β€” Warm blue & gold palette, light/dark mode, cinematic landing page
  • πŸ” Auth System β€” JWT-based register/login with bcrypt password hashing
  • πŸ’» Code Editor β€” Monaco Editor with syntax highlighting, run & submit
  • πŸ“Š Dashboard β€” XP tracker, streak, progress rings, daily challenge
  • πŸ—ΊοΈ Explore β€” Search, filter, sort 15+ problems by difficulty/topic
  • πŸ† Leaderboard β€” Global & weekly rankings with podium visualization
  • πŸ’¬ Discussions β€” Threaded forum with voting, comments, tag filters
  • πŸ“š Practice β€” Topic-grouped problems with cheat sheets
  • πŸ€– Ava AI Mentor β€” Floating hint bot on problem/practice pages
  • πŸ“± Responsive β€” Works on mobile, tablet, and desktop

πŸ› οΈ Tech Stack

Layer Tech
Frontend React 18 + Vite, React Router v6
Styling Pure CSS (no Tailwind), CSS Variables
Code Editor Monaco Editor (@monaco-editor/react)
Backend Node.js + Express.js
Database JSON files (fs read/write)
Auth JWT (jsonwebtoken) + bcryptjs
Fonts Playfair Display, Inter, Poppins, JetBrains Mono
Icons Phosphor Icons
Notifications react-hot-toast

πŸ“ Project Structure

algovault/
β”œβ”€β”€ client/                      # React Vite Frontend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ Navbar.jsx        # Auth-aware navbar with dropdown
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.jsx        # Full footer with links
β”‚   β”‚   β”‚   β”œβ”€β”€ LoadingScreen.jsx # Animated 2.5s intro
β”‚   β”‚   β”‚   β”œβ”€β”€ ProtectedRoute.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AvaBot.jsx        # Floating AI mentor widget
β”‚   β”‚   β”‚   └── DifficultyBadge.jsx
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthContext.jsx   # User state, login/logout
β”‚   β”‚   β”‚   └── ThemeContext.jsx  # Light/dark theme
β”‚   β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”‚   β”œβ”€β”€ LandingPage.jsx   # Hero, CSS study room, features, testimonials
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthPages.jsx     # Login + Register (split-screen)
β”‚   β”‚   β”‚   β”œβ”€β”€ HomePage.jsx      # Dashboard after login
β”‚   β”‚   β”‚   β”œβ”€β”€ ExplorePage.jsx   # Problem list with filters
β”‚   β”‚   β”‚   β”œβ”€β”€ ProblemPage.jsx   # Monaco editor + run/submit
β”‚   β”‚   β”‚   β”œβ”€β”€ LeaderboardPage.jsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DiscussPage.jsx   # Forum with threads & comments
β”‚   β”‚   β”‚   └── OtherPages.jsx    # Practice, About, 404
β”‚   β”‚   β”œβ”€β”€ services/api.js       # Axios instance with JWT interceptor
β”‚   β”‚   β”œβ”€β”€ App.jsx               # Router + loading screen
β”‚   β”‚   └── index.css             # Full design system (600+ lines)
β”‚   β”œβ”€β”€ index.html
β”‚   └── vite.config.js
β”‚
└── server/                       # Node.js Express Backend
    β”œβ”€β”€ data/
    β”‚   β”œβ”€β”€ users.json            # 5 seed users
    β”‚   β”œβ”€β”€ problems.json         # 15 real problems
    β”‚   β”œβ”€β”€ submissions.json      # User submissions
    β”‚   └── discussions.json      # Forum threads
    β”œβ”€β”€ routes/
    β”‚   β”œβ”€β”€ auth.routes.js
    β”‚   β”œβ”€β”€ problems.routes.js
    β”‚   β”œβ”€β”€ submissions.routes.js
    β”‚   β”œβ”€β”€ users.routes.js
    β”‚   β”œβ”€β”€ discussions.routes.js
    β”‚   └── leaderboard.routes.js
    β”œβ”€β”€ middleware/auth.middleware.js
    β”œβ”€β”€ utils/jsonDB.js
    └── server.js

πŸš€ Getting Started

Prerequisites

  • Node.js v18+
  • npm v8+

1. Install & Run Backend

cd server
npm install
npm run dev
# βœ… Server running on http://localhost:5000

2. Install & Run Frontend

cd client
npm install
npm run dev
# βœ… App running on http://localhost:5173

3. Open in Browser

Navigate to http://localhost:5173


πŸ”‘ Demo Credentials

Field Value
Email manthan@example.com
Password password

Other seed users: arjun@example.com, priya@example.com, alex@example.com, sofia@example.com β€” all use password.


🌐 API Endpoints

Auth

POST   /api/auth/register         Create account
POST   /api/auth/login            Login β†’ JWT
GET    /api/auth/me               Get current user (πŸ”’)
GET    /api/auth/check-username/:u Check availability

Problems

GET    /api/problems              List (search, difficulty, topic, sort, page)
GET    /api/problems/:id          Single problem by ID or slug
POST   /api/problems              Create (admin only πŸ”’)

Submissions

POST   /api/submissions/run       Run code against test cases (πŸ”’)
POST   /api/submissions/submit    Submit solution (πŸ”’)
GET    /api/submissions/me        My submissions (πŸ”’)
GET    /api/submissions/problem/:id  Problem submissions (πŸ”’)

Users

GET    /api/users/:username       Public profile
GET    /api/users/me/stats        My stats (πŸ”’)
PUT    /api/users/me              Update profile (πŸ”’)

Leaderboard

GET    /api/leaderboard           Global rankings
GET    /api/leaderboard/weekly    Weekly rankings

Discussions

GET    /api/discussions           List threads (sort, tag)
POST   /api/discussions           Create thread (πŸ”’)
GET    /api/discussions/:id       Single thread
POST   /api/discussions/:id/comments  Add comment (πŸ”’)
PUT    /api/discussions/:id/vote  Upvote/downvote (πŸ”’)

🎨 Design System

/* Brand Colors */
--primary-blue: #436b95;    /* Main brand */
--accent-gold:  #caa855;    /* Highlights, badges */

/* Difficulty */
--easy:   #4caf50;
--medium: #ff9800;
--hard:   #f44336;

/* Fonts */
Playfair Display  β†’ Headings, titles
Inter             β†’ Body, UI text
Poppins           β†’ Buttons, CTAs
JetBrains Mono    β†’ Code, editor

πŸ”’ Environment Variables

server/.env

PORT=5000
JWT_SECRET=algvault_super_secret_jwt_key_2025
NODE_ENV=development

πŸ“¦ Dependencies

Client

{
  "react": "^18",
  "react-router-dom": "^6",
  "axios": "^1",
  "@monaco-editor/react": "^4",
  "react-hot-toast": "^2",
  "date-fns": "^3"
}

Server

{
  "express": "^4",
  "bcryptjs": "^2",
  "jsonwebtoken": "^9",
  "uuid": "^9",
  "cors": "^2",
  "morgan": "^1",
  "dotenv": "^16"
}

πŸ—ΊοΈ Roadmap

  • Python/C++ code execution (Docker sandbox)
  • Real AI integration for Ava (Claude API)
  • User profile pages & avatars
  • Weekly challenge system with prizes
  • Premium features (solution unlocks)
  • PostgreSQL migration from JSON storage
  • Email notifications & password reset

πŸ‘€ Author

Manthan Vinzuda β€” Full-Stack Developer

"Every algorithm begins with silence and ends in clarity."


AlgoVault 2025 β€” Crafted with ❀️

About

This Is My LeedCode Type Project So Make It Let's Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors