The Challenge: Acquisition outpaced the infrastructure
Each acquisition brought another website, separately hosted and maintained. Nothing was shared across them, so the same work got repeated for every brand.
Reporting was equally fragmented. After a field inspection (a lead assessment at a school or an air-quality check at a plant) staff assembled each report by hand, and every legacy business had its own processes. A report could run two pages or 100, and each brand brought various templates and approval flows.
The cost of this showed up in multiple places:
- Rework across sites: Running multiple separate sites meant increased the overhead in content updates, hosting and plugins.
- Security risk: WordPress security problems persisted, with the site experiencing repeated attacks.
- Manual reporting: Reports varied across each brand and took 100+ hours per month of staff time to manually create.
- Disconnected customer experience: Each acquisition brought its own brand, creating the potential for a disconnected experience across sites and portals.
Lastly, they needed a consolidated dashboard for national accounts that have a large portfolio of properties. These commercial property owners manage buildings across the country, and need one place where they can easily see their compliance posture across their full portfolio. While Mainline could perform all of the testing, they needed a dedicated customer portal that delivered a clear view of reports and testing results. That gap was limiting a category of customer for the organization.
The solution: A digital foundation for growth
Mainline engaged Nerdery to build the digital foundation for their growth. Four things came out of the work:
- A templated multi-brand website platform on consolidated hosting, which unifies the brand experience, removes rework across sites and addresses the repeated WordPress attacks.
- An internal admin portal that consolidates admin processes.
- A customer-facing portal that gives national accounts the single portfolio view they were missing, and improves sales and the customer experience.
- A report builder that standardizes and automates how Mainline produces more than 82 different service reports, making a once manual build a simple edit — cutting production time by 75%
The platform was built around Mainline’s acquisition roadmap, not just the brands it runs today. Nerdery moved Mainline off WordPress onto Contentful, a headless CMS, and established a shared library of components and templates. The design system for the portal and report builder live in Storybook ensuring consistency across all brand touch points. Now, bringing a new company under the Mainline umbrella is a content exercise against the system instead of a ground-up build. Each brand can be easily folded into the Mainline foundation while keeping its own identity, services, and content, which is important for regional loyalty.
At Mainline Environmental, transparency is a core part of how we serve our clients. Nerdery has helped us bring that commitment to life through a client portal that provides real-time access to critical data, reports, and project updates. The platform has improved visibility for our customers, strengthened trust, and enhanced the overall client experience.
Beyond the customer-facing benefits, the reporting tools Nerdery has built are helping streamline our internal operations by reducing the time and effort required to produce reports, allowing our team to focus more on delivering value to clients and less on manual processes.
Their team has taken the time to understand our business and build solutions that support both our customers and our continued growth.The entire Nerdery team have been exceptional partners every step of the way.
— Daniel McGowan, Chief Executive Officer, Mainline Environmental
How it works together
The platform is one application with a dedicated pipeline for generating reports, built on top of the systems Mainline already runs. Here’s what each part uses.
Core application
- Next.js on Vercel, with TypeScript across the stack
- Tailwind CSS with a theme framework that handles each brand’s configuration
- Auth0 for authentication
- Contentful (headless CMS) serving the marketing sites
- PostgreSQL via Prisma for document templates, layout configs, and in-flight reports
- Amazon S3 for generated PDFs and uploaded files
Report builder pipeline
- TipTap browser-based rich-text editor for assembling a report
- WeasyPrint (containerized) renders the final PDF, using React server-side rendering and CSS Paged Media
Existing Mainline systems
- HubSpot: system of record for customer, tenant, and employee profile and signature data
- Field inspection and sample-tracking system
- QuickBooks: accounting
- SendGrid: transactional email
Claude Code across engineering and design
The team used Claude Code on both sides of the build, and leaned on it differently than a typical back-and-forth with an assistant. Instead of feeding Claude one instruction at a time, engineers wrote prompts against Nerdery’s Context Engineering Playbook, giving it enough context up front that a single prompt could deliver a plan for a feature, and then implement the feature independently with no or minimal human intervention.
A lot of that context was already sitting in Jira. When a ticket was written well, Claude could build most of a feature straight from it through the Atlassian MCP server, with an engineer stepping in for minimal final tweaks after initial plan completion.
The Playbook’s library of slash commands standardized the work. The one the team used consistently was /create_plan: point it at a ticket, answer a few questions, and it would build the feature, refinement, or bug fix, usually leaving just a few tweaks.
For design, Nerdery’s design lead worked in Claude Code to generate front-end code straight from the designs, then handed it to developers for review, back-end work, and QA. The designs came from a mix of Claude Code and manual work, with Figma and Paper connected through MCP servers.
A customer report, start to finish
- Inspection completed: A field team finishes an inspection, job is labeled ready for report and appears in the report builder.
- Report generated: The builder pulls the report together, and the staff member edits the report rather than starting from scratch. Spell check, the correct logo, signatures, and formatting are already in place.
- Sign-off in the workflow: The report goes to a project manager for sign-off inside the same workflow, instead of an ad hoc email approval.
- Create PDF: The staff member previews the final formatting and generates the customer-facing PDF.
- Report added to customer portal: Customer-facing PDF is automatically added to the portal and can be viewed or downloaded.
Inside the portal
A customer logs into the portal and sees a map and listing of their locations and buildings, plus their reports, invoices, and proposals from the last 60 days. They can:
- Request a new service
- View and download any report or floor plan
- Track the status of every service, invoice, and proposal
A Mainline admin logs into the same system and can toggle between the parent companies to see recent activity, services, reports, invoices, and proposals on one dashboard. From there an admin can:
- Manage organizations down to the level of a building’s floor plan, drawing functional spaces and attaching the reports and documents tied to them
- Invite and remove internal and customer users, with permissions set by user type
- Send announcements
- Adjust proposal and invoice status
Overcoming Challenges: No single source of truth
The report builder was designed on a straightforward assumption: customer information, field and lab data results would flow from Hubspot, Oneflow, and Zuper into the builder. This also aligned with how the work was split. Nerdery led design and development of the portals and the website platform, and a separate firm owned the backend data that would feed them.
However, Zuper was ruled out as Mainline’s long-term lab sample collection system, which put the report builder’s data source back into question. HubSpot, Zuper and a possible new laboratory information management system were all competing to be the source of truth, and the team was building the report interface against mock data because no single source existed yet.
Split ownership was the deeper cause.
With direction and delivery spread across several organizations, decisions came slowly, architectural guidance was inconsistent, and requirements kept changing.
The team stopped waiting on the data question and designed around it. Instead of hard-coding the report builder to one source, they rebuilt around an adapter pattern. They built the report interface and template engine first, keeping them source-agnostic, and layering in real integrations once the lab-system was identified. Ultimately myLIMS was chosen as their core laboratory management system. At this time, Mainline asked Nerdery to take a larger role across architecture, engineering, product delivery, and execution, which gave the program one clear technical direction and stronger governance.
Business outcomes
Mainline set out to do three things with the platform: serve customers better, open new markets, and streamline how the business runs. All three now sit on one foundation.
New markets
The portal won Mainline its first national commercial property owner account. These owners manage buildings across the country and need one place to see compliance across a whole portfolio. One login now shows every property, its compliance status, and its recertification schedule. The same portal doubles as a sales tool: demo accounts loaded with sample data, isolated from real metrics, let the team pitch the product live. Mainline is now positioned to bring on more large-scale accounts.
Better service
Reports go out with the same logos, signatures, formatting, and structure across every brand, so a customer gets one experience whichever regional company they came in through. The portfolio view updates in real time, so a customer can check the compliance status of every building they own, in one place, whenever they want.
A leaner operation
Mainline’s people no longer maintain multiple WordPress sites, hand-assemble reports, or chase approvals over email. Under one of their brands, the time spent assembling reports was cut by 75%. Consolidated hosting and a headless CMS ended the repeated WordPress attacks, and full click and pixel tracking now runs across the sites and feeds lead generation. The platform was built around Mainline’s acquisition roadmap, so bringing on the next company works with the existing system rather than starting over.
Acknowledgments
- Reuben Van Hemert, Client Services Delivery Director
- Trevor Tillery, Senior User Experience Designer / Product Leadership
- Kyle Wills, Senior Project Manager
- Doug Bielon, Product Leadership
- Julian Mancera, Senior Software Engineer
- Kristofer Dubbels, Senior Software Engineer
- Sergio Valencia, Software Engineer
- Theresa Aleta, QA Lead