System architecture, API reference, and data models for Precision Auto Doors (PAD).
PAD runs entirely on Cloudflare edge infrastructure, routed through the MASCOM multi-tenant edge router. No origin server. All compute, storage, and database operations execute at the edge.
Client -> Cloudflare CDN -> mascom-edge Worker
-> Static: R2 (versioned, cache-busted via data-build)
-> API: pad-weylandai-com-api Worker -> D1
| Layer | Technology | Notes |
|---|---|---|
| Edge Router | mascom-edge | Multi-tenant R2 router, venture_routing D1 table |
| API Worker | pad-weylandai-com-api | Handles /api/* routes, business logic |
| Database | Cloudflare D1 | SQLite at edge, ~5ms reads |
| Object Storage | Cloudflare R2 | Blueprints, attachments, static assets |
| Auth | AuthFor SSO | authfor.com/sdk/v1/authfor.min.js |
| Payments | VendyAI | Subscription billing, invoice generation |
| Notifications | MailGuyAI | Email alerts, bid notifications |
| AI Inference | WeylandAI Platform | Blueprint parsing, schedule extraction |
Base URL: https://pad.weylandai.com/api. All endpoints require a valid AuthFor session token in the Authorization header.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/projects | List projects for authenticated contractor. Supports ?status= filter. |
| GET | /api/projects/:id | Get project detail including bid history and hardware schedule. |
| POST | /api/projects | Create project. Accepts blueprint upload (multipart/form-data). |
| PUT | /api/projects/:id | Update project metadata, status transitions. |
| DEL | /api/projects/:id | Soft-delete. Archived projects retained 90 days. |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/bids | List bids. Filter by ?project_id= or ?contractor_id=. |
| POST | /api/bids | Submit bid against a project. Triggers MailGuyAI notification to GC. |
| PUT | /api/bids/:id | Revise bid. Only allowed while status is submitted. |
| POST | /api/bids/:id/accept | GC accepts bid. Triggers VendyAI escrow hold. |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/hardware | List hardware schedules for a project. |
| POST | /api/hardware/extract | AI extraction. Upload blueprint PDF, returns parsed door schedule. |
| PUT | /api/hardware/:id | Manual override of extracted schedule line items. |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/contractors/me | Current contractor profile (from AuthFor session). |
| PUT | /api/contractors/me | Update profile, certifications, service area. |
| GET | /api/contractors/search | Search contractors by region, certification, capacity. |
id TEXT PK — UUID v4name TEXT NOT NULL — Project namegc_id TEXT FK — General contractor (AuthFor user ID)status TEXT — draft | bidding | awarded | in_progress | complete | archivedaddress TEXT — Job site addressblueprint_r2_key TEXT — R2 object key for uploaded blueprintdoor_count INTEGER — Total doors (auto-populated from hardware schedule)bid_deadline TEXT — ISO 8601 timestampcreated_at TEXT — ISO 8601updated_at TEXT — ISO 8601id TEXT PKproject_id TEXT FK — References projects.idcontractor_id TEXT FK — AuthFor user ID of bidding subamount_cents INTEGER — Bid total in centsline_items TEXT (JSON) — Itemized breakdownstatus TEXT — submitted | revised | accepted | rejected | withdrawnlead_time_days INTEGER — Estimated deliverynotes TEXT — Contractor notes / exclusionscreated_at TEXTid TEXT PKproject_id TEXT FKdoor_mark TEXT — Door mark number from plans (e.g. "D-101")door_type TEXT — hollow_metal | wood | aluminum | fiberglasswidth REAL — Inchesheight REAL — Inchesfire_rating TEXT — none | 20min | 45min | 60min | 90min | 3hrhardware_group TEXT — Hardware set referenceframe_type TEXT — knock_down | welded | drywallsource TEXT — ai_extracted | manualconfidence REAL — AI extraction confidence 0.0-1.0id TEXT PK — AuthFor user IDcompany_name TEXTlicense_number TEXTcertifications TEXT (JSON) — DHI, AAADM, fire door inspect, etc.service_regions TEXT (JSON) — Array of state/metro codestier TEXT — free | pro | enterprisevendyai_customer_id TEXT — VendyAI billing referencePAD delegates all authentication to AuthFor (authfor.com). No passwords are stored in PAD's database.
authfor.min.js SDK.HttpOnly cookie, redirects back to PAD./verify endpoint (cached 5 min).user_id, email, roles[]. PAD maps user_id to contractors.id.// SDK initialization
AuthFor.init({
app: 'pad-weylandai',
redirect: 'https://pad.weylandai.com/dashboard',
scopes: ['profile', 'email']
});
// API Worker JWT validation
const { valid, payload } = await authfor.verify(request.headers.get('Authorization'));
if (!valid) return new Response('Unauthorized', { status: 401 });
Contractors upload architectural blueprint PDFs. The WeylandAI platform processes them to extract door schedules, hardware groups, and fire ratings.
POST /api/hardware/extract
Content-Type: multipart/form-data
Response:
{
"project_id": "proj_8f2a...",
"doors_found": 47,
"confidence_avg": 0.91,
"schedule": [
{
"door_mark": "D-101",
"door_type": "hollow_metal",
"width": 36, "height": 84,
"fire_rating": "90min",
"hardware_group": "HW-3",
"confidence": 0.95
}
],
"warnings": ["D-218: fire rating unclear, manual review recommended"]
}
Given a hardware schedule, PAD generates bid estimates using historical pricing data, regional material costs, and labor rates. Contractors can accept the estimate as a starting point or override line items.
POST /api/bids/estimate
{ "project_id": "proj_8f2a...", "markup_pct": 15 }
Response:
{
"estimated_total_cents": 4872500,
"line_items": [
{ "door_mark": "D-101", "material_cents": 48000, "labor_cents": 12000, "hardware_cents": 35000 }
],
"data_sources": ["regional_avg_2025Q4", "rs_means", "historical_bids"]
}
| Service | Venture | Integration |
|---|---|---|
| Authentication | AuthFor | SSO SDK, JWT verify API, user provisioning webhooks |
| Payments | VendyAI | Subscription billing (free/pro/enterprise), bid escrow holds, invoice generation |
| Notifications | MailGuyAI | Bid submitted/accepted/rejected alerts, project status changes, deadline reminders |
| AI Platform | WeylandAI | Blueprint OCR, schedule extraction, cost estimation models |
| Edge Routing | mascom-edge | Static asset delivery from R2, API path routing to worker |
# Static assets (HTML/CSS/JS) deployed via mascom-edge
python3 mascom_edge_deploy.py spec/index.html \
--hostname pad.weylandai.com \
--path /spec/index.html \
--tag spec-v1
# API worker
cd workers/pad-weylandai-com-api
npx wrangler deploy
# D1 migrations
npx wrangler d1 migrations apply pad-db --remote
Precision Auto Doors — a WeylandAI platform product. Part of the MobCorp venture fleet.
Specification version 1.0.0 — 2026-03-04