Software / September to October 2026
Masomo
A school management app for primary and secondary schools in Uganda.
- Role
- Solo developer
- Team
- Solo
- When
- September to October 2026

Schools juggle paper registers, mark sheets and fee books, and parents wait days for results. Masomo puts all of it in one place, and each role gets its own view.
One installation serves many schools. Each person signs in to a view for their own school and role. The roles are principal, administrator, teacher, student, guardian, bursar, librarian and transport officer, plus a platform owner who looks after everything.
- Designed the database, with 34 tables.
- The school's ID comes from the login session, never from a form.
- Added several layers of access checks on every page and action, including two-step sign-in for the roles that need it.
- Made signing in safer with hashed passwords, authenticator app codes, a lockout after too many wrong tries, and setup links that expire and only work once.
- Stored all money as whole numbers, in the smallest unit of the currency, and put the fee math in one billing module.
- Changed the database in small steps that can each be rolled back.
- Gave each payment a unique key in the database, so a double click doesn't save twice.
- Saved corrections as new entries, so the payment history stays intact.
- Added 146 automated tests for the money, billing, grading, password and SMS code.
Publishing marks
Marks go from open to submitted to approved to published. Only certain roles can move them to the next step, and every step is logged. Students see their marks only once they're published.
Change log
It records who changed what. Only the changed fields are saved, with their old and new values, and secrets are hidden before anything is stored.
Attendance drafts
The attendance register saves a draft on the device while a teacher fills it in. The draft comes back after a reload and is sent safely when they're done.
Part of the Masomo code.
The repository is private, so this is one short piece of it. I can walk you through the rest on a screen share.
Recording a payment
src/lib/actions/bursar.ts, TypeScript and Prisma
// Derive an idempotency key when the caller did not supply one.
function derivedIdempotencyKey(invoiceId: string, minor: Minor, method: string): string {
const minuteBucket = Math.floor(Date.now() / 60_000);
return createHash("sha256")
.update([invoiceId, minor, method, minuteBucket].join("|"))
.digest("hex");
}
export async function recordPayment(formData: FormData) {
const { tenantId, userId } = await requireSession("/bursar");
// ...
const idempotencyKey =
String(formData.get("idempotencyKey") ?? "").trim() || derivedIdempotencyKey(invoiceId, minor, method);
const position = applyPayment(invoice, minor);
try {
// One transaction: the receipt and the invoice status must move together,
// or a crash between them leaves a paid invoice still showing as owing.
await prisma.$transaction([
prisma.payment.create({
data: {
invoiceId,
method,
status: "SUCCESSFUL",
reference: genReference("RCT"),
recordedBy: userId,
idempotencyKey,
...moneyColumns(minor),
},
}),
prisma.invoice.update({ where: { id: invoiceId }, data: { status: position.status } }),
]);
} catch (error) {
if (isDuplicateKey(error)) {
// The database refused a repeat of a payment already recorded. Treat it
// as success: the bursar's intent was carried out the first time, and
// showing an error would invite them to try again and double-charge.
await logEvent({
tenantId,
actorId: userId,
action: "PAYMENT_DUPLICATE_SUPPRESSED",
target: invoiceId,
reason: "Matching payment already recorded",
});
// ...
return;
}
throw error;
}
// ...
}


Next project
Avatar Documents
A quoting tool I built for the staff at Avatar Solutions, an IT services company in Kampala. You fill in a form, see a live A4 preview and download a print-ready PDF.