Workers think in shifts. Payslips are computed in weighted segments. Shiftly bridges the two: it turns your shifts into daily pay breakdowns and a monthly gross-pay estimate.
Stack: TypeScript · React · Vite · Zustand · TanStack Query · MUI · Express · Supabase · Cloud Run · Vitest · Playwright · pgTAP
Live demo · עברית · Full technical reference
Shiftly was born from a real problem observed in a government office.
Workers track time in shifts: a continuous block of hours with a clear start and end. Israeli payslips don't work that way. They are computed in weighted segments: overtime brackets that restart with each working day, Shabbat and holiday additions that begin at specific hours, and night additions that cut through the middle of a shift.
The result is a predictable frustration: employees get a payslip they have no practical way to verify. Shiftly bridges that gap. You enter shifts the way you think about them, and it calculates pay by the rules applied in government offices, so every amount can be inspected and explained.
See payroll validation (עברית) for the evidence matrix, comparisons against results corrected using actual payslips, known limitations and validation plan.
Calculations are indicative gross-pay estimates, not a replacement for official payroll.
- Independent calculation engine: React consumes the TypeScript
@shiftly/domainpackage through an explicit public API; the engine has no React or DOM dependency. - Tested deployment artifact: CI runs E2E against the downloaded production
distartifact and deploys that same artifact only after checks and E2E pass. - Browser coverage: Playwright projects exercise desktop Chromium, Android emulation (Chromium) and iPhone emulation (WebKit).
- Backend-owned data access: the browser uses Supabase for sign-in only.
apps/api(Express on Cloud Run) verifies the access token and reaches user data throughUserScope, which pins every query to the verified user; writes that must be atomic run as backend-only Postgres functions. Row Level Security stays on as a backstop. - Database tests: pgTAP suites run in CI against a schema rebuilt from the migrations, and fail if a browser role gains a privilege it should not have.
Signed-in users can open /:lang/profile for their account card and three monthly charts: Actual Hrs vs Payable Hrs, Base Hours vs Overtime Hours, and Total Payment composition (base pay, extras/overtime, and allowances).
A shared selector applies the last 3, 6 or 12 months, this year, or an inclusive custom month range to all charts. The default is six months; supported dates run from November 2015 through the current month.
History uses saved account data, not unsaved salary-summary quantity edits. Payment is a calculated gross estimate, not net pay or confirmation of payment received. Calculation rules remain public at /:lang/calculation-rules. Guests opening the profile see a sign-in card and a locked preview of the charts.
Requirements: Node.js 24 (.nvmrc pins the patch release) and Bun 1.3.14. Install with Bun to link the workspace
packages; this repository uses Bun's workspace:* dependency protocol.
git clone https://github.com/dmaman86/shiftly.git
cd shiftly
nvm install
nvm use
bun install
bun run devOpen http://localhost:5173/shiftly. Guest mode needs nothing else. Signing in
and saving data also needs the API (bun run dev:api) and its settings; see
apps/api/README.md and the
setup guide.
- Full technical reference
- Hebrew technical reference
- Payroll validation
- Payroll validation in Hebrew
- Independent payroll engine
- Backend API
- Architecture documentation
- Current architecture diagrams
- Architecture history by tag
bun run typecheck
bun run lint
bun run test:ci
bun run build
bun run test:e2e
bun run test:db # pgTAP; needs the Supabase CLI and DockerThe web lives in apps/web and consumes @shiftly/domain from packages/domain;
the backend lives in apps/api.
Run bun run dev:domain in a second terminal when editing engine sources so the
compiled package updates while Vite is running.
This project is licensed under the MIT License.
