Skip to content

About

SmartGN: A web-based Digital Grama Niladhari Service Management System developed as a collaborative university project .

Resources

Stars

1 star

Watchers

0 watching

Forks

Β 
Β 

Latest commit

Β 

History

1,472 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SmartGN - Digital Grama Niladhari Service Management System

SmartGN is an online platform designed to modernize village administration using digital solutions. It enables Grama Niladhari officers and community members to access and manage services efficiently through a user-friendly and well-organized system.


Live Demo

Open the live demo


Project Overview

SmartGN provides a centralized platform where residents and Grama Niladhari officers can interact digitally.

The system allows:

  • Resident registration and profile management
  • Grama Niladhari account access
  • Certificate request management
  • Appointment booking
  • Government allowance applications
  • Disaster support requests
  • Village announcements
  • AI chatbot guidance
  • Multi-language support

Main Features

Resident Features

  • Register using NIC details
  • Login securely
  • Manage household information
  • Add family member details
  • Request certificates
  • Book appointments with Grama Niladhari
  • Apply for government allowances
  • Submit disaster assistance requests
  • Receive announcements

Grama Niladhari Features

  • Login using provided credentials
  • Verify resident registrations
  • Approve or reject certificate requests
  • Manage appointments
  • Publish village announcements
  • Review allowance eligibility
  • Handle disaster support requests
  • Monitor village information

Admin Features

  • Manage Grama Niladhari accounts
  • Add or remove users
  • Maintain system operations
  • Resolve platform issues

AI Chatbot Integration

The system includes one AI chatbot that supports:

  • Sinhala language
  • Tamil language
  • English language

The chatbot provides:

  • Registration guidance
  • System usage instructions
  • Service explanations
  • Resident assistance
  • Grama Niladhari assistance

Technologies Used

  • HTML
  • CSS
  • JavaScript
  • GitHub
  • Figma
  • Database Management System

System Modules

  1. User Registration Module
  2. Authentication Module
  3. Resident Management Module
  4. Certificate Request Module
  5. Appointment Management Module
  6. Announcement Module
  7. Allowance Management Module
  8. Disaster Support Module
  9. AI Chatbot Module
  10. Admin Management Module

Project Goal

The goal of SmartGN is to digitize Grama Niladhari services and improve communication between residents and village officers.

This platform reduces paperwork and improves accessibility for village-level administration.


πŸ“ Project Structure

SmartGN-Digital-GN-Service-Management-System/
β”œβ”€β”€ Backend/                         # Node.js + Express API
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”‚   β”œβ”€β”€ cors.js
β”‚   β”‚   β”‚   └── database.js
β”‚   β”‚   β”œβ”€β”€ controllers/
β”‚   β”‚   β”‚   β”œβ”€β”€ allowanceController.js
β”‚   β”‚   β”‚   β”œβ”€β”€ appointmentController.js
β”‚   β”‚   β”‚   β”œβ”€β”€ authController.js
β”‚   β”‚   β”‚   β”œβ”€β”€ certificateController.js
β”‚   β”‚   β”‚   β”œβ”€β”€ chatController.js
β”‚   β”‚   β”‚   β”œβ”€β”€ disasterController.js
β”‚   β”‚   β”‚   β”œβ”€β”€ officerController.js
β”‚   β”‚   β”‚   └── residentController.js
β”‚   β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”‚   β”œβ”€β”€ errorHandler.js
β”‚   β”‚   β”‚   └── validation.js
β”‚   β”‚   β”œβ”€β”€ models/
β”‚   β”‚   β”‚   β”œβ”€β”€ Certificate.js
β”‚   β”‚   β”‚   β”œβ”€β”€ Officer.js
β”‚   β”‚   β”‚   └── Resident.js
β”‚   β”‚   β”œβ”€β”€ routes/
β”‚   β”‚   β”‚   β”œβ”€β”€ allowanceRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ announcementRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ appointmentRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ authRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ certificateRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ chatRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ disasterRoutes.js
β”‚   β”‚   β”‚   β”œβ”€β”€ officerRoutes.js
β”‚   β”‚   β”‚   └── residentRoutes.js
β”‚   β”‚   β”œβ”€β”€ seed/
β”‚   β”‚   β”‚   └── seedGnDivisions.js
β”‚   β”‚   └── utils/
β”‚   β”‚       β”œβ”€β”€ emailService.js
β”‚   β”‚       β”œβ”€β”€ fileUpload.js
β”‚   β”‚       β”œβ”€β”€ generateToken.js
β”‚   β”‚       β”œβ”€β”€ hashPassword.js
β”‚   β”‚       β”œβ”€β”€ helpers.js
β”‚   β”‚       └── validators.js
β”‚   β”œβ”€β”€ uploads/
β”‚   β”‚   └── gn_profile/
β”‚   β”œβ”€β”€ .env.example
β”‚   β”œβ”€β”€ .gitignore
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ package-lock.json
β”‚   └── server.js
β”‚
β”œβ”€β”€ SmartGN/                         # Vite + React frontend
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   β”œβ”€β”€ _redirects
β”‚   β”‚   └── favicon.png
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ assets/                  # Images, icons, and documents
β”‚   β”‚   β”œβ”€β”€ Components/              # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ AppointmentsPage/
β”‚   β”‚   β”‚   β”œβ”€β”€ Common/
β”‚   β”‚   β”‚   β”œβ”€β”€ Family&HouseholdPage/
β”‚   β”‚   β”‚   β”œβ”€β”€ LandingPage/
β”‚   β”‚   β”‚   β”œβ”€β”€ OfficerDashboard.jsx/
β”‚   β”‚   β”‚   β”œβ”€β”€ ResidentDashboard/
β”‚   β”‚   β”‚   └── ResidentsDetails/
β”‚   β”‚   β”œβ”€β”€ Pages/                   # Application pages
β”‚   β”‚   β”œβ”€β”€ context/
β”‚   β”‚   β”‚   └── AuthContext.jsx
β”‚   β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”‚   β”œβ”€β”€ api.js
β”‚   β”‚   β”‚   β”œβ”€β”€ encryption.js
β”‚   β”‚   β”‚   β”œβ”€β”€ imageUtils.js
β”‚   β”‚   β”‚   β”œβ”€β”€ notifications.js
β”‚   β”‚   β”‚   └── translate.js
β”‚   β”‚   β”œβ”€β”€ App.jsx
β”‚   β”‚   β”œβ”€β”€ index.css
β”‚   β”‚   └── main.jsx
β”‚   β”œβ”€β”€ .gitignore
β”‚   β”œβ”€β”€ eslint.config.js
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ package.json
β”‚   β”œβ”€β”€ package-lock.json
β”‚   └── vite.config.js
β”‚
β”œβ”€β”€ .gitignore
β”œβ”€β”€ README.md
└── render.yaml

