Welcome to the Affinity backend repository! This project is powered by the blazing-fast Axum framework, built using Rust to handle API requests and efficiently communicate with a PostgreSQL database. Our backend is optimized for high performance and scalability, designed to meet the demands of modern applications.
PerOxO is a core backend engine within the Affinity system designed for high-throughput real-time features like messaging and presence.
Key Highlights:
- Actor Model Concurrency: Built using Rust’s asynchronous capabilities to ensure isolated, concurrent actor execution per user session.
- Microservice Architecture: Operates as an independent service, enabling decoupled scaling and service separation.
- gRPC Communication: Interfaces with other Affinity services using performant, schema-defined gRPC calls.
- WebSocket Integration: Handles persistent user connections, routes messages, and manages session lifecycles. This module lives as a subproject under ./per_oxo/ and can be built, tested, and deployed independently.
-
Language: Rust
-
Framework: Axum
-
Database: PostgreSQL,ScyllaDB
-
Containerization: Docker
-
CI/CD: GitHub Actions, Jenkins,
-
Orchestration: Kubernetes with Helm
Make sure you have the following installed:
- Rust
- PostgreSQL
- Docker (optional, if running in a container)
-
Clone the repository:
git clone https://github.com/Sidharth-Singh10/Affinity-backend cd Affinity-backend -
Build and run the backend:
cargo build cargo run
To run the project in Docker, ensure that the environment variables for database connection are properly set. Follow these steps:
-
Using Docker Compose:
Update the
docker-compose.ymlfile with the correct environment variables, and then:docker-compose up
Deploy the project on a Kubernetes cluster using Helm:
-
Configure
values.yaml:Make sure your
values.yamlfile is properly set up with the required database configuration. -
Install the application with Helm:
helm install <app-name> ./helm_charts
We welcome contributions! Please check out our CONTRIBUTING.md to get started. Contributions are expected to follow good practices, maintain code quality, and align with the project’s objectives.
- PerOxO Architecture:
2. Affinity Architecture (deprecated)
- BackendDevOps
-
Frontend Repository:
The frontend code for this project is available at:
Affinity-Frontend -
Discord Bot Repository The code of discord bot used in our server is available at:
Discord-bot
This project is licensed under the MIT License - see the LICENSE file for details.
This version includes all necessary build, run, and deployment instructions formatted as code blocks for ease of use.



