A free, campus-exclusive dating platform for Kenyan university and college students built with modern, production-ready technologies.
- Project Overview
- Technology Stack
- Quick Start
- Architecture
- Development Setup
- Database Schema
- API Endpoints
- Deployment
- Testing & Monitoring
- Contributing
UniMatch Kenya is a mobile-first dating application designed specifically for university and college students in Kenya. The platform emphasizes safety, authenticity, and a vibrant campus community experience.
Key Features:
- Email verification using institutional email domains (.ac.ke, .edu)
- Swipe-based discovery with intelligent matching
- Real-time messaging with WebSocket support
- User safety with reporting and blocking features
- Profile completeness tracking
- Responsive design with dark mode support
- Framework: Django 5.0 + Django REST Framework
- Database: PostgreSQL 16
- Cache & Broker: Redis 7
- Real-time: Django Channels + Daphne
- Tasks: Celery with Beat scheduler
- Server: Gunicorn with Uvicorn workers
- Proxy: Nginx with rate limiting
- Framework: Next.js 14 with App Router
- Language: TypeScript
- State Management: Zustand
- HTTP Client: Axios
- Animations: Framer Motion
- Styling: Tailwind CSS (to be added)
- Testing: Jest + React Testing Library
- Containerization: Docker & Docker Compose
- Email: SMTP (Gmail recommended for dev)
- File Storage: Cloudinary
- Production: Manual scaling with monitoring
- Docker & Docker Compose
- Node.js 18+ (for frontend development)
- Python 3.11+ (for backend development)
- PostgreSQL 16 (if running without Docker)
- Clone and setup environment:
cd /home/samdev652/Desktop/UniMatch\ Kenya
cp .env.example .env
# Edit .env with your configuration- Start all services:
docker-compose up --build- Run migrations:
docker-compose exec backend python manage.py migrate
docker-compose exec backend python manage.py createsuperuser- Access the application:
- Frontend: http://localhost:3000
- Backend API: http://localhost:8000/api
- Django Admin: http://localhost:8000/admin
- WebSocket: ws://localhost:8000/ws
Backend:
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
export DJANGO_SETTINGS_MODULE=unmatch_kenya.settings.development
python manage.py migrate
python manage.py runserverFrontend:
cd frontend
npm install
npm run devRedis (macOS with Homebrew):
brew install redis
redis-serverUniMatch Kenya/
βββ backend/
β βββ unmatch_kenya/ # Main Django project
β β βββ settings/ # Base, dev, production configs
β β βββ asgi.py # Channels config
β β βββ wsgi.py # WSGI config
β β βββ celery.py # Celery config
β β βββ urls.py # URL routing
β βββ apps/
β β βββ users/ # Authentication & user management
β β βββ profiles/ # User profile & photos
β β βββ matching/ # Swipe algorithm & matches
β β βββ messaging/ # Chat & WebSocket
β β βββ notifications/ # In-app notifications
β β βββ reports/ # Moderation system
β βββ core/ # Shared utilities
β βββ manage.py
β βββ requirements.txt
β βββ Dockerfile
βββ frontend/
β βββ app/ # Next.js App Router pages
β βββ components/ # React components
β βββ hooks/ # Custom React hooks
β βββ store/ # Zustand stores
β βββ lib/ # Utilities (API client, etc)
β βββ types/ # TypeScript definitions
β βββ __tests__/ # Jest tests
β βββ package.json
β βββ tsconfig.json
β βββ next.config.js
β βββ Dockerfile
βββ infrastructure/
β βββ nginx/ # Nginx configuration
βββ docker-compose.yml
βββ .env.example
βββ .gitignore
βββ .editorconfig
βββ README.md
User (1) ββββββββΊ UserProfile (1)
β β
ββββΊ VerificationOTP ββββΊ ProfilePhoto
β β
ββββΊ UserBlock ββββΊ ProfileInterest
β
ββββΊ Swipe ββββββΊUser (Many-to-Many via swipe)
β
ββββΊ Match
β β
β ββββΊ Message
β β
β ββββΊ User (sender)
β
ββββΊ Notification
β
ββββΊ Report
- Pool size: 20 connections
- Max overflow: 10 additional connections
- Timeout: 600 seconds (auto-reconnect)
-- Swipes: Quick access by swiper & swiped
CREATE INDEX idx_swipes_swiper ON swipes(swiper_id, created_at DESC);
CREATE INDEX idx_swipes_swiped ON swipes(swiped_id, created_at DESC);
-- Messages: Efficient chat retrieval
CREATE INDEX idx_messages_match ON messages(match_id, created_at DESC);
-- Users: Location & activity queries
CREATE INDEX idx_users_campus ON users(campus, last_active DESC);Base URL: /api/v1/
POST /auth/register/ - Register new user
POST /auth/verify/ - Verify email with OTP
POST /auth/login/ - Login (JWT)
POST /auth/refresh/ - Refresh token
GET /auth/me/ - Current user profile
PATCH /auth/me/update/ - Update profile
GET /profiles/my_profile/ - Get user's profile
POST /profiles/upload_photo/ - Upload profile photo
POST /profiles/add_interests/ - Add interests
PATCH /profiles/update_bio/ - Update bio & looking_for
GET /matching/discover/feed/ - Get discover feed (20 candidates)
POST /matching/discover/like/ - Like a profile
POST /matching/discover/pass_profile/ - Pass on profile
GET /matching/matches/ - List all active matches
POST /matching/matches/{id}/unmatch/ - Unmatch with user
GET /messages/conversations/ - Get all conversations
POST /messages/send_message/ - Send message in match
POST /messages/mark_as_read/ - Mark messages as read
WebSocket: /ws/chat/{match_id}/
GET /notifications/ - List notifications
GET /notifications/unread/ - Get unread count
POST /notifications/{id}/mark_as_read/ - Mark as read
POST /notifications/mark_all_as_read/
POST /reports/report_user/ - Submit report
GET /reports/ - List user's reports
Critical variables for production:
DEBUG=False
SECRET_KEY=<generate-strong-key>
ALLOWED_HOSTS=yourdomain.com,www.yourdomain.com
DATABASE_URL=postgresql://user:pass@host:5432/dbname
REDIS_URL=redis://host:6379/0
CLOUDINARY_CLOUD_NAME=<your-cloud-name>
CLOUDINARY_API_KEY=<api-key>
CLOUDINARY_API_SECRET=<api-secret>
EMAIL_HOST_USER=<gmail@example.com>
EMAIL_HOST_PASSWORD=<app-password>
CORS_ALLOWED_ORIGINS=https://yourdomain.com
JWT_EXPIRATION_HOURS=1
JWT_REFRESH_EXPIRATION_DAYS=7
- Set DEBUG=False
- Generate secure SECRET_KEY
- Configure PostgreSQL connection pooling
- Set up Redis persistence
- Configure Cloudinary for image moderation
- Set up HTTPS/SSL certificates
- Configure email backend (SendGrid/Mailgun recommended)
- Set up log aggregation (Sentry)
- Configure database backups
- Set up monitoring & alerting
gunicorn --workers=4 \
--worker-class=uvicorn.workers.UvicornWorker \
--bind=0.0.0.0:8000 \
--timeout=30 \
unmatch_kenya.wsgi:application# Run all tests
pytest
# With coverage
pytest --cov=apps --cov-report=html
# Specific app
pytest apps/users/tests/
# Watch mode
pytest-watch# Run unit tests
npm test
# With coverage
npm run test:coverage
# Watch mode
npm test -- --watch# Using Locust - simulate 600 concurrent users
locust -f tests/load_test.py --host=http://localhost:8000- Database: Monitor slow queries, connection pool utilization
- Redis: Monitor memory usage, eviction policies
- Celery: Monitor task queue length, worker availability
- WebSocket: Monitor active connections, message throughput
- Response times: API latency, WebSocket message delivery
- Create a feature branch:
git checkout -b feature/your-feature - Make changes following the project conventions
- Write tests for new features
- Run linting:
black . && flake8 apps/ - Commit with clear messages
- Push and create a Pull Request
Proprietary - UniMatch Kenya 2026
Questions or Issues? Create an issue or contact the development team.