STD Plus API

STD Plus is a backend API for managing materials, inventory, orders, and workflow in a glass manufacturing operation.

Tech Stack

TechnologyPurpose
Node.js + Express 5HTTP server and routing
MongoDB + MongooseDatabase and ODM
JWTAuthentication (Bearer Token)
Socket.IOReal-time WebSocket events
ZodRequest validation
Helmet / CORSSecurity

Base URL

http://localhost:3000
All REST API routes are prefixed with /api. Health: GET /api/health (no auth) — see Health check.

Documentation map

Use the Documentation tab for prose guides and the API Reference tab for every HTTP endpoint (OpenAPI + playground).

Documentation tab

SectionPages
Getting StartedIntroduction · Quickstart (install, env, scripts, integration tests) · Authentication (JWT, roles, permissions)
QR ScanningQR Scanning · QR Check-in
WebSocketWebSocket overview · WebSocket events

API Reference tab

Endpoint groups match the server implementation (each group expands to list/create/update/delete and related routes where applicable): Health · Auth · Workers · Customers · Materials · Inventories · Material Logs · Requests · Withdrawals · Orders · Claims (including from-pane) · Panes · Pane Logs · QR Scanning (single-pane scan + batch scan) · Production Logs · Station Templates · Stations · Roles (including list permissions) · Notifications · Sticker Templates · Job Types · Pricing Settings

Features

REST API

Install, environment, npm scripts, and how to run integration tests against a live server.

QR Scanning

Pane routing, lamination, and station scan flow; links to scan API under API Reference.

Real-time WebSocket

Socket.IO path, rooms, and inbound events (order:updated, pane:updated, etc.).

Auth & RBAC

JWT, system roles, permission keys, and ownership rules.

API Reference

Full OpenAPI spec: try requests with the playground (Bearer auth).

Resources

Domain resources exposed by the API (see API Reference for HTTP operations on each):
ResourceDescription
WorkersStaff accounts with authentication
RolesPermission sets; system roles (admin, manager, worker) plus custom roles; GET /api/roles/permissions lists all permission keys
CustomersClient records with discount tracking
MaterialsMaterial definitions with spec details
InventoriesStock levels by material and type (Raw / Reuse); move endpoint
Material LogsAudit trail for material movements
RequestsCustomer purchase requests (auto requestNumber)
WithdrawalsMaterial withdrawals (auto withdrawalNumber WDW-…)
OrdersProduction orders (auto orderNumber, stations, progress)
ClaimsDefect/claim reports (auto claimNumber); create by order or from pane
PanesIndividual glass panes; laminate parent/sheet/survivor; list hides merged_into unless includeMerged=true
Pane LogsScan/action timeline per pane; material timeline endpoint
Production LogsLegacy/action logs per pane and station
Station TemplatesConfigurable UI schemas (uiSchema) for station types
StationsWork stations (colorId, optional laminate flag)
NotificationsWorker alerts (reference id/type, priority)
Sticker TemplatesLabel layouts (elements, dimensions)
Job TypesCatalog (code, sheetsPerPane, default glass types)
Pricing SettingsSingleton document: glass price maps, hole/notch pricing