Skip to content
Maxwell CollinsContact

Clear Report, environmental reports explained in plain language

Explains environmental lab reports (mold, air, water, radon, lead, asbestos) in plain language for homeowners and property managers.

What it achieved

A homeowner uploads a lab report and gets each result explained against its safe limit, with next steps.

The short version

A homeowner or property manager uploads an environmental lab report and, within minutes, gets each result explained against its safe limit, with what to do next. Maxwell built Clear Report, a paid service. It covers mold, air quality, water quality, radon, lead and asbestos, each judged against published EPA, HUD and WHO limits. It gives a summary, an overall risk level, every finding measured against its safe limit, prioritised recommendations and a confidence score. Customers buy credits through Stripe, pay only for a delivered result and get an email when it is ready. Accounts, refunds, a full data export and an expert-review role are built in.

The problem

People pay for environmental testing because they are worried about their health or their investment. What they get back is pages of spore counts, parts per billion and lab codes. The numbers mean nothing without the safe limit beside them, and that limit differs for every contaminant and every agency. The usual answer is to pay a consultant to explain it.

In use

  1. A customer buys credits, picks the report type (mold, air, water, radon, lead or asbestos) and uploads the lab's PDF.
  2. Clear Report reads the PDF, checks the chosen type against the report's own text with a keyword classifier, and applies that type's published standards (EPA, HUD, WHO).
  3. Within minutes the customer sees what was found, how serious it is, and what to do next, in that order.
  4. A credit is charged only for a delivered result, and a repeat report is served from the cache at no AI cost.

What it achieved

  • A homeowner no longer needs a consultant to read a lab report. Within minutes, each finding is shown against its safe limit with what to do next, across six report types: mold, air, water, radon, lead and asbestos, each judged to published EPA, HUD and WHO standards.
  • Customers know the cost before they upload: a fixed credit price, from $29 for five reports, charged only when a result is delivered.
  • A report uploaded again is answered from the cache, at no AI cost to the business.

The software

Screens of the running system, on invented demo data.

Clear Report dashboard showing 5 report credits, no reports yet, and a completed $29 Basic Plan order.
1A homeowner has bought five report credits and lands on the dashboard.
Upload form with the report name filled in and a menu of seven report types, Water Quality highlighted.
2She names the report and picks its type from the list.
Upload step with a drop zone and the file 412-Oak-Street-water-test.pdf uploading.
3She uploads the lab's water test PDF.
Interpreted water test for 412 Oak Street: high risk summary, findings against EPA limits, and ranked recommendations.
4The homeowner reads each result against its safe limit, with prioritized next steps.
Dashboard after delivery: 4 credits left, 1 interpreted report marked Completed, and the $29 order.
5One credit is deducted after the interpretation is delivered.

The full record

On this page
In one sentence

Maxwell built Clear Report, a Claude-powered SaaS that reads an environmental inspection report (mold, air quality, water quality, radon, lead or asbestos), classifies it into one of six report types and turns its raw lab data into a plain-language interpretation for homeowners and property managers, with a summary, an overall risk level, every finding measured against the safe threshold for its contaminant, prioritized recommendations and a confidence score, all behind a cached four-queue processing pipeline, Stripe credit billing and role-gated access, in 16,462 lines of code across 176 files, with 99 test cases, 16 screens, 8 service routes, 25 typed API calls, 10 data tables and 54 commits. He builds by directing AI agents, and he built this system that way.

lines of code
16,462
report types
6
test cases
99
screens
16
data tables
10

What it does

Environmental reports are written for regulators and laboratories. A homeowner who pays for a mold or water test gets back pages of spore counts, parts per billion and lab codes with no plain answer to the question they care about: is this a problem, and what should I do? Clear Report answers it. A customer buys credits, uploads the report and receives an interpretation they can act on.

What the customer gets

  • A two-to-three-sentence summary of what the report says.
  • An overall risk level: low, moderate, high or critical.
  • Every finding, itemized: its category, a description, a severity (info, warning, concern or critical), where it was found, the measured value and the safe threshold it is compared against.
  • Prioritized recommendations: each with a priority (low, medium, high or urgent), the action, the reason and a timeline.
  • A confidence score for the interpretation as a whole.

