MVP for NatureGov Malawi – waste reporting, tourism booking, and environmental data dashboard
# NatureGov Malawi - Digital Governance & Sustainability Platform
A full-stack MVP web application for Malawi's digital transformation in public services. Built with React, Express, and MongoDB.
## Features
- **Authentication** - Email/password login with Admin/User roles
- **Dashboard** - Summary cards and analytics overview
- **Waste Management** - Submit/track waste reports with image uploads
- **Agriculture Advisory** - Seasonal crop suggestions, weather info, AI advisor
- **Tourism & Bookings** - Browse experiences/hotels, submit booking requests
- **Land Records** - Add and view land ownership records in a searchable table
- **Environmental Dashboard** - Charts and analytics across all modules (Recharts)
## Tech Stack
| Layer | Technology |
|-------|-----------|
| Frontend | React (Vite) + Tailwind CSS |
| Backend | Node.js + Express |
| Database | MongoDB (Mongoose) |
| Charts | Recharts |
| Auth | JWT + bcryptjs |
## Quick Start
### Prerequisites
- Node.js 18+
- MongoDB 6+ running locally (default: `mongodb://localhost:27017`)
### 1. Backend
```bash
cd backend
cp .env.example .env # Edit .env if needed
npm install
node seed.js # Seed sample data
node server.js # Starts on port 5000
```
### 2. Frontend
```bash
cd frontend
npm install
npm run dev # Starts on port 5173
```
### 3. Open the app
Visit `
localhost` and login with:
| Role | Email | Password |
|------|-------|----------|
| Admin | admin@naturegov.mw | admin123 |
| User | john@naturegov.mw | user123 |
## Environment Variables
Create `backend/.env`:
```
PORT=5000
MONGODB_URI=mongodb://localhost:27017/naturegov
JWT_SECRET=your_jwt_secret_here
OPENAI_API_KEY=your_openai_api_key_here
```
## API Endpoints
### Auth
| Method | Endpoint | Description |
|--------|----------|-------------|
| POST | `/api/auth/register` | Register new user |
| POST | `/api/auth/login` | Login |
| GET | `/api/auth/me` | Get current user (auth required) |
### Waste Man …