https://github.com/pythonicforge/fleetcode
https://github.com/pythonicforge/fleetcode
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pythonicforge/fleetcode
- Owner: pythonicforge
- Created: 2025-05-25T17:36:12.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2025-05-25T17:46:10.000Z (7 months ago)
- Last Synced: 2025-05-25T18:45:45.665Z (7 months ago)
- Language: JavaScript
- Size: 28.3 KB
- Stars: 0
- Watchers: 0
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](#project-structure)
- [Features](#features)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Development](#development)
- [Running the Client](#running-the-client)
- [Running the Server](#running-the-server)
- [Tech Stack](#tech-stack)
- [Directory Overview](#directory-overview)
- [Contributing](#contributing)
- [License](#license)
## 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](https://pip.pypa.io/)
- [Vite](https://vitejs.dev/) (for frontend, installed via npm)
- (Optional) Docker
### Installation
1. **Clone the repository:**
```bash
git clone https://github.com/pythonicforge/fleetcode.git
cd fleetcode
```
2. **Install Client Dependencies:**
```bash
cd client
npm install
```
3. **Install Server Dependencies:**
```bash
cd ../server
pip install -r requirements.txt
```
## Development
### Running the Client
From the `client/` directory:
```bash
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:
```bash
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/](https://github.com/pythonicforge/fleetcode/tree/master/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/](https://github.com/pythonicforge/fleetcode/tree/master/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](LICENSE) for more information.