The customer uploads a PDF, JPEG, PNG or WebP file of up to 50 MB, follows its progress on the report page, which updates itself until the result is ready, and receives an email when it is.

Six report types, each with its own standards

Every interpretation starts from the same base instruction: act as an expert environmental health consultant, write in plain language for homeowners and property managers, stay calm rather than alarmist, and return strictly structured data. Each report type then adds the standards an expert would apply:

  • Mold: spore species and counts, with the toxic genera Stachybotrys and Chaetomium flagged, and indoor counts compared with the outdoor baseline (typically 500 to 1,500 spores per cubic meter outdoors, with concern starting at 500 above it).
  • Air quality: fine and coarse particulates, total volatile organic compounds, formaldehyde against the World Health Organization's 0.1 ppm, carbon dioxide (good below 800 ppm, poor above 1,000), carbon monoxide (any reading means investigate, above 9 ppm is dangerous) and humidity (30 to 50% ideal, above 60% a mold risk).
  • Water quality: EPA maximum contaminant levels for lead (action level 15 ppb), arsenic (10 ppb), nitrate (10 mg/L), copper, mercury and fluoride; any coliform or E. coli fails; pH between 6.5 and 8.5.
  • Radon: EPA action levels in picocuries per liter, below 2 low risk, 2 to 4 moderate, 4 to 8 high and above 8 critical, with lung-cancer context of about 16% more risk per 2 pCi/L.
  • Lead: EPA and HUD thresholds for paint (1.0 mg/cm² by XRF or 0.5% by lab), dust (10, 100 and 400 µg/ft² for floors, window sills and window troughs) and soil (400 ppm in play areas, 1,200 elsewhere), with added concern when children under six are in the home.
  • Asbestos: confirmed against presumed asbestos-containing material (above 1%), friable against non-friable, the fiber type (crocidolite the most dangerous), common locations, and the rule that removal needs licensed abatement.

A general fallback handles any other kind of environmental report by first identifying what was tested and then applying the standards that fit, and a normalizer maps the many names labs use (IAQ, fungal, drinking water, asbestos survey and others) onto the right type.

How it classifies a report

After a report is parsed, a keyword classifier scores its text against 15 to 17 terms for each report type. Multi-word phrases count double, a term found in a section header adds five points, and a type is chosen only when it holds at least 30% of the total score and scores at least five, with confidence capped at 0.95. The detected type is stored with the parsed report and travels with the interpretation job as its confidence signal, alongside the type the customer chose on the upload form.

The processing pipeline

Four job queues on Redis carry each report from upload to inbox:

  1. Upload: the app hands the browser a presigned storage link valid for one hour, so the file goes straight to S3-compatible storage, then records the upload.
  2. PDF processing (three jobs at once, three attempts, a five-minute limit): extracts the text, metadata, section headers and tables, runs the classifier, saves the parsed report and queues the interpretation.
  3. Interpretation (two at once, two attempts, a three-minute limit): checks the cache, otherwise calls Claude at a low temperature of 0.2, parses the structured reply with two fallbacks, and checks every value against the allowed lists. In one database transaction it marks the report complete, stores the interpretation, the model, the tokens used, the processing time and the estimated cost, and deducts one credit, on success only. A failure marks the report failed, records the error and the attempt count, and sends the customer a failure email instead.
  4. Email: five attempts through Resend, with six branded templates (welcome, report ready, report failed, order confirmation, password reset and refund confirmation).

Every queue retries with exponential backoff, keeps completed jobs for 24 hours and failed jobs for seven days, and starts with the server. A report moves through pending, uploaded, analyzing, reviewing and completed (or failed), the reviewing state holding a place for a human expert's review.

The cache

Identical reports are interpreted once. The cache key is a SHA-256 fingerprint of the report type plus the first 10,000 characters of the normalized text, and each interpretation is held in Redis for seven days. A cache hit skips the AI call while still charging the credit and sending the email, so the customer experience is identical and the cost is not. A cost estimator prices every call by input and output tokens, and utilities report the cache's size and memory use and can clear it.

