-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
87 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,115 @@ | ||
# Affinity Backend | ||
|
||
## Introduction | ||
This repository contains the backend for the **Affinity** project, built using the [Axum](https://github.com/tokio-rs/axum) framework in Rust. The backend manages API requests and communicates with a PostgreSQL database, ensuring high performance and scalability. | ||
|
||
## Tech Stack | ||
- **Language**: Rust | ||
- **Framework**: Axum | ||
- **Database**: PostgreSQL | ||
- **Containerization**: Docker | ||
- **CI/CD**: Github Actions ,Jenkins, Docker Compose | ||
|
||
## Setup | ||
# 🚀 Affinity Backend | ||
|
||
Welcome to the **Affinity** backend repository! This project is powered by the blazing-fast [Axum](https://github.com/tokio-rs/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. | ||
|
||
|
||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> | ||
|
||
## 🛠️ Tech Stack | ||
|
||
- **🦀 Language**: Rust | ||
- **⚙️ Framework**: Axum | ||
- **💾 Database**: PostgreSQL | ||
- **🐳 Containerization**: Docker | ||
- **🚀 CI/CD**: GitHub Actions, Jenkins, Docker Compose | ||
|
||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> | ||
|
||
## 📋 Setup | ||
|
||
### Prerequisites | ||
|
||
Make sure you have the following installed: | ||
|
||
- [Rust](https://www.rust-lang.org/tools/install) | ||
- [PostgreSQL](https://www.postgresql.org/) | ||
- [Docker](https://www.docker.com/) (optional, if running in a container) | ||
|
||
### Installation | ||
|
||
1. **Clone the repository:** | ||
|
||
```bash | ||
git clone https://github.com/Sidharth-Singh10/Affinity-backend | ||
cd Affinity-backend | ||
2. **Build and run the backend:** | ||
``` | ||
|
||
2. **Build and run the backend:** | ||
|
||
```bash | ||
cargo build | ||
cargo run | ||
``` | ||
### Running in Docker | ||
The `dockerfile` is incomplete, add `env` accordingly. | ||
The `docker-compose` is incomplete. | ||
database url does not feed into the backend `env` | ||
|
||
### Running in K8 | ||
`helm install <app-name> ./hell_charts` | ||
does the work without setting up a database. | ||
Configure `values.json` before running the command. | ||
|
||
## Contributing | ||
Read [CONTRIBUTING.md](https://github.com/Sidharth-Singh10/Affinity-backend/blob/main/CONTRIBUTING.md) | ||
|
||
## Affinity Project | ||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> | ||
|
||
### Running in Docker 🐳 | ||
|
||
To run the project in Docker, ensure that the environment variables for database connection are properly set. Follow these steps: | ||
|
||
|
||
1. **Using Docker Compose:** | ||
|
||
Update the `docker-compose.yml` file with the correct environment variables, and then: | ||
|
||
```bash | ||
docker-compose up | ||
``` | ||
|
||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> | ||
|
||
### Running on Kubernetes with Helm ⛵ | ||
|
||
Deploy the project on a Kubernetes cluster using Helm: | ||
|
||
1. **Configure `values.yaml`:** | ||
|
||
Make sure your `values.yaml` file is properly set up with the required database configuration. | ||
|
||
2. **Install the application with Helm:** | ||
|
||
```bash | ||
helm install <app-name> ./helm_charts | ||
``` | ||
|
||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> | ||
|
||
## 🌱 Contributing | ||
|
||
We welcome contributions! Please check out our [CONTRIBUTING.md](https://github.com/Sidharth-Singh10/Affinity-backend/blob/main/CONTRIBUTING.md) to get started. Contributions are expected to follow good practices, maintain code quality, and align with the project’s objectives. | ||
|
||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> | ||
|
||
## 🏗️ Affinity Project Overview | ||
|
||
1. **Architecture** (deprecated) | ||
|
||
![image](https://github.com/user-attachments/assets/402a9b69-eccd-478b-9c0e-50810200c28d) | ||
2. **Links** | ||
- Frontend: `https://github.com/rishyym0927/Affinity_frontend` | ||
![Architecture](https://github.com/user-attachments/assets/402a9b69-eccd-478b-9c0e-50810200c28d) | ||
|
||
2. **Frontend Repository**: | ||
The frontend code for this project is available at: | ||
[Affinity Frontend](https://github.com/rishyym0927/Affinity_frontend) | ||
|
||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> | ||
|
||
## ❤️ Our Valuable Contributors | ||
<div align="center"> | ||
<img src="https://github.com/user-attachments/assets/c7f169de-e8e9-418e-a08e-c69b34c23a41" alt="Affinity Architecture" width="200"/> | ||
</div> | ||
|
||
|
||
## Our Valuable Contributors ❤️✨ | ||
|
||
[![Contributors](https://contrib.rocks/image?repo=Sidharth-Singh10/Affinity-backend)](https://github.com/Sidharth-Singh10/Affinity-backend/graphs/contributors) | ||
|
||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> | ||
|
||
## 📄 License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](https://github.com/Sidharth-Singh10/Affinity-backend/blob/main/LICENSE) file for details. | ||
|
||
|
||
This version includes all necessary build, run, and deployment instructions formatted as code blocks for ease of use. | ||
<img src="https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif" width="900"> |