Cart Dues — Clean Code

Run a garbage-cart fee app for two years: errors, comments, Demeter, README, learning tests, debt. 13 levels, right in the browser.

What the levels ask

  1. 14 December 2024, Ms. Nanda's second month keeping Iuran Gerobak, the Ward 04 garbage fee app Mr. Hendra wrote. Every night cocokkan.js asks the provider for the status of each QRIS payment. Tonight the provider does not know one payment and does not answer another. Fill the catch. Tomorrow morning pengingat.js reminds every house whose fee is not recorded yet.
  2. 6 January 2025. Villagers can now reply BAYAR on WhatsApp, and the app charges their e-wallet through QRIS. This morning the payments of Mr. Tono, Mrs. Ratna and Mrs. Yanti failed, each for a different reason. Choose what is logged for Ms. Nanda and what is sent to the villager's phone.
  3. Last December Ms. Nanda wrote comments over IURAN and JATUH_TEMPO in tarif.js, Mr. Hendra's file without a single comment. Choose both comments. On 25 February 2025 Ms. Nanda changes those two numbers as the ward meeting decided, without touching the comments.
  4. From March 2025 elderly households pay half, Rp12.500. tarif() throws GolonganBelumAda for a house whose group is not filled in yet, and such a house pays the full fee for now. On 27 February Mr. Piksel tidies tarif.js. On the morning of 1 March tagih.js sends the bills. Fill the catch in iuranRumah.
  5. May 2025. The village office changes the shape of its neighbourhood data: ketua now sits under pengurus.ketua. pengingat.js, rute.js and laporan.js send WhatsApp messages to each house's neighbourhood head. Choose how the three get the phone number of house r's neighbourhood head. If something fails, Ms. Nanda adjusts the code and runs it again.
  6. July 2025. The ward meeting frees Grandma Marni from the fee from August, and Ms. Nanda marks her house bebas: true. pengingat.js and laporan.js ask whether house r owes this month, and terimakasih.js thanks the houses that paid. Choose how they ask.
  7. July 2025. In August Mr. Arka, a KKN volunteer, helps at the post, and he starts from the README. Choose the README's example for tagihanBulan. On 14 July Ms. Nanda renames tagihanBulan to iuranBulan with find and replace in the code and test files. The README is not searched.
  8. September 2025. The villagers' sign-up form uses zod 3 to check what is typed, with our own sentences. Ms. Nanda writes a learning test: a small test that makes sure zod behaves the way we rely on. On 1 September Mr. Piksel upgrades zod to 4.6.7 without touching the code. Build the learning test: which zod it tests, what it checks, and where its file lives.
  9. October 2025. The new QRIS library asks for zod 4, so the move has to happen now. Three files check input with zod: setoran.js, daftar.js and webhook.js. Choose how the three use zod from the start. The 20 October change replaces required_error, invalid_type_error and errorMap with error, and .errors with .issues.
  10. Monday night, 14 July 2025. Mr. Harun calls: in July the Neighbourhood 02 houses pay him in cash, so no reminders. The reminders go out tomorrow morning, and Ms. Nanda writes a one-line shortcut in daftarPengingat. Choose where that shortcut is written down.
  11. March 2026. UTANG.md lists three debts, and Ms. Nanda has one afternoon to pay off one. From April to September new houses go up at the end of the lane, Mr. Dodi moves out, and Mrs. Yanti asks for the rupiah to be written another way. Choose the debt paid off this afternoon.
  12. 1 June 2026, 5 in the morning. The post's laptop runs tagih.js from cron, and nobody watches it. The night before, golongan.json broke while it was copied. Choose what happens at the program's edge, on the last line of tagih.js.

And more, 13 levels in all.