AI-powered Change Order Manager for South African construction contractors
# ChangeGuard
AI-powered Change Order Manager for South African construction contractors. Built to help SA contractors (R5M–R100M/year revenue) manage variation orders across 5–50 active projects.
## Features
- **AI Extraction**: Automatically extracts data from PDFs and emails using Claude AI
- **Duplicate Detection**: Identifies duplicate and near-duplicate claims
- **Pricing Benchmarking**: Flags overpriced line items against SA unit rates (ASAQS)
- **Exposure Dashboard**: Live ZAR totals and risk tracking
- **Contract Support**: JBCC, FIDIC, NEC3/4, and GCC contract awareness
- **PoPIA Compliant**: South African data protection compliance
## Tech Stack
- **Frontend**: Next.js 14 (App Router), TypeScript, Tailwind CSS
- **Backend**: Next.js API Routes
- **Database**: Supabase (Postgres + Row Level Security + Auth)
- **AI**: Anthropic Claude (claude-sonnet-4-20250514)
- **Storage**: Supabase Storage
- **Deploy**: Vercel
## Prerequisites
- Node.js 18+
- npm or yarn
- Supabase account (free tier works)
- Anthropic API key
## Setup
### 1. Clone and Install
```bash
git clone
cd changeguard
npm install
```
### 2. Environment Variables
Create a `.env.local` file:
```env
# Supabase
NEXT_PUBLIC_SUPABASE_URL=your-supabase-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-supabase-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
# Anthropic
ANTHROPIC_API_KEY=your-anthropic-api-key
# App
NEXT_PUBLIC_APP_URL=
localhost
```
### 3. Supabase Setup
1. Create a new Supabase project at
supabase.com
2. Run the migration in `supabase/migrations/001_initial_schema.sql`
3. Enable RLS policies (included in migration)
4. Create storage bucket named `change-orders` for PDF uploads
### 4. Run Development Server
```bash
npm run dev
```
Open
localhost
## Database Schema
The app uses the following tables:
- `organizations` - Contractor companies
- `profiles` - User profiles linked to organizations
- `projects` - Construction projects
- …