How part-db/part-db-server works
Part-DB is a web-based electronic-component inventory system. The principal workflow is users managing parts and their inventory details, then searching and filtering that inventory; projects can use parts in bills of materials and withdraw needed stock. The README also documents API/MCP access, labels and scanning, imports, KiCad, event history, authentication, and external information providers. Most domain components are represented by their exact source paths, but implementation relationships beyond the sampled excerpts are limited to documented capabilities; unsampled subsystem paths indicate scope, not inspected code.
Main entry points: index.php Web entry point · User.php Users and groups · PartRepository.php Part search · Part.php MCP tools
Components 25
Inventory and storage
- Parts and stock
src/Entity/Parts/Part.php - Categories
src/Entity/Parts/Category.php - Storage locations
src/Entity/Parts/StorageLocation.php - Suppliers
src/Entity/Parts/Supplier.php - Attachments
src/Entity/Attachments/Attachment.php - Attachment relationships
src/Entity/Attachments/AttachmentContainingDBElement.php - Part search
src/Repository/PartRepository.php
Projects and labels
- Projects and BOM
src/Entity/ProjectSystem/ProjectBOMEntry.php - Labels and scanning
src/Controller/LabelController.php
Application interfaces
- Web entry point
public/index.php - Import and export
src/Controller/PartImportExportController.php - REST API
src/Entity/Parts/Part.php - MCP tools
src/Entity/Parts/Part.php - Element lookup input
src/Mcp/DTO/ElementByIdInput.php
Identity and history
- Users and groups
src/Entity/UserSystem/User.php - Permission groups
src/Entity/UserSystem/Group.php - Permission management
src/Services/UserSystem/PermissionManager.php - API token levels
src/Entity/UserSystem/ApiTokenLevel.php - Event history
src/Entity/LogSystem/AbstractLogEntry.php
External integrations
- Provider imports
src/Entity/InfoProviderSystem/BulkInfoProviderImportJob.php - KiCad integration
src/Controller/KiCadApiController.php - AI extraction
src/Controller/InfoProviderController.php - Part information providers
src/Controller/InfoProviderController.php
Other components
- Inventory user
- Configured database
Connections 20
- Inventory user → Web entry point: uses browser
- Web entry point → Parts and stock: manages inventory
- Web entry point → Part search: searches parts
- Part search → Parts and stock: queries
src/Repository/PartRepository.php - Web entry point → Projects and BOM: manages BOM
- Web entry point → Labels and scanning: creates and scans
- Web entry point → Import and export: imports and exports
- Inventory user → REST API: accesses inventory
- Inventory user → MCP tools: asks inventory questions
- MCP tools → Element lookup input: accepts lookup input
src/Entity/Parts/Part.php - Web entry point → Users and groups: authenticates users
- Users and groups → Permission groups: belongs to groups
src/Entity/UserSystem/User.php - Permission management → Users and groups: resolves permissions
src/Services/UserSystem/PermissionManager.php - Web entry point → Event history: tracks changes
- Web entry point → Provider imports: imports provider data
- Provider imports → Part information providers: retrieves part data
- Web entry point → KiCad integration: integrates KiCad
- Web entry point → AI extraction: extracts datasheet data
- Attachments → Attachment relationships: associates elements
src/Entity/Attachments/Attachment.php - Web entry point → Configured database: stores inventory