Skip to content

AlgoBytes: LeetCode-like platform [Full Stack] for coding challenges, featuring user management, question management, code submission, and execution functionalities. Built with Angular, Python, GCP Cloud Functions (Serverless), and GCP Firestore (NoSQL), this project demonstrates a scalable system design for coding practice and evaluation platform

Notifications You must be signed in to change notification settings

SameerKhurd/algo-bytes

Repository files navigation

AlgoBytes : LeetCode-like Coding Platform [Full Stack]

Overview

This repository contains the codebase for a LeetCode-like coding platform AlgoBytes, designed to provide users with coding challenges and an integrated code execution environment. The platform includes user management, question management, code submission, and execution functionalities.

Demo

Checkout  Live Demo :  algobytes.web.app

System Design Blog

For a detailed explanation of the system design and implementation, checkout System Design Blog.


AlgoBytes

Contents

Technology Stack

  • Frontend: Angular, Bootstrap 5, PrimeNG, ngx-monaco-editor, ng2-chart
  • Backend: Python, GCP Cloud Functions (Serverless)
  • Database: GCP Firestore (NoSQL)
  • Hosting: Firebase Hosting
  • APIs: RESTful APIs

Frontend Setup

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/SameerKhurd/algo-bytes.git
  2. Navigate to the project directory:
    cd algo-bytes
  3. Install frontend dependencies:
    cd frontend/algo-bytes-web-app
    npm install --force

Running Locally

  1. Navigate to the project directory:

    cd algo-bytes
  2. Start the frontend server:

    cd frontend/algo-bytes-web-app
    npm start

    or

    cd frontend/algo-bytes-web-app
    ng serve

Backend Setup

Prerequisites

Installation

  1. Clone the repository (If not cloned the repository earlier):
    git clone https://github.com/SameerKhurd/algo-bytes.git
  2. Navigate to the project directory:
     cd algo-bytes
  3. Navigate to backend code directory:
    cd api-functions-serverless/functions
  4. Create a virtual environment and activate it:
    python3.12 -m venv venv
    source venv/bin/activate
  5. Install backend dependencies:
    pip install -r requirements.txt

Setting up local firestore and cloud functions using firebase emulator

  1. Firebase Login - log in via the browser and authenticate the Firebase CLI.
    cd api-functions-serverless/
    firebase login
  2. Follow step mentioned for initializing and setting up firestore in the documentation
    firebase init firestore
  3. Initialize firebase functions.
    firebase init functions

Running Locally

  1. Start the backend server:
    cd api-functions-serverless/
    firebase emulators:start

Deployment

Frontend Deployment

  1. Configure GitHub Actions to build and deploy to Firebase Hosting on commits to the deploy branch.
  2. GitHub Actions runners will build the package and deploy it automatically.

Backend Deployment

  1. Set up Firebase CLI and configure it for the respective project.
  2. Deploy the cloud functions manually:
    firebase deploy --only functions

Contributing

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature-branch).
  3. Make your changes and commit them (git commit -m 'Add new feature').
  4. Push to the branch (git push origin feature-branch).
  5. Open a pull request.

Screenshots

  • Landing Page Landing Page

  • Question Page Question Page

  • Question Page - Submissions Question Page - Submissions

  • Question Page - Execution Result Question Page -  Execution Result

  • Question Page - Wrong Result Question Page - Wron Result

  • Question Page - Runtime Error Result Question Page - Runtime Error More Screenshots

About

AlgoBytes: LeetCode-like platform [Full Stack] for coding challenges, featuring user management, question management, code submission, and execution functionalities. Built with Angular, Python, GCP Cloud Functions (Serverless), and GCP Firestore (NoSQL), this project demonstrates a scalable system design for coding practice and evaluation platform

Topics

Resources

Stars

Watchers

Forks