Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

195 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CiviLink – Government Service Application

A platform for citizens, officers, and administrators to manage national services efficiently.

πŸ”— Live Deployment: https://civilink.onrender.com/
πŸ“§ Additional Contact: ob22adegefu123@gmail.com

Run in Postman


πŸ“Œ Overview

CiviLink is a role-based government service automation system that allows:

πŸ‘€ Citizens

  • Apply for TIN (Tax Identification Number)
  • Apply for Vital Registration
  • Track application status
  • Submit questions & queries to officers

πŸ§‘β€πŸ’Ό Officers

  • Receive and process applications
  • Approve or reject requests
  • Respond to citizen queries
  • Publish weekly announcements (if assigned)

πŸ‘¨β€βš–οΈ Admins

  • Manage officer accounts
  • Assign and remove roles
  • View system metrics
  • Monitor system activity

πŸ§ͺ API Testing (Postman)

You can test all backend endpoints directly using the included Postman collection:

πŸ‘‰ Click the button below to open in Postman:

Run in Postman

πŸ“Œ Includes:

  • Authentication routes (login/register)
  • User management endpoints
  • Service request workflows
  • Admin-level operations
  • Officer-level operations

πŸ— Project Architecture

The system follows a modular full-stack architecture:

CiviLink/
β”‚
β”œβ”€β”€ client/        # React frontend
β”œβ”€β”€ server/        # Node.js backend
β”œβ”€β”€ docs/          # All documentation
└── .github/       # GitHub automation (CI, PR templates)
                   # CI is partially non-functional due to
                   # MongoDB & environment variable limitations

🟦 Frontend: React (JavaScript, no TypeScript)
🟩 Backend: Node.js (JavaScript, Express.js)
πŸ—„ Database: MongoDB
πŸ§ͺ Testing: Jest, Supertest
πŸš€ Deployment: Render


πŸ”§ Tech Stack

Layer Technologies
Frontend React, React Router
Backend Node.js, Express.js
Database MongoDB
Validation Joi
Auth JWT-based RBAC
Testing Jest, Supertest
Deployment Render
Version Control Git + GitHub (dev β†’ main flow)

πŸ‘₯ User Roles & Test Accounts

πŸ”Ή Admin


πŸ”Ή News Officer

⚠️ Note: News content is seeded using FakerJS, which is why the text may appear random or meaningless. The news officer changes weekly so if this officer has been reassigned please tell us and we'll update the README


πŸ”Ή Approver Officer

πŸ”Ή Customer Support Officer


πŸ§ͺ Additional Seeded Test Accounts

Because the application uses seeded data, some backend actions (approval, rejection, or responses) may fail if the data was not part of the original seed.

Additional seeded officers:

Approver Officer

Customer Support Officer

⚠️ This behavior is intentional and part of backend validation logic.

Password for all officers is: Password123!


πŸ’³ Payments (Chappa – Test Mode)

The application integrates Chappa for payments.

⚠️ Important for Testing:

  • When redirected to Chappa’s payment page, DO NOT use your personal phone number or password
  • Select one of Chappa’s official test phone numbers
  • Complete the payment using test credentials only

This is required because the integration runs in sandbox/test mode.


πŸš€ Getting Started

1️⃣ Clone the Repository

git clone https://github.com/ob22a/CiviLink
cd CiviLink

2️⃣ Install Dependencies

Client

cd client
npm install

Server

cd server
npm install

πŸ” Environment Variables

Backend (/server/.env.example)

Copy each .env.example file and rename it to .env and fill it with the appropriate values.


▢️ Run Locally

Start Backend

cd server
npm run dev

Start Frontend

cd client
npm run dev

πŸ§ͺ Testing

Robust Test Suite: The project currently includes 194 passing tests across both frontend and backend to ensure reliability.

  • Backend: 151 Jest & Supertest API tests
  • Frontend: 43 Vitest & React Testing Library tests

Frontend Tests (Vitest + React Testing Library)

cd client
npm test

Backend Tests (Jest + Supertest)

cd server
npm test

βœ” Every pull request should include tests where applicable.


πŸŒ€ Git Workflow (Important)

  • All development is done on the dev branch

Branch naming

feature/<name>
bugfix/<name>
hotfix/<name>

Merging Rules

  • PRs target dev
  • dev β†’ main only during releases
  • No self-merging allowed

πŸ“„ Documentation

All documentation is located in:

/docs/

Includes:

  • Product requirements
  • API documentation
  • Architecture documentation

Not currently available:

  • Roadmaps
  • Risk analysis
  • Scrum artifacts
  • Manuals for officers and Admins

πŸ”’ Security

The system enforces:

  • JWT authentication
  • Role-Based Access Control (RBAC)
  • Input validation on all endpoints
  • Request logging
  • No sensitive data in logs
  • HTTPS enforced by Render

To report a security issue, create a GitHub Security Issue or contact the project owner.


πŸ‘₯ Contributing

See:

/CONTRIBUTING.md

Includes:

  • Branch rules
  • Commit style
  • PR requirements
  • Testing expectations
  • Reviewer responsibilities

πŸŽ‰ Contributors


πŸ“Š Contribution & Commit History Clarification

Most of the development work for this project was carried out in individual forks and the dev branch.

For grading and review purposes:

  • Contributors worked primarily in personal forks and feature branches
  • Pull requests were merged into dev using squash-and-merge
  • Releases from dev to main were also squashed

As a result:

  • The number of commits visible in dev or main may appear lower than the actual development effort
  • Individual contribution levels are more accurately reflected in:
    • Fork commit histories
    • Pull request discussions
    • The GitHub Contributors graph

Reviewers are encouraged to inspect:

  • Individual forks
  • Feature branches
  • Pull request history
    to better assess the level of contribution.

About

A secure, role-based government services portal built on the MERN stack. Features strict data validation, production-grade RBAC authentication, and a comprehensive suite of nearly 200 tests

Topics

Resources

Contributing

Stars

Watchers

Forks

Contributors

Languages