Perimeter is a B2B SaaS application designed for digital agencies and freelance consultants to detect scope creep in incoming client communications before it degrades profit margins.
-
Auth & Client / Project Onboarding:
- Supabase email/password authentication flow.
- Client and Project management with contract hourly rates.
-
SOW Ingestion & Parsing Agent:
- Upload PDF contracts or paste raw Statement of Work text.
- Uses Anthropic Claude API (
claude-sonnet-4-6) to extract structured deliverables, explicit exclusions, revision caps, and project timelines. - Readable, editable card UI allowing PM verification before saving.
-
Request Logging (Single & Bulk Slack/Email Thread Entry):
- Paste single client messages or entire multi-line Slack threads.
- Evaluates each message against the SOW baseline.
-
Scope Classification Agent (Core AI Engine):
- Prompts Claude API (
claude-sonnet-4-6) with structured SOW, raw contract context, historical project requests, and the new message. - Classifies request into
in_scope,out_of_scope, orambiguouswith explicit clause citation and labor hour estimates.
- Prompts Claude API (
-
Change Order Drafting Agent & Scope Radar Dashboard:
- Auto-generates polite, professional change-order proposal emails for flagged requests.
- Includes status workflow tracker (
Draft→Sent→Approved→Rejected). - Recharts Margin Tracker visualizing unbilled labor value and monthly financial risk recovery.
- Frontend: Next.js 14 (App Router) + TypeScript + Tailwind CSS
- Backend: Monolithic Next.js API Routes (
app/api/...) - Database & Auth: Supabase Postgres + Supabase Auth + Row Level Security (RLS)
- AI Engine: Anthropic Claude API (
claude-sonnet-4-6) - Data Visualization: Recharts
Copy .env.local.example to .env.local in the project root:
# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=https://your-supabase-project-id.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
# Anthropic Claude API Key (uses model claude-sonnet-4-6)
ANTHROPIC_API_KEY=your-anthropic-api-keyApply the SQL migration file located at supabase/migrations/20260904000000_init.sql in your Supabase SQL Editor to initialize tables and RLS policies:
clientsprojectssowsrequestschange_orders
Install dependencies and run the Next.js development server:
cmd /c npm install
cmd /c npm run devOpen http://localhost:3000 in your browser.
Note: If no Supabase keys or Anthropic API keys are provided initially, Perimeter operates out-of-the-box with a built-in state store and mock seed data so you can visually test and demonstrate the full flow immediately!
The AI logic resides in lib/claude.ts and uses claude-sonnet-4-6 across three specialized agents:
parseSOWWithClaude: Converts raw contract prose into schema-enforced structured JSON.classifyScopeWithClaude: Employs contextual sandboxing (SOW + past 10 requests + new request) to classify scope risk and estimate labor hours.draftChangeOrderWithClaude: Synthesizes client metadata, out-of-scope reasoning, labor hours, and hourly billing rates into email proposals.