Getting Started
Welcome to the documentation for Project Avinya KS. This guide will help you set up the project on your local machine and get started with development.
Prerequisites
Before you begin, ensure you have the following installed on your system:
- Python 3.12.6 or above with pip3
- Django 5.1.1
- PostgreSQL (for database management)
Installation
1. Clone the Repository
Clone the repository to your local machine using the following command:
$ git clone https://github.com/arclogi/avinya-ks-backend .
2. Create a Virtual Environment
Create a virtual environment to isolate the project dependencies:
$ python -m venv /path/to/new/virtual/environment
3. Activate the Virtual Environment
Activate the virtual environment based on your operating system:
-
For Linux/MacOS:
$ source env_name/bin/activate -
For Windows:
$ env_name\Scripts\activate
4. Install Dependencies
Install all the required dependencies using pip:
$ pip install -r requirements.txt
5. Environment Variable Setup
The Project_KS app relies on several environment variables, which are defined in Project_KS/settings.py.
- Locate the
.env.examplefile in the project directory. - Create a new file named
.envand copy the contents of .env.example into it. - Replace the placeholder values with the actual values for your environment.
Note: You must set these environment variables for the server to function properly. If you do not have access to the required values, contact an admin developer.
6. Database Setup
Install all the required dependencies using pip:
- Ensure PostgreSQL is installed and running on your system.
- Create a new database for the project.
- Update the database configuration in the
.envfile with your PostgreSQL credentials:DB_NAME=your_database_name DB_USER=your_database_user DB_PASSWORD=your_database_password DB_HOST=localhost DB_PORT=5432 - Run migrations to set up the database schema:
$ python manage.py migrate
7. Run the Server
To start the server, use Uvicorn for asynchronous server support:
bash
$ uvicorn Project_KS.asgi:application --host 127.0.0.1 --port 8000
The server will be accessible at http://127.0.0.1:8000.
8. Set Up Celery for Background Tasks
The project uses Celery for handling background tasks such as sending emails and scheduling jobs.
- Open a new terminal window.
- Start the Celery worker:
$ celery -A Project_KS worker -l info - Start the Celery beat scheduler:
$ celery -A Project_KS beat -l info
License
© 2025 Kurtha Saree. All rights reserved.