Metaviz AI
Construction Tech / AEC SaaS / AI Compliance

AI Building-Code Compliance & Permit-Review SaaS

Live in production for a Florida building-code engineering firm. Full-stack, AI-powered platform that replaces days of manual construction-drawing review with supervised AI verification. Ingests construction PDFs, runs AWS Textract OCR + GPT-4o extraction, retrieves exact code passages via ChromaDB RAG, and produces audit-ready compliance reports with real FBC/IBC/NFPA citations across five disciplines.

Project Overview

GPT-4o + RAG — 200+ code checks across five disciplines, every finding cited to a real FBC/IBC/NFPA section. Days of manual review cut to supervised hours.

Permit review means reading hundreds of pages of construction drawings against hundreds of code rules by hand. For AEC firms and Florida code-engineering practices, that process takes days per project, requires deep discipline expertise across Architectural, Structural, Mechanical, Electrical, and Plumbing trades, and leaves no structured audit trail for the permit file.

This platform cuts that from days to hours — and, critically, makes the AI auditable. Every finding the system raises is grounded in a real code passage retrieved by ChromaDB vector search from indexed FBC, IBC, and NFPA standards. The AI cannot invent a rule: it cites, it does not guess. Reviewers verify reasoning instead of trusting a black box, and the output is a fully cited, permit-ready compliance report in both PDF and JSON.

Built on FastAPI + Celery + PostgreSQL backend, Next.js 15 frontend, and a six-stage transparent processing pipeline with live progress, per-stage cost display, and a hard billing ceiling per document. Live in production for a Florida building-code engineering firm.

The platform ingests construction PDF drawings, runs AWS Textract OCR and GPT-4o per-page extraction, retrieves the exact relevant code passage via ChromaDB vector search (RAG), and runs 200+ checks per discipline across five trades: Architectural, Structural, Mechanical, Electrical, and Plumbing, plus NFPA fire and life-safety codes (NFPA 1, 70, 72, 101).

Every finding links to a real citation — for example, FBC Plumbing 2023, Section 712.1 — so the AI cannot hallucinate a rule. It must reference an indexed passage from the FBC, IBC, or NFPA standards stored in ChromaDB. The output is a fully cited, audit-ready compliance report in PDF for the permit file and JSON for BIM/PM tooling, with every page traceable to the source drawing.

The system is cost-aware by design: page, OCR, and LLM cost is estimated up front with a hard ceiling per document to prevent runaway spend. Reviewers operate in a full human-in-the-loop workflow — they can edit any extracted field and re-run checks before accepting the final report.

Relevant Keywords
AI Permit Review SaaS
Building Code Compliance AI
GPT-4o RAG Construction
AWS Textract OCR PDF
ChromaDB Vector Search
FBC IBC NFPA Compliance
AEC AI Platform
FastAPI Celery Backend
Next.js 15 TypeScript
MEP Structural Architectural Checks
Audit-Ready Compliance Report
Zero-Hallucination AI
Challenges

Permit Review Is Still a Manual, Unaudited, Days-Long Process

high pain
  • Manual permit review takes days per project — reading hundreds of pages of construction drawings against hundreds of code rules by hand is the standard process at AEC firms and code-engineering practices. A single project review can take two to five days of senior engineer time, with no structured tracking of which rules were checked or why a finding was raised.
  • No audit trail for the permit file — traditional review produces a marked-up PDF or a handwritten checklist, neither of which gives the permit office a structured, traceable record of which code sections were checked, which passed, and which failed. When a drawing is revised, the review process starts from scratch with no reference to what was previously verified.
  • AI hallucination makes LLMs unusable for compliance without RAG — off-the-shelf LLMs cannot be trusted for code compliance because they generate plausible-sounding but unverified code citations. A building official cannot accept 'AI says this complies' without a reference to the actual code section. Without grounding every finding in a retrieved passage from an indexed code corpus, AI is a liability rather than an asset in permit review.
  • Five disciplines require different expertise and rule sets — Architectural, Structural, Mechanical, Electrical, and Plumbing reviews each require a different body of knowledge, different sections of the FBC, IBC, and NFPA standards, and different extraction logic from construction drawings. A single generic AI cannot handle all five trades without discipline-specific prompts, rule sets, and structured output schemas.
  • Large PDF processing is expensive and unpredictable — construction drawing sets can be hundreds of pages and hundreds of megabytes. Sending entire documents to an LLM is cost-prohibitive, technically unreliable, and produces unstructured outputs that cannot be audited. Without per-page processing, cost control, and structured JSON extraction, AI-assisted review is not viable at production scale.
  • No human-in-the-loop means no professional accountability — code-compliance decisions carry professional and legal liability. A system that produces a report without allowing a licensed engineer to review, edit, and approve every extracted field and finding is not usable in a regulated permit-review workflow. Reviewers need to verify AI reasoning, not accept its output as final.
  • Billing surprises kill production AI tool adoption — AEC firms and code-engineering practices cannot adopt an AI tool that runs unpredictable LLM costs per document. Without up-front cost estimates, live per-stage cost display, and a hard ceiling per document, the tool is a financial risk rather than a productivity gain.
