PRODUCTIONSHIPPED★ FLAGSHIP
TPCompanion logo

TPCompanion

Production business operations platform for Shortcuts POS environments

CLIENT: TECHNOLOGY PEOPLE LLC · 2026

Windows / LAN

Architecture

React 19

Frontend

Node.js

Backend

SQL Server

Database

3+

Commission Models

15+

Messaging Workflows

SMS / WhatsApp

Channels

Automated

Reporting

Qatar GTA

E-Invoicing

Local / Ollama

AI Runtime

Qwen3

LLM

nomic-embed-text

Embeddings

Read-Only Tools

DB Access

Overview

TPCompanion is a production-oriented business operations platform developed as a companion layer for the Shortcuts POS environment used in salon, spa, and retail operations. Rather than replacing the existing POS system, TPCompanion extends it with a modern React interface and a locally running Node.js/Express backend connected directly to Microsoft SQL Server. The backend operates as a Windows Service, allowing APIs, background schedulers, messaging workflows, reporting, Qatar GTA processing, application updates, and AI services to continue running independently of the frontend. The platform provides a dedicated analytics layer over existing Shortcuts data, covering revenue, appointments, products, staff, clients, business summaries, and custom date-range analysis. It also includes a configurable commission engine supporting percentage-based, flat/jump-slab, progressive structures, employee-specific rules, item and category filtering, company filtering, stylist/operator allocation, and commission summaries. Appointment data is reused across analytics and automation workflows, supporting reminders, confirmations, pre-arrival communication, no-show workflows, and related operational processes. A background messaging system automates customer communication through SMS and WhatsApp, covering appointment reminders, confirmations, pre-arrival messages, thank-you and receipt follow-ups, new-client communication, referrals, birthdays, series and gift-certificate expiry, miss-you campaigns, no-show communication, class-related workflows, and promotions. TPCompanion also provides scheduled automated reporting, allowing selected business reports to be generated and delivered without requiring the user to keep the application open. The platform includes a dedicated Qatar GTA electronic invoicing workflow covering device onboarding, certificate lifecycle management, supplier configuration, invoice and credit-note processing, UBL 2.1 generation, document validation and signing, submission, response processing, status tracking, and DCV/PDH document-chain management. Transaction control is used around relevant chain-state operations so failed processing does not leave local invoice state inconsistent. The application is packaged for Windows using @yao-pkg/pkg, hosted through WinSW as a Windows Service, distributed through an Inno Setup installer, and supported by an application-level update mechanism backed by a controlled release repository. Most recently, TPCompanion was extended with a locally hosted AI assistant combining two distinct capabilities: controlled business-data access and Shortcuts Fusion knowledge retrieval. Users interact through a free-text conversational interface, while the backend separates natural-language requests from actual business operations. Business requests are routed through capability discovery, eligibility checks, validation, and deterministic read-only tools rather than allowing the language model to generate unrestricted SQL against the production database. Supported capabilities include business summaries, revenue, appointments, clients, staff, inventory, commissions, cash movements, gift-certificate liability, refunds and voids, stock movement, discounts, taxation, and report-derived operations. The knowledge side uses Shortcuts Fusion retrieval with document synchronization, chunking, embeddings, semantic search, confidence evaluation, and fail-closed handling for unsupported answers. The AI runtime uses Ollama with Qwen3 for local inference and nomic-embed-text for embedding-based retrieval, keeping the AI workload within the local application environment rather than depending on a hosted general-purpose AI API. This architecture provides natural-language access while keeping business-data execution deterministic, validated, and application-controlled.

Engineering Challenges

Designing a Windows-native architecture where the Node.js backend operates continuously as a background service without depending on the React interface being open

Integrating with the existing Shortcuts POS SQL Server environment while preserving the existing POS as the system of record

Building reliable analytics and business logic over an existing operational database schema

Implementing a configurable commission engine supporting multiple calculation structures, filtering rules, employee assignments, and stylist/operator allocations

Keeping business calculations centralized in the backend rather than duplicating critical rules in the frontend

Building background schedulers for messaging, reporting, Qatar GTA processing, and application updates with overlap prevention and graceful shutdown handling

Automating multiple customer communication workflows across SMS and WhatsApp using appointment and customer data

Maintaining reliable invoice document-chain state when Qatar GTA processing succeeds or fails

Implementing transactional DCV / PDH reservation and rollback behavior for failed e-invoicing operations

Packaging the Node.js backend as a Windows executable, wrapping it with WinSW, and distributing it through an installer

Building a controlled update mechanism that can distribute new backend versions without exposing proprietary source code

Preventing a local language model from receiving unrestricted access to a production business database

Designing deterministic business tools and capability routing so natural-language requests resolve to controlled application operations

Handling unsupported AI requests through validation and fail-closed behavior instead of allowing arbitrary execution

Improving local AI reliability by separating business-data retrieval and calculations from language-model reasoning

Building a retrieval-grounded Shortcuts Fusion knowledge system using synchronization, chunking, embeddings, semantic search, confidence thresholds, and fail-closed handling

Keeping the AI subsystem locally hosted so business information does not need to be sent to a hosted general-purpose AI API

Outcomes

✓

Delivered a production-oriented business operations layer around an existing Shortcuts POS environment without replacing the underlying POS system

✓

Provided a unified interface for analytics, commissions, appointments, products, messaging, reporting, e-invoicing, and AI-assisted business access

✓

Automated commission calculations that previously required manual processing and spreadsheet-based workflows

✓

Improved business visibility through centralized revenue, appointment, staff, client, product, and inventory analysis

✓

Automated recurring customer communication across SMS and WhatsApp

✓

Enabled scheduled business reports to be generated and delivered without requiring the application interface to remain open

✓

Integrated Qatar GTA electronic invoicing workflows into the broader business application

✓

Added transactional protection around invoice document-chain state to improve processing reliability

✓

Enabled continuous background operation through Windows Service deployment

✓

Established a controlled Windows packaging, installation, release, and update workflow

✓

Enabled natural-language business queries through a locally hosted AI assistant

✓

Kept business-data execution under deterministic backend tools rather than unrestricted model-generated SQL

✓

Added Shortcuts Fusion knowledge retrieval with confidence checks and fail-closed behavior

✓

Kept local AI inference and knowledge retrieval within the application's local environment rather than relying on a hosted LLM API

✓

Provided a publicly accessible production frontend while keeping proprietary backend source code and production business data private

Media Gallery

← ALL PROJECTS