Kenya's First Circular Waste Intelligence Platform
# ♻️ TakaLoop — Kenya's Circular Waste Intelligence Platform
> One platform connecting citizens, collectors, businesses, and county government into a full circular economy loop — powered by M-Pesa, AI, and community action.
---
## 🚀 Quick Start
### Prerequisites
- Node.js 18+
- MongoDB (local or Atlas)
- npm or yarn
### 1. Clone and Install
```bash
# Install server dependencies
cd server && npm install
# Install client dependencies
cd ../client && npm install
```
### 2. Configure Environment
```bash
# Server
cd server
cp .env.example .env
# Edit .env with your MongoDB URI, M-Pesa keys, Anthropic API key, etc.
# Client
cd client
cp .env.example .env
# Edit VITE_API_URL if backend runs on different port
```
### 3. Seed Demo Data
```bash
cd server
node seed.js
```
### 4. Run Development Servers
```bash
# Terminal 1 - Backend (port 5000)
cd server && npm run dev
# Terminal 2 - Frontend (port 3000 or 5173)
cd client && npm run dev
```
### 5. Open in Browser
Visit: `
localhost`
---
## 🔑 Demo Login Accounts
| Role | Email | Password |
|------|-------|----------|
| Admin | admin@takaloop.ke | Admin@2024! |
| Citizen | citizen@demo.com | Admin@2024! |
| Collector | collector@demo.com | Admin@2024! |
| Business | business@demo.com | Admin@2024! |
| Officer | officer@demo.com | Admin@2024! |
---
## 🏗️ System Architecture
```
takaloop/
├── client/ # React + Vite + Tailwind frontend
│ └── src/
│ ├── pages/ # All page components
│ │ ├── citizen/ # Citizen dashboard, points, reports
│ │ ├── business/# Business dashboard, listings, audit
│ │ ├── officer/ # Officer dashboard
│ │ ├── admin/ # Admin panel
│ │ ├── Landing.jsx
│ │ ├── Marketplace.jsx
│ │ └── ImpactDashboard.jsx
│ ├── components/ # Shared UI & layout components
│ ├── context/ # Auth context (JWT)
│ └── lib/ # API utility (Axios)
│
└── server/ # Node.js + Express …