New

20% off - LAUNCH20

Shop
Back to Case Studies
Featured

Deminut — Restaurant Management & Digital Ordering Platform

Deminut Hospitality / SaaS
79
API Endpoints
938+
Total Tests
221+
Merged PRs

Situation

Small and medium restaurants in Latin America (initial focus: Uruguay) operated with physical menus, manual order-taking, and payment coordination via cash or bank transfer. The operational flow was fragmented: no unified way to publish a digital menu, receive online orders, process payments, and send tickets to the kitchen automatically. Post-pandemic, the need for contactless ordering via QR accelerated the problem.

Task

Build a complete restaurant management SaaS platform with three components: a backend API handling hierarchical menus, order state machines, and Mercado Pago split payments; a dual-purpose SPA for customer ordering and restaurant administration; and a desktop Print Bridge for automatic thermal printer ticket generation.

Action

Developed a multi-repo ecosystem of 3 independent projects: Express API with Sequelize/MySQL (79 endpoints, 28 tables, 77 migrations), Next.js 14 SPA with Redux Toolkit (192 components, 43 async thunks), and a Node.js Print Bridge desktop app (WebSocket + ESC/POS) distributed as native installers. Integrated Mercado Pago Marketplace (split payments with OAuth PKCE), Resend for email, Twilio for SMS, and Sharp for image optimization.

Result

Production SaaS platform deployed on Coolify with CI/CD via GitHub Actions. Print Bridge distributed as native macOS (.pkg) and Windows (.exe) installers via GitHub Releases and Cloudflare R2. 530+ backend tests, 408+ Print Bridge tests, 221+ merged PRs. Active market in Uruguay with expansion roadmap to Argentina, Brazil, Chile, Mexico, Colombia, and Peru.

Technologies Used

Next.js 14 Express MySQL 8 Sequelize Redux Toolkit Mercado Pago WebSocket

The Challenge

Small and medium restaurants in Latin America face an operational gap: physical menus that can’t be updated, manual order-taking prone to errors, fragmented payment collection via cash or transfer, and zero integration between the customer ordering experience and back-of-house operations. Post-pandemic QR ordering raised expectations, but existing solutions were either too expensive for small businesses or lacked the depth needed for real restaurant workflows — especially integration with thermal printers and local payment processors like Mercado Pago.

Our Approach

We built Deminut as a multi-repo ecosystem of 3 independent applications:

  1. API Backend — Express with Sequelize/MySQL: 79 endpoints across 16 route modules, 28 database tables, 77 migrations. Layered architecture (Routes → Controllers → Services → Models) with workers for auto-rejection of stale orders (15min) and log cleanup
  2. SPA Frontend — Next.js 14 with dual interface: a public QR menu where diners browse, customize, and pay; and an admin dashboard where restaurants manage menus, approve orders, configure printers, and connect Mercado Pago
  3. Print Bridge — Desktop application (Windows/macOS) running locally at the restaurant, connecting via WebSocket to the browser and sending ESC/POS commands to thermal printers over TCP or USB

Communication: REST API (SPA ↔ API), WebSocket (SPA ↔ Bridge), TCP/USB (Bridge ↔ Printer).

Automated Printing (Print Bridge)

An end-to-end system connecting the web to physical thermal printers without complex network configuration:

  • Auto-Discovery — Scans the local network and discovers thermal printers automatically
  • Dual Tickets — Kitchen tickets (no prices, preparation-focused) and customer tickets (prices, payment details) generated on order approval
  • Real-Time WebSocket — Instant ticket printing when orders transition to APPROVED in the dashboard
  • Multi-Protocol — Supports TCP and USB connections with automatic fallback to Windows print spooler
  • Builder Pattern — Composable ESC/POS command construction for flexible ticket layouts
  • Monitoring — Printer status tracking (paper, errors) with remote logging to the API for diagnostics
  • Native Distribution — Packaged as standalone executables via pkg, distributed as .pkg (macOS) and .exe (Windows) through GitHub Releases and Cloudflare R2

Mercado Pago Split Payments (Marketplace)

Complete online payment integration using Mercado Pago’s Marketplace model:

  • OAuth PKCE Flow — Each restaurant connects their own Mercado Pago account from the admin dashboard
  • Split Payments — The platform automatically collects a commission per transaction via the Marketplace model
  • Order State Machine — Orders transition through states: PENDING → PENDING_PAYMENT → PAID → APPROVED → DELIVERED with webhook-driven payment status synchronization
  • Automatic Reconciliation — Payment confirmation triggers order approval and kitchen notification in real-time

Technical Highlights

  • Hierarchical Menus — Menu → Section → Item → Option Group → Option, with bulk import/export via Excel and Zod validation
  • Order State Machine — 5-state workflow with automatic transitions, 15-minute auto-rejection worker via node-schedule
  • Redux Architecture — 43 async thunks with custom useActionStatus hook for loading/error tracking, Redux Persist for offline-capable state
  • Image Pipeline — Sharp-based WebP optimization with automatic resizing, stored on Cloudflare R2
  • Multi-Channel Notifications — Resend for transactional emails, Twilio for SMS order alerts
  • AdminJS Backoffice — Super admin panel for platform-wide operations
  • Soft Deletes — Sequelize paranoid mode across all models, with atomic transactions for bulk operations

Architecture

deminut/
├── deminut-api/         # Express REST API (Node.js 20)
│   ├── routes/          # 16 route modules, 79 endpoints
│   ├── controllers/
│   ├── services/
│   ├── models/          # 28 Sequelize models
│   └── migrations/      # 77 migrations
├── deminut-spa/         # Next.js 14 SPA (React 18 + Redux)
│   ├── components/      # 192 components in 77 directories
│   ├── store/           # Redux Toolkit, 43 async thunks
│   └── pages/           # 25 routes
└── deminut-printer-bridge/  # Desktop app (WebSocket + ESC/POS)
    ├── printer/         # TCP/USB drivers
    ├── websocket/       # WS server
    └── installers/      # pkg builds (macOS/Windows)

The Results

Deminut is live in production:

  • 79 API endpoints across 16 route modules with 27 integration docs
  • 938+ tests — 530+ backend (Vitest) + 408+ Print Bridge (Jest, 17 suites)
  • 221+ merged PRs with 40+ active feature branches
  • 77 database migrations evolving 28 models over 4 months of development
  • Native Print Bridge — macOS and Windows installers for automatic thermal printing
  • Mercado Pago Marketplace — Split payments with per-transaction commission
  • Production deployment — Coolify with GitHub Actions CI/CD
  • Expansion roadmap — Active in Uruguay, planned for Argentina, Brazil, Chile, Mexico, Colombia, Peru

Ready to Write Your Success Story?

Let's discuss how we can help solve your technical challenges.

Let's Talk