Work/Dashboards & Internal Tools

Black Lily Internal Ops

Internal app for jobs, profit splits, MRR and per-employee earnings

Typeinternal
Statusprototype
Updated2026-05-24
Commits24
SourcePrivate

What it is

An internal web app for Black Lily LLC that tracks companies, contacts, jobs, profit splits, MRR and per-employee earnings, with shared task boards and an admin payment checklist that locks once a payment is marked paid. Business rules live in the database: split percentages must sum to 100 and a paid row can never be unpaid.

The problem

A small team splitting profit on client jobs needs one trustworthy record of who is owed what.

How it works

  1. Next.js 15 App Router with Server Actions, each mutating action guarded by requireAdmin().
  2. Supabase Postgres with RLS, a deferred constraint trigger that enforces splits summing to 100 and a before-update trigger that locks paid payments.
  3. computeEarnings in src/lib/earnings.ts is the single place every dollar amount is derived from jobs, MRR periods and splits; MRR rate changes apply forward through effective-dated rows.
  4. Recharts dashboards, dark mode by default, and a seed script that resets to an admin-only state.

Stack

Next.js 15React 19TypeScriptSupabaseTailwindRechartsZodpnpm

Disciplines

For your business

Internal operations apps with database-enforced business rules, such as payment locks and revenue splits, so the numbers cannot drift.