Skip to main content
Next-generation government intake infrastructure built with modern cloud primitives
The Unify Platform is a monorepo containing experimental and production tools for government benefit program applications. We’re exploring how serverless computing, edge networks, and composable authentication can transform public sector digital services.

What’s Inside

This monorepo contains three applications and three shared packages:

Applications

  • Terra - Form builder and intake management platform for government programs (experimental)
  • Pathfinder - Client-facing portal for application tracking and document management
  • Docs - Internal technical documentation (Mintlify)

Packages

  • @unify/ui - Shared React component library built with Radix UI and Tailwind CSS
  • @unify/database - Shared database types and utilities for Supabase
  • @unify/identity - Shared applicant identity, profile, and history modules

Tech Stack

Core Framework

  • Next.js 16 - React framework with App Router
  • React 19 - UI library
  • TypeScript 5 - Type safety
  • Tailwind CSS 4 - Styling with @tailwindcss/postcss

Infrastructure

  • Supabase - Postgres database with Row Level Security
  • WorkOS - Enterprise SSO and authentication
  • Vercel - Hosting and edge computing
  • Doppler - Secrets management
  • Resend - Transactional email
  • Twilio - SMS notifications
  • Sentry - Error monitoring and performance tracking
  • PostHog - Product analytics

Developer Experience

  • pnpm - Fast, disk-efficient package manager
  • Turbo - High-performance monorepo build system
  • Vitest - Unit and integration testing
  • Playwright - End-to-end testing
  • ESLint 9 - Code linting with flat config
  • Prettier - Code formatting
  • Husky - Git hooks

Quick Start

Prerequisites

  • Node.js 20+ (via fnm or nvm)
  • pnpm 9.14+ (npm install -g pnpm@9.14.4)
  • Doppler CLI (optional, for secrets management)

Installation

This starts:
  • Terra at http://localhost:3000
  • Pathfinder at http://localhost:3001

Environment Setup

Option 2: Local .env Files

Required environment variables for Terra:
See apps/terra/.env.example for complete configuration.

Development

Available Commands

Working with Specific Apps

Code Quality

We enforce code quality through:
  • ESLint - Linting with React, TypeScript, and Next.js rules
  • Prettier - Consistent code formatting
  • TypeScript - Strict type checking
  • Husky - Pre-commit hooks for formatting and linting
  • Vitest - Unit and integration tests
  • Playwright - End-to-end tests

Testing

Unit & Integration Tests

E2E Tests

Current Test Coverage:
  • 310 passing unit/integration tests (~3.8s runtime)
  • E2E tests configured (requires authentication setup to enable)
See apps/terra/tests/README.md for E2E testing documentation.

Project Structure

Architecture Highlights

Terra (Form Builder)

  • Form Engine: Recursive JSON schema with Zod validation
  • Drag-and-Drop: @dnd-kit for intuitive form organization
  • Multi-language: I18nString objects for unlimited translations
  • Conditional Logic: Dynamic field visibility based on user input
  • File Security: Supabase private buckets or Google Drive integration
  • RBAC: Row Level Security in Postgres + WorkOS organizations
  • White-label: Custom branding per agency (logos, colors, emails)
  • Data Access Layer: Repository pattern with soft delete and audit hooks
  • Notification Hub: Multi-channel notifications (email + SMS) with templates

Pathfinder (Client Portal)

  • Application Tracking: Applicants can view submission status
  • Document Management: Upload and manage supporting documents
  • Multi-program Support: Browse and apply to multiple programs
  • Profile Management: Shared identity across applications

Integrations

  • Airtable: Two-way sync with automatic field mapping
  • Google Drive: Direct file uploads with permanent URLs
  • Plaid: Bank account verification for financial programs
  • Webhooks: Outbound webhooks for downstream systems

Security Features

  • Auth Guards: Centralized authorization checks for all server actions
  • Path Traversal Protection: Sanitized file paths
  • Open Redirect Prevention: Safe redirect validation
  • XSS Prevention: React escaping + Content Security Policy + DOMPurify
  • CSRF Protection: Server actions with token validation
  • Rate Limiting: Upstash Redis-based API throttling (required in production)
  • Audit Logging: All sensitive operations tracked
  • PII Redaction: Automatic PII filtering in logs

CI/CD

GitHub Actions

Our CI pipeline runs on every push and pull request:
Current Status: ✅ All checks passing

Deployment

  • Production: Automatically deployed via Vercel on merge to main
  • Preview: Every PR gets a unique preview URL
  • Environment Variables: Managed through Vercel + Doppler

Contributing

Commit Convention

We follow Conventional Commits:

Pull Request Process

  1. Create a feature branch: git checkout -b feature/your-feature
  2. Make your changes with clear, atomic commits
  3. Run tests: pnpm test
  4. Run linter: pnpm lint
  5. Format code: pnpm format
  6. Push and create a PR
  7. Address review feedback
  8. Merge after approval (squash and merge)

Code Style

  • Use TypeScript for all new code
  • Follow React best practices (hooks, composition, etc.)
  • Write tests for new features
  • Add JSDoc comments for complex functions
  • Keep components small and focused
  • Use semantic HTML and ARIA labels

Technical Debt

We maintain a backlog of technical improvements. Run pnpm --dir apps/terra lint to see current warnings. Common patterns to address:
  • Replace any with proper types (@typescript-eslint/no-explicit-any)
  • Remove unused imports (@typescript-eslint/no-unused-vars)
  • Use Next.js <Image /> for image optimization
See the Engineering Planning doc for the roadmap.

Resources

Internal Documentation

External References

License

Proprietary - All rights reserved

Support

For questions or issues:
  • Internal: Post in #engineering Slack channel
  • External: Create a GitHub issue

Built for better government services