Product Architecture

How PermitPilot works

A visual walkthrough of the end-to-end flow from permit ingestion to final compliance sign-off, with all the moving pieces engineered for multi-tenant reliability.

End-to-end permit flow
Step 1
Customer creates project
Multi-tenant workspace scoped by customer_id + project_id.
Step 2
Upload permit PDF
Signed URL upload, virus scan, immutable S3-style store.
Step 3
Admin inbox appears
Ops staff triage by SLA tier + document complexity score.
Step 4
Excel import & validation
Row/col schema validator with human-readable errors.
Step 5
Conditions table created
Normalized rows, indexed by authority + category.
Step 6
Assign specialists
Rule engine suggests planners by category + workload.
Step 7
Prepare authority emails
Templated with placeholders, sent via provider.
Step 8
Archive & export
Immutable snapshot exports (PDF + ZIP).
Rules engine
A declarative ruleset drives assignment, SLAs and notifications. New rules can be added without redeploying the application.
rule "Auto-assign fire safety" {
  when: condition.category == "Fire safety"
  then: assign(specialist.role == "fire_safety", by_workload)
}

rule "Escalate critical near-deadline" {
  when: priority == "critical" AND deadline_in_days < 7
  then: notify(project_manager, slack, email) AND raise(priority)
}

rule "Auto-archive completed projects" {
  when: project.completion == 100 AND days_idle > 30
  then: archive(project) AND snapshot(export_zip)
}
System boundaries
Tenant isolation
Row-level security keyed on customer_id at every read/write.
Pluggable extraction
Manual today. Swap for AI/OCR service without core rewrites.
Immutable audit log
Every state change captured, exportable per project.
Data model (simplified ERD)
  ┌──────────────┐        ┌──────────────┐         ┌──────────────┐
  │  customers   │ 1───∞  │   projects   │ 1───∞   │  conditions  │
  ├──────────────┤        ├──────────────┤         ├──────────────┤
  │ id           │        │ id           │         │ id           │
  │ name         │        │ customer_id  │         │ project_id   │
  │ plan         │        │ status       │         │ authority    │
  │ mrr          │        │ deadline     │         │ status       │
  └──────────────┘        └──────────────┘         │ assignee_id  │
                                 │                 └──────────────┘
                                 │ 1                       │ 1
                                 ∞                         ∞
                          ┌──────────────┐         ┌──────────────┐
                          │  documents   │         │   comments   │
                          └──────────────┘         └──────────────┘
Ingestion throughput
Median SLA (hours)