Skip to content

11 Development

Vicky Patel edited this page Sep 14, 2026 · 1 revision

11. Local Development Guide & Workflows

Developer setup instructions, local development commands, and environment configuration for PACT OS.


💻 Prerequisites

  • Node.js: v20.x or higher
  • Package Manager: npm (v10+)
  • Git: v2.30+
  • OS: macOS, Linux, or Windows (PowerShell / WSL2)

🚀 Quickstart Setup

# 1. Clone the repository
git clone https://github.com/TheVicky1/Pact_OS.git
cd Pact_OS

# 2. Install dependencies
npm install

# 3. Configure local environment variables
cp .env.example .env.local

# 4. Start local development server
npm run dev

The application will be available at http://localhost:3000.


🔑 Environment Configuration (.env.local)

# Supabase Configuration
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key

# Cron Security
CRON_SECRET=your-timing-safe-cron-secret

# Application URL
NEXT_PUBLIC_APP_URL=http://localhost:3000

🛠️ Developer Scripts Cheatsheet

Task Command Description
Development Server npm run dev Starts Next.js development server on port 3000
Typecheck npm run typecheck Executes tsc --noEmit across entire codebase
ESLint Check npm run lint Runs Next.js ESLint static analysis
Run Unit Tests npm test Runs all 56 domain test suites offline (< 5s duration)
Markdown Link Audit node scratch/check-links.mjs Audits 100% of relative Markdown documentation links
Secret Scan node scratch/secret-scan.mjs Scans repository for leaked credentials or keys
Issue Audit node scratch/check-issues-audit.mjs Audits 20/20 beginner issue target files
Production Build npm run build Compiles production Next.js App Router bundle

⚡ 100% Offline Testing Reassurance

Note

All 56 domain unit test suites run 100% offline without needing a live Supabase database or cloud network connection. Test mocks simulate PostgreSQL databases and external APIs locally in under 5 seconds.

Clone this wiki locally