Skip to content

Latest commit

 

History

History
90 lines (73 loc) · 2.19 KB

File metadata and controls

90 lines (73 loc) · 2.19 KB

Development Setup Guide

1. (Optional) Install PostgreSQL

PostgreSQL is optional. If you already have a database or prefer another, you can skip this step.

Ubuntu/Debian:

sudo apt update
sudo apt install -y postgresql postgresql-contrib

macOS (Homebrew):

brew update
brew install postgresql

Windows:

  1. Download the installer from PostgreSQL official site.
  2. Follow the installation wizard and ensure pgAdmin and psql are installed.
  3. Add PostgreSQL to the system PATH if necessary.

2. (Optional) Start and Enable PostgreSQL

If you installed PostgreSQL, start it with the following commands:

Ubuntu/Debian:

sudo systemctl start postgresql
sudo systemctl enable postgresql

macOS:

brew services start postgresql

Windows:

  • PostgreSQL should start automatically after installation.
  • If not, use pgAdmin or Services to start it manually.

3. (Optional) Verify PostgreSQL Installation

psql --version

4. (Optional) Set Up Database

If using PostgreSQL, set up the database with the following:

sudo -u postgres psql
# Inside psql shell
CREATE DATABASE platform_v2;
CREATE USER postgres WITH ENCRYPTED PASSWORD '@9^xwWA';
GRANT ALL PRIVILEGES ON DATABASE platform_v2 TO postgres;
\q

5. Install Dependencies

Before running the project, install the required dependencies.

Using pip and venv (Recommended)

  1. Create a virtual environment (optional but recommended):
    python -m venv venv
    source venv/bin/activate  # On macOS/Linux
    venv\Scripts\activate     # On Windows
  2. Install dependencies from requirements.txt:
    pip install -r requirements.txt

6. Setup and Run Project

PostgreSQL is not required if your project supports other databases (e.g., SQLite, MySQL). Adjust configurations accordingly.

# Setup project
make setup

# Run the project - open two terminals
make worker  # In one terminal
make run     # In another terminal