Admin panel expansion, operational runbooks, and API hardening
This release expands Unitwise’s internal admin capabilities while hardening admin and runbook APIs for Next.js 15. It introduces a lightweight internal CRM, shared admin navigation, and safe-to-run operational tooling, alongside significant improvements to session handling, authorization, and schema alignment.
What’s new
- Introduced a new Client Management section, providing an internal, admin-only CRM for managing companies, contacts, and opportunities.
- Added support for multiple contacts and opportunities per company, optimized for lightweight internal tracking rather than rigid schemas.
- Implemented a shared Admin navigation component across all admin pages, including clear access back to the main application.
- Launched Runbooks for administrative maintenance tasks, designed to be safe, repeatable, and auditable.
- Added a Project Defaults runbook to validate and backfill required deficiency and inspection status options for projects.
- Added a Floorplan Image Backfill runbook to identify missing floorplan images and regenerate them from existing PDFs in bulk.
- Standardized Route Handler authentication using a centralized Next.js-safe Supabase wrapper for consistent session access.
- Hardened admin authorization checks across admin and runbook endpoints using the global role model.
- Aligned admin and user-management APIs with the current database schema, removing invalid selects, ordering, and assumptions.
- Improved robustness of invitation flows (invite, resend, cancel, accept) while preserving existing behavior and permissions.
- Standardized admin page layouts and navigation patterns for consistency and easier future expansion.
Why it matters
This release gives Unitwise a stronger operational backbone. Internal teams can manage clients, maintain data integrity, and resolve edge cases through safe, repeatable tooling instead of manual database intervention. At the same time, the underlying API hardening reduces production risk under Next.js 15 by making authentication, authorization, and schema usage explicit and reliable.