# Daleeli IQ Backend

Backend API for Daleeli IQ application built with Django and Django REST Framework.

## Setup

1. Create virtual environment:
```bash
python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
```

2. Install dependencies:
```bash
pip install -r requirements.txt
```

3. Copy `.env.example` to `.env` and configure:
```bash
cp .env.example .env
```

4. Run migrations:
```bash
python manage.py migrate
```

5. Create superuser:
```bash
python manage.py createsuperuser
```

6. Run development server:
```bash
python manage.py runserver
```

## API Documentation

- Swagger UI: http://localhost:8000/api/swagger/
- ReDoc: http://localhost:8000/api/redoc/

## Project Structure

```
backend/
├── accounts/          # User management
├── places/            # Places management
├── bookings/           # Bookings management
├── reviews/            # Reviews management
├── offers/             # Offers management
├── notifications/      # Notifications
├── analytics/          # Analytics
├── api/                # API routing
├── common/             # Common utilities
└── config/             # Django settings
```

## Environment Variables

See `.env.example` for all available environment variables.

## Testing

```bash
python manage.py test
```

## Production Deployment

See deployment documentation for production setup with Nginx, Gunicorn, and PostgreSQL.

