Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

E-Government Service Delivery and Citizen Engagement System

This project is a full-stack final year implementation for improving public service delivery at district level in Rwanda, using Kicukiro District as the case study. It provides a digital platform where citizens submit service requests online and administrators manage those requests efficiently.

Technology Stack

  • Frontend: React.js + Tailwind CSS
  • Backend: Node.js + Express
  • Database: MongoDB + Mongoose
  • Authentication: JWT
  • File Uploads: Multer

Project Structure

e-GOV/
  backend/
    config/
    controllers/
    middleware/
    models/
    routes/
    uploads/
    server.js
  frontend/
    public/
    src/
      components/
      pages/
      services/
      App.js

Backend Features

  • Citizen registration
  • Citizen and admin login
  • JWT protected routes
  • Service request submission with file upload
  • Citizen request tracking
  • Admin request filtering and status updates
  • Admin analytics
  • User role management
  • Feedback collection

Frontend Features

  • Modern landing page
  • Login and registration pages
  • Citizen dashboard
  • Admin dashboard
  • Request tracking tables
  • Feedback form
  • API integration with Axios

Setup Instructions

1. Install Required Software

Make sure the following are installed on your computer:

  • Node.js (recommended version 18 or above)
  • npm
  • MongoDB Community Server

2. One-Time Root Setup

From the project root folder, install the root helper package and both app dependencies:

npm install
npm run install:all

3. Backend Environment Setup

Open a terminal in the backend folder and run:

Create a .env file inside backend using the values from .env.example:

PORT=5000
MONGO_URI=mongodb://127.0.0.1:27017/egov_system
JWT_SECRET=supersecretjwtkey
CLIENT_URL=http://localhost:3000

Start the backend server:

Create the default admin user:

npm run seed-admin

4. Frontend Environment Setup

Open another terminal in the frontend folder and run:

Create a .env file inside frontend using the values from .env.example:

REACT_APP_API_URL=http://localhost:5000/api
REACT_APP_UPLOADS_URL=http://localhost:5000

5. Start Frontend and Backend Together

From the project root folder, run:

npm run dev

The application should open at:

  • Frontend: http://localhost:3000
  • Backend API: http://localhost:5000

If you ever want to run only one side, you can still use:

  • npm run backend
  • npm run frontend

Default Admin Login

After running npm run seed-admin, use:

  • Email: admin@kicukiro.gov.rw
  • Password: `Admin123!

Example Test Data

The file sample-data.json contains example values for:

  • Admin login
  • Citizen registration
  • Service request submission
  • Feedback submission

How to Test the System

Citizen Flow

  1. Open the frontend in the browser.
  2. Register a new citizen account.
  3. Log in as the citizen.
  4. Submit a service request with or without a document.
  5. Check that the request appears in the citizen dashboard with status Pending.
  6. Submit feedback and confirm the success message.

Admin Flow

  1. Log in with the seeded admin account.
  2. Open the admin dashboard.
  3. Review all citizen requests.
  4. Filter requests by status.
  5. Select a request and change its status to In Progress, Approved, or Rejected.
  6. Add a response message and save.
  7. Review analytics cards and user management section.

End-to-End Verification

  1. Create a citizen request.
  2. Log in as admin and update the request.
  3. Log back in as the citizen.
  4. Confirm the updated status and admin response are visible in the citizen dashboard.

Important API Endpoints

Authentication

  • POST /api/auth/register
  • POST /api/auth/login
  • GET /api/auth/me

Service Requests

  • POST /api/requests
  • GET /api/requests/my
  • GET /api/requests
  • PUT /api/requests/:id
  • GET /api/requests/analytics/summary

Feedback

  • POST /api/feedback
  • GET /api/feedback

Users

  • GET /api/users
  • PUT /api/users/:id/role

Notes

  • Uploaded files are stored inside backend/uploads.
  • Only authenticated users can access protected routes.
  • Only admins can access request management, analytics, feedback review, and user management endpoints.
  • This codebase was written to be beginner-friendly and easy to explain in a final year project defense. `

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages