# How to Vibe Code Your Own ComTrack (and Stop Paying for It)

> Life & Health Insurance Commission Tracking Software

- Site: https://comtrack.io
- Category: InsurTech / Commission SaaS
- Verdict: **Serious undertaking** (45/100 vibecodeable)
- Estimated effort: 6-8 weeks of focused engineering and prompt iteration

## Verdict

You can build the core ledger, comp engine, and portal dashboard for personal use, but automating and maintaining scrapers for 300+ insurance carrier portals is a massive maintenance trap.

ComTrack is a classic vertical SaaS where the UI and payroll calculator are straightforward to scaffold, but the real product value lives in the data ingestion engine. Ingesting and normalizing PDF and CSV statements across hundreds of chaotic, legacy insurance carrier formats will consume endless hours of debugging and maintenance. For personal agency use, building a scoped version that accepts standardized CSV drops and implements your specific agency hierarchy is realistic; trying to replicate 300 automated portal scrapers is a full-time engineering job.

### What you can't replicate

- Pre-built automated credentialed login scrapers for 300+ legacy insurance carrier portals
- The massive historical parser template library that handles carrier format updates
- Established industry compliance trust and BAA ecosystems

## What it does

Commission tracking, reconciliation, and automated payroll software built specifically for life and health insurance agents, agencies, and field marketing organizations.

### Core features

- Multi-carrier statement parser and normalization engine
- Unified ledger ('All Time') consolidating hundreds of disparate formats
- Application vs. commission cross-referencing and underpayment flagging
- Sneaky missing renewal detection on a month-to-month basis
- Custom compensation plan builder (flat fees, percentages, chargebacks)
- Multi-tier hierarchy override splits (Agent -> Manager -> GA -> MGA -> FMO)
- Conditional If/Then rules engine for automated adjustments and AOR reassignments
- Secure agent and manager self-service portals with real-time payout views
- CRM and bank deposit accounting reconciliation sync

## The business

### Pricing

- Lite Plan: $55/mo — For individual agents (billed annually)
- Pro Plan: $204/mo — For agencies and teams (billed annually)
- Usage Add-on: $1 / statement — Automatically retrieved statements

Founded 2023.
Team size: Early-stage startup.

## The hard parts

- Building and maintaining automated scrapers/parsers for 300+ legacy insurance carrier portal layouts that change formatting constantly
- Multi-tier hierarchical override and payroll calculation state machines with complex conditional execution order
- Handling sensitive insurance/financial records securely with strict access control boundaries

## How to vibe code ComTrack

### Prerequisites

- Node.js (free): Required runtime for the Next.js full-stack application and parser scripts
- GitHub (free): Source code repository and deployment trigger for Vercel
- Supabase Account (free): Provides relational Postgres database storage, row-level security, and built-in auth for multi-tier user portals

### Recommended AI tools

- Claude Code: Best-in-class terminal agent for scaffolding complex relational database schemas, multi-tier state machines, and data parsing scripts
- Cursor: Ideal code editor for inspecting parser diffs, refining ledger calculation logic, and adjusting dashboard component layouts

### Stack

- Frontend: Next.js with Tailwind CSS and shadcn/ui components
- Backend: Next.js Server Actions and API Route Handlers
- Database: Supabase (PostgreSQL)
- Auth: better-auth
- Payments: Stripe
- Other: Vercel AI SDK for LLM-assisted statement schema mapping, Resend for transactional email notifications, Zod for robust commission and statement schema validation

### Hosting

- Vercel (Hosting the Next.js frontend, API routes, and serverless background workers): $0-20/mo
- Supabase (Managed PostgreSQL database with relational indexing for multi-tier agent hierarchies and ledger storage): $0/mo (Free Tier)

### Build guide

1. **Project Scaffolding & Database Schema** — Initialize the Next.js project with Tailwind CSS, configure Supabase PostgreSQL connection, and establish relational database tables for agents, carrier statements, unified ledger line items, comp plans, and hierarchy overrides.

```
Scaffold a new Next.js TypeScript project using App Router and Tailwind CSS. Configure Supabase as the database client using connection pooling. Write a comprehensive Prisma or Drizzle schema (or Supabase migration SQL) for a life and health insurance commission tracking system with the following tables: `agents` (id, name, email, role, upline_id), `carriers` (id, name, code), `comp_plans` (id, name, agent_id, commission_rate, renewal_rate, chargeback_rules), `statements` (id, carrier_id, period_start, period_end, raw_file_url, status), `ledger_items` (id, statement_id, agent_id, policy_number, client_name, product_type, transaction_type [new_business/renewal], expected_amount, paid_amount, status [paid/underpaid/missing_renewal], transaction_date), and `override_splits` (id, ledger_item_id, payee_agent_id, override_amount). Include appropriate foreign keys, indexes on policy numbers and agent IDs, and RLS policies.
```

2. **Authentication & Multi-Role Portals** — Implement authentication via better-auth and construct role-based dashboards separating individual agent views from agency manager override hierarchies.

```
Integrate `better-auth` into the Next.js app supporting email/password and secure session cookies. Implement role-based access control (Agent vs Manager vs Admin). Build responsive dashboard views under `/dashboard` using Tailwind CSS and shadcn/ui. For individual agents, create a clean view showing commission totals, pending payments, and historical statements. For managers, construct an override breakdown dashboard displaying downline team performance, hierarchical commission payouts, and summary metrics. Add protected layout wrappers checking user roles against Supabase permissions.
```

3. **Statement Ingestion & AI Mapping Engine** — Build file drop upload endpoints and an AI-assisted parsing pipeline that ingests messy CSV/PDF carrier statement extracts and normalizes them into the unified 'All Time' ledger.

```
Build a file upload endpoint supporting CSV and PDF statement drop zones. Implement a background processing pipeline using the Vercel AI SDK and Anthropic API to parse unstructured statement text, extract key fields (policy number, client name, transaction type, commission amount, carrier name), and map them to our standardized `ledger_items` table. Include a manual review and mapping confirmation screen where users can preview parsed line items, correct discrepancies before committing them to the unified 'All Time' ledger, and handle error states for corrupted files.
```

4. **Reconciliation & Missing Renewal Detection** — Develop automated reconciliation algorithms to cross-reference submitted applications with actual commission payouts and detect silent month-to-month drops.

```
Implement the reconciliation and auditing engine in Next.js server actions. Create a cross-reference module that matches submitted insurance applications against actual `ledger_items` to flag underpayments and payment discrepancies. Write a scheduled cron job or analytical query that scans active policies month-over-month to flag 'missing renewals'—clients who silently dropped off the active books without triggering standard chargeback flags. Display these audit flags in a dedicated Reconciliation tab with filterable discrepancy thresholds and resolution action buttons.
```

5. **Compensation Plan & Override Hierarchy Engine** — Construct the core compensation and payroll calculation engine handling multi-tier overrides, flat rates vs percentages, new business vs renewals, and If/Then conditional rules.

```
Build the compensation plan builder and payroll calculation engine. Allow administrators to configure custom comp plans with flat rates, percentage splits, differential new business vs renewal rates, and chargeback accounting rules. Implement the multi-tier hierarchy override calculator that automatically computes payouts cascading upward through downlines (Agent -> Manager -> GA -> MGA -> FMO). Add an If/Then rules engine module allowing custom conditional logic (e.g., AOR reassignments or special split adjustments) to execute during payroll runs, generating a complete audit trail for every disbursed dollar.
```

6. **CRM & Accounting Integrations & Polish** — Add webhook and API endpoints to sync commission data with external CRMs and bank reconciliation feeds, followed by UI polish and error handling.

```
Build external integration endpoints and webhooks allowing commission data to sync with popular insurance CRMs and accounting software. Create a bank deposit matching view where users can compare actual bank ledger deposits against aggregated commission statements. Add end-to-end polish, loading skeletons, toast notifications for successful payroll calculations, error boundaries for parser failures, and comprehensive unit tests for the compensation math engine to guarantee financial calculation accuracy.
```

### Cost vs paying

**Starting costs (one-time):**

- Domain name (optional): $12 one-time
- Total: ~$12 one-time

**Ongoing costs (monthly):**

- Supabase DB & Vercel Hosting: $0-20/mo
- AI API statement mapping credits: $5-15/mo
- Total: ~$5-35/mo

- Paying for the SaaS instead: $256/mo (Pro Plan)
- Build time: 45-60 hours
- AI tool credits: $20 (Claude/Cursor Pro)
- Break-even: Immediate if replacing Pro tier

## Sources

- [ComTrack Official Website](https://comtrack.io)
- [ComTrack Pricing & Plans](https://comtrack.io/pricing/)
- [ComTrack Privacy Policy & Terms](https://comtrack.io/privacy-policy/)