SaaS

FlowMetrics Pro: The AI-Powered Monitoring System

Client: Flowmetrics Pro

Industry SaaS
Duration 12 months
Technologies
React TypeScript Tailwind CSS shadcn/ui TanStack Query Electron TypeScript Bun MongoDB Redis RabbitMQ BullMQ WebSockets Google Gemini

The Challenge

The client is FlowMetrics Pro, a workforce operations SaaS product targeting agencies, BPOs, IT and software teams, virtual assistant firms, accountants, consultants, and any organization running distributed, hybrid, or in-office teams. The core problem is that the average operations leader runs their workforce on a stack of disconnected tools that nobody can reconcile under pressure. When the CEO asks whether the team is productive and being paid correctly, nobody can answer in under a week.
Specific pain points the platform was built to solve:
A time tracker says employees were active 6.2 hours yesterday, but no one can tell whether that was real work or Slack. Hours-logged numbers say nothing about output.
The HRIS holds leave balances that do not match what attendance records show. Two systems claim to be the source of truth and neither one is.
Payroll requires CSV exports from three different sources every cycle. Manual reconciliation, manual overtime recalculation, and constant disputes are the norm.
Performance reviews run on memory and Google Docs with zero data behind them. KPIs are talked about, not measured. The KPI dashboard hasn't been updated since onboarding.
Remote and hybrid setups break legacy attendance assumptions. Badge scanners and desktop sign-ins fail the moment a workforce goes distributed, and there is no reliable way to verify that a remote employee, a field agent, or a hybrid worker is actually working when they say they are.
Tool sprawl bleeds budgets. Teams stack four or more separate subscriptions (time tracking, monitoring, HR, payroll, project management, KPI dashboards), each billed per seat, and combined cost scales faster than value.
Most monitoring tools are surveillance-first. Employees resent them, HR pushes back, and adoption stalls. The market needed monitoring that could be defended internally, not just deployed.
Onboarding takes weeks across the legacy stack. IT involvement, multiple admin panels, custom integrations, and training cycles mean small and mid-sized teams give up before they get value.

Our Solution

