Skip to content

Enterprise SaaS · Workforce Management

StaffVertex — Web Platform

My part in StaffVertex's web platform at Alphinex: I started as a Next.js developer and became Team Lead of 4. I owned the permission engine, the server-side time rules and the desktop API contract on a multi-tenant MongoDB stack.

  • The admin dashboard: team status, project health and tracked hours at a glance. Demo data.
  • Project task board with custom columns, priorities and labels. Demo data.
  • Weekly timesheets with required hours, overtime and per-project totals. Demo data.
  • Project finance report: hours, team cost and profit per project. Demo data.
  • Team members with weekly hours and current projects. Demo data.
On this page

My role

I joined Alphinex Solutions in January 2025 as a MERN and Next.js developer. In July 2025 I started on StaffVertex, a workforce platform the team was building from scratch. Since June 2026 I have been the Team Lead, guiding 4 developers while still shipping code every week. This page is about the web platform. The desktop tracker that reports to it has its own case study.

The product was built with the team, so I will be specific about what I owned: the permission engine and its migration, the server-side rules that decide whether a tracked hour is believable, and the rules that keep the desktop API compatible. As lead I also planned and reviewed the work of the other developers.

The problem

Remote companies were stitching together a spreadsheet for hours, a board for tasks and a hand-built payroll run at month end. The goal was one record where a tracked hour, its task, its payroll line and its invoice line are the same data. Two things made that hard. An hour is only worth something if you can defend it when a client or employee disputes it. And real organisations need more than admin versus member: a team lead sees a team, an HR user sees people but not billing.

Key decisions and why

Flat permission keys with a scope

The platform began with a nested permission object. I replaced it with flat keys such as projects.view.team, all answered through one can() and effectiveScope() API. Every key carries a scope: own, team, project or organization. The cost was a long migration. I did it incrementally behind the unchanged can() signature, which was slower than a rewrite but meant no shipped screen broke on the way.

I backed team scope with a real Team collection of members and leaders instead of filtering in the UI, because a UI filter hides data without protecting it. System roles are immutable so that a tenant building custom roles cannot lock itself out.

Integrity rules the customer cannot turn off

I kept the time rules out of tenant settings on purpose. A check an admin can disable gives you logs nobody can defend in a dispute. The server compares client timestamps with its own clock, caps any day at the hours that physically elapsed, and rejects offline rows from outside a known-good window. Every decision goes to an audit log.

One key choice: open timers are bounded at read time from the last heartbeat, instead of being closed by a scheduled sweep. A sweep can truncate someone who is offline but genuinely working. The trade-off is a little extra work on reads.

An additive-only contract for the desktop app

Installed desktop builds update when users let them, sometimes months late. So new fields are optional with safe server defaults, replaced endpoints stay alive, and no migration may leave an old client behind. It slows some clean-ups, and I accepted that because a stranded tracker means someone's hours stop syncing.

A side channel never blocks the action

Notifications go out on four channels from one event: bell, email, browser push and desktop push. They are decoupled from the action that triggered them, so assigning a task still succeeds if email is down.

What I built

  • Tenancy and access: every query scoped to an organization, a role builder over a central permission catalog, teams, invitations, join requests and an offboarding flow that keeps history.
  • Time and work: timesheets, manual entry with optional approval, projects, task boards with configurable statuses, leave, holidays, attendance, screenshots with optional blurring and app usage categories.
  • Money: eleven report types plus a report builder with export, invoicing from the same hours, Stripe subscriptions and a reconciliation console for cases where the webhook and reality disagree.
  • Desktop surface: a /api/v1/desktop/* set of endpoints covering sign-in through a staffvertex:// link, sync, presigned Cloudflare R2 screenshot uploads and the updater manifest.
  • Around the app: the public site, a help centre, a blog CMS, a super-admin console, a metered AI provider registry and a Playwright-based QA system.

The codebase is about 325,000 lines of TypeScript with 483 route handlers, over 100 Mongoose schemas, roughly 740 components and 148 pages, and it has passed 3,600 commits. Zod validates inputs, RTK Query handles cache invalidation by tag, and Next.js route groups separate pages by access level.

Results

  • StaffVertex reached its official public launch in October 2026 and serves both the browser app and every installed desktop tracker.
  • An organization can express "team lead sees their team, HR sees people but not billing" without a code change.
  • Clock tampering, impossible daily totals and unverifiable offline rows are rejected or flagged, with an audit trail, so tracked hours can be argued from evidence.
  • Server features have shipped since the current desktop generation without breaking an older installed build.
  • My own path went from developer to Team Lead in about a year and a half, and I still carry feature work next to the planning and review.
All projects

Have a project in mind?

Whether it's an MVP, a dashboard, or a rescue mission on an existing codebase — let's talk about it.

Prefer to talk first? Book a free 30-min call (opens in a new tab)