Local Installation¶
Socon-MKT utilizes a decoupled architecture. To run the platform locally, developers must initialize both the Django backend and the React frontend from their respective repositories.
Setup Instructions¶
Choose the environment you wish to configure below. It is required to have the backend running before the frontend can successfully make API calls.
=== "Backend (Django)"
The backend handles REST API requests, database migrations, and background Celery tasks.
**1. Clone the Repository**
```bash
git clone [email protected]:DevNinja254/socon_backend.git
cd socon_backend
```
**2. Initialize Virtual Environment**
```bash
python3 -m venv venv
source venv/bin/activate # Use venv\Scripts\activate on Windows
pip install -r requirements.txt
```
**3. Environment Configuration**
Before proceeding, you must configure your local environment variables. Create a `.env` file in the project root. Refer to the [Environment Variables](environment.md) documentation for the required template.
**4. Apply Migrations & Run Server**
```bash
python manage.py migrate
python manage.py runserver 0.0.0.0:8000
```
*The API will be available at `http://localhost:8000`.*
=== "Frontend (React + Vite)"
The frontend is a single-page application built with React, TypeScript, and Tailwind CSS.
**1. Clone the Repository**
```bash
git clone [email protected]:DevNinja254/sokoni-mkt.git
cd sokoni-mkt
```
**2. Install Dependencies**
```bash
npm install
```
**3. Environment Configuration**
Create a `.env` file in the project root. Ensure your API endpoint points to your local backend. See the [Environment Variables](environment.md) documentation for the complete template.
**4. Start Development Server**
```bash
npm run dev
```
*Vite will launch the local development server at `http://localhost:5173`.*