# SmartQ - Queue Management System
A comprehensive queue management system designed for Rwanda to reduce waiting time at service points like hospitals and banks.
## Features
- **Multi-Organization Support**: Manage multiple organizations from a single platform
- **Role-Based Access Control**: Super Admin, Organization Admin, Staff roles
- **Real-Time Queue Management**: Live updates and status tracking
- **Unified Display System**: Single display page showing all services per organization
- **Analytics Dashboard**: Track performance metrics and wait times
- **SMS Notifications**: Mock SMS system (ready for Twilio integration)
- **Responsive Design**: Clean, minimalist GovTech-style interface
## Tech Stack
- **Backend**: Flask (Python)
- **Database**: MySQL with SQLAlchemy ORM
- **Frontend**: HTML, CSS, JavaScript
- **Architecture**: REST API with async requests
## Setup Instructions
### Prerequisites
- Python 3.8 or higher
- MySQL Server
- pip (Python package manager)
### Installation
1. **Clone or download the project**
2. **Create a Python virtual environment**
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
**Make sure to change from the default environment to the created virtual environment to avoid conflicts with global packages.**
3. **Install Python dependencies**
```bash
pip install -r requirements.txt
```
4. **Configure Environment Variables**
Create a `.env` file in the project root directory with the following variables:
```env
DATABASE_URL=mysql+pymysql://username:password@localhost/db_name
SECRET_KEY=your_secret_key_here
```
**Create a secret key**: You can generate a secure random key using Python in the terminal:
```bash
python -c "import secrets; print(secrets.token_hex(32))"
```
**For local development:**
- `DATABASE_URL`: MySQL connection string (format: `mysql+pymysql://user:password@host:port/database`)
- `SECRET_KEY`: A secure random key for session management
**Example for local …