πŸ‘₯ Team Collaboration

This project is developed collaboratively using GitHub.

Workflow

main
β”‚
└── develop
     β”‚
     β”œβ”€β”€ feature/authentication
     β”œβ”€β”€ feature/dashboard
     β”œβ”€β”€ feature/appointments
     β”œβ”€β”€ feature/certificates
     β”œβ”€β”€ feature/chatbot
     └── feature/admin-panel
  • All team members work on separate feature branches.
  • Changes are submitted through Pull Requests.
  • Code is reviewed before merging into the develop branch.
  • Only tested and stable code is merged into the main branch.


πŸ‘₯ Module Assignment & Component Responsibilities

To ensure clear development ownership, the frontend pages, components, and backend route handlers are mapped below to the respective team members, aligning with the core modules from the project proposal. (This is the random future plan to create the pages it might be changed)

πŸ“‹ Overall Assignment Table

Module ID Module Name Responsible Member Student Index Frontend Pages & Components Backend Route Files
1 User Authentication & Identity Mogith - RoleSelection.jsx
- ResidentLogin.jsx
- OfficerLogin.jsx
- AdminLogin.jsx
- Register.jsx
- Success.jsx
- auth.js (Auth/Registration)
2 Resident & Family Management Achini - ResidentProfile.jsx
- OfficerProfile.jsx
- ResidentDashboard.jsx
- auth.js (Profile APIs)
3 Divisional & Household Management Janith - ResidentHousehold.jsx
- OfficerHouseholdDetails.jsx
- auth.js (Household endpoints)
4 Digital Certificate Service Mogith - ApplyCharacterCertificate.jsx
- ApplyIncomeCertificate.jsx
- ResidentCertificates.jsx
- OfficerCertificates.jsx
- OfficerCertificateDetails.jsx
- certificates.js
5 Government Allowance & Welfare Achini - ResidentAllowances.jsx
- OfficerAllowances.jsx
- allowances.js
6 Appointment & Meeting Scheduler Janith - ResidentAppointments.jsx
- OfficerAppointments.jsx
- appointments.js
7 Disaster & Emergency Relief Achini - ResidentDisasterReport.jsx
- OfficerDisasterReports.jsx
- disasters.js
8 AI Chatbot & Information Mogith - LandingPage.jsx
- Chatbot.jsx
- LanguageSelector.jsx
- Integrations across routes
9 Village Asset & Admin Janith - AdminDashboard.jsx
- OfficerDashboard.jsx
- announcements.js

πŸ› οΈ Detailed Component & Route Tasks Breakdowns

