API Layer - Communication, Routing, and Update Distribution System

This project is a suite of three ASP.NET Core Web API applications designed to manage data exchange, request routing, and software update distribution across a network of vending machines and server systems. Together, they form the backbone of all inter-system communication, handling everything from data synchronization to machine configurations and update management. Developed entirely by me, this modular architecture ensures reliable connectivity even in complex environments involving isolated customer networks, multi-device deployments, or hybrid infrastructure (on-premise and cloud).

Tech Stack & Integration:
  • ASP.NET Core Web API / C# for backend services
  • PostgreSQL database with Entity Framework Core for data access and persistence
  • RESTful API architecture for clear, maintainable service interfaces
  • JSON-based payload exchange for consistency and compatibility
  • Token-Based Authentication using standard JWT (JSON Web Tokens) for secure, stateless client-server communication. This ensures authenticated access to endpoints and supports claims-based identity for permission handling.
Map of API Layer

TB Connector Data Processing & Synchronization Endpoint

The Connector app is responsible for processing all incoming data from external sources-either the main server or peer vending machines. It acts as the core data sync engine that validates, updates, or removes records such as:

  • Users, products, access restrictions
  • Transactions and audit logs
  • Machine configurations, layouts, and parameters

The logic ensures idempotent operations (e.g., avoiding duplicate records), version checks, and safe merging or overwriting of existing data. This service ensures every machine and server instance maintains consistent, accurate state.

TB Router Network Bridging & Package Forwarding

The Router app handles intelligent data routing between isolated network environments. It's deployed in the main vending machine of a customer site and solves the challenge of bridging communication between:

  • Local vending machine groups (e.g., multiple devices at a customer site)
  • The main server, which may be hosted externally, on a separate subnet or in the cloud

Based on the direction of communication, it forwards packages (user data, transactions, product updates, etc.) either to a peer machine’s Connector or to the central server. This ensures seamless data flow even across segmented infrastructures.

TB Update Version Check & Update Distribution

This service manages the delivery of software update packages to vending machines. It runs primarily on the main server and is also mirrored on the main vending machines within each location.

  • Machines periodically check in with their current software version
  • If updates are available, the server responds with a list of relevant packages
  • Vending machines can then download and install updates directly from the server

The update mechanism supports differential updates, version tracking, and distribution rules based on machine type or deployment role.

arrow right Previous
Next arrow right
An unhandled error has occurred. Reload 🗙