The Project
A barangay is the smallest unit of local government in the Philippines. Its office keeps the records of every resident and household, issues certificates like proof of residency or indigency, and has to get announcements out to the community.
Most of that runs on paper, walk-ins and posted notices. Residents line up at the office just to request a certificate, and an announcement only reaches the people who happen to see it. Plenty of residents don't have mobile data, but nearly everyone can receive a text message.
SmartSMS Barangay puts the office's records and services in one web app. Admins manage residents and households and send SMS announcements to filtered groups of residents. Residents request certificates online and get the result by email.
We built it for Barangay 551, Zone 54 in Manila. We consulted the office to learn how they keep records, issue certificates and reach residents, and designed the system around that. The barangay is using it now.
The screenshots on this page come from a local Project with generated data.
Key Features
Targeted SMS announcements
Admins filter residents by age, gender, marital status, address, education, resident type or medical condition, pick recipients, and send one message to all of them. Seniors can get a vaccination notice without everyone else getting it too. Every broadcast is saved with its sender, recipients and delivery status, and reusable message templates cover the announcements that come up again and again.
Email-verified document requests
Residents request a certificate from the public site. The request is held in a separate pending collection and a 6-digit code, valid for 10 minutes, is emailed to them. Only a verified request reaches the admin queue, so the office never sorts through spam or mistyped emails. When an admin approves or rejects it, the resident gets an email with the pickup date and time or the reason for rejection.
Households and the RBI form
Residents are grouped into households with a head member and generated IDs (HH-0001, HH-0002, …). Admins can add, unassign or reassign members and change the head, and each household prints as the government's Record of Barangay Inhabitants (RBI) form, already filled in.
Roles and audit trail
A superadmin creates and manages admin accounts and is the only role that can delete residents or households. Approvals, rejections, broadcasts and household changes are logged with who did what and when, so the office can answer "who changed this?" without guessing.
My Contribution
This started as our team's project for a Software Engineering course, but it was built for a real client: we worked with the barangay office on the requirements, and they are using the system now. I was the team's developer: every commit in the repo is mine, from the first schema to the deployed app.
- The Express + MongoDB backend: the data models, about 40 REST endpoints, JWT authentication and role checks.
- The SMS integration with an Android phone acting as the gateway, including saving each broadcast and polling its delivery status.
- The two-step document request flow and the verification, approval and rejection emails.
- Household management, its audit log and the printable RBI form.
- The React frontend: the public homepage and online services, and the admin dashboard with the broadcast composer, resident and household tables, request queue and history pages.
- Deployment to Render, with Express serving both the API and the built frontend.
The Challenge
The Problem
SMS was the whole point: it's the one channel that reaches residents without data or a smartphone. But SMS APIs charge per message and need a business account, and a barangay office doesn't have a budget line for a messaging platform. If sending announcements cost money every time, the feature wouldn't get used.
The Decision
I used android-sms-gateway, which turns an ordinary Android phone with a regular SIM into an SMS API. The backend sends the recipients and message to the phone, saves the broadcast with the message ID it gets back, and later asks the gateway for the message's state to record whether it was sent, delivered or failed. The office's own phone and load do the sending.
The Tradeoff
A single phone is a much weaker sender than a commercial provider. Throughput is limited to what one SIM and the carrier allow, and if the phone is off or loses signal, nothing goes out. I accepted that because broadcasts are occasional and go to hundreds of people, not thousands per minute, and because saving every broadcast with its status means a failed send shows up in the history instead of disappearing.
The Result
The barangay is using the system now. The office can reach a targeted group of residents by text without paying for a messaging platform, every message sent is on record, and residents can request certificates without lining up at the office first.
Technical Details
A React + Vite frontend built with Material UI talks to an Express API over REST. In production, Express serves the built frontend too, so the whole app deploys as one Node service on Render with MongoDB Atlas behind it.
Admins sign in with a bcrypt-hashed password and get a JWT that expires after 8 hours. Middleware checks the token on every admin route, and a second middleware restricts deletes and account management to the superadmin role.
Document requests use two collections on purpose. Unverified requests and their codes live in a pending collection and are replaced if the same email requests again. Only after the code checks out is the request copied into the real collection, so nothing in the admin queue is unverified. Emails go through Nodemailer, and a failed approval email is logged without rolling back the admin's decision.
What I'd change today
Creating a household writes to several documents in a row: the head, the household, then each member. If one write fails halfway, the data is left half-updated. I'd wrap it in a MongoDB transaction, and I'd generate household IDs from a counter instead of counting documents, since the count-based ID can repeat after a household is deleted.
I'd also store every date in plain UTC. Right now some models shift timestamps to Philippine time before saving, which means every place that reads a date has to know whether it was shifted. Storing UTC and converting only on display removes that whole class of bugs.