FlowMetrics Pro was built as one platform that owns the entire chain from what an employee did, to what it means, to what gets paid, to how it gets reviewed. The product is structured as 22 backend modules sharing a single data spine, with AI wired into seven different surfaces rather than bolted on as a feature page. The thesis behind every architectural decision is one platform, one data model, one source of truth.
Architecture and core decisions:
Single backend, five purpose-built clients. Instead of one generic UI for everyone, the platform ships an admin web app for HR, ops, and managers; an employee web app for self-service; a desktop agent for activity capture, screenshots, and idle detection; a browser extension for web activity tracking; and a separate AI face analyzer client for biometric session verification. One backend, five surfaces, no compromises.
Event-driven core, not a CRUD app. RabbitMQ acts as the event bus so a single activity signal becomes many outcomes (productivity scoring, KPI updates, gamification recognition, anomaly detection) without hard-wiring modules to each other. Heavy work runs in 17 dedicated background workers powered by BullMQ, covering everything from AI app classification, screenshot analysis, and pattern learning to payslip generation, recurring bonuses, leave balance sync, timesheet materialization, and report scheduling. Expensive work doesn't block user requests, which is what makes the system feel fast.
Real-time delivery via WebSockets. Clients don't poll. Live productivity dashboards, idle-threshold alerts, AI insight notifications, and live attendance status are pushed.
The intelligence layer (Monitoring module, the largest in the system, 21 models on its own):
Activity Timeline gives a minute-by-minute view of an employee's day, built from raw signal captured by the desktop agent and browser extension (every app, every URL, every idle moment, every active session), with TrackingSession, TrackingSlice, and TrackingScreenshot as the underlying models.
App Classification auto-categorizes apps and websites as productive, neutral, or distracting, learning per-org context. Contextual Classification takes this further by adjusting per role (Photoshop is work for a designer, not for an accountant), so the same app can mean different things in the same org.
AI Insights generate natural-language daily and weekly summaries per employee and team (for example, "Sarah spent 4.2 hours on design tools and 38 minutes on social media. Productivity trended up vs last week"), powered by Google Gemini through a queued analysis service with prompt templates and response caching, so AI calls don't block the request path or burn budget on duplicates.
Anomaly Detection runs against per-user productivity baselines (UserProductivityPattern), flagging deviations like a sudden 3-hour idle gap, mass file deletion, or off-hours activity spikes. The platform learns each employee's normal rhythm and uses it as the reference, instead of a static rules engine.
Alert Rules, Alert Conditions, and Alert Logs form a fully configurable alerting engine, so admins can create rules like "page me when any developer is idle more than 60 minutes during work hours."
Face Enrollment and Webcam Verification provide biometric proof that the right person is at the keyboard, eliminating buddy-punching on shift-based teams. Screenshot capture pairs with AI-driven Screen Analysis to detect sensitive info, off-task content, and compliance risks. Tracking Configuration lets each org set screenshot frequency, sensitive-area blurring, and opt-out windows.
HR, payroll, and attendance (HRIS and AMS modules):
The AMS module owns the attendance lifecycle end to end (check-in/check-out via physical biometric and RFID terminals through Device and DeviceToken models, granular AttendanceDay/AttendanceEntry/AttendanceLog records with full AttendanceAudit trail, employee correction requests with manager approval, leave types/balances/policies, and self-service "My Leave").
The HRIS module covers org structure (departments, designations, shifts, holidays), compensation (EmployeeSalaryConfig, one-off and recurring Bonus / BonusGroup / EmployeeBonus), and full payroll runs (PayrollConfiguration, EmployeePayroll, PayrollPayment) with audit trail. Timesheets are materialized from attendance by a dedicated timesheetMaterializationWorker for fast queries.
Because attendance, time, project, and payroll data share the same schema, payroll runs are automatic. No CSV exports, no reconciliation, no "which tool is the source of truth this week."
Performance, KPIs, and fairness:
The KPI Engine lets admins define metrics (tickets closed per week, average productive hours, code reviews completed), generates per-employee scorecards, runs analytics and leaderboards, and triggers KPI alerts when thresholds are missed or exceeded. Heavy KPI math runs in workers.
The Appraisal module runs formal review cycles (quarterly, annual, project-based) where review forms are pre-populated with KPI data, productivity trends, attendance, and peer feedback. Reviews stop being a memory exercise.
The Disputes module is the fairness backbone. Employees can file general disputes, productivity disputes (challenging a specific classification, like "Photoshop should count as work for me"), and managers can dismiss false-positive anomalies, which feeds back into the learning loop. This was a deliberate counterweight to the punitive feel of legacy monitoring, and it is what makes the platform something employees defend rather than resent.
Gamification (GamificationProfile with points, level, streaks, plus Achievement badges tied to real activity) gets fed by AI-driven recognition signals from the monitoring module, so standout work surfaces automatically without manager input.
Multi-tenancy, billing, and ops:
The Organization module handles multi-tenancy with per-org BusinessConfig (work hours, time zones, holiday calendars, screenshot policy), per-org Currency for multi-currency support out of the box, and OTP-gated destructive actions. The Subscription module runs the revenue engine (Subscription, SubscriptionInvoice, Coupon, CouponRedemption, Stripe-style payment webhooks, and feature-gate middleware so paid features stay paid).
The Admin module is the super-user control plane (system-wide KPIs, BullMQ Job Monitor, SystemAuditLog, plan management, RBAC, feature flags, "log in as user" support, and pipeline seeders). The Notifications module dispatches across channels with HTML email templates and partials, async queue and processors, per-category and per-event user preferences, and full NotificationLog audit (delivery status, recipient, timestamp).
Audit everything. SystemAuditLog, AttendanceAudit, NotificationLog, JobExecutionLog, and AlertLog mean the platform tells you not just what the state is but how it got there.
Tech stack: TypeScript on Bun for the backend, MongoDB as the primary store (chosen for its flexible document model across HR records, time logs, screenshots, project data, and payroll runs), Redis for caching and real-time activity streams, RabbitMQ for the event bus, BullMQ for background workers, and WebSockets for live updates. AI features run on Google Gemini via a centralized service wrapper with prompt templates and response caching. Clients are built with React, Tailwind, and shadcn/ui on the web side, Electron for the cross-platform desktop agent (Windows and macOS), and a dedicated face analyzer client for biometric verification.

Results & Impact

22 backend modules, 80+ data models, 70+ route files, 17 background workers, and 7 AI-powered surfaces running on a single shared data spine, replacing a 4+ tool stack with one platform.
5 client surfaces (admin web, employee web, desktop agent, browser extension, face analyzer) on one backend, removing the multi-week setup typical of legacy stacks.
Fully automated, attendance-driven payroll with zero CSV reconciliation, multi-currency from day one, and a complete audit trail from daily activity to monthly pay.
Event-driven, worker-heavy core means AI analysis, payroll runs, and reports never block the user, and AI calls are queued and cached so they don't break under load or burn budget on duplicates.
Scroll