Skip to main content

Admin Control Center (/admin) - 20 Operational Tabs

The Admin Control Center (/[locale]/admin) is the central operational command suite for HiTech Insurance. It unifies inbound lead inspection, mass email campaigns, editorial content management, field marketing operations, visitor telemetry, and compliance auditing.


1. Security Architecture & Access Control​

Access to /admin is restricted exclusively to authenticated users with admin or super_admin roles:

  • 404 Security Cloaking: Implemented in src/app/[locale]/admin/page.tsx. Non-administrators and automated vulnerability scanners requesting /admin receive an immediate HTTP 404 Not Found response (notFound()), concealing the existence of the admin endpoint.
  • SuperAdmin Hierarchy: Highly sensitive operational tabs (adminAuditLogs) are restricted exclusively to super_admin. Standard administrators attempting access are intercepted by AdminRestrictedModal.

2. Exhaustive Directory of All 20 Operational Workspaces​


Tab 1: Overview (overview)​

  • Component: src/components/feature/admin/admin-overview.tsx
  • Capabilities: KPI cards displaying active visitors, 24-hour total visits, 30-day lead volume, and conversion rates. Highlights urgent operational alerts: unresolved CrmFailedLead transmissions, low-scoring quarantined leads, and new claims.

Tab 2: Bulk Email Campaign Suite (bulkEmail)​

  • Component: src/components/feature/admin/bulk-email-tab.tsx
  • Capabilities: Enterprise mass communication composer powered by Tiptap rich text. Features:
    • Inline Media Offloading: Offloads pasted/dropped base64 images to the Signature collection, substituting lightweight /api/signatures/[id] URLs.
    • Email Template Studio: Compose, preview, tag, search, and apply reusable templates stored in EmailTemplate.
    • Recipient List Manager: Upload audience CSV spreadsheets or manual lists stored in RecipientList.
    • Controlled Micro-Batching: Dispatches outgoing emails in batches of 5 (BATCH_SIZE = 5) with a 250ms delay (BATCH_DELAY_MS = 250).
    • Test Email Dispatch: Instant single-click test email to the logged-in admin's personal inbox.

Tab 3: Events & Field Marketing (events)​

  • Component: src/components/feature/admin/events-management-tab.tsx
  • Capabilities: Provision trade show campaigns (truck shows, logistics conventions). Configures dynamic form schemas (fields), assigns licensed agents (EventAgent), generates high-resolution QR codes, and tracks attendee conversion rates.

Tab 4: HTI Partner Leads (htiLeads)​

  • Capabilities: Inspects personal and commercial trucking leads delivered through the HMAC partner ingestion API (/api/leads/*). Includes a full JSON payload modal (hti-lead-preview-modal.tsx) displaying 100% of vendor-specific metadata.

Tab 5: Quote Leads (leads)​

  • Capabilities: Central data table of direct website quote inquiries. Filters by status (draft vs completed), insurance line, and date range. Allows underwriting staff to update lead statuses, add notes, and export records to CSV.

Tab 6: Scheduled Calls (calls)​

  • Capabilities: Calendar and list view of customer phone callback requests. Displays customer telephone, preferred consultation date, and selected time slot.

Tab 7: Career Applications (careers)​

  • Capabilities: Evaluates job applications submitted through /careers. Displays position applied for, LinkedIn profile, experience summary, and provides a direct download link for candidate resume files (/api/career/resume/[id]).

Tab 8: Claims Requests (claims)​

  • Capabilities: First Notice of Loss (FNOL) incident reports. Displays policy numbers, incident dates, loss descriptions, and direct download links to police reports and damaged vehicle photos.

Tab 9: Contact Messages (contacts)​

  • Capabilities: Customer support inbox managing inquiries submitted from /contact. Enables support staff to track statuses (unread, in_progress, resolved).

Tab 10: Newsletter Subscribers (newsletters)​

  • Capabilities: Audience explorer for email newsletter subscribers. Supports active status filtering and one-click export for marketing automation.

Tab 11: Meta Lead Ads (metaLeads)​

  • Capabilities: Dedicated management portal for leads harvested from Facebook and Instagram Lead Ads via Meta Graph API v25.0. Also accessible via dedicated route /admin/meta-leads.

Tab 12: Google Ads Leads (googleLeads)​

  • Capabilities: Audit log of leads captured via Google Ads Lead Form webhook integrations.

Tab 13: App Waitlist (waitlist)​

  • Capabilities: Registrations for the upcoming HiTech mobile apps partitioned by platform (ios vs android).

Tab 14: Referrals & Rewards Management (referrals)​

  • Component: src/components/feature/admin/referrals-management-tab.tsx
  • Capabilities: Governs the customer referral program. Staff can audit client referrals, approve earned commission rewards, update payout statuses (pending → approved → disbursed), and track total agency commission payouts.

Tab 15: Blogs CMS (blogs)​

  • Component: src/components/feature/admin/blog-editor.tsx
  • Capabilities: Headless editorial studio powered by Tiptap. Rich formatting (headings, blockquotes, code, tables, images), automated read-time calculation, custom SEO meta title/description inputs, canonical slug assignment, and draft/published toggles.

Tab 16: Bilingual FAQs CMS (faqs)​

  • Component: src/components/feature/admin/faq-dashboard.tsx & faq-editor-modal.tsx
  • Capabilities: Bilingual FAQ management. Each FAQ item defines English (questionEn, answerEn) and Spanish (questionEs, answerEs) copy, display order, active status, and target coverage category.

Tab 17: Visitor Analytics & Telemetry (analytics)​

  • Component: src/components/feature/admin/admin-analytics.tsx
  • Capabilities: Real-time presence monitoring (concurrent active sessions), 30-day traffic curves, bounce rates, device breakdown (Desktop, Mobile, Tablet), US state traffic distribution, and international country metrics.

Tab 18: Visitor Journeys & Conversion Funnels (visitorJourneys)​

  • Component: src/components/feature/admin/visitor-journeys-tab.tsx
  • Capabilities: Inspects step-by-step navigation funnels from landing page through product exploration to form conversion or drop-off. Identifies high-friction pages and traffic acquisition channels (UTM source, medium, campaign).

Tab 19: Admin Audit Logs (adminAuditLogs)​

  • Component: src/components/feature/admin/admin-audit-logs-tab.tsx
  • Access Level: Strictly restricted to super_admin.
  • Capabilities: Immutable, tamper-evident audit trail recording every administrative modification (lead updates, user deletions, blog publishing, credential changes, bulk email dispatches) with admin email, IP address, before/after snapshots, and timestamps.

Tab 20: Social Portal Configuration (socialSite)​

  • Component: src/components/feature/admin/social-management-tab.tsx
  • Capabilities: Dynamic management studio for the companion portal social.hitechinsurance.ai. Allows staff to update quick action links, social handle links, highlights, video tip reels, and OpenGraph share graphics without code deploys.