Syntora
AI AutomationTechnology

Build a Custom Material Tracking System with Python

Custom Python scripts use OCR to read delivery dockets and automatically update a central inventory database. This system sends real-time alerts for low stock and tracks material usage against project budgets.

By Parker Gawne, Founder at Syntora|Updated Mar 5, 2026

Syntora develops custom Python-based systems to automate construction inventory management. These systems utilize OCR and large language models like Claude API to extract data from delivery dockets and update inventory in real time. Syntora approaches this as an engineering engagement, designing solutions tailored to specific client needs.

The build complexity for such a system depends significantly on your existing dockets and operational systems. Processing standardized PDF documents from a national supplier is typically simpler than parsing inconsistent, handwritten notes from local vendors. Integrating with a straightforward data source like a Google Sheet is generally faster than connecting to a legacy ERP system with a limited API. Syntora focuses on understanding these specific complexities to design a solution that fits your operational context.

What Problem Does This Solve?

Most construction firms start with spreadsheets. A shared Google Sheet seems simple, but manual entry from paper dockets is slow and creates errors. A foreman at one site receives a lumber delivery but forgets to update the sheet, so a project manager at another site orders redundant materials, wasting budget and creating storage problems.

A foreman for a 20-person plumbing contractor used a shared sheet to track copper fittings. He received a delivery of 50 units at Site A but was too busy to update the sheet immediately. An hour later, the office manager checked the sheet, saw a stock level of 60, and told the Site B team to pick up materials. They drove 45 minutes to the warehouse only to find 10 units, derailing their work for half a day.

Off-the-shelf construction management software like Procore has inventory modules, but they are expensive and rigid. They force you into a specific workflow and often lack the flexibility to process the varied docket formats from dozens of different suppliers. You end up paying a high monthly per-user fee for a massive platform when you only need to solve one critical data entry problem.

How Would Syntora Approach This?

Syntora's approach to automating material tracking begins with a detailed discovery phase. We would first collect a representative sample of 50-100 of your recent delivery dockets to analyze their formats and data consistency. Our initial technical step involves using a Python script with an OCR engine to test the reliable extraction of key fields such as item name, quantity, and supplier from these documents. For dockets with varied layouts, or those containing handwritten notes, the Claude API would be employed to interpret the OCR output and structure it into clean, usable JSON data. We have experience building similar document processing pipelines using Claude API for financial documents, and the same pattern applies here for material dockets.

The core of the proposed system would be a FastAPI service designed to provide a secure endpoint for document submission. For instance, a site manager could email a photo of a docket, which would trigger the OCR and Claude processing pipeline. The extracted data would then be validated against your master materials list, which Syntora would configure within a Supabase Postgres database. This architecture enables efficient data processing and inventory updates.

The FastAPI service would be deployed on serverless infrastructure like AWS Lambda. This choice is made for its scalability and cost-efficiency, keeping hosting expenses predictable even as document processing volumes fluctuate. A scheduled script, potentially managed by AWS EventBridge, would regularly query the Supabase database to identify items that fall below their predefined reorder thresholds.

Upon detecting a low-stock item, an alert would be sent. This could involve an httpx POST request to a designated Slack channel, notifying the purchasing manager with the specific material name and current quantity. To maintain transparency and facilitate debugging, every step of this process—from docket receipt through to any low-stock alert—would be recorded using structlog for structured, traceable logging.

Typical timelines for developing such a system often range from 6 to 12 weeks, depending on the complexity of your document formats and the integrations required. For a successful engagement, the client would need to provide access to example dockets, existing material master lists, and details of current inventory management processes. The deliverables would include the deployed, custom-built system, source code, and technical documentation.

What Are the Key Benefits?

  • From Docket to Database in 8 Seconds

    A site manager snaps a photo of a delivery docket, and your central inventory is updated before the truck leaves. No more end-of-day manual entry.

  • Stop Paying for Software You Don't Use

    A one-time build cost replaces monthly per-user fees from large construction ERPs. Your only ongoing expense is hosting, typically under $50/month.

  • You Get the Keys and the Blueprints

    We deliver the full Python source code to your company's GitHub account, plus a runbook for maintenance. You are never locked into a proprietary platform.

  • Alerts When It Matters, Not When It's Too Late

    Automated threshold monitoring checks stock levels every hour, flagging items for reorder to prevent costly project delays from material shortages.

  • Works With How Your Team Already Mails

    Foremen submit dockets by emailing a photo to a dedicated address. Low-stock alerts are sent directly to your existing Slack channels or email inboxes.

What Does the Process Look Like?

  1. Discovery and Docket Analysis (Week 1)

    You provide 50-100 sample dockets and access to your current inventory list. We build a proof-of-concept parser and deliver a report on extraction accuracy.

  2. Core System Build (Week 2)

    We build the FastAPI endpoint, set up the Supabase database, and develop the inventory logic. You receive a private URL to test the docket processing.

  3. Integration and Deployment (Week 3)

    We deploy the system on AWS Lambda and connect it to a dedicated email address. We train your site managers on how to submit dockets for processing.

  4. Monitoring and Handoff (Weeks 4-6)

    We monitor the system for 2 weeks post-launch, tuning the parser for any errors. You receive the full source code, documentation, and a maintenance runbook.

Frequently Asked Questions

How much does a custom inventory system cost?
Pricing is a fixed fee for the initial build based on scope. The main factors are the variety and quality of your dockets (e.g., printed PDFs vs. handwritten notes) and the number of systems we need to integrate for alerts. After the build, you can choose a flat monthly maintenance plan or manage it yourself. We provide a detailed quote after our initial discovery call.
What happens if the script misreads a docket?
Any docket that fails validation is automatically routed to a 'needs review' queue in the database, and the original image is saved. A daily email digest is sent to a project manager listing these exceptions for a quick manual fix. This keeps the primary inventory data accurate while ensuring no delivery is ever lost. Accuracy typically exceeds 98% after the initial tuning period.
How is this better than an off-the-shelf inventory app?
Off-the-shelf apps force your team into their workflow and rarely handle the diverse docket formats from local suppliers. A custom Python system is built around your exact process. It accepts dockets via a simple email, sends alerts to your existing Slack, and uses a data model based on your specific material list. It solves your exact problem without forcing you to change your business.
What if our delivery dockets are handwritten?
Modern OCR combined with LLMs like the Claude API can process clear handwriting with high accuracy, especially for common material names and numbers. We test this on your specific samples during the discovery phase. If some handwriting is consistently illegible, we can build a simple interface for a human to quickly verify the 2-3 extracted fields, which is still much faster than full manual entry.
Can this system track our tool inventory as well?
Yes. The Supabase database and FastAPI backend can be extended to manage tool check-ins and check-outs. We can add a simple interface for tracking which tools are assigned to which employee or site. Since you own the source code, adding new tracking capabilities is a small, incremental project, not a search for another piece of software.
Do we need an AWS account or technical expertise to run this?
No. We handle the entire deployment and can host the system within a managed environment for a flat monthly fee. Alternatively, if you have your own AWS account, we can deploy the system there and hand over full control to your team. We manage all the technical setup during the build process, so your team can focus on using the system from day one.

Ready to Automate Your Technology Operations?

Book a call to discuss how we can implement ai automation for your technology business.

Book a Call