2a86a79ca20dfc3d55e5d72ee0f22a0f793a75a2
Client-side authentication support for the Silo database API. Adds a compact dock widget for auth status and login, bearer token management on all HTTP requests, and an enhanced settings dialog. Auth helper functions: - _get_auth_token(): reads token from FreeCAD preferences, checks expiry - _get_auth_username(): reads stored username from preferences - _get_auth_headers(): returns Authorization bearer header dict - _clear_auth(): clears token, username, and expiry from preferences SiloClient auth methods: - login(username, password): POSTs to /auth/login, stores token/user/expiry - logout(): clears stored credentials via _clear_auth() - is_authenticated(): checks for valid stored token - auth_username(): returns stored username - check_connection(): GETs /health to test server reachability Auth header injection: - _request(), _download_file(), _upload_file(), delete_bom_entry() all merge _get_auth_headers() into outgoing HTTP requests - _request() clears stored token on 401 response SiloAuthDockWidget: - Status indicator dot (green=authenticated, yellow=no auth, red=disconnected) - Displays current username and server URL - Login/Logout toggle button - Gear button opens Silo_Settings dialog - 30-second QTimer polls connection and auth status - Login dialog with username/password fields and inline error display Silo_Auth command: - Shows/focuses the auth dock panel from menu or toolbar - Registered in workbench toolbar alongside existing commands Silo_Settings enhancements: - New Authentication section showing current auth status - Clear Saved Credentials button - Active values summary now includes authentication state New icon: - silo-auth.svg padlock icon in Catppuccin Mocha style Graceful degradation: when backend auth endpoint does not yet exist, login fails with a clear error and all existing unauthenticated requests continue to work as before (empty auth headers are a no-op).
Kindred Silo
Item database and part management system for Kindred Create.
Overview
Kindred Silo is an R&D-oriented item database with:
- Configurable part number generation via YAML schemas
- FreeCAD integration with git-like commands (checkout, commit, status)
- Revision tracking with append-only history
- BOM management with reference designators and alternates
- Physical inventory tracking with hierarchical locations
Components
silo/
├── cmd/
│ ├── silo/ # CLI tool
│ └── silod/ # API server
├── internal/
│ ├── api/ # HTTP handlers, routes, and templates
│ ├── config/ # Configuration loading
│ ├── db/ # PostgreSQL access
│ ├── migration/ # Property migration utilities
│ ├── partnum/ # Part number generation
│ ├── schema/ # YAML schema parsing
│ └── storage/ # MinIO file storage
├── pkg/
│ └── freecad/ # FreeCAD workbench (Python)
├── migrations/ # Database migration SQL scripts
├── schemas/ # Part numbering schema definitions (YAML)
├── deployments/ # Docker Compose and systemd configs
├── scripts/ # Deployment and setup scripts
└── docs/ # Documentation
Quick Start
# Database setup
psql -h psql.kindred.internal -U silo -d silo -f migrations/001_initial.sql
# Configure
cp config.example.yaml config.yaml
# Edit config.yaml with your settings
# Run server
go run ./cmd/silod
# CLI usage
go run ./cmd/silo register --schema kindred-rd --category F01
Configuration
See config.example.yaml for all options.
Kindred Create Integration
Install the workbench:
ln -s $(pwd)/pkg/freecad ~/.local/share/FreeCAD/Mod/KindredSilo
Then in Kindred Create, use the Silo workbench toolbar commands:
- Pull - Download an item by part number
- Commit - Save current state as a new revision with comment
- Push - Batch upload modified files
- Info - View revision history
License
MIT License - Copyright (c) 2026 Kindred Systems LLC
See LICENSE for details.
Languages
Go
68.5%
TypeScript
25.5%
Shell
2.7%
PLpgSQL
2.4%
Makefile
0.5%
Other
0.3%