Engineering brief · internal

Scope of Work — Build TeamPulse

A complete, phased brief for an engineer (or "Engineer Claude") to build TeamPulse from the interactive demo into a production, sellable SaaS. The live demo at /teampulse is the design + UX source of truth for Phase 1.

📌 Goal: Ship a multi-tenant workforce-visibility platform — time tracking, activity/productivity, GPS field, scheduling, reporting, and payments — that a client can sign up for and pay to use. The public marketing + demo page is already built and live.

1 · Product summary

TeamPulse is an all-in-one workforce visibility platform. It answers three questions for any business with employees or contractors: Who is working on what? How productively? And what do we owe them / bill for it?

Users
Owners/admins, managers, and team members (staff). Optional read-only client viewers.
Model
Multi-tenant SaaS. Each customer = one workspace. Per-seat internally; pricing surface intentionally hidden on the public page (sales-led).
Platforms
Web dashboard + desktop agent (Win/Mac/Linux) + mobile app (iOS/Android) + browser timer.
North-star
A manager opens one dashboard and trusts every number — hours, productivity, and pay all reconcile.

2 · Feature scope (modules)

ModuleWhat it doesPriority
Time trackingStart/stop timer tied to project/task/client; manual entries; automatic & idle detection; desktop/web/mobile.P0
Activity & monitoringActivity level (input), active app/URL, idle time, optional screenshots (interval + blur + opt-in).P0
TimesheetsAuto-built from tracked time; edit, submit, approve; weekly/period views.P0
Reports & insights20+ reports: hours by project/person, productivity trend, apps/URLs, utilization, anomalies.P1
Projects & budgetsProjects, tasks, budgets, bill/pay rates, cost-vs-budget, margins.P1
GPS / fieldGeofenced job sites, auto clock-in/out, location trails, mobile-first.P1
Scheduling & attendanceShifts, availability, PTO/time-off, attendance.P2
Payments & payrollHours→timesheets→invoices→multi-currency payouts; overtime rules; approvals.P1
IntegrationsSlack, Jira, Asana, Trello, GitHub, QuickBooks, PayPal, Wise, Google Calendar + public API/webhooks.P2
Admin & billingWorkspace setup, roles/RBAC, SSO, seat management, subscription billing (Stripe).P0

3 · Architecture

[ Desktop agent ]  [ Mobile app ]  [ Web timer ]
        \               |               /
         \______  event ingestion API  ______/
                        |
        +---------------+----------------+
        |                                |
   API / services                 background workers
   (REST + GraphQL)          (aggregation, reports, alerts)
        |                                |
   +----+--------- data layer -----------+----+
   | PostgreSQL (core)  |  TimescaleDB/ClickHouse (events) |
   | Redis (cache/queue)|  S3/R2 (screenshots, signed URLs)|
   +---------------------------------------------------------+
        |                                |
   Payments rails (Stripe/Wise/PayPal)   Integrations (OAuth)
        |
   Web dashboard SPA (React/Next) — realtime via WebSocket

Recommended stack

Next.js + TypeScript + TailwindRecharts / Chart.jsWebSocket / Ably NestJS (Node) + GraphQLBullMQ + RedisPostgreSQL + Prisma TimescaleDB / ClickHouseS3 / Cloudflare R2Electron (or Tauri) React NativeAuth0 / Clerk + RBACStripe + Wise/PayPal Docker + AWS/GCP + TerraformSentry + Grafana

4 · Build phases

PhaseDeliverableEst.
P0 · FoundationRepo, CI/CD, auth, multi-tenant workspace, RBAC, DB schema, web timer, core time-tracking API, dashboard shell. Demo UI already done ✔2–3 wk
P1 · Desktop agentElectron agent: timer, activity level, active app/URL, idle, screenshot capture + upload (signed URLs); privacy controls.3–4 wk
P2 · Timesheets + reportsAuto timesheets, approval flow, event aggregation pipeline, core reports & charts, anomaly flags.2–3 wk
P3 · Projects + paymentsProjects/tasks/rates, budget tracking, Stripe subscription billing, invoicing, multi-currency payouts, overtime engine.3–4 wk
P4 · Mobile + GPSReact Native app, geofenced job sites, auto clock-in/out, location trails, offline sync.3–4 wk
P5 · Integrations + launchSlack/Jira/QuickBooks/etc, public API + webhooks, SSO, audit logs, security review, load testing, launch.3–4 wk

MVP to sell = P0 + P1 + P2 + billing slice of P3 (≈ 8–10 weeks solo, faster with a small team). Field/GPS + mobile can follow as v2.

5 · Data model (core)

workspaces(id, name, plan, created_at)
users(id, workspace_id, name, email, role, pay_rate, bill_rate, currency)
projects(id, workspace_id, client, name, budget, status)
tasks(id, project_id, name, assignee_id)
time_entries(id, user_id, task_id, started_at, ended_at, source)
activity_events(ts, user_id, activity_pct, app, url, idle)   -- time-series
screenshots(id, user_id, ts, s3_key, blurred)
timesheets(id, user_id, period, total_hours, status)
locations(ts, user_id, lat, lng, jobsite_id)                 -- time-series
jobsites(id, workspace_id, name, lat, lng, radius_m)
invoices(id, workspace_id, client, amount, currency, status)
payouts(id, user_id, period, amount, currency, status)
subscriptions(id, workspace_id, seats, stripe_id, status)

6 · Security & compliance

7 · "Buy" / go-to-market

8 · Definition of done

▶️ Kickoff for Engineer Claude: "Scaffold the P0 monorepo (Next.js dashboard + NestJS API + Prisma/Postgres + auth + multi-tenant workspaces), then port the /teampulse demo dashboard into the real app shell wired to a live time-tracking API."