https://github.com/lokrip/business-application-backend
This is a backend business application designed to manage clients, subscription plans, and services. It allows businesses to subscribe to different service plans and manage their subscriptions efficiently
https://github.com/lokrip/business-application-backend
celery django django-cache django-rest-framework docker python redis
Last synced: 2 months ago
JSON representation
This is a backend business application designed to manage clients, subscription plans, and services. It allows businesses to subscribe to different service plans and manage their subscriptions efficiently
- Host: GitHub
- URL: https://github.com/lokrip/business-application-backend
- Owner: Lokrip
- License: mit
- Created: 2025-01-09T12:33:40.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-01-10T03:25:29.000Z (5 months ago)
- Last Synced: 2025-02-09T05:47:12.519Z (4 months ago)
- Topics: celery, django, django-cache, django-rest-framework, docker, python, redis
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Business Application Backend
## Overview
This is a backend business application designed to manage clients, subscription plans, and services. It allows businesses to subscribe to different service plans and manage their subscriptions efficiently.### Features
- **Client Management**: Clients are associated with their users and can store their company details.
- **Service Management**: Services can be created and updated with pricing details.
- **Subscription Plans**: Plans are categorized (e.g., full, student, discount) and associated with clients.
- **Dynamic Price Adjustment**: Subscription prices and comments are recalculated and updated upon changes to service prices or plan discounts.
- **Efficient Query Execution**: The application is designed to execute only necessary queries, with indexes applied to critical fields for faster lookups.
- **Cache Management**: Automatic cache invalidation when subscriptions are deleted.## Technologies Used
- **Django**: The web framework for developing the backend.
- **Django REST Framework**: For building RESTful APIs.
- **Celery**: For handling asynchronous tasks like updating prices and comments.
- **Docker**: For containerizing the application and ensuring it runs consistently across environments.
- **Redis**: Used as a broker for Celery tasks.
- **Django Cachalot**: For improving database query performance with caching.## Installation
### Prerequisites
- Python 3.x
- Docker and Docker Compose (optional but recommended for containerization)### Steps to Run the Project
1. **Clone the repository**:
```bash
git clone https://github.com/Lokrip/Business-Application-Backend.git
```1. **Build Docker containers**:
```bash
docker-compose up --build
```4. **Set up environment variables**:
You may need to configure environment variables for your Django settings, Redis, and other services. Create a .env file in the root directory of your project and define the following variables
docker-compose.yml
```bash
DB_HOST=database-1
DB_NAME=dbname
DB_USER=dbuser
DB_PASS=pass
```5. **Apply migrations**:
```bash
docker-compose run --rm web-app sh -c "python manage.py migrate"
```6. **Create a superuser** (for accessing the Django admin):
```bash
docker-compose run --rm web-app sh -c "python manage.py createsuperuser"
```3. **Access the application**:
Navigate to `http://127.0.0.1:8000/` for the web application.