1. User Authentication and Identity (Mogith)

  • Frontend Components:
    • RoleSelection.jsx: Select user role entry-point before redirecting to individual log-in screens.
    • ResidentLogin.jsx / OfficerLogin.jsx / AdminLogin.jsx: Input fields, authentication requests handling, error messages, storage of JWT session tokens in localStorage.
    • Register.jsx: Multi-step form for user creation including NIC front/back file attachment logic.
    • Success.jsx: Dynamic completion feedback state indicator.
  • Backend Routers:
    • auth.js: Login validation handlers, database queries, password hashing (bcrypt), JWT creation, OTP mailer integration helper.

2. Resident and Family Management (Achini)

  • Frontend Components:
    • ResidentProfile.jsx: Allows residents to configure their credentials, upload avatar, review registered properties, and declare family member records.
    • OfficerProfile.jsx: Grama Niladhari profile page with contact detail management tools.
    • ResidentDashboard.jsx: Displays summaries of requests, appointments, alerts, and navigation links.
  • Backend Routers:
    • auth.js / server.js: API endpoints for updating profile, appending/deleting family members under matching parent NIC.

3. Divisional and Household Management (Janith)

  • Frontend Components:
    • ResidentHousehold.jsx: Section for household metadata registration, residential proof list, and head of household matching details.
    • OfficerHouseholdDetails.jsx: Administrative division filters allowing matching GNs to see all registered households, verify residents list under divisions, search by Household No.
  • Backend Routers:
    • auth.js (Shared): Database integration queries for listing/updating household and divisional relationships.

4. Digital Certificate Service (Mogith)

  • Frontend Components:
    • ApplyCharacterCertificate.jsx / ApplyIncomeCertificate.jsx: Interactive online submission forms with conditional file attachments (employment/revenue proof, character declarations).
    • ResidentCertificates.jsx: Tabbed lists tracking status of submissions: Pending, Approved, and Rejected. Includes download action links.
    • OfficerCertificates.jsx: Division list of incoming applications sorted chronologically.
    • OfficerCertificateDetails.jsx: Officer panel enabling PDF preview of credentials, approval toggle, reject comments panel, and automated digital certificate generation.
  • Backend Routers:
    • certificates.js: Route handlers to process new submissions, retrieve requests filterable by status/officer division, update review records, upload documents, and generate certificate documents.

5. Government Allowance and Welfare (Achini)

  • Frontend Components:
    • ResidentAllowances.jsx: Form to apply for Aswesuma/Samurdhi, file/income detail declarations, status history tracking list.
    • OfficerAllowances.jsx: Dashboard for managing welfare benefits. Allows GNs to check application details, verify income status, search applicants, toggle approval, and configure custom allowance programs.
  • Backend Routers:
    • allowances.js: CRUD API endpoints for managing allowance applications, registering new welfare program categories, querying beneficiary data.

6. Appointment and Meeting Scheduler (Janith)

  • Frontend Components:
    • ResidentAppointments.jsx: Request appointment form (select date, time slot, write details) with active scheduler calendar displaying slots availability.
    • OfficerAppointments.jsx: Management calendar showing upcoming bookings, action buttons to confirm/cancel/reschedule with feedback dialog.
  • Backend Routers:
    • appointments.js: Calendar-check query helper endpoints, appointment requests validation routes, notification alerts trigger hook.

7. Disaster and Emergency Relief (Achini)

  • Frontend Components:
    • ResidentDisasterReport.jsx: Submit disaster alerts, specify affected resources (damage description, severity level), track aid request statuses.
    • OfficerDisasterReports.jsx: Relief dashboard listing incidents by category/location, update logistics and financial relief allocations.
  • Backend Routers:
    • disasters.js: Incident reporting logic, coordinates/relatives associations, relief distributions tracking APIs.

8. AI Chatbot and Information (Mogith)

  • Frontend Components:
    • LandingPage.jsx: Entry dashboard featuring welcome headers, site overview sliders, quick navigation links.
    • Chatbot.jsx: Floatable overlay chat widget allowing interactive text input, fetching responses from automated knowledge base APIs.
    • LanguageSelector.jsx: Dropdown widget storing selected translation locale state (en/si/ta) dynamically mapping visual components string keys.
  • Backend Routers:
    • Chatbot response query processors, session tracking endpoints, Knowledge base retrieval system.

9. Village Asset and Admin (Janith)

  • Frontend Components:
    • AdminDashboard.jsx: Statistics counters (active registrations, approved certificates), audit history table, officer profiles management dashboard.
    • OfficerDashboard.jsx: GN management workspace with divisional resources status charts, activity logs, summary stats.
  • Backend Routers:
    • announcements.js: Route handlers to fetch regional announcements, publish new entries with severity rating, modify/retire outdated notices.

Contributors


License

This project is developed for educational purposes.

About

SmartGN: A web-based Digital Grama Niladhari Service Management System developed as a collaborative university project .

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages