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.
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
- 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
- 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
- Manage Grama Niladhari accounts
- Add or remove users
- Maintain system operations
- Resolve platform issues
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
- HTML
- CSS
- JavaScript
- GitHub
- Figma
- Database Management System
- User Registration Module
- Authentication Module
- Resident Management Module
- Certificate Request Module
- Appointment Management Module
- Announcement Module
- Allowance Management Module
- Disaster Support Module
- AI Chatbot Module
- Admin Management Module
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.
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
This project is developed collaboratively using GitHub.
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
developbranch. - Only tested and stable code is merged into the
mainbranch.
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)
| 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 |
- 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.
- auth.js: Login validation handlers, database queries, password hashing (
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
This project is developed for educational purposes.