# payment engine rewrite + calendar UI + light theme — TRACK v2

Major update to contractor tracker — rebuilt payment system as derived state, added monthly calendar with EOD previews, professional light/dark theme toggle

Type: project entry

Published: 2026-05-03

[Original page](<https://artlu.ai/project/payment-engine-rewrite-calendar-ui-light-theme-track-v2>)

[Browse this group](<https://artlu.ai/ai/groups/other.md>)

Parent project: other builds

Recorded status: launched

Updated: 2026-05-20T19:37:39.331Z

Technologies: React, HTML, CSS, JavaScript, Babel standalone, Firebase Realtime Database, Netlify

## Details

Came back to the contractor tracker after six weeks of production use and found the payment system had a critical flaw — overriding a missed day auto-triggered a payment, placing two paid badges one day apart. Root cause: storing derived payment state as cached values that every function had to keep in sync. Ripped out the entire payment layer and rebuilt it as a pure derived system. getAllCountedDays scans daily logs, vacation approvals, and status overrides. getPaymentState derives totals, cycle boundaries, and remaining days from raw payment records. Nothing is cached, nothing can drift.

Also shipped: a monthly calendar UI with status labels and 4-line EOD preview text inside each day cell, three-state pay badges (PAY DAY → PAYMENT DUE → PAID), admin status overrides with persistent contractor notifications, a professional white default theme with dark mode toggle, vacation days properly counting toward payment, weekend day activation, payment and bonus logging with 2-step confirmation, a unified links/references section, auto-expanding text areas, guest read-only view, and a home button. Still a single index.html, still $0/month.

## Links

[Site or demo](<https://contractortracker.netlify.app/>)

## Related build notes

[contractor tracker got a payment engine rewrite and a face-lift](<https://artlu.ai/ai/log/day-47-contractor-tracker-got-a-payment-engine-rewrite-and-a-face-lift.md>)


Status and dates describe the published record, not a recent test of an external service. Missing details are not inferred. Public links do not imply an open-source licence or permission to reuse material.

[Directory](<https://artlu.ai/llms.txt>)
