Skip to content

This is the clone of Leetcode website created from scratch in Reactjs and problem execution is done by judge0

License

Notifications You must be signed in to change notification settings

sanketsingh01/CodeLeap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

85 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CodeLeap ๐Ÿš€

CodeLeap Logo

Enhance Your Coding Skills Today!

License Version Build Status

๐Ÿ“– About

CodeLeap is an interactive coding practice platform designed to help developers enhance their programming skills through practical challenges. Master coding problems with hands-on experience and improve your problem-solving abilities with expert-led tutorials across multiple programming languages.

โœจ Features

  • ๐ŸŽฏ Interactive Coding Challenges - Solve problems ranging from Easy to Hard difficulty levels
  • ๐Ÿ“Š Progress Tracking - Monitor your coding journey with detailed statistics and streaks
  • ๐Ÿ’ป Multi-Language Support - Practice in JavaScript, Python, Java, and more
  • โšก Real-time Code Execution - Test your solutions instantly with our online code editor
  • ๐Ÿ“ˆ Performance Analytics - Track your success rate, average completion time, and improvement over time
  • ๐Ÿ† Achievement System - Maintain coding streaks and unlock achievements
  • ๐Ÿ“š Problem Categories - Organized by topics like algorithms, data structures, mathematics, and more
  • ๐Ÿ’พ Solution Bookmarking - Save and revisit your favorite problems
  • ๐Ÿ‘ฅ Community Features - Share solutions and discuss approaches with other developers

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v14 or higher)
  • npm or yarn
  • Modern web browser

Installation

  1. Clone the repository

    git clone https://github.com/sanketsingh01/CodeLeap
    cd codeleap
  2. Backend Setup

    cd BACKEND
    npm install
    # Set up environment variables
    cp .env.example .env
    # Edit .env with your database and API configuration
    
    # Set up Prisma database
    npx prisma generate
    npx prisma db push
    npx prisma db seed
    
    # Start the backend server
    npm start
    # Backend will run on http://localhost:5000
  3. Frontend Setup

    cd ../FRONTEND
    npm install
    # Start the frontend development server
    npm run dev
    # Frontend will run on http://localhost:5173
  4. Open your browser Navigate to http://localhost:5173

๐Ÿ—๏ธ Project Structure

codeleap/
โ”œโ”€โ”€ FRONTEND/
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ”‚   โ”œโ”€โ”€ favicon.ico
โ”‚   โ”‚   โ””โ”€โ”€ index.html
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ assets/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ images/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ icons/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ styles/
โ”‚   โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ common/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CodeEditor/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ ProblemList/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ UserProfile/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ UI/
โ”‚   โ”‚   โ”œโ”€โ”€ layout/
|   |   |    โ””โ”€โ”€ Layout.jsx
โ”‚   โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Profile/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Problems/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Profile/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Auth/
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Landing/
โ”‚   โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ””โ”€โ”€ App.js
โ”‚   |   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ README.md
โ”œโ”€โ”€ BACKEND/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ models/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Problem.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Submissions.js
โ”‚   โ”‚   โ”œโ”€โ”€ assets
โ”‚   โ”‚   โ”œโ”€โ”€ controllers/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ authController.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ problemController.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ userController.js
โ”‚   โ”‚   โ”œโ”€โ”€ middlewares/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ validation.js
โ”‚   โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ auth.js
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ problems.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ users.js
โ”‚   โ”‚   โ”œโ”€โ”€ utils/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ database.js
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ constants.js
โ”‚   โ”‚   โ””โ”€โ”€ validators/
โ”‚   โ”‚       โ”œโ”€โ”€ authValidator.js
โ”‚   โ”‚       โ”œโ”€โ”€ problemValidator.js
โ”‚   โ”‚       โ””โ”€โ”€ userValidator.js
โ”‚   โ”œโ”€โ”€ prisma/
โ”‚   โ”‚   โ”œโ”€โ”€ schema.prisma
โ”‚   โ”‚   โ”œโ”€โ”€ migrations/
โ”‚   โ”‚   โ””โ”€โ”€ seed.js
โ”‚   โ”œโ”€โ”€ index.js
โ”‚   โ”œโ”€โ”€ package.json
โ”‚   โ””โ”€โ”€ .env.example
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ docker-compose.yml
โ””โ”€โ”€ README.md