The Solution

How We Built a Zero-Hallucination AI Permit-Review Platform

The platform is built on an event-driven FastAPI + Celery + PostgreSQL backend with a six-stage document processing pipeline. Every component addresses a specific failure mode of off-the-shelf AI applied to code compliance. The result is a tool that a licensed engineer can stake their professional reputation on — because every output is traceable, cited, and human-approved.

1Zero-Hallucination RAG-Grounded AI — every finding is grounded in a real code passage retrieved by ChromaDB vector search from indexed FBC, IBC, and NFPA standards. The AI cannot invent a rule; it must cite an indexed passage before raising any flag. This makes the output permit-ready and professionally defensible, not just a plausible LLM response.
2Six-Stage Transparent Processing Pipeline — documents move through a fully visible pipeline: Queued → OCR (AWS Textract) → Schedule Detection → Table Extraction → Equipment Parsing → Ready-for-Verification. Each stage shows live progress and its own cost, so reviewers always know exactly where processing is and what it is costing.
3Per-Page Structured GPT-4o Extraction with Confidence Scores — GPT-4o processes each page individually and outputs typed JSON with confidence scores for every extracted field. Reviewers can inspect, edit, and approve extraction results before checks run — full human-in-the-loop at the data layer, not just the output layer.
4200+ Discipline-Specific Code Checks Across Five Trades — each discipline (Architectural, Structural, Mechanical, Electrical, Plumbing) gets its own prompts, extraction logic, rule set, and check library. Plumbing checks drainage slope, backflow prevention, and venting. Structural checks load paths, framing, and foundations. Electrical checks NEC compliance. Every check is traceable to a specific code section.
5Cost-Aware Processing with Hard Ceilings — page count, OCR cost, and LLM token cost are estimated up front before any processing begins. A hard cost ceiling per document prevents runaway spend. Live cost display per stage and per page gives practices complete financial visibility into every review job.
6Streaming 500 MB Uploads with Deduplication — construction drawing PDFs are streamed to disk in 5 MB chunks with magic-byte validation and SHA-256 content hashing. Duplicate submissions are detected and rejected before any processing begins — preventing double-billing on resubmitted drawings and ensuring storage integrity.
7Audit-Ready PDF + JSON Export — every report exports as a printable PDF for the permit file and a complete JSON record for BIM and PM tooling. Every finding links to its source drawing page, the extracted field, and the specific code citation — creating a full traceable chain from drawing to code section.
Before

Senior engineer reads hundreds of drawing pages by hand — 2 to 5 days per project. No structured audit trail — marked-up PDFs and handwritten checklists only. LLM output not usable for compliance — no code citations, hallucinations unacceptable. Different discipline reviewers needed for each trade — no unified workflow. No cost visibility — LLM fees unpredictable and potentially unbounded. Drawing resubmissions processed again from scratch with no deduplication.

After

200+ RAG-grounded checks across five disciplines in supervised hours, not days. Every finding cites a real FBC/IBC/NFPA section — permit-ready audit trail in PDF + JSON. ChromaDB retrieves the exact code passage before GPT-4o raises any flag — zero hallucination. Discipline-specific prompts, extraction logic, and rule sets for all five trades in one platform. Up-front cost estimate, live per-stage cost display, and hard ceiling per document. SHA-256 dedup on upload — duplicate drawings rejected before any processing begins.

Ecosystem

The Platform Modules — Six-Stage Pipeline, Five Disciplines, Zero Hallucination

PDF Ingestion & Upload

Streaming upload handler for PDFs up to 500 MB. Files streamed to disk in 5 MB chunks with magic-byte validation, MIME sniffing, and SHA-256 content hashing for deduplication. Duplicate submissions rejected before any processing or billing begins.

FastAPIAWS S3Python hashlibCelery

OCR Engine (AWS Textract)

AWS Textract processes each page and returns structured blocks (lines, words, tables, key-value pairs). Output stored as JSONB in PostgreSQL per page for downstream extraction. Textract cost tracked and displayed per page in the pipeline UI.

AWS TextractPostgreSQL JSONBFastAPICelery

Schedule & Table Detection

Dedicated stage detects title blocks, revision schedules, and data tables in the OCR output. Schedule data is extracted into structured records for cross-referencing during code checks. Table rows are parsed into typed JSON for equipment and specification tables.

GPT-4oPydanticAIFastAPIPostgreSQL JSONB

Equipment Parser

Parses mechanical schedules, panel schedules, fixture schedules, and structural member tables into typed equipment records. Each record includes extracted values, confidence scores, and the source page reference for traceability.

GPT-4oPydanticAIPostgreSQLFastAPI

ChromaDB RAG Engine

Indexes FBC (Florida Building Code), IBC (International Building Code), and NFPA 1/70/72/101 standards as vector embeddings. At check time, the relevant code passage is retrieved before GPT-4o generates any finding — grounding every flag in a real cited text.

ChromaDBOpenAI EmbeddingsFastAPIPostgreSQL

Compliance Check Engine

Runs 200+ discipline-specific checks across Architectural, Structural, Mechanical, Electrical, and Plumbing trades. Each check retrieves its code passage from ChromaDB, runs GPT-4o against the extracted drawing data, and records the finding with citation, confidence, and source reference.

GPT-4oPydanticAIChromaDBFastAPICelery

Human-in-the-Loop Review

Reviewers inspect per-page extraction results, edit any field, override confidence scores, and approve or reject individual findings before the final report is generated. Every edit is logged with timestamp and reviewer identity for the audit trail.

Next.js 15TanStack QueryFastAPIPostgreSQL

Report Generator (PDF + JSON)

Generates a printable branded PDF compliance report for the permit file and a complete structured JSON export for BIM/PM tooling. Every finding links to its source page, extracted value, and cited code section. Built with ReportLab and FastAPI background tasks.

ReportLabFastAPICeleryPostgreSQLAWS S3

Cost Tracker & Billing Controls

Estimates page count, OCR cost, and LLM token cost before processing begins. Tracks actual spend per stage in real time and enforces a configurable hard ceiling per document. Live cost display on the pipeline progress UI prevents billing surprises.

FastAPIPostgreSQLOpenAI token countingCelery

Processing Pipeline UI

Six-stage pipeline progress view (Queued / OCR / Schedule Detection / Table Extraction / Equipment Parsing / Ready) with per-stage status, timing, and cost. Built on TanStack Query with polling for live updates during async Celery processing.

Next.js 15TanStack QueryFastAPIReact 19Tailwind
User Experience

Designed for every screen

Web

  • Upload construction PDFs up to 500 MB with real-time streaming progress and immediate magic-byte validation
  • Six-stage pipeline progress view with per-stage status, timing, and live cost display
  • Per-page extraction review: inspect GPT-4o extracted fields, confidence scores, and edit any value before checks run
  • Discipline selector: choose which trades to check (Architectural, Structural, MEP, or all five)
  • Compliance findings view: filterable by discipline, severity, and citation source (FBC / IBC / NFPA)
  • Human-in-the-loop approval: accept, reject, or flag each finding with reviewer comments before finalising the report
  • Up-front cost estimate before processing starts, with live cost tracking and configurable hard ceiling
  • PDF compliance report download for the permit file, JSON export for BIM/PM tooling
  • Document history: all past submissions with processing status, cost totals, and report access
  • SHA-256 dedup alert: duplicate drawing submissions detected and shown before any processing charge
