fn-uns Documentation

Build a manufacturing data backbone using serverless functions, MQTT, and GitOps. 9 independent functions that capture, process, and report on real-time factory data.

CAPTURE PROCESS REPORT cnc-01 ACTIVE status cnc-02 IDLE program cnc-03 ACTIVE tool cnc-04 ALARM MQTT Broker v1.0/enterprise/site1/# Valkey Cache uns:data:* · uns:prev:* · uns:meta:* uns-state Go · state durations uns-stoppage Node · classification uns-productivity Go · production runs uns-log · uns-input · uns-cache PostgreSQL — 5 tables uns-kpi Go · HTTP · read-only 72% Utilisation 94% Avail 48/hr Thru 142m MTBF 8.3m MTTR STOPPAGE PARETO NO_WORK 240m SETUP 120m FAULT 30m GET /uns-kpi?hours=8&machine=cnc-01

What is fn-uns?

This project implements a complete Unified Namespace (UNS) — the modern approach to manufacturing data integration — using fnkit as the development and deployment platform.

Instead of point-to-point integrations between machines, databases, and dashboards, the UNS creates a single source of truth for all operational data. Every machine, sensor, and system publishes to a shared MQTT topic hierarchy, and lightweight serverless functions process, store, and report on that data.

The 9 Components

Each function does one thing well — they compose through shared infrastructure (MQTT, Valkey, PostgreSQL), not through each other.

Architecture at a Glance

Data flows through three stages: Capture (machines publish to MQTT, framework caches to Valkey), Process (functions detect changes and write to PostgreSQL), and Report (KPI function queries all tables on demand).

All functions run as Docker containers on a shared fnkit-network. Deployed via git push using fnkit's GitOps workflow.

Get Started

StepDescription
What is the UNS?Understand the Unified Namespace concept
Why FaaS & GitOps?Why serverless functions beat flow-based tools
Getting StartedDeploy the full stack in minutes
ComponentsDeep dive into each function