- Framework: Django (Python)
- Database: Sqlite3
- Socket Connection: Node, WebSocket
- API Layer: Django REST Framework (DRF)
- Virtual Environment:
venv
(Python built-in) - Frontend: React + MUI
To get started, first clone the repository:
git clone https://github.com/9bit-Jedi/tunein-backend.git
Navigate into the project directory:
cd tunein-backend
Create and activate a virtual environment to manage dependencies:
-
Create the virtual environment:
python -m venv .venv
-
Activate the virtual environment:
-
On Windows:
.\.venv\Scripts\activate
-
On Mac/Linux:
source .venv/bin/activate
-
With the virtual environment activated, install the required dependencies:
pip install -r requirements.txt
Before running the server, ensure your environment is properly set up.
-
If running for the first time, ensure the database is migrated:
python manage.py makemigrations python manage.py migrate
-
You may need to create a superuser to access Django's admin interface:
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
By default, the server will be running on http://127.0.0.1:8000/
.
-
Navigate to the WebSocket server folder:
cd websocket-server
-
Initialize the project:
npm install
node server.js
The WebSocket server will run at ws://localhost:8080/
.
To sync the repository with the latest code from the main
branch, use the following commands:
-
Pull the latest changes:
git pull origin main
-
Switch branches (if needed):
git checkout <branch_name>
-
Install/update dependencies (after pulling new changes):
pip install -r requirements.txt