From 920787b82ab7536bcbf9df65dc9fceb11cb28a9f Mon Sep 17 00:00:00 2001 From: Eshal Shaikh Date: Mon, 28 Oct 2024 19:32:20 +0530 Subject: [PATCH] Update README.md --- README.md | 128 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 100 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 6e99d96..550bd86 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,31 @@ -# 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. +
+ Affinity Architecture +
+ + + +## πŸ› οΈ Tech Stack + +- **πŸ¦€ Language**: Rust +- **βš™οΈ Framework**: Axum +- **πŸ’Ύ Database**: PostgreSQL +- **🐳 Containerization**: Docker +- **πŸš€ CI/CD**: GitHub Actions, Jenkins, Docker Compose + + + +## πŸ“‹ 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) @@ -21,36 +33,96 @@ Make sure you have the following installed: ### 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 ./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 + + +### Running in Docker 🐳 + +To run the project in Docker, ensure that the environment variables for database connection are properly set. Follow these steps: + +1. **Build the Docker image:** + + ```bash + docker build -t affinity-backend . + ``` + +2. **Run the Docker container:** + + ```bash + docker run -e DATABASE_URL= -p 8000:8000 affinity-backend + ``` + +3. **Using Docker Compose:** + + Update the `docker-compose.yml` file with the correct environment variables, and then: + + ```bash + docker-compose up + ``` + + + +### 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 ./helm_charts + ``` + + + +## 🌱 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. + + + +## πŸ—οΈ 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) + + + +## ❀️ Our Valuable Contributors +
+ Affinity Architecture +
+ -## Our Valuable Contributors ❀️✨ [![Contributors](https://contrib.rocks/image?repo=Sidharth-Singh10/Affinity-backend)](https://github.com/Sidharth-Singh10/Affinity-backend/graphs/contributors) + + +## πŸ“„ 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. +