Statistics routes derive access from the authenticated user’s organization and role. Owners can inspect their organization, leaders are limited to their teams, and representatives have narrower views.
One reporting period at a time
Sales seasons and explicit date ranges define the reporting window. A counts-only query mode skips hourly and daily breakdowns when a view needs only summary totals.
Controls around daily operations
Audit events record administrative actions. Rate-limit presets distinguish authentication, general requests, read-heavy views, and rapid activity counters, with an Upstash Redis option for shared limits.
My contribution
Built a sales activity tracker with views for representatives, team leaders, and organization owners.
Implemented season-based reporting, performance charts, budget views, and recruitment tracking.
Added organization-scoped permissions, audit logging, and configurable API rate limiting.
Results
30 unique users logged ≈69,000 sales actions across 935 user-days from January to September 2026.
Representative activity and team-level reporting connected to the same organization and season model.
Implemented role-aware performance views alongside budget and recruitment workflows.