Hulog: A Free Paluwagan Planner With a Fair Bunutan Draw and Hulog Tracker
Almost every office, market and barangay in the Philippines has a paluwagan: everyone pays the same hulog every payday, and one member takes home the whole pot each round. It usually lives in one organizer's notebook and a very long group chat. I built Hulog Paluwagan Planner, a free web app that turns it into a clear payout schedule, a fair draw anyone can check, and a tracker that shows who has paid.
It runs entirely in the browser with plain HTML, CSS and JavaScript: no account, no server and no framework. It handles kinsenas at katapusan paydays, members with two ulo (slots), Sunday payouts, an optional organizer fee, and it works offline once opened.
Try It: Draw the Order and Mark the Hulog
This is a small slice of the app with a sample five-member group. Tap the boxes in round 1 to mark payments and watch the collection meter move, or type any seed and press Draw to run the bunutan.
Build Footprint & Quality Checks
Group organizers open this on budget phones and patchy mobile data, so I kept it small and tested it in a real browser. These are the measured numbers from the v1.0.0 build:
Technology Stack & Architecture Layers
JavaScript, CSS, HTML
JavaScript 76% of the code (logic, interface, tests), CSS 16% (design tokens, light and dark themes), HTML 6% (page structure).
Pure, Testable Engine
One file with no DOM code builds the payout dates, schedule, draw, totals, CSV and safe import. The same file runs in the browser and in Node.
Storage, Clipboard, Offline
localStorage for groups, the Clipboard API for the chat summary, Intl for Manila time, and a service worker so it opens without signal.
node:test + Playwright
Unit tests cover leap years, short months, Sundays, fees and bad backups. Browser tests run every tab at 1280px and 390px in light and dark.
Key Architectural Decisions
A Draw Anyone Can Check
The bunutan hashes a seed word and uses it to drive a Fisher-Yates shuffle. Same seed, same order, so no one has to trust the organizer's phone.
Centavos and Plain Dates
Money is stored as whole centavos and dates as YYYY-MM-DD text computed in UTC, so rounding errors and timezones can never move a payout.
Logic Apart From Screen
hulog-core.js calculates; hulog-app.js only renders and listens. Every rule is covered by a unit test that runs in under a second.
Private and Defensive
No server at all. Names are escaped before display, restored backups are validated field by field, and CSV cells are guarded against spreadsheet formula injection.
Paydays, the Fair Draw & Safe Export
Three real excerpts from js/hulog-core.js: how the payout calendar is built, how the seeded bunutan works, and how CSV cells are made safe for Excel.
// js/hulog-core.js
/**
* Build the list of payout dates.
* @param {string} start first possible payout date (YYYY-MM-DD)
* @param {string} freq weekly | biweekly | semimonthly | monthly
* @param {number} count number of rounds
* @param {string} sundayRule 'none' or 'monday' (move Sunday payouts to Monday)
*/
function payoutDates(start, freq, count, sundayRule) {
var out = [];
var i, d;
if (!isYmd(start) || count < 1) return out;
if (freq === 'weekly' || freq === 'biweekly') {
var step = freq === 'weekly' ? 7 : 14;
for (i = 0; i < count; i++) out.push(addDays(start, i * step));
} else if (freq === 'semimonthly') {
d = nextSemimonthly(start);
for (i = 0; i < count; i++) {
out.push(d);
d = nextSemimonthly(addDays(d, 1));
}
} else {
// monthly: same day as the start, clamped to short months (Jan 31 -> Feb 28 -> Mar 31)
var s = parseYmd(start);
var y = s.getUTCFullYear(), m = s.getUTCMonth(), day = s.getUTCDate();
for (i = 0; i < count; i++) {
var mm = m + i;
var yy = y + Math.floor(mm / 12);
mm = mm % 12;
out.push(toYmd(new Date(Date.UTC(yy, mm, Math.min(day, daysInMonth(yy, mm))))));
}
}
if (sundayRule === 'monday') {
out = out.map(function (x) { return weekday(x) === 0 ? addDays(x, 1) : x; });
}
return out;
}
// js/hulog-core.js: the bunutan (seeded, repeatable shuffle)
function hashSeed(str) {
// FNV-1a 32-bit
var h = 0x811c9dc5;
var s = String(str);
for (var i = 0; i < s.length; i++) {
h ^= s.charCodeAt(i);
h = Math.imul(h, 0x01000193) >>> 0;
}
return h >>> 0;
}
function drawOrder(group, seed) {
var slots = [];
group.members.forEach(function (m) { for (var i = 0; i < m.hands; i++) slots.push(m.id); });
var rand = mulberry32(hashSeed(seed));
for (var i = slots.length - 1; i > 0; i--) {
var j = Math.floor(rand() * (i + 1));
var t = slots[i]; slots[i] = slots[j]; slots[j] = t;
}
return slots;
}
// js/hulog-core.js: safe CSV export
function csvCell(v) {
var s = String(v == null ? '' : v);
// Stop spreadsheet formula injection (=, +, -, @ at the start).
if (/^[=+\-@\t\r]/.test(s)) s = "'" + s;
if (/[",\n\r]/.test(s)) s = '"' + s.replace(/"/g, '""') + '"';
return s;
}
Development Roadmap & Milestones
Version 1.0.0 is released. The next milestones come from the project's roadmap:
v1.0.0: Core Planner (Released)
Four payout frequencies, multiple ulo, seeded bunutan, hulog tracker, per-member totals, organizer fee, chat summary, CSV, backup and offline support.
Next: Partial Payments & Reminders
Record half payments and advance payments, and copy a friendly reminder for each member who still owes hulog.
Planned: Read-Only Share Link
A link the organizer can post in the group chat so every member can see the schedule and tracker without editing it.
Planned: Filipino & Cebuano Interface
A language switch so organizers in Bukidnon and across Mindanao can use the app in the words their members use.
User Interface & Feature Showcase
Project Links, Code & Documentation
Open the Live App
Use it right now in your browser with the sample group, then create your own. Add it to your home screen to use it offline.
GitHub Repository
Browse the source, download the v1.0.0 release, open an issue or suggest a feature. Free and open source under the MIT License.
How It Was Built
A plain-language build log: the languages used, every step in order, the test results and the problems fixed along the way.
A Filipino Habit, Made Clear and Fair
A paluwagan runs on trust. Hulog backs that trust with a schedule everyone can see, a draw anyone can re-check and a tracker that shows exactly who has paid. Want a version branded for your cooperative, office or school, or a custom tool built around how your group works?
Frequently Asked Questions
Is Hulog Paluwagan Planner free to use?
Yes. It is free and open source under the MIT License, so you can use it, change it and use it for client work.
Do I need to install anything or create an account?
No. It runs in any modern browser on a phone or computer, with no sign-up and no server. You can open the live demo, add it to your home screen, or host the files on GitHub Pages or any web hosting.
Is our group's data uploaded anywhere?
No. Names and payments are saved only in the browser on the device you use, and nothing is sent to a server. Save a backup from the Share & backup tab before clearing your browser or changing phones.
How does the bunutan (draw lots) stay fair?
The group agrees on a seed word, such as the date and the group name, and the app shuffles the payout order from that seed. The same seed always gives the same order, so any member can enter it and check the result.
Can one member hold two slots, and does it support kinsenas at katapusan?
Yes. A member can hold up to five ulo and pays and receives once per ulo. Payouts can be weekly, every two weeks, on the 15th and last day of the month, or monthly, and Sunday payouts can move to Monday.
Can you set this up for my business website?
Yes. I can install it on your website or domain, brand it for your cooperative, office or community group, and add features such as payment reminders. Contact me here.
The sample groups and member names in the demo are fictional. Hulog is a planning tool: it does not hold, collect or move money.

Comments
Post a Comment