HomeWorkLaboratoryCertificationsBlogLet's Talk

© 2026 Juan Villegas. All rights reserved.

Solutions Architect

    Back

    Multi-branch Purchase Management

    Management system

    MVP of multi-branch purchase management for a hardware store in Mexico: complete flow of orders to suppliers with offline-first synchronization (own engine, without third-party libraries) so that the system works without a stable connection at the branch and syncs upon reconnecting.

    Multi-branch Purchase Management 1

    The Challenge

    Each branch managed its supplier orders without a single flow for creation, receipt, and reporting, with a real risk of losing traceability. It also couldn't rely on a stable internet connection at the branch, so the system had to work offline.

    The Solution

    A system that doesn't depend on having internet at the branch: staff keep creating and receiving their supplier orders even if the connection drops, and everything syncs automatically upon reconnection, in the correct order. Under the hood, NestJS and MongoDB handle the complete order flow with a data model designed to avoid losing historical traceability, while a custom sync engine over IndexedDB detects real connectivity, not just the browser's notification, and does the heavy lifting on the frontend.

    Development time

    ~10h of hardening documented and billed separately; MVP in production.

    Focused on

    Companies with purchases from suppliers across multiple branches

    Role in the project

    Solutions Architect and Full Stack Dev.

    DemoCode

    Tech Stack

    Frontend

    Next.jsReactTypeScriptTailwind CSSRadix UI / shadcn

    Backend

    NestJSMongoose

    Database

    MongoDB

    Infrastructure

    DockerTraefikWireGuardUFWFail2ban

    What it protects in production

    • Administrative server access restricted to a private network, never directly exposed to the Internet.
    • Remote access protected with separate layers: distinct identity per role and active defense against brute force attempts.
    • Firewall with default-deny policy, only the strictly necessary enabled.

    Infrastructure in production

    • Complete production infrastructure managed by the developer, from domain to VPS, with periodic server maintenance approximately every two months.

    Metrics and Results

    80 h

    Administrative hours saved per month

    10x faster

    Order generation and dispatch

    0

    Duplicate orders between branches

    100%

    Order traceability (created → received → reported)

    Testimonial

    "When you have so many proposals for a project it can be overwhelming: you want someone who understands your desire for it to be extraordinary. From his profile they said that Juan went beyond the ordinary, and working with him I confirmed that it was true. He seeks for the work to be fast, efficient, and elegant, he is attentive to what you want to see accomplished and strives to exceed your expectations. I want to continue working with him."

    LFTE
    Luis Felipe Tep EkClient on Workana
    ShareLinkedIn

    Need something similar?

    Let's talk about your project.

    Let's talk