Logo Lanfrica

afrivatedev/Afrivate-Backend

Domain:

digital infrastructuresocioeconomic

Record type:

software
Creator:
afr
Host:
Afrivate- Elevating Life in Africa > **Note:** This README is a quick-start guide. For a complete developer reference — including all API endpoints, architecture decisions, security configuration, deployment steps, and the full changelog — see BACKEND_CHANGES.md. # Afrivate Backend Backend service for Afrivate: a marketplace platform connecting African professionals (Pathfinders) with organizations posting opportunities (Enablers). Built with Django and Django REST Framework. ## Tech Stack - Python 3.11+ - Django 5.2.7 - Django REST Framework 3.16 - PostgreSQL (via dj-database-url) - Redis (cache + Celery broker) - JWT auth (djangorestframework-simplejwt) - Cloudinary (file storage) - Resend (auth emails) + SendGrid (waitlist emails) - Railway (deployment) ## Quick Setup ```bash # 1. Clone and checkout git clone github.com cd Afrivate-Backend git checkout light # 2. Create virtual environment python -m venv venv venv\Scripts\activate # Windows # or: source venv/bin/activate # macOS/Linux # 3. Install dependencies cd app pip install -r requirements.txt # 4. Configure environment cp .env.example .env # Edit .env — at minimum: SECRET_KEY, DB_URL, RESEND_API_KEY, SENDGRID_API_KEY, # CLOUDINARY_*, GOOGLE_CLIENT_ID # 5. Migrate and run python manage.py migrate python manage.py runserver ``` See BACKEND_CHANGES.md — Local Development Setup for full instructions including Redis setup and common error fixes. ## API Documentation Interactive docs available when the server is running: - Swagger UI: `127.0.0.1` - ReDoc: `127.0.0.1` Production docs: `afrivate-backend-production…` ## Authentication All protected endpoints require `Authorization: Bearer `. - Access tokens expire in **1 hour** — refresh with `POST /api/auth/token/refresh/`. - Registration requires email OTP verification before login is permitted. ## Key Endpoints | Endpoint | Method | Description | |---|-- …