warecache is launching on Crowd Supply. Sign up for launch updates →

The Server

One self-hosted service, warecached, that receives sensor readings, stores your inventory, serves every client, and keeps pricing current.

Available now

The server is a single binary. It owns the databases, ingests readings from the container controllers, serves the REST API that every client and tool talks to, runs the distributor plugins, and computes what your projects cost to build. It runs on your own hardware, so your inventory data never leaves your network.

What It Does

Sensor Ingest

Container controllers publish readings over MQTT. Each controller authenticates with a certificate the server issued when it was registered, so there are no device passwords. Every quantity is stored as a time series, which is where stock history comes from.

REST API

Everything the clients do goes through one authenticated HTTP API. The server publishes a live OpenAPI description of itself and a browsable API explorer, so you can generate a client for any language.

Storage

Two PostgreSQL databases, kept separate on purpose: one for inventory, using TimescaleDB for the time-series tables, and one for users and sessions. Migrations run automatically at startup.

Distributor Plugins

Python plugins run inside the server and pull pricing, lifecycle, and part information from distributors on a schedule. Nine are included and you can write your own. About the plugins →

Build-Cost Analytics

A background worker rolls the cost of every BOM line up into the price of the finished part, so an assembly you build looks like any other part to the BOMs that use it. It recomputes when pricing or BOMs change.

Changelog

Every change to every record is logged. The clients use that log to sync only what changed since they last connected, and the desktop client shows it as an audit trail.

Users & Access

Password login or single sign-on through your OIDC identity provider, with groups mapped to the Guest, Default, and Admin roles. Scripts and tools use API tokens. Sessions are stored server-side and can be revoked.

Device Certificates

When a container is registered, the server issues its client certificate. The MQTT link is mutual TLS in both directions, and the server refuses to start if its certificate authority material is missing.

Running It

Docker Compose is the recommended install. A native install is documented as well.

Docker Compose

The published compose file starts four services: the user database, the item database with TimescaleDB, an MQTT broker, and warecached itself. Configuration is a TOML file, with every setting also available as an environment variable.

  • PostgreSQL for users, PostgreSQL with TimescaleDB for inventory
  • An MQTT broker for the sensor link
  • Nightly server image in the container registry
  • Reverse proxy guide for putting it behind TLS