Upload & Process Flow: Reviewer uploads drawing PDF → streaming validation runs → SHA-256 dedup check → cost estimate displayed → reviewer confirms → Celery job queued → Textract OCR runs per page → Schedule Detection → Table Extraction → Equipment Parsing → status shown live on pipeline UIReview & Verify Flow: Processing complete → reviewer opens per-page extraction results → inspects GPT-4o fields and confidence scores → edits any incorrect value → approves extraction → compliance checks run against corrected data → findings displayed with ChromaDB-retrieved citationsReport Generation Flow: Reviewer approves findings → overrides any false positive or false negative → adds reviewer comments → generates final report → branded PDF rendered by ReportLab → JSON export created → both stored in S3 with signed URL download links for the permit file
AI Assistant

AI Layer

An AI processing engine embedded in the platform's pipeline (not a conversational chatbot). Primary Model: OpenAI GPT-4o (vision + structured output). Structured Outputs: PydanticAI validates every GPT-4o response before any database write. RAG Engine: ChromaDB vector search over indexed FBC, IBC, and NFPA 1/70/72/101 standards. Embeddings: OpenAI text-embedding-3-small for ChromaDB indexing. OCR Layer: AWS Textract (per-page blocks, tables, key-value pairs). Hallucination Prevention: every finding requires a ChromaDB-retrieved citation before GPT-4o output is accepted. Human-in-the-Loop: per-page extraction review and per-finding approval before report generation.

Embedded widget
Per-page structured extraction: GPT-4o outputs typed JSON with confidence scores for every field on every drawing page
RAG-grounded compliance checks: ChromaDB retrieves the exact code passage before GPT-4o generates any finding
200+ discipline-specific checks across Architectural, Structural, Mechanical, Electrical, and Plumbing trades
NFPA fire and life-safety checks: NFPA 1 (Fire Code), NFPA 70 (NEC), NFPA 72 (Fire Alarm), NFPA 101 (Life Safety Code)
Schedule and table detection: identifies title blocks, revision schedules, and data tables in OCR output
Equipment parsing: extracts mechanical, panel, fixture, and structural member schedules into typed records
Confidence scoring on every extracted field — low-confidence fields flagged for mandatory human review
Human-in-the-loop edits: reviewers correct any extraction result and re-run checks against corrected data
Zero-hallucination guarantee: every finding must cite a ChromaDB-retrieved code passage — no citation, no finding
PydanticAI structured output validation on every GPT-4o response before database write
Example queries
Check this page against FBC Plumbing 2023 drainage requirements and cite the relevant section for each finding
Extract all mechanical equipment from this schedule page as typed JSON with model numbers, capacities, and efficiency ratings
Verify the structural member sizes on this framing plan against the IBC 2021 load requirements for the specified occupancy
Identify all egress path components on this floor plan and check them against NFPA 101 Section 7.1 minimum width requirements
Parse the electrical panel schedule and check each circuit against NEC Article 210 branch circuit requirements
Architecture

System design

