What it does
The size of the whole
224 tracked files and 165 commits, from an empty folder to the backup system. Application code: 12,211 lines in 120 files of strict TypeScript on Next.js 16 and Tailwind v4. Tests: 7,506 lines in 57 files and 422 test cases as they run: 416 unit test cases (two of them tables that run eight cases each, for reply-to-stop wording and free mailbox domains) and a browser test of six scenarios through the whole happy path. Screens: 19, and 20 with the 404 page. Server routes: 20, of which 17 are route handlers and 3 are generated (the robots file, the sitemap and the preview image). Database: 4 tables and 3 enumerated types. HTML: 3,912 lines, and 4,913 with the published sample brief. Documents: 11,464 lines in 14 Markdown files (69,772 words), the 6,242-line first-bid-free plan the largest. Five tagged releases mark the stages of the site: v0.1.0-pre-jobber-polish, v0.2.0-landing-page-locked, v0.3.0-all-pages-locked, v0.4.0-pre-seo-implementation and v0.5.0-pre-hero-rebuild. Together with the analyzer the two projects hold 88,378 authored lines with the analyzer's untracked documents and interface laboratory counted, and the two repositories 82,065 authored lines in 443 tracked files and 330 commits.
The public website (the landing page, four inner pages, eight content pages).
- The hero, in four designs. First a phone frame playing a 16-second animation in three acts (a bid arriving, the pipeline working, the result) with a finger cursor that taps through it; then a free-standing pipeline demonstration; then a free-floating composition of six choreographed pieces; then two receipt cards, one for the Bid Brief and one for the takeoff, that open the real sample files in an inline file viewer (
inline-file-viewer.tsx, 727 lines; the brief card 384 lines, the takeoff card 313). - Six landing sections: a trust strip, a tabbed tour of the pipeline, a case-file gallery by industry, a picture of the hash chain for security (the analyzer's audit ledger drawn as a chain of stage events from ingest to verify, each sealed with
sha256(prevHash|seq|payload)over the event before it), pricing, and a final call to action. The navigation turns from transparent over the hero to solid on scroll. - Inner pages: product (with a competitive positioning section), pricing, security, and samples, with four sample pages by type of work: an oil-tank replacement, a commercial general-contractor job, an operating-room suite renovation, and the flagship sample.
- Four guides: catching addendum conflicts, AIA G702/G703 pay-application software, how to catch scope gaps in a bid set, and the material takeoff explained.
- A design-token system set up and checked on a swatch page before the first screen was built: Inter type, navy, beige and lime.
- Phone layout: a slide-out navigation drawer and a call to action that stays on screen. The layouts live in responsive styles, so the server and the browser draw the same page.
The free-first intake (/send, /api/forward-address, /api/free-bid). A contractor gets a unique forwarding address (bid+ and a reserved suffix), or pastes a link, on a page with two tabs. The submission is checked by a Zod schema with a hidden honeypot field that catches bots, and a double submit returns a conflict (409, raised through a typed error code once the reserved suffix is used) rather than a second record. The suffix is reserved in the database before the form appears, retried up to five times on a collision, and the submit button stays disabled, with its own error state, until the address has loaded. The acknowledgment and the operator notification go out together, through Resend with react-email templates, in one settled batch so a slow email never delays the page.
Inbound bid email (/api/inbound-bid, 355 lines; src/lib/inbound.ts, attachments.ts, suffix.ts). A Resend webhook receives the forwarded email, reads the suffix to find the submission, saves every attachment, and files mail it cannot match as an orphan for the operator. Each delivery is checked against its Svix signature (any of the rotating signatures may match, compared in constant time), and its svix-id is recorded so a repeated delivery is handled once. Attachment names are cleaned against path tricks and stored under a folder for each submission, with their list kept as JSONB on the row so it can be searched by name. A reply asking to stop is detected, declines the submission and updates the CRM.
The database (migrations/, 4 changes, 4 tables, on PostgreSQL 16 through pg). Change 0001: free_bid_submissions and inbound_orphans. Change 0002: twenty_push_queue and twenty_webhook_received, for retries and duplicate protection. Change 0003: attachments. Change 0004: deliverables. A migration runner records which changes have been applied. The data layer moved from a hosted Postgres client (@vercel/postgres, which speaks HTTP to a hosted database) to plain pg so the service could run on his own machine, behind a typed wrapper that keeps every query parameterised. Each submission carries its life as timestamps: received, bid received, in progress, delivered, first opened, declined, paid, and each of the three nudges.
CRM synchronisation, retry queue and lifecycle automation (twenty.ts, twenty-dispatch.ts, twenty-queue.ts, /api/twenty-webhook, /api/cron/twenty-push-retry). Every submission becomes a Person, a Company and a Note in his self-hosted Twenty CRM, with free public mailboxes kept off the company list. The first push is tried inline with a three-second limit and can never fail the contractor's request; anything that does not land goes to a queue retried with exponential backoff by a scheduled worker. Companies are created only for business domains: a list of free mailbox providers such as Gmail and Yahoo keeps those addresses off the company list. Six kinds of event travel this way: submitted, bid received, delivered, paid, nudge sent and declined. Each event is written to the queue before the push is tried, so nothing is lost if the push fails; the push has 3,000 milliseconds inline; retries wait five minutes times two to the number of attempts, never more than six hours; and after ten attempts the event is marked failed and the operator is emailed. The dispatcher never passes an error back to the request. Each push writes a Note and links it to the person with a NoteTarget record. Changes made in the CRM come back through a webhook checked by HMAC signature, compared in constant time, and de-duplicated per delivery. The CRM's custom fields and webhook are set up by scripts through Twenty's metadata API (setup-twenty-fields.ts, setup-twenty-webhook.ts), with no hand configuration.
The operator console, tokenised delivery and paid follow-on (/admin, src/lib/auth.ts, admin-db.ts at 508 lines, src/middleware.ts).
- Passwordless sign-in: a magic link sent only to the admin address, a session cookie, and middleware that guards every admin screen and route. The link and the session are signed tokens with different purposes, so a link can never be replayed as a session; the session cookie lasts 30 days and is closed to page scripts. Consuming the link was moved into a route handler so it can set the cookie under Next.js 16, and the redirect after sign-in goes to the public address rather than the container's own bind address,
0.0.0.0. - The list view: a strip of metrics (among them bids delivered in the last 30 days and bids paid for next), filter pills by status and a table of submissions.
- The detail view: the submission, its email and attachments, and upload zones for the finished Bid Brief and takeoff. The send form stays closed until both files are uploaded and its four project fields are filled, and the server checks them again with Zod.
- Send results: one action delivers the results email, marks the submission delivered and updates the CRM.
- Private file serving: deliverables are served only through the admin routes and the results page, never from a public folder.
The private results page (/r/[token]). Each contractor gets an unguessable link to their Bid Brief and takeoff, the first opening is recorded, and the page closes on the offer for the next bid. Search engines are told to stay away from results and admin pages.
Payments (/api/checkout-success, 131 lines). When a Stripe checkout succeeds, the service creates the paid follow-on submission and emails the contractor their next bid address. The Stripe signature is checked first (constructEvent), each Stripe event is recorded so a repeat is answered as a duplicate, and the paid submission is created once, as a child of the free one, with its own fresh suffix and results token. Pricing: the first bid free, every bid after a flat $249, no subscription.
Follow-up automation (/api/cron/nudges, 224 lines). Three nudge emails on a schedule, sent hourly to the submissions that are due, an automatic decline sweep for submissions gone stale, and an alert to the operator on any terminal failure. The first nudge goes 48 hours after sign-up if no bid has arrived, the second 48 hours after delivery if the results page has not been opened, the third 7 days after the first opening if the next bid has not been paid for, and a submission with no bid after 14 days is declined. Each send is claimed by an update that only succeeds while its timestamp is still empty, so two runs can never send the same nudge twice.
The eight email templates (src/emails/): acknowledgment, operator notification, magic link, delivery, three nudges and the paid next-bid address.
Self-hosted deployment, verified backup and acceptance harness (deploy/, 448 lines in 5 files). Five Docker containers under one Compose file: the app, PostgreSQL 16, a BusyBox cron container that calls the scheduled routes with a bearer secret compared in constant time, a backup container, and cloudflared, a tunnel that only dials out, so the machine opens no port to the internet. The app joins the CRM's network so the two talk directly. The backup script takes a database dump and a full copy of the attachments once at start and then every night at 03:10 UTC, writes both to the machine and to an iCloud folder that Apple syncs off the machine, and keeps the newest fourteen of each in each place. A dump counts as a backup only after pg_restore --list has read it. The app image is built in stages, runs as an unprivileged nextjs user with a 4 GB memory allowance for the build, and reports its own health. The database is published only on the machine's loopback address (port 5434), every container has memory and process limits and may not gain privileges, and the attachments folder, /data/attachments, is created in the image and owned by the app user, so the first write into the mounted volume succeeds. The cron container runs two schedules, the CRM retry every five minutes and the nudges every hour, from BusyBox's own crontab path, /var/spool/cron/crontabs/root, with each of its two authenticated lines kept whole through the Compose file's line folding. deploy/README.md (135 lines) sets out the whole stand-up.
Search and answer-engine discoverability. Per-page titles, descriptions and Open Graph previews (set in 15 source files), an llms.txt for AI assistants, structured data (JSON-LD) for the service and its pricing, a robots file that names the AI crawlers, a sitemap, security headers, a generated preview image and a 404 page. The structured data uses 19 schema types (Product, SoftwareApplication, Offer, UnitPriceSpecification, FAQPage, Question, Answer, BreadcrumbList, TechArticle, HowTo, HowToStep, ItemList, ListItem, Organization, Brand, WebSite, WebPage, CreativeWork and QuantitativeValue); the robots file welcomes 15 named AI and search crawlers by name while keeping the results and admin pages closed to all of them, and those pages also carry a no-index instruction. The work followed a search audit; docs/SEARCH_ENGINES.md (218 lines) sets out the submission routes for the three engines. Submission scripts for IndexNow, Bing Webmaster and Google Search Console, each also reachable by an agent. The flagship figures live in one file (src/lib/flagship-case-study.ts) so every page quotes the same numbers.
The test system (57 files, 422 cases). Every route, library and email has its own tests; the inbound webhook alone has 749 lines of them. A browser test of six scenarios drives the happy path: the homepage hero's first-bid-free offer, the send form through to its thank-you page, the admin sign-in answering a stranger's address with a generic message, the admin screens sending a visitor without a session to sign in, the robots rules closing results and admin pages, and an unknown results link answered with a 404. Hero layouts were measured in the browser at desktop and phone sizes, states saved for comparison.
The design record. The first-bid-free design (593 lines, eleven mockups, seventeen numbered acceptance criteria), its 6,242-line plan in ten phases, the positioning-alignment plan (1,459 lines), the navigation plan (385 lines), four handoffs, and the rebrand plan (287 lines).
What it achieved
A contractor can forward a bid, get a free Bid Brief and priced takeoff on a private page, and pay $249 for the next, while every step lands in the CRM and the operator works from one console. The whole service is self-hosted on his own machine behind an outbound-only tunnel, with its database and files copied every night to two places, one of them off the machine.
The problem it solves
The buyer has to try it before trusting it. An estimator will not pay for an unknown analysis on a live bid, so the first one is free and the price after is one flat number: the free-first funnel.
Sending a bid has to be as easy as forwarding an email, because that is how bids arrive. A unique address per contractor ties each forward to its submission with no form to fill.
Secondary systems must never break the request in front of the customer. The CRM push is tried once with a short limit, can never fail the submission, and is retried later from a queue; emails go out in one settled batch.
The buyer is the chief estimator, not a technical buyer. In the rebrand he moved the site from selling verified AI to selling time back: a working estimator's read of every page, the priced takeoff and the risk brief, returned within a business day. The engineering stays the reason the product works; the words on the site speak to a person who reads 600-page bid sets in bid season.
Owning the machine keeps the cost of a bid near zero. The site, its database and the CRM are self-hosted on his own hardware, reached through a tunnel that opens nothing, with backups that leave the machine every night.
How he built it
He builds by directing AI agents. BidLedger was built from an empty folder in ten planned phases, each closed by an independent check.
The phase verification protocol. Every phase of the first-bid-free plan ended with a verification task given to a fresh agent with no part in building that phase. It re-ran every command from scratch, trusted nothing reported to it, cited the command and its output for every pass, and gave one verdict for the phase with no partial credit.
Ten phases: foundation; the hero copy and navigation; the send page, the confirmation page and the submission route; the CRM foundation; inbound bid handling; admin sign-in and list view; the admin detail view and delivery; the private results page; Stripe; nudges; then acceptance against all seventeen criteria.
Design before code. The spec and its eleven mockups were written and checked before the plan, and the plan before the first commit of each phase; reviews of each task were applied as their own commits.
The rebrand plan. Built from the work of five research agents: a teardown of competitors, the chief estimator's profile and language, page structure for a non-technical buyer, a voice and copywriting playbook, and pricing and trust signals. It fixes the buyer and the buyer's three real fears (a scope item buried in hundreds of pages of specifications, addenda that land late and reset the work, and a bid that is judged forever after), locks the voice with a table of banned words and the reason for each, and sets the competitive lane. It lays out a homepage of 15 sections and a pricing page of 8, decides the fate of every page and section in a 23-row table, sets six pricing positions (the free first bid, pay-as-you-go at $249, prepaid packs of 5, 10 and 25 bids at $1,099, $1,990 and $4,375 that expire after 90 days, 180 days and a year, and an annual arrangement above 50) and four tiers of trust signals, led by a sample deliverable with no email gate, the named operator, money back on the first paid bid and a one-business-day turnaround commitment, writes the copy at a sixth-to-eighth-grade reading level, and orders the work as ten commits.
Handoffs between sessions. Four handoff files carried the work across agent sessions: the first-bid-free plan, the move to pg in two parts, and the search audit fixes.
The hero as a laboratory. Four hero designs, each built, measured in the browser at desktop and phone sizes, and replaced when a better one was found, the last on its own branch before it joined the main line.
Named concepts
The named concepts, defined
- BidLedger, the service's name, chosen in the rebrand.
- Free-first funnel: first bid free, then a flat $249.
- First-bid-free flow, the ten-phase design.
- Phase verification protocol: a fresh agent, every command re-run, one verdict per phase.
- The estimator pivot, the rebrand, with its locked voice and banned words.
- Receipt cards, the final hero.
- The systems of this repository: Public web product, design system, hero, content, and discoverability; Free-first intake, PostgreSQL lifecycle, inbound bid, and email service; CRM synchronization, retry queue, and lifecycle automation; Operator console, tokenized delivery, and paid follow-on flow; Self-hosted deployment, verified backup, and acceptance harness; Estimator-market positioning and rebrand methodology.
What it shows
Maxwell built the whole business around his analyzer: the storefront, the intake that works by forwarding an email, the operator's console, the delivery, the payment, the follow-up and the CRM, on infrastructure he owns, in six weeks. He designed it so that the customer's request is never held hostage by a secondary system, and he rewrote its voice from the builder's language to the buyer's when the research showed who the buyer is.


