Skip to content

WillyEverGreen/ReCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReCode - DSA Solution Generator & Revision Tracker

A modern web application that helps developers master Data Structures and Algorithms through AI-powered solution generation and smart revision tracking.

ReCode License

Features

🚀 AI-Powered Solution Generation

  • Get brute force, better, and optimal solutions for any DSA problem
  • Powered by Qubrid AI with multi-tier caching (Redis → MongoDB)
  • Supports multiple programming languages

📚 Smart Revision Tracking

  • Save and organize your solved problems
  • Track patterns and categories
  • Review time/space complexity

🔐 Secure Authentication

  • Email verification with OTP
  • Password reset functionality
  • JWT-based session management

📊 Admin Dashboard

  • User analytics
  • Cache management
  • Solution statistics

Tech Stack

Frontend:

  • React 18 + TypeScript
  • Vite
  • TailwindCSS

Backend (Serverless):

  • Vercel Serverless Functions
  • MongoDB (Mongoose)
  • Upstash Redis

AI:

  • Qubrid AI (Qwen3-Coder)

Getting Started

Prerequisites

  • Node.js 18+
  • MongoDB database
  • Upstash Redis (optional, for faster caching)
  • Qubrid API key

Installation

  1. Clone the repository

    git clone https://github.com/WillyEverGreen/ReCode.git
    cd ReCode
  2. Install dependencies

    npm install
  3. Configure environment variables

    cp .env.example .env

    Fill in your .env file:

    # MongoDB
    MONGO_URI=mongodb+srv://...
    
    # JWT Secret
    JWT_SECRET=your-secret-key
    
    # Qubrid AI
    QUBRID_API_KEY=your-qubrid-api-key
    
    # Admin
    ADMIN_PASSWORD=your-admin-password
    
    # Redis (Optional - for faster caching)
    UPSTASH_REDIS_REST_URL=https://...
    UPSTASH_REDIS_REST_TOKEN=...
  4. Run development server

    # Using Vercel CLI (recommended - tests serverless functions)
    vercel dev
    
    # Or using Vite only (frontend only)
    npm run dev
  5. Open http://localhost:3000

Deployment

Vercel (Recommended)

  1. Push code to GitHub
  2. Import project in Vercel
  3. Add environment variables in Vercel dashboard
  4. Deploy!

Environment Variables for Production

Variable Required Description
MONGO_URI MongoDB connection string
JWT_SECRET Secret for JWT tokens
QUBRID_API_KEY Qubrid AI API key
ADMIN_PASSWORD Admin panel password
UPSTASH_REDIS_REST_URL Upstash Redis URL
UPSTASH_REDIS_REST_TOKEN Upstash Redis token

API Endpoints

Endpoint Method Description
/api/health GET Health check
/api/auth/signup POST User registration
/api/auth/login POST User login
/api/auth/verify-email POST Verify email OTP
/api/auth/forgot-password POST Request password reset
/api/auth/reset-password POST Reset password
/api/solution POST Generate DSA solution
/api/questions GET/POST User's saved questions
/api/admin/stats GET Admin statistics

Project Structure

ReCode/
├── api/                    # Vercel Serverless Functions
│   ├── _lib/               # Shared utilities
│   ├── admin/              # Admin endpoints
│   ├── auth/               # Authentication endpoints
│   ├── questions/          # Questions CRUD
│   └── solution/           # Solution generation
├── components/             # React components
├── models/                 # MongoDB models
├── services/               # Frontend services
├── config/                 # Configuration
└── types/                  # TypeScript types

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.


Made with ❤️ by WillyEverGreen

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published