Automated collection management for B2B payments - a Wholesail product.
- Node.js v18+ (you have v22.17.0 ✅)
- npm v10+ (you have v10.9.2 ✅)
- Git v2+ (you have v2.50.1 ✅)
- Supabase account (already set up ✅)
If you're setting this up from scratch:
# Create project directory
mkdir -p ~/Projects/agentic-collections
cd ~/Projects/agentic-collections
# Copy all files from the provided package
# (or clone from GitHub once pushed)npm installCreate a .env.local file in the project root:
# .env.local
NEXT_PUBLIC_SUPABASE_URL=https://uplqqwemsldnujlwjhia.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InVwbHFxd2Vtc2xkbnVqbHdqaGlhIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjkwNjU0NzcsImV4cCI6MjA4NDY0MTQ3N30._K_DE2csRtqHTDx5vObc9UqrVQUJUPgcj1SdUzLsWBI-
Go to Supabase Dashboard: https://supabase.com/dashboard/project/uplqqwemsldnujlwjhia
-
Open SQL Editor (left sidebar)
-
Run Schema SQL:
- Open
supabase/schema.sql - Copy ALL content
- Paste into SQL Editor
- Click "Run"
- Open
-
Run Seed Data SQL:
- Open
supabase/seed-data.sql - Copy ALL content
- Paste into SQL Editor
- Click "Run"
- Open
npm run devOpen http://localhost:3000 in your browser.
agentic-collections-app/
├── src/
│ ├── app/ # Next.js App Router pages
│ │ ├── (dashboard)/ # Dashboard route group
│ │ │ ├── dashboard/ # Main dashboard page
│ │ │ ├── queue/ # Action Queue page
│ │ │ ├── buyers/ # Buyers/Invoices page
│ │ │ ├── activity/ # Activity log page
│ │ │ ├── alerts/ # Alerts page
│ │ │ └── settings/ # Settings page
│ │ ├── globals.css # Global styles
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Root page (redirects to dashboard)
│ ├── components/
│ │ ├── layout/ # Layout components (Sidebar, etc.)
│ │ └── ui/ # UI components
│ ├── lib/
│ │ ├── supabase.ts # Supabase client
│ │ └── utils.ts # Utility functions
│ └── types/
│ └── database.ts # TypeScript types for database
├── supabase/
│ ├── schema.sql # Database schema
│ └── seed-data.sql # Initial data
├── public/ # Static assets
├── .env.local # Environment variables
├── package.json
├── tailwind.config.ts
└── tsconfig.json
| Table | Description |
|---|---|
vendors |
Vendor information (Harbor Seafood, Golden Grain) |
buyers |
Customer/buyer information |
invoices |
Invoice data with balances and due dates |
contacts |
Buyer contact information |
vendor_configs |
Vendor-level configuration |
buyer_configs |
Buyer-level configuration overrides |
action_proposals |
Generated collection actions |
email_drafts |
AI-generated email drafts |
alerts |
System alerts |
sent_emails |
Sent email history |
npm install -g @anthropic-ai/claude-codecd ~/Projects/agentic-collections
claude> Read the dashboard page and explain what it does
> Add a new filter for high-risk buyers on the dashboard
> Create a new API endpoint for triggering collection actions
> Fix the TypeScript error in the Sidebar component
Go to https://vercel.com and sign up (free tier available).
# Initialize git repo
git init
git add .
git commit -m "Initial commit - Agentic Collections"
# Create GitHub repo and push
# (Create repo on github.com first, then:)
git remote add origin https://github.com/YOUR_USERNAME/agentic-collections.git
git branch -M main
git push -u origin main- Go to https://vercel.com/new
- Import your GitHub repository
- Add environment variables:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEY
- Click "Deploy"
- Project structure setup
- Supabase integration
- Database schema
- Seed data from Excel files
- Dashboard with Aging report
- Action Queue page
- Sidebar navigation
- Wholesail-style UI
- Trigger Engine implementation
- Email generation with LLM
- Settings configuration UI
- Email sending service
- Activity log with real data
- Alert management
The UI is designed to match Wholesail's existing dashboard style:
- Clean, minimal design
- Teal (#0D9488) as primary color
- White sidebar with clear navigation
- Table-based data displays
- Subtle hover states and transitions
For questions about this project, refer to the PRD documentation or contact the product team.