AI-native Bid + Delivery OS for Data Centre Refurbs & New Builds
"Win more DC projects with less bid pain."
aLiGN replaces your messy stack of spreadsheets, email chains, SharePoint folders, and tribal knowledge with a structured, AI-assisted platform that guides every deal from Target โ Lead โ Qualified โ Bid โ Win โ Deliver โ Expand.
| Module | What it does |
|---|---|
| ๐บ๏ธ Account & Site Intelligence | Target list builder, trigger signal alerts (planning, grid, hiring spikes), contact/stakeholder mapping |
| ๐ Opportunity Qualification | Go/No-Go scoring across 5 dimensions: budget confidence, route-to-market, incumbent risk, timeline realism, technical fit |
| ๐ฆ Bid Pack Builder | Document ingestion, compliance matrix autopilot, RFI generator, method statement templates |
| ๐งฎ Estimating + Scope Gap Detector | Scope completeness scoring, 8-category gap checker (enabling works, temp power, commissioning etc.), lead-time alerts |
| ๐งฏ Delivery Handover Mode | Bid โ project setup, scope baseline, change control, outage planning |
Windows users: see the Windows Installation Guide for step-by-step instructions, including a one-click installer option.
cp .env.example .env
docker-compose up --buildBackend:
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r backend/requirements.txt
uvicorn backend.main:app --reload --port 8000Frontend:
cd frontend
cp ../.env.example .env.local # set NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
npm install
npm run devFor Windows desktop deployments, the notification system includes comprehensive testing tools:
Quick Start: See TESTING-QUICK-START.md
Setup Gmail OAuth:
cd backend
setup-gmail-oauth.batRun Tests:
cd backend
test-notifications.batAvailable Test Tools:
backend/setup-gmail-oauth.bat- Interactive OAuth wizardbackend/test-notifications.bat- Automated test suite (7 tests)backend/tests/manual_test_notifications.py- Interactive debugging consolebackend/tests/README.md- Complete testing documentation
Documentation:
- Gmail Fallback Setup - OAuth configuration
- Windows Desktop Setup - Complete Windows guide
- Fallback Notifications - Quick reference
Expected Test Results:
โ
Passed: 7
โ Failed: 0
โ ๏ธ Warnings: 2 (Gmail OAuth not configured - expected on fresh install)
aLiGN/
โโโ backend/ # Python ยท FastAPI ยท SQLAlchemy (SQLite โ Postgres)
โ โโโ models/ # Account, Contact, TriggerSignal, Opportunity,
โ โ # QualificationScore, Bid, BidDocument,
โ โ # ComplianceItem, RFI, EstimatingProject,
โ โ # ScopeGapItem, ChecklistItem
โ โโโ schemas/ # Pydantic v2 request/response models
โ โโโ routers/ # 55+ REST endpoints at /api/v1
โโโ frontend/ # Next.js 15 (App Router) ยท TypeScript ยท Tailwind CSS
โ โโโ app/ # Dashboard, Accounts, Opportunities, Bids, Estimating
โ โโโ components/ # Sidebar, Header, shared UI
โ โโโ lib/api.ts # Typed API client
โโโ docker-compose.yml
| Layer | Tech |
|---|---|
| Frontend | Next.js 15, TypeScript, Tailwind CSS |
| Backend | Python 3.11, FastAPI, SQLAlchemy 2, Pydantic v2 |
| Database | SQLite (dev) / PostgreSQL 16 (prod) |
| File Storage | Local filesystem (dev) / Amazon S3 (prod) |
| Auth | Clerk or Auth0 JWT verification (configurable via AUTH_PROVIDER) |
| Document Parsing | pdfplumber (PDF), python-docx (Word) |
| Exports | reportlab (PDF), python-docx (Word), openpyxl (Excel) |
| Audit | HTTP middleware โ all writes logged |
| Docs | OpenAPI at /docs and /redoc |
xALiGN uses Clerk for secure, production-ready authentication supporting multiple sign-in methods.
All Clerk components and configuration are installed. See docs/clerk-setup-guide.md for complete documentation.
-
Install dependencies (if not already done):
cd frontend npm install -
Start the development server:
npm run dev
-
Test authentication:
- Visit http://localhost:3000
- Click "Sign In" or "Sign Up"
- Use test email:
admin+clerk_test@xalign.com - Enter verification code:
424242 - โ
You'll be signed in and redirected to
/dashboard
| Route | Component | Description |
|---|---|---|
/sign-in |
<SignIn> |
Email/phone sign-in with OTP verification |
/sign-up |
<SignUp> |
New user registration |
/dashboard |
Protected | Redirect destination after auth |
For development and testing:
- Test Emails:
{username}+clerk_test@{domain}(e.g.,user+clerk_test@example.com) - Test Phones:
+1 (XXX) 555-0100to555-0199(e.g.,+12015550100) - Verification Code:
424242(universal test code)
See docs/clerk-test-credentials.md for detailed testing guide.
- โ Email/Phone Authentication: OTP verification with test mode support
- โ
Protected Routes: Automatic route protection with
clerkMiddleware() - โ Custom JWT Claims: TypeScript types for user metadata and permissions
- โ Role-Based Access Control: Custom roles (owner, admin, bid_manager, estimator, viewer)
- โ Organization Support: Multi-tenant access with team management
- โ MCP Server Integration: AI context for GitHub Copilot (see docs/clerk-mcp-server.md)
Backend JWT verification is handled by backend/services/auth.py:
from backend.services.auth import get_current_user, require_auth
# Optional auth - returns None if not authenticated
@app.get("/api/v1/protected")
async def route(user: UserClaims | None = Depends(get_current_user)):
if user:
print(f"User: {user.sub}, Email: {user.email}")
# Required auth - returns 401 if not authenticated
@app.get("/api/v1/admin")
async def admin(user: UserClaims = Depends(require_auth)):
return {"user_id": user.sub}The backend supports dual authentication (Clerk + Auth0) via AUTH_PROVIDER environment variable.
- Complete Setup Guide - Full authentication documentation
- Test Credentials - Testing patterns and examples
- MCP Server Integration - AI context for GitHub Copilot
GET /health
# Accounts
GET/POST /api/v1/accounts
GET/PUT/DELETE /api/v1/accounts/{id}
GET/POST /api/v1/accounts/{id}/contacts
GET/POST /api/v1/accounts/{id}/trigger-signals
# Opportunities
GET/POST /api/v1/opportunities
GET/PUT/DELETE /api/v1/opportunities/{id}
POST /api/v1/opportunities/{id}/qualify
GET /api/v1/opportunities/{id}/qualification
# Bids
GET/POST /api/v1/bids
GET/PUT/DELETE /api/v1/bids/{id}
GET/POST /api/v1/bids/{id}/documents
POST /api/v1/bids/{id}/documents/upload-and-parse โ PDF/Word upload + extract
POST /api/v1/bids/{id}/documents/{doc_id}/parse โ LLM re-parse
GET/POST /api/v1/bids/{id}/compliance
POST /api/v1/bids/{id}/compliance/{item_id}/generate-answer โ LLM answer draft
GET/POST /api/v1/bids/{id}/rfis
POST /api/v1/bids/{id}/generate-compliance-matrix
POST /api/v1/bids/{id}/generate-rfis
GET/POST/PATCH/DELETE /api/v1/bids/{id}/debrief โ Bid debrief
GET /api/v1/bids/{id}/export/pursuit-pack-pdf โ PDF export
GET /api/v1/bids/{id}/export/tender-response-docx โ Word export
GET /api/v1/bids/{id}/export/compliance-matrix-xlsx โ Excel export
# Debriefs (learning loop)
GET /api/v1/debriefs
GET /api/v1/debriefs/insights
# Estimating
GET/POST /api/v1/estimating
GET/PUT/DELETE /api/v1/estimating/{id}
GET/POST /api/v1/estimating/{id}/scope-gaps
GET/POST /api/v1/estimating/{id}/checklist
GET /api/v1/estimating/{id}/scope-gap-report
# Lead-time intelligence
GET/POST /api/v1/lead-times
GET/PATCH/DELETE /api/v1/lead-times/{id}
POST /api/v1/lead-times/seed โ Seed default dataset
# Procurement frameworks
GET/POST /api/v1/frameworks
GET/PATCH/DELETE /api/v1/frameworks/{id}
- Document parsing (PDF/Word โ structured requirements via
pdfplumber+python-docx) - LLM-assisted compliance answer generation
- Lead-time intelligence database (switchgear, UPS, chillers, generators)
- Bid debrief capture + learning loop
- Framework & procurement tracker
- Export: Pursuit Pack PDF, Tender Response Pack (Word), Compliance Matrix (Excel)
- PostgreSQL + S3 production config
- SSO / Auth (Clerk or Auth0)