Minimal payout engine for Indian merchants receiving international payments.
- Backend: Django, Django REST Framework
- Database: PostgreSQL in Docker, SQLite fallback for quick local checks
- Background jobs: Celery with Redis
- Frontend: React, Vite, Tailwind
docker compose up --buildBackend: http://localhost:8000
Frontend: http://localhost:5173
Seed data is loaded automatically by the backend container.
Do not commit real secrets. Copy the examples and fill values for your environment:
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.envBackend hosting needs:
DATABASE_URLfor hosted PostgreSQLREDIS_URLorCELERY_BROKER_URLfor Redis/CeleryDJANGO_SECRET_KEYDJANGO_ALLOWED_HOSTSCORS_ALLOWED_ORIGINSCSRF_TRUSTED_ORIGINS
Frontend hosting needs:
VITE_API_BASE_URL, pointing to the hosted backend API
Use merchant 1, 2, or 3 via X-Merchant-Id.
curl http://localhost:8000/api/v1/dashboard -H "X-Merchant-Id: 1"curl -X POST http://localhost:8000/api/v1/payouts \
-H "Content-Type: application/json" \
-H "X-Merchant-Id: 1" \
-H "Idempotency-Key: 11111111-1111-1111-1111-111111111111" \
-d '{"amount_paise":6000,"bank_account_id":1}'cd backend
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
python manage.py migrate
python manage.py seed_demo
python manage.py test
python manage.py runserver 127.0.0.1:8000
# Terminal 1
docker start playto-redis
# Terminal 2
cd C:\Users\user\Desktop\assignment\backend
.venv\Scripts\activate
python manage.py runserver 127.0.0.1:8000
# Terminal 3
cd C:\Users\user\Desktop\assignment\backend
.venv\Scripts\activate
celery -A playto worker -l info --pool=solo
# Terminal 4
cd C:\Users\user\Desktop\assignment\backend
.venv\Scripts\activate
celery -A playto beat -l info