DECT loan and inventory system for chaos events
  • JavaScript 57%
  • Svelte 41.6%
  • CSS 1.2%
  • HTML 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-28 08:15:49 +01:00
.vscode hide MAC on analog devices, small adjustments 2026-11-15 17:21:56 +01:00
src fix spelling of "collective" and add link to fw.dect.fail 2026-11-28 08:15:49 +01:00
static initial commit 2026-11-12 02:58:26 +01:00
.gitignore initial commit 2026-11-12 02:58:26 +01:00
jsconfig.json initial commit 2026-11-12 02:58:26 +01:00
LICENSE add license 2026-11-26 00:18:44 +01:00
package.json initial commit 2026-11-12 02:58:26 +01:00
pnpm-lock.yaml initial commit 2026-11-12 02:58:26 +01:00
pnpm-workspace.yaml initial commit 2026-11-12 02:58:26 +01:00
README.md fix spelling of "collective" and add link to fw.dect.fail 2026-11-28 08:15:49 +01:00
vite.config.js initial commit 2026-11-12 02:58:26 +01:00

oxide/dect.fail

Note

This project was in-part made with Claude Opus. You are not required to use an LLM however you may choose to as long as it follows existing coding standards and have properly checked over the code in a staging environment. Failure to do so will result in being prohibted to contribute in the future.

dect.fail is a self-hosted inventory management app, made by Oxide Collective, capable of managing and tracking Hardware across an entire event at scale.

It's a single SvelteKit app on Node 22+ with an SQLite database, so there's no separate backend or database server to run. To get started:

pnpm install
pnpm dev

Open the app and it asks you to create the first admin account. The database is created at data/dect.db.

Running it in production

pnpm install && pnpm build
DATABASE_PATH=/var/lib/dect/dect.db PORT=3000 node build

On the server, build/ needs package.json and pnpm install --prod beside it, since bwip-js, sip and alawmulaw are loaded at runtime.

Variable When Purpose
DATABASE_PATH runtime SQLite file, default data/dect.db. Back this file up.
PORT, HOST runtime Listen address, default 0.0.0.0:3000.
ORIGIN build time Public URL, e.g. http://inventory.lan:3000. Needed for plain HTTP, or form posts are rejected as cross-site.
INSECURE_COOKIES=true runtime Also needed for plain HTTP on any host other than localhost, or the browser drops the session cookie.
PROTOCOL_HEADER, HOST_HEADER runtime Behind a reverse proxy, e.g. x-forwarded-proto / x-forwarded-host.

Behind an HTTPS reverse proxy that passes the Host header through, nothing extra is needed.

NOTE: the database runs in WAL mode, so copying the file while the app is running can give you a broken backup. Use SQLite's backup command instead:

sqlite3 data/dect.db ".backup backup.db"

Barcode scanners

Any hand-held scanner in keyboard (wedge) mode works. In scan desk mode (/scan), a scan brings the device up ready to check out or in. Anywhere else, scanning outside a text field opens the device. Scans are told apart from typing by their speed, and most scanners send US key codes, so HS-GIG-… arriving as HSßGIGß… on a German layout is fixed up to still find the requested device.

Asset tags

{seq:N} counts separately for every combination of the other parts, so HS-GIG-SL450H-0003 and BS-MIT-RFP48-0003 can coexist. A deleted device's number is never reused, since its sticker may still be out there. Changing the template only affects devices registered afterwards.

Model rules (Settings -> Tags & labels) shorten models before they become {model}, one find = replacement per line. Plain text matches whole words, and /…/ is a case-insensitive regular expression:

OpenStage =
Sinus = SI
/KX-T[A-Z]*([A-Z])(\d+)E?X/ = T$1$2X

This turns OpenStage 40 T into 40T and KX-TGEA25EX into TA25X.

Recall calls

Admins enter a SIP account under Settings -> Recall calls, and Run test checks it. The holder hears an uploaded recording (WAV, MP3, M4A or OGG, up to 60 s), or a chime if there is none, with "Return your DECT" (by default) as the caller name.

Signalling uses the sip package and is UDP only with G.711 µ-law or A-law, and no TCP, TLS or SRTP support. The PBX must be able to send RTP back to the server and if you're behind NAT, set Local address. The SIP password is stored in plain text because digest authentication needs it, so use an account that can only place calls.

Design

One SvelteKit app is both frontend and backend. The UI is Svelte 5 with a UI kit adapted from cyanos/webui in src/lib/ui, and every page works without JavaScript. The database is SQLite through Node's built-in node:sqlite, so there are no native modules to compile. The schema and migrations live in src/lib/server/db.js. Passwords are hashed with scrypt, and sessions are server-side, checked for every route in src/hooks.server.js.

Bugfixes and contributions are very welcome. If you prefer a cup of tea and a nice chat instead of an issue ticket, shoot us an E-Mail over at [email protected] or a DM Laura on matrix at @laura:cyanos.net.