Billing and credits

  • Credit packs through Stripe Checkout: Basic at $29 for 5 credits, Standard at $79 for 15 (marked most popular) and Professional at $149 for 50.
  • A webhook handling five Stripe events: completed checkouts, succeeded and failed payments, full and partial refunds, and refund creation.
  • An order service that creates the order and adds the credits in one transaction, tracks seven order states from pending to refunded, issues refunds with an amount and reason, and reports each customer's order statistics.
  • No credit, no report: creating a report is refused when the balance is below one.
  • A partner program in the data model: business-to-business referral partners with their own codes and a default 20% commission, tracked on every order.

Accounts, roles and protection

  • Four roles: user, expert, admin and super admin, enforced through four access levels in the API (public, signed in, expert and above, and admin), the higher two checked against the role stored in the database.
  • Sign-in with email and password (bcrypt) or Google, with page protection in middleware and single-use, expiring password-reset tokens.
  • Rate limits on every sensitive action: 5 sign-in attempts per 15 minutes, 3 password resets an hour, 10 registrations an hour per address, 100 API calls a minute, 20 uploads an hour and 10 checkouts an hour.
  • Data rights: customers can export everything held about them (reports, orders and files), change their password or delete their account, and each of those actions, along with sign-ins, sign-outs, orders and refunds, is written to an audit log.
  • Security headers on every response and validated environment settings at start-up.

Screens

Sixteen screens: the marketing site (home with how it works, about, pricing, and checkout success and cancel pages); sign-in, registration, forgot-password and reset-password; and the customer dashboard (credit balance and statistics, orders and order detail, reports, a two-step new-report flow that blocks when no credits remain, the report detail with key findings and recommendations, settings and profile). The interface is built from 45 components with drag-and-drop upload, progress bars and a light and dark theme.

What it achieved

  • A complete paid service in one codebase: upload, classification, AI interpretation against published EPA, HUD and WHO standards, payment, refunds, email, accounts and data rights.
  • Six report types, each interpreted to the standards a consultant would apply, with every finding shown against its safe threshold.
  • Credits charged only for delivered results, and repeat reports served from the cache at no AI cost.
  • Size: 16,462 lines of code in 176 files, 99 test cases in 10 test files (2,371 lines), 16 screens, 8 service routes, 6 API routers with 25 typed calls, 10 data tables and 7 enumerations, built across 54 commits.

The problem it solves

Homeowners, buyers and property managers pay for environmental testing because they are worried about their health or their investment, then receive a document they cannot read. The numbers mean nothing without the threshold beside them, and the threshold differs for every contaminant and every agency. The usual answer is to pay a consultant to explain it. Clear Report gives that explanation in minutes for a fixed credit price: what was found, how serious it is, and what to do next, in that order.

How he built it

Maxwell ran the build under a written agent protocol: five prime directives and a six-phase loop for every task (intake, preflight, implement, verify, document and complete), driven by five scripts that open a task, run the preflight, verify it (type check, lint, tests and build), scan for security issues and track the session. A master roadmap planned 38 tasks across six phases, with every decision and change recorded in tracking files.

The guards: pre-commit hooks lint and format every staged file; three GitHub workflows run linting, type checks, unit tests and the build on every push, check every pull request's title, conflicts and size and deploy a preview with a comment, and ship production. Tests run in Vitest with a browser environment and Playwright for end-to-end flows, covering the order service, the app state, the audit log, sign-in, the Stripe webhook and the user procedures.

An enterprise self-audit checked the system against 437 checkpoints across seven areas, and the rate limiting, security headers, password-reset flow and environment validation it checks for are all in the code.

The stack: Next.js 16 and React 19 with TypeScript, Tailwind and shadcn components; tRPC 11, Prisma 7 on PostgreSQL 16, BullMQ on Redis 7, the Anthropic SDK, Stripe, Resend with React Email, S3-compatible storage and Upstash rate limiting; Docker Compose for local development (Postgres, Redis and MinIO) and container deployment with health checks and automatic restarts.