diff --git a/README.md b/README.md index 1b711d1..e2a4103 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,21 @@ # Kindred Silo -Item database and part management system for Kindred Create. +Item database and part management system. ## 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 +- **Revision tracking** with append-only history, rollback, comparison, and status labels +- **BOM management** with multi-level expansion, where-used queries, CSV/ODS export +- **Authentication** with local (bcrypt), LDAP/FreeIPA, and OIDC/Keycloak backends +- **Role-based access control** (admin > editor > viewer) with API tokens and sessions +- **ODS import/export** for items, BOMs, and project sheets +- **Audit/completeness scoring** with weighted per-category property validation +- **Web UI** with htmx-based item browser, project management, and schema editing +- **CAD integration** via REST API ([silo-mod](https://git.kindred-systems.com/kindred/silo-mod), [silo-calc](https://git.kindred-systems.com/kindred/silo-calc)) +- **Physical inventory** tracking with hierarchical locations (schema ready) ## Components @@ -20,17 +25,18 @@ silo/ │ ├── silo/ # CLI tool │ └── silod/ # API server ├── internal/ -│ ├── api/ # HTTP handlers, routes, and templates +│ ├── api/ # HTTP handlers, routes, templates (74 endpoints) +│ ├── auth/ # Authentication (local, LDAP, OIDC) │ ├── config/ # Configuration loading -│ ├── db/ # PostgreSQL access +│ ├── db/ # PostgreSQL repositories │ ├── migration/ # Property migration utilities +│ ├── odoo/ # Odoo ERP integration +│ ├── ods/ # ODS spreadsheet library │ ├── 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) +├── migrations/ # Database migrations (10 files) +├── schemas/ # Part numbering schemas (YAML) ├── deployments/ # Docker Compose and systemd configs ├── scripts/ # Deployment and setup scripts └── docs/ # Documentation @@ -39,16 +45,19 @@ silo/ ## Quick Start ```bash -# Database setup -psql -h psql.kindred.internal -U silo -d silo -f migrations/001_initial.sql - -# Configure +# Docker Compose (quickest) cp config.example.yaml config.yaml -# Edit config.yaml with your settings +# Edit config.yaml with your database, MinIO, and auth settings +make docker-up -# Run server -go run ./cmd/silod +# Or manual setup +psql -h localhost -U silo -d silo -f migrations/*.sql +go run ./cmd/silod -config config.yaml +``` +When auth is enabled, a default admin account is created on first startup using the credentials in `config.yaml` under `auth.local.default_admin_username` and `auth.local.default_admin_password`. + +```bash # CLI usage go run ./cmd/silo register --schema kindred-rd --category F01 ``` @@ -57,19 +66,41 @@ go run ./cmd/silo register --schema kindred-rd --category F01 See `config.example.yaml` for all options. -## Kindred Create Integration +## Authentication -Install the workbench: +Silo supports three authentication backends, configured in `config.yaml`: -```bash -ln -s $(pwd)/pkg/freecad ~/.local/share/FreeCAD/Mod/KindredSilo -``` +| Backend | Description | +|---------|-------------| +| **Local** | Built-in accounts with bcrypt passwords | +| **LDAP** | FreeIPA / Active Directory integration | +| **OIDC** | Keycloak / OpenID Connect providers | -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 +Roles: **admin** (full access) > **editor** (create/modify items) > **viewer** (read-only). + +API tokens provide programmatic access for scripts and CAD clients. Set `auth.enabled: false` for development without authentication. + +See [docs/AUTH.md](docs/AUTH.md) for full details. + +## Client Integrations + +CAD and spreadsheet integrations are maintained in separate repositories: + +- **Kindred Create / FreeCAD workbench** -- [silo-mod](https://git.kindred-systems.com/kindred/silo-mod) +- **LibreOffice Calc extension** -- [silo-calc](https://git.kindred-systems.com/kindred/silo-calc) + +The server provides the REST API and ODS endpoints consumed by these clients. + +## Documentation + +| Document | Description | +|----------|-------------| +| [docs/AUTH.md](docs/AUTH.md) | Authentication system design | +| [docs/AUTH_USER_GUIDE.md](docs/AUTH_USER_GUIDE.md) | User guide for login, tokens, and roles | +| [docs/DEPLOYMENT.md](docs/DEPLOYMENT.md) | Production deployment guide | +| [docs/SPECIFICATION.md](docs/SPECIFICATION.md) | Full design specification and API reference | +| [docs/STATUS.md](docs/STATUS.md) | Implementation status | +| [ROADMAP.md](ROADMAP.md) | Feature roadmap and gap analysis | ## License