Kenya-focused prediction market MVP (academic prototype). Secure PWA with OTP auth, virtual currency trading, admin tools, and safeguards. Built with Next.js, Express, Postgres RLS, Docker, and AWS Africa deployment.
# Uhasibu Prediction Market Platform
> **Kenya-Focused Web-First Prediction Market MVP (Academic Prototype)**
A research platform developed for university academic research to study prediction markets using virtual currency. This platform enables academic research on market dynamics, user behavior, and forecasting accuracy in a controlled environment.
## π Overview
Uhasibu (Swahili for "calculation/prediction") is an academic research tool designed to explore how prediction markets function in the Kenyan context. The platform uses virtual currency (vKES) to simulate real market dynamics while maintaining strict ethical research protocols.
### Key Features
- **π Age-Gated Access**: Strict 18+ verification for research participants
- **π± OTP Authentication**: Secure login via Kenyan phone numbers (+254)
- **π Bilingual Support**: Full English and Swahili localization
- **π° Virtual Currency**: Play money (vKES) system for risk-free participation
- **π Market Trading**: Create and participate in prediction markets
- **π€ User Profiles**: Demographic data collection for research purposes
- **π Portfolio Management**: Track positions and performance
- **π‘οΈ Admin Dashboard**: Research oversight and market management
## ποΈ Architecture
### Tech Stack
- **Frontend**: Next.js 14 (Pages Router) + React 18 + Tailwind CSS
- **Backend**: Node.js + Express.js
- **Database**: PostgreSQL 15
- **Authentication**: JWT + Africa's Talking SMS OTP
- **Admin Panel**: Next.js 14 (separate dashboard)
- **Containerization**: Docker + Docker Compose
- **Reverse Proxy**: Nginx
### Project Structure
```
unasibu/
βββ frontend/ # Next.js user-facing application
β βββ pages/ # Page routes
β βββ components/ # React components
β βββ styles/ # Global styles
β βββ public/ # Static assets
βββ backend/ # Express.js API server
β βββ src/
β β βββ routes/ # API endpoints
β β βββ middleware/ # Auth & valid β¦