Backend: Django 6.0 + DRF | Frontend: React + Vite
Copy the example env file and fill in your values:
cp api/.env.example api/.env| Variable | Description |
|---|---|
DEBUG |
True for dev, False for production |
SECRET_KEY |
Django secret key (generate a long random string for production) |
DB_NAME, DB_USER, DB_PASSWORD, DB_HOST, DB_PORT |
PostgreSQL connection |
CLOUDINARY_CLOUD_NAME, CLOUDINARY_API_KEY, CLOUDINARY_API_SECRET |
Optional — leave blank for local file storage in dev |
EMAIL_BACKEND |
console prints emails to terminal; smtp sends real emails |
cd api
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverPopulate the database with sample doctors, patients, and appointments:
python manage.py seed_data| Role | Password | |
|---|---|---|
| Admin | admin@mawid.com |
admin123 |
| Doctor | dr.sarah@mawid.com |
doctor123 |
| Doctor | dr.mohamed@mawid.com |
doctor123 |
| Patient | omar.hassan@mail.com |
patient123 |
| Patient | nour.adel@mail.com |
patient123 |
The command is idempotent — running it again skips existing records.
Delete all data from all tables (except migrations):
python manage.py clean_dbPrompts for confirmation. To skip the prompt:
python manage.py clean_db --no-inputpython manage.py test --settings=api.test_settingsOr with pytest:
pytest