๐ŸŽฎ How to Use

For Beginners

  1. Create an Account - Sign up to track your progress
  2. Start with Easy Problems - Begin with fundamental coding challenges
  3. Use the Code Editor - Write your solution in the integrated editor
  4. Test Your Code - Run test cases to verify your solution
  5. Submit and Learn - Submit your solution and review explanations

For Advanced Users

  1. Filter by Difficulty - Challenge yourself with Medium and Hard problems
  2. Track Your Streaks - Maintain daily coding practice
  3. Explore Different Languages - Switch between JavaScript, Python, and Java
  4. Analyze Performance - Review your success rate and improvement metrics
  5. Create Custom Sheets - Organize problems into personalized study lists

๐Ÿ“Š User Dashboard Features

  • Progress Overview: Visual representation of solved problems (1 of 22 completed)
  • Difficulty Breakdown: Track Easy, Medium, and Hard problem completion
  • Statistics Panel:
    • Languages practiced
    • Average completion time
    • Total submissions
    • Success rate
  • Streak Tracking: Current streak and best streak
  • Language Proficiency: JavaScript, Python, Java support

๐Ÿ› ๏ธ Technologies Used

Frontend

  • React.js - User interface framework
  • Tailwind CSS - Styling and responsive design
  • Monaco Editor - Code editing experience
  • React Router - Navigation and routing
  • Axios - API communication

Backend

  • Node.js - Server runtime
  • Express.js - Web application framework
  • Prisma - Database ORM and query builder
  • PostgreSQL/MySQL - Database (configurable via Prisma)
  • JWT - Authentication and authorization
  • bcryptjs - Password hashing
  • express-validator - Input validation
  • cors - Cross-origin resource sharing
  • dotenv - Environment variable management

Development Tools

  • Webpack - Module bundling
  • Babel - JavaScript compilation
  • ESLint - Code linting
  • Prettier - Code formatting
  • Jest - Testing framework

๐Ÿš€ Deployment

Production Build

npm run build
# or
yarn build

Deploy to Vercel

npm install -g vercel
vercel --prod

Deploy to Netlify

  1. Connect your GitHub repository to Netlify
  2. Set build command: npm run build
  3. Set publish directory: build
  4. Deploy automatically on push to main branch

๐Ÿค Contributing

We welcome contributions from the community! Here's how you can help:

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

Development Guidelines

  • Follow the existing code style
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting

๐Ÿ“ API Documentation

Authentication Endpoints

  • POST /api/v1/v1/auth/register - User registration
  • POST /api/v1/v1/auth/login - User login
  • POST /api/v1/auth/logout - User logout

Problem Endpoints

  • GET /api/v1/problems - Fetch all problems
  • GET /api/v1/problems/:id - Get specific problem
  • POST /api/v1/problems/:id/submit - Submit solution

User Endpoints

  • GET /api/v1/user/profile - Get user profile
  • PUT /api/v1/user/checkAuth - checks the authenticated user

๐Ÿ› Known Issues

  • Code editor occasionally loses focus on mobile devices
  • Performance optimization needed for large problem sets
  • Pricing page is in development

๐Ÿ“‹ Roadmap

Version 1.1.0

  • Advanced code debugging tools
  • Video solution explanations
  • Mobile app development
  • Social coding features

Version 1.2.0

  • AI-powered hint system
  • Contest mode
  • Team challenges
  • Advanced analytics dashboard

๐Ÿ“ž Support

If you encounter any issues or have questions:

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Thanks to all contributors who have helped shape CodeLeap
  • Inspired by popular coding platforms like LeetCode and HackerRank
  • Special thanks to the open-source community for tools and libraries

๐Ÿ“ˆ Statistics

  • Active Users: 10+
  • Problems Available: 20+
  • Solutions Submitted:
  • Languages Supported: 3

Made with โค๏ธ by the CodeLeap Team

Website โ€ข Twitter โ€ข LinkedIn

About

This is the clone of Leetcode website created from scratch in Reactjs and problem execution is done by judge0

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages