Crowdsourced platform for tracking power, water, and internet reliability across Kenya
# Kenya Infrastructure Livability Platform
A crowdsourced platform for tracking power, water, and internet reliability across Kenya. Users can report utility status for buildings, view composite livability scores, and make informed decisions about where to live or work.
## 🚀 Features
- **Interactive Map**: Mapbox-powered map showing buildings with color-coded livability scores
- **Utility Tracking**: Track power, water, and internet status (stable/flickering/outage)
- **Smart Scoring**: Recency-weighted scoring algorithm with data trust validation
- **User Authentication**: Secure JWT-based authentication with role-based access
- **Admin Dashboard**: Moderation tools for managing reports and flagging suspicious activity
- **Beautiful UI**: Component-heavy modern design with Tailwind CSS and Framer Motion
- **Dark Mode**: Full dark mode support with system preference detection
## 🛠️ Tech Stack
### Backend
- **Node.js 20 LTS** with **Express.js 4.19+**
- **PostgreSQL 16** (Docker)
- **Redis 7.2** (Docker) - Session management & rate limiting
- **Prisma 5.22+** - Type-safe ORM
- **TypeScript 5.6+**
### Frontend
- **React 18.3+** with **Vite 5.4+**
- **TypeScript 5.6+**
- **Tailwind CSS 3.4+**
- **Mapbox GL JS 3.7+** with **react-map-gl 7.1+**
- **Framer Motion 11.5+** - Animations
- **Lucide React 0.446+** - Icons
- **React Router 6.26+** - Routing
### DevOps
- **Docker Compose** - PostgreSQL, Redis, pgAdmin
- **Prisma Migrate** - Database migrations
- **tsx** - TypeScript execution
## 📋 Prerequisites
- **Node.js 20 LTS** or higher
- **Docker Desktop** (for PostgreSQL and Redis)
- **npm** or **pnpm**
## 🏁 Quick Start
### 1. Clone and Install
```bash
# Navigate to project directory
cd Livability
# Install root dependencies
npm install
# Install server dependencies
cd server && npm install && cd ..
# Install client dependencies
cd client && npm install && cd ..
```
### 2. Start Docker Services
```bash
# Start PostgreSQL and Redis containers
npm run docke …