Citizen Hub Kenya is a comprehensive civic engagement platform that empowers Kenyan citizens with access to legal information, government services, and participatory tools. The frontend application provides an intuitive interface for citizens to interact with the backend API, which includes features such as constitution search, MP tracking, crime r
# Citizen Hub Kenya - Frontend Application
## Table of Contents
1. Project Overview
2. Features
3. Technology Stack
4. Installation
5. Environment Variables
6. Project Structure
7. Authentication Flow
8. API Integration
9. Available Scripts
10. Deployment
11. Troubleshooting
12. Contributing
13. License
---
## Project Overview
Citizen Hub Kenya is a comprehensive civic engagement platform that empowers Kenyan citizens with access to legal information, government services, and participatory tools. The frontend application provides an intuitive interface for citizens to interact with the backend API, which includes features such as constitution search, MP tracking, crime reporting, and AI-powered legal assistance.
The application is built with React and utilizes M-Pesa STK Push for authentication, eliminating the need for traditional passwords. Users verify their identity through their mobile phone number and authorize access via a one-tap M-Pesa transaction.
---
## Features
### Authentication
- M-Pesa STK Push authentication using Safaricom's API
- Passwordless login via phone number verification
- Automatic user profile creation on first login
- JWT token-based session management with refresh tokens
### Constitution Access
- Full text search across all 264 constitution articles
- Filter by topic (rights, land, government, citizenship)
- View individual articles with simplified translations
- Chapter-based article organization
### Parliamentary Information
- Comprehensive list of all 102 Members of Parliament
- Filter MPs by political party or constituency
- Search MPs by name
- View MP profiles including contact information
### Kenyan History
- Curated historical facts from pre-colonial to modern era
- Category-based filtering (leaders, independence, culture, etc.)
- Search functionality across all history entries
- Year-based chronological sorting
### Legal FAQ System
- Categorized frequently asked questions
- Search questions and answers
- Expandable q …