Frontend
Next.js 15 · React 19 · TypeScript · Tailwind CSS · TanStack Query
Backend
FastAPI · Python 3.11 · Pydantic v2 · PydanticAI · async SQLAlchemy · Celery + Redis · AI/ML: OpenAI GPT-4o · PydanticAI · ChromaDB · OpenAI Embeddings · AWS Textract
Infrastructure
Docker · GitHub Actions · Coolify (DigitalOcean) · Traefik · Cloudflare · Let's Encrypt · Sentry
FastAPI Backend (Python 3.11) — Async FastAPI with uvicorn/gunicorn multi-worker. Handles upload streaming (5 MB chunks), pipeline orchestration, extraction API, compliance check API, report generation, and cost tracking. SQLAlchemy async + asyncpg for PostgreSQL. Alembic for schema migrations.Celery + Redis Task Queue — Six-stage document processing pipeline runs as Celery tasks: Textract OCR, Schedule Detection, Table Extraction, Equipment Parsing, Compliance Checks, Report Generation. Redis as broker and result backend. Pipeline status polled by frontend via TanStack Query.AWS Textract OCR — Per-page OCR returns structured blocks (lines, words, tables, key-value pairs). Block output stored as JSONB in PostgreSQL per page. Textract cost tracked per page and accumulated per document against the configured ceiling.ChromaDB RAG Store — FBC, IBC, and NFPA 1/70/72/101 standards indexed as vector embeddings using OpenAI text-embedding-3-small. At check time, the top-k relevant passages are retrieved and included in the GPT-4o prompt context — grounding every finding in a real code section.GPT-4o Extraction & Checks — Processes each drawing page with discipline-specific prompts. Outputs typed PydanticAI-validated JSON for extraction (fields + confidence scores) and structured compliance findings (citation, severity, source page, extracted value). No unstructured LLM output reaches the database.PostgreSQL + JSONB — Primary data store for documents, pages, extraction results, compliance findings, cost records, and audit logs. JSONB columns store flexible per-page OCR blocks and extraction outputs without schema migrations on every prompt change. asyncpg for high-throughput async queries.Next.js 15 + React 19 Frontend — TypeScript SPA with TanStack Query for live pipeline polling. Tailwind CSS for layout. Per-page extraction editor, compliance findings dashboard, cost display, and report download UI. Sentry for client-side error tracking.AWS S3 + Signed URLs — Original PDFs, intermediate OCR outputs, and final reports stored in S3. All access via signed URLs with configurable expiry — no public document access. Streaming upload writes directly to S3 via pre-signed multipart upload.Observability Stack — Sentry for error tracking across backend and frontend. structlog for structured JSON logs with per-request trace IDs. Per-stage pipeline timing and cost logged to PostgreSQL for analytics and billing audit.Infrastructure — Docker + GitHub Actions CI/CD. Coolify (managed Docker Compose) on DigitalOcean. Traefik reverse proxy with Cloudflare + Let's Encrypt TLS. Horizontal scaling via Celery worker replicas with zero code changes.
Business Logic

The rules that run the product

Rules
  • Every compliance finding must have a ChromaDB-retrieved code citation before it is written to the database — no citation, no finding
  • Document processing is gated on cost approval: the up-front estimate must be acknowledged before Celery jobs are queued
  • A hard cost ceiling per document is enforced by the task queue: processing halts and alerts the reviewer if the ceiling is reached mid-pipeline
  • SHA-256 content hash deduplication rejects any file already in the system before OCR begins, preventing double-billing on resubmitted drawings
  • Per-page extraction results are locked after reviewer approval: re-running checks always uses the approved (human-corrected) data, not raw GPT-4o output
  • All six pipeline stages must complete successfully before the report generation stage is unblocked
  • Final reports are immutable once generated: any change to findings requires a new report version with a new audit record
  • All reviewer edits, approvals, and rejections are logged with timestamp and user identity for the professional audit trail
Workflows
  • Upload & Dedup Workflow: File received → 5 MB chunk streaming to disk → magic-byte MIME validation → SHA-256 hash computed → duplicate check against database → if new: stored to S3 and processing record created → if duplicate: rejection response with original submission reference
  • Pipeline Processing Workflow: Celery job queued → Textract OCR per page → JSONB blocks stored to PostgreSQL → Schedule Detection stage → Table Extraction stage → Equipment Parsing stage → all outputs stored as typed JSONB → status updated per stage → frontend polls via TanStack Query
  • Compliance Check Workflow: Reviewer approves extraction → check engine runs per discipline → ChromaDB retrieves top-k code passages per check → GPT-4o runs check against extracted data + retrieved passages → PydanticAI validates output → findings written to database with citation, severity, source page
  • Report Generation Workflow: Reviewer approves final findings → report generator triggered as Celery task → ReportLab renders branded PDF with all findings, citations, and source page references → JSON export created → both stored to S3 → signed download URLs returned to frontend
Automations
  • Celery Beat runs nightly cost reconciliation across all documents processed in the billing period
  • Textract completion webhook triggers the next pipeline stage automatically — no polling between stages
  • Low-confidence extraction fields are automatically flagged for mandatory reviewer attention before checks run
  • Cost ceiling alert fires a Sentry notification and halts the Celery pipeline if per-document spend reaches the configured threshold
  • S3 signed URL expiry is automatically renewed on reviewer access to prevent expired download links mid-session
  • pgvector embedding refresh runs on ChromaDB index updates to keep code-standard citations current after code cycle updates
Features

Everything inside

Document Ingestion & Deduplication

  • Streaming upload handler for PDFs up to 500 MB — 5 MB chunk streaming to disk
  • Magic-byte MIME type validation — rejects non-PDF files regardless of extension
  • SHA-256 content hash deduplication — duplicate submissions rejected before any processing or billing
  • S3 storage with signed URL access control — no public document access
  • Cost estimate displayed and acknowledged before any Celery job is queued

OCR Pipeline (AWS Textract)

  • Per-page Textract processing returning structured blocks: lines, words, tables, key-value pairs
  • Block output stored as JSONB in PostgreSQL per page for downstream extraction stages
  • Textract cost tracked per page and accumulated against the per-document hard ceiling
  • Schedule and title block detection identifies drawing metadata for cross-referencing
  • Table rows parsed into typed JSON for equipment schedules and specification tables

AI Extraction (GPT-4o + PydanticAI)

  • Per-page structured extraction: typed JSON output with confidence scores for every field
  • Discipline-specific prompts for Architectural, Structural, Mechanical, Electrical, and Plumbing pages
  • Equipment parsing: mechanical schedules, panel schedules, fixture schedules, structural member tables
  • PydanticAI validates every GPT-4o output before database write — no unstructured LLM responses stored
  • Low-confidence fields automatically flagged for mandatory reviewer correction

RAG-Grounded Compliance Checks (ChromaDB)

  • FBC, IBC, and NFPA 1/70/72/101 standards indexed as OpenAI vector embeddings in ChromaDB
  • Top-k code passage retrieval before every GPT-4o compliance check — grounds every finding
  • 200+ discipline-specific checks: Architectural (occupancy, egress, accessibility), Structural (loads, framing, foundations), Mechanical (HVAC, ventilation), Electrical (NEC panels, circuits), Plumbing (drainage, backflow, venting)
  • NFPA fire and life-safety checks: NFPA 1 (Fire Code), NFPA 70 (NEC), NFPA 72 (Fire Alarm), NFPA 101 (Life Safety Code)
  • Every finding includes: code citation, retrieved passage excerpt, extracted drawing value, severity, and source page

Human-in-the-Loop Review

  • Per-page extraction review UI: inspect and edit any GPT-4o extracted field before checks run
  • Per-finding approval: accept, reject, or flag each compliance finding with reviewer comments
  • Reviewer corrections stored separately from raw AI output — checks always run against approved data
  • Full audit log: every edit, approval, and rejection timestamped with reviewer identity
  • Re-run checks on any corrected extraction without reprocessing the full pipeline

Cost Control & Observability

  • Up-front cost estimate (page count + Textract + LLM tokens) before processing begins
  • Live per-stage cost display on the pipeline progress UI
  • Configurable hard cost ceiling per document — enforced by Celery task gating
  • Cost ceiling alert via Sentry notification if threshold is reached mid-pipeline
  • Sentry error tracking + structlog JSON logs with per-request trace IDs across all pipeline stages

Report Generation (PDF + JSON)

  • Branded PDF compliance report rendered by ReportLab for the permit file
  • Every finding links to: source drawing page, extracted field value, retrieved code citation, reviewer approval
  • Complete JSON export for BIM and PM tooling with full finding metadata
  • Both outputs stored to S3 with signed URL download links
  • Immutable report versions: any post-approval change creates a new versioned report record

Processing Pipeline UI

  • Six-stage progress view: Queued / OCR / Schedule Detection / Table Extraction / Equipment Parsing / Ready
  • Per-stage status indicators with timing and cumulative cost display
  • TanStack Query polling for live async Celery pipeline updates without page refresh
  • Document history view: all past submissions with processing status, cost totals, and report access
  • Duplicate submission alert: shows original submission date and cost if SHA-256 match detected
Tech Stack

Built on a modern stack

Frontend
Next.js 15 · React 19 · TypeScript · Tailwind CSS · TanStack Query (pipeline polling) · Sentry (client error tracking)
Backend
Backend: FastAPI (Python 3.11) · Pydantic v2 · PydanticAI · async SQLAlchemy · asyncpg · Alembic · uvicorn + gunicornTask Queue: Celery · Redis (broker + result backend) · Six-stage pipeline as Celery task chainsAI / LLM: OpenAI GPT-4o (vision + structured output) · PydanticAI (model routing + validation) · OpenAI text-embedding-3-small (ChromaDB indexing)RAG / Vector Store: ChromaDB (FBC, IBC, NFPA 1/70/72/101 embeddings) · OpenAI Embeddings · Top-k retrieval per compliance checkOCR: AWS Textract (per-page blocks, tables, key-value pairs) · JSONB storage per page in PostgreSQLAuth & Security: Signed S3 URLs for all document access · FastAPI dependency injection for auth · Per-reviewer audit logging
Database
PostgreSQL · JSONB columns (OCR blocks, extraction outputs, findings) · asyncpg · Alembic migrations
DevOps
Infrastructure: Docker · GitHub Actions CI/CD · Coolify (managed Docker Compose, DigitalOcean) · Traefik reverse proxy · Cloudflare + Let's Encrypt TLS · Horizontal Celery scalingObservability: Sentry (error tracking — backend + frontend) · structlog (JSON logs with trace IDs) · Per-stage cost logging to PostgreSQL
Tools
Storage & CDN: AWS S3 (PDFs, OCR outputs, reports) · Pre-signed multipart upload · Signed URL access control · Configurable expiryPDF Generation: ReportLab (branded compliance report PDF) · FastAPI background tasks
Results

Outcomes that move the business

Days → Hours on Every Project
🔒
Zero-Hallucination, Permit-Ready Output
📐
200+ Checks Across Five Disciplines in One Platform
💰
No Billing Surprises, Ever
📈
Production-Grade at Scale
🤝
Human Accountability at Every Step
📄
Audit-Ready Permit File Output
  • Delivered a production AI permit-review platform (Next.js 15 SPA, FastAPI backend, six-stage Celery pipeline) for a live Florida code-engineering firm
  • Zero-hallucination compliance findings: ChromaDB RAG retrieves real FBC/IBC/NFPA citations before every GPT-4o check — the AI cites, it does not guess
  • 200+ discipline-specific checks across Architectural, Structural, MEP (Mechanical, Electrical, Plumbing), and NFPA fire/life-safety codes in one codebase
  • Full human-in-the-loop workflow: per-page extraction review, per-finding approval, and immutable report versioning for professional accountability
  • Cost-aware architecture: up-front estimates, live per-stage tracking, and configurable hard ceilings prevent billing surprises at production document volumes
  • Streaming 500 MB upload with SHA-256 dedup and signed S3 URLs — production-grade data handling for large construction drawing sets
  • End-to-end observability: Sentry + structlog across backend and frontend with per-request trace IDs and per-stage cost logging to PostgreSQL
  • Horizontal Celery scaling with zero code changes — worker replicas add capacity without architectural changes

See it in action

My Role & Deliverables

Role: Full-Stack AI Engineer · Construction Tech · Python, FastAPI, Next.js, GPT-4o, AWS, RAG

Project Description: Built a production AI SaaS that automates building-permit review for a Florida code-engineering firm. Ingests construction PDFs, runs AWS Textract OCR and GPT-4o per-page extraction, and grounds every finding in real code via ChromaDB RAG — so the AI cites FBC/IBC/NFPA sections, never hallucinates. 200+ checks across Architectural, Structural, and MEP disciplines. Stack: FastAPI, Celery/Redis, PydanticAI, PostgreSQL, Next.js 15. Streaming 500 MB uploads, cost ceilings, human-in-the-loop edits, audit-ready PDF/JSON reports. Cut review from days to supervised hours.

Skills & Deliverables:

  • Full-Stack Development (FastAPI, Next.js 15, React 19, TypeScript)
  • AI / LLM Integration (OpenAI GPT-4o, PydanticAI structured outputs)
  • RAG Pipeline (ChromaDB, OpenAI Embeddings, FBC/IBC/NFPA indexing)
  • OCR Integration (AWS Textract per-page block extraction)
  • PDF Processing & Generation (streaming upload, ReportLab compliance report)
  • Task Queue Architecture (Celery six-stage pipeline, Redis broker)
  • Cost Control Systems (up-front estimates, live tracking, hard ceilings)
  • Production Observability (Sentry, structlog, per-stage cost logging)
  • Cloud & DevOps (Docker, GitHub Actions, Coolify, DigitalOcean, Traefik, Cloudflare)