TAlgo is a competitive programming platform inspired by Codeforces, implemented as a Rust workspace. This project aims to provide a robust, efficient, and user-friendly environment for coding competitions and practice.
This workspace contains the following crates:
core
: Core backend functionality and data structuresdata_dust
: Database functions and utilitiesoxide_wave
: WebSocket implementationsub_sweeper
: Worker for managing submission queue and judging
- User registration and authentication
- Problem submission and evaluation
- Real-time contest management
- Leaderboards and user ratings
- Problem set browsing and filtering
- Editorial and solution discussions
- Rust (latest stable version)
- PostgreSQL (for database)
- Redis (for caching and real-time features)
- Docker (for containerization)
- Kafka (for message queueing)
- Diesel CLI (for database migrations)
-
Clone the repository:
git clone https://github.com/shawakash/talgo.git cd talgo
-
Set up the database and configure environment variables (see
.env.example
). -
Build the project:
cargo build --release
-
Setup the enviroments:
cp .env.example .env
Edit the
.env
file and set the values accordingly. -
Start some services (PostgreSQL, Redis, Kafka) using Docker:
cd docker/services docker-compose up -d
-
Run the database migrations:
cd crates/data_dust diesel migration run cd ../..
-
Start the server:
cargo run --bin core cargo run --bin oxide_wave
- Access the core backend api server at
http://localhost:8080
- Access the web socket server at
http://localhost:8081
To run tests across all crates:
cargo test --workspace
To format the code:
cargo fmt --all
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by Codeforces
- Built with Rust