Why Your SaaS Needs an Internal Ops Console (And How We Built Ours)
Every SaaS platform eventually reaches the point where you need to look inside the machine. A customer reports a billing issue. A webhook stops firing. A workspace hits a rate limit and you need to know why.
You could query the database directly. But that doesn't scale when you have a team, and it certainly doesn't create an audit trail.
At Gigaviz, we built a dedicated ops console β a 26-page internal admin interface that gives our team full visibility and control without touching raw SQL.
Here's what we learned building it.
The case for a dedicated ops console
It's not just "admin panel"
Most SaaS tools bolt on a basic admin panel β a list of users, maybe some settings toggles. An ops console goes further:
- God Console: Full workspace management with impersonation, suspension, and entitlement overrides
- Health Monitoring: Real-time checks on database, queues, workers, and external APIs
- Developer Tools: SQL runner (read-only, whitelisted tables), webhook debugger, API playground, feature flags
- Support Tools: Customer search, support tickets with SLA tracking, canned responses
- Business Intelligence: Analytics dashboard, data exports (CSV/JSON), saved reports
Security is non-negotiable
An ops console with write access to every workspace is a nuclear button. We implemented multiple layers:
1. Environment kill switch β disable the entire console instantly via a single environment variable 2. Layout-level auth guard β a centralized authorization function runs on every page load 3. Owner email allowlist β only pre-approved emails can claim admin access 4. Rate limiting β throttled request limits to prevent abuse 5. Full audit trail β every mutation logged with actor, before/after snapshots, and timestamps 6. Impersonation alerts β Slack/Discord notifications when an admin impersonates a workspace
Architecture decisions
Per-page shell, not layout shell
We render the shell wrapper in each page rather than in the root layout. Why?
Each page calls the centralized auth guard, and on success, passes actor details to the shell component. On failure, it redirects cleanly.
This gives us:
- Per-page auth context β each page can pass actor details to the shell
- Flexible layouts β some pages need full-width, others need sidebar panels
- Server component by default β no `"use client"` on the shell wrapper
Centralized theme config
All ops styling lives in a single centralized theme configuration. Navigation items, color schemes, and page groups are defined in one place.
This means:
- Nav items are always in sync across all pages
- Color changes propagate instantly
- New pages just need to be added to the config
Redirect, don't throw
Early on, some pages threw errors when auth failed. This showed ugly error boundaries to developers who accidentally navigated there. We standardized to clean redirects β if authorization fails, the user is silently redirected to the home page instead of seeing a crash screen.
What we monitor
Health checks
Our health page monitors:
- Database: Connection health and query performance
- Background workers: Heartbeat freshness and processing status
- External APIs: Third-party API availability
- Queue depth: Pending messages and jobs
- Rate limits: Current usage and remaining headroom
Activity dashboard
Every ops action is logged and visualized:
- Who did what, when
- Actor breakdown (pie chart of admin activity)
- Timeline of recent actions
- Filterable by action type, actor, and workspace
Lessons learned
1. Audit everything from day one
Adding audit logging after the fact is painful. We log every mutation with the actor identity, the action type, and full before/after snapshots of the affected record. This gives us a complete timeline of who changed what, when, and why β invaluable for debugging and compliance.
2. Loading states matter for internal tools too
Internal users are still users. Every ops page has `loading.tsx` and `error.tsx` β 26 pages Γ 2 boundary files = 52 files, but the experience is night and day.
3. Feature flags should be in the ops console, not just env vars
We built a feature flag system directly into the ops console with per-workspace overrides. This lets us:
- Roll out features to specific workspaces
- Kill a feature instantly without deploying
- Test in production with real data
4. Standardize auth patterns early
We had 3 different auth patterns across 26 pages before our audit. Standardizing to one pattern (centralized auth guard β redirect on failure) took 18 file changes but prevented future security gaps.
The result
Our ops console now has:
- 26 pages across 6 navigation groups
- 25 API routes powering admin actions
- 11 server actions for real-time operations
- 14 nav items all pointing to verified, working pages
- 100% loading/error boundary coverage
- Full audit trail on every mutation
For a team of 2-3 people managing thousands of workspaces, this console is the difference between "let me SSH into the server" and "let me click this button."
Should you build one?
If you're past 50 paying workspaces, yes. Before that, a simple admin script or database GUI might suffice.
But plan for it early β add audit logging, structured permission checks, and rate limiting to your admin routes from day one. Retrofitting security is always harder than building it in.
---
*Gigaviz is an all-in-one SaaS platform for businesses growing via WhatsApp, Instagram, and social media. Our ops console manages workspaces, entitlements, billing, and support across the entire platform.*