Skip to content

Guembri01/drawmark-ai

Repository files navigation

DrawMark AI

Cross-checks a building permit drawing against IBC, ADA, NFPA, ASHRAE, and OSHA simultaneously and writes the resubmittal letter — replacing a plan examiner's two-week per-set review.

DrawMark multi-code compliance view showing 27 items across IBC, ADA, NFPA, ASHRAE with per-standard percentage cards, severity legend, and real building-code citations such as IBC 1005.1 means of egress, IBC 903.3 sprinkler, ADA 206.2 accessible route.


The problem

City and county plan examiners review building-permit drawings against five separate code families: IBC (International Building Code), ADA (Americans with Disabilities Act), NFPA (fire / life safety), ASHRAE (energy + mechanical), OSHA (worker safety during construction). A 50-sheet drawing set takes a senior examiner two weeks. Applicants wait. Cities have permit backlogs measured in months.

What this does

DrawMark ingests the permit drawing PDF, classifies the active code domain per sheet, runs per-code analyzers against detected compliance items (IBC chapter cross-references, ADA route requirements, NFPA sprinkler / egress, ASHRAE building envelope), grades each item Critical / Major / Minor / Advisory, and produces the resubmittal letter the applicant gets back — keyed to each specific compliance item.

Real-world scenario

A city plan examiner uploads a 12-storey mixed-use drawing set. DrawMark surfaces 27 items across four code families: IBC 29 % pass (2/7), highest item §IBC 1005.1 Means of egress width: minimum 124 inches required for 412 occupants; ADA 0 % pass (0/8); NFPA 0 % pass (0/6); ASHRAE 0 % pass (0/6). The action-required banner generates: "Applicant must submit corrected drawings addressing all 'fail' and 'needs_info' items before permit issuance. A written response letter keyed to each compliance item is required with the resubmittal." The examiner forwards to the applicant.

Why it saves time

Metric Manual approach DrawMark Improvement
Per-set review ~2 weeks same-day for the AI pass + ~half day examiner review ~10× faster
Code-family coverage one at a time five in parallel systematic
Resubmittal letter drafted by examiner auto-generated, item-keyed manual → automated

Key features

  • Multi-code engine for IBC + ADA + NFPA + ASHRAE + OSHA.
  • Severity-graded findings — Critical / Major / Minor / Advisory.
  • Real code citations per item (§IBC 1005.1, §ADA 206.2, etc.).
  • Per-standard progress cards showing pass rate per code family per drawing set.
  • Action-required resubmittal letter auto-generated and keyed to compliance items.
  • Canvas annotation workspace unique among permit-review products.
  • Tab filters by standard, result, and severity.

How it works

The non-obvious decision was to run one analyzer per code family in parallel rather than feeding the whole drawing set to a single prompt. Per-family analyzers stay short, regression-test cleanly, and accept new versions of their own code (IBC 2024 vs 2027) without disturbing the others. The shared canonical schema (item → standard → severity → citation) means findings from different families merge naturally into the resubmittal letter without the examiner doing the reconciliation.

Architecture

flowchart LR
    PDF[Permit Drawing PDF] --> Seg[Sheet Segmenter]
    Seg --> IBC[IBC Analyzer]
    Seg --> ADA[ADA Analyzer]
    Seg --> NFPA[NFPA Analyzer]
    Seg --> ASHRAE[ASHRAE Analyzer]
    Seg --> OSHA[OSHA Analyzer]
    IBC --> Findings
    ADA --> Findings
    NFPA --> Findings
    ASHRAE --> Findings
    OSHA --> Findings[(Findings with Citations)]
    Findings --> Letter[Resubmittal Letter]
    Findings --> Tabs[Per-Standard Tabs]
Loading

Screenshots

Multi-code compliance view (all tab)

All-codes compliance view with per-standard cards and severity legend.

Tab IBC

IBC tab filtered to International Building Code items.

Tab ADA

ADA tab filtered to Americans with Disabilities Act items.

Tab NFPA

NFPA tab filtered to fire / life-safety items.

Tab ASHRAE

ASHRAE tab filtered to energy and mechanical items.

Analytics

City-wide analytics with per-code pass-rate trend and applicant rework rates.

Project detail variants

Per-project AI regeneration view for re-running the analysis after a resubmittal.

Stack

  • Backend: fastapi, sqlalchemy + PostgreSQL, openai SDK against DeepInfra and OpenAI, azure-ai-documentintelligence for drawing OCR.
  • Frontend: react + vite, @tanstack/react-query, react-konva for the canvas annotation surface.
  • Infra: Docker Compose (api, worker, postgres, redis, frontend).

Quick start

git clone https://github.com/Guembri01/drawmark-ai.git
cd drawmark-ai
cp .env.example .env   # OPENAI_API_KEY, AZURE_DI_*, JWT_SECRET
docker compose up -d
# API: http://localhost:8033/docs — UI: http://localhost:5033

Limitations

  • IBC 2024 baseline. New code cycles (IBC 2027) need analyzer regression tests.
  • 2D drawing input only. BIM/IFC input is not yet ingested.
  • English code references only. Bilingual jurisdictions (e.g., Quebec) need French code-family analyzers.
  • Canvas annotations are keyboard-shortcut-friendly; full ARIA/keyboard navigation is a roadmap item for accessibility examiners themselves.

Roadmap

  • IFC / BIM ingestion.
  • IBC 2027 + ADA 2024 update sets.
  • French code-family analyzers for Quebec jurisdictions.
  • Keyboard-shortcut overlay + ARIA full coverage on the canvas.
  • Multi-code engine (IBC + ADA + NFPA + ASHRAE + OSHA).
  • Severity-graded findings with real citations.
  • Auto-generated resubmittal letter.

What I learned

  • Per-code analyzers beat one mega-prompt for regression isolation — a change to one code family doesn't break the others.
  • Real code citations on every finding turned permit applicants from adversaries into collaborators; they understood exactly what needed to change.

License

Released under the MIT License.

Acknowledgements

Built with FastAPI, SQLAlchemy, React, Azure Document Intelligence, and Konva.

About

Cross-checks building permit drawings against IBC, ADA, NFPA, ASHRAE in parallel and auto-writes the resubmittal letter.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors