Skip to content

A real-time coding platform featuring matchmaking, live status updates, and code evaluation.

License

Notifications You must be signed in to change notification settings

ianshpwr/fleetcode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

114 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

fleetcode

A full-stack application blending a React frontend and Python FastAPI backend for collaborative coding, competitive programming, or coding interview-style practice.

Built during a hackathon, fleetcode aims to bring the thrill of real-time 1v1 competitive coding to life — think LeetCode meets Chess.com. Whether you're grinding interview prep, battling friends, or building your rating, fleetcode makes it fast, real-time, and fun.

No lobbies. No delays. Just code, compete, and climb.

This repository is organized into two main parts:

  • client/ – Frontend (React)
  • server/ – Backend (FastAPI/Python)

Table of Contents


Project Structure

.
├── client/      # React frontend
│   ├── public/  # Static assets
│   ├── src/     # Source code (components, routes, etc.)
│   └── ...      # Configs, package.json, etc.
├── server/      # FastAPI backend
│   ├── routers/ # API endpoints (user, match, judge, etc.)
│   ├── schemas/ # Pydantic models
│   ├── services/# Business logic (judging, matchmaking, rating)
│   ├── utils/   # Utility modules
│   └── ...      # main.py, requirements.txt, etc.
├── README.md

Features

  • Real-time Coding: Collaborative and competitive coding sessions.
  • Matchmaking: Match users for coding duels or practice.
  • Code Judging: Submit solutions and get automatic feedback.
  • User System: User authentication and management.
  • Live Updates: Sockets for real-time updates.
  • Leaderboard/Rating: Track your progress and compete.

Getting Started

Prerequisites

  • Node.js (v18+ recommended)
  • Python 3.8+
  • pip
  • Vite (for frontend, installed via npm)
  • (Optional) Docker

Installation

  1. Clone the repository:

    git clone https://github.com/pythonicforge/fleetcode.git
    cd fleetcode
  2. Install Client Dependencies:

    cd client
    npm install
  3. Install Server Dependencies:

    cd ../server
    pip install -r requirements.txt

Development

Running the Client

From the client/ directory:

npm run dev
  • Configured with Vite (vite.config.js)
  • Main entry: src/main.jsx
  • Protected routes, authentication, and main logic in src/

Running the Server

From the server/ directory:

uvicorn main:app --reload
  • Main entry: main.py
  • Routers define API endpoints (e.g., routers/match.py, routers/submission.py)
  • Models in schemas/, business logic in services/, helpers in utils/

Tech Stack

  • Frontend: React, Vite, JavaScript/JSX, CSS
  • Backend: Python, FastAPI, Pydantic
  • Communication: REST, WebSockets (for real-time features)
  • Other: ESLint, Vercel config for deployment

Directory Overview

Client

  • index.html: Entry HTML.
  • src/: App source code
    • App.jsx: Main React app component
    • Protectedroute.jsx: For protected routing
    • components/: UI components
  • public/: Static assets (e.g., vite.svg)
  • package.json, package-lock.json: NPM configs
  • eslint.config.js: Linting
  • vite.config.js: Vite setup
  • vercel.json: Deployment config

See client/ for all files.

Server

  • main.py: FastAPI app startup
  • requirements.txt: Python dependencies
  • routers/: API endpoints
    • match.py, match_socket.py, submission.py, user.py, judge.py
  • schemas/: Pydantic models (user.py, match.py, submission.py, etc.)
  • services/: Core logic (judge_client.py, matchmaking.py, rating.py, supabase_client.py)
  • utils/: Helpers (connection_manager.py)

See server/ for all files.


Contributing

Contributions are welcome! Please open issues or pull requests via GitHub.

  • Follow standard code style (ESLint/Prettier for JS, Black for Python).
  • Add documentation/comments to your code.
  • Run tests and make sure code builds before submitting.

License

Distributed under the MIT License. See LICENSE for more information.

About

A real-time coding platform featuring matchmaking, live status updates, and code evaluation.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 44.7%
  • CSS 43.5%
  • Python 11.5%
  • HTML 0.3%