Expand description
TeamCraft – an open-source product lifecycle management (PLM) system.
The crate is organised in layers:
domain– pure rules (roles, lifecycle, numbering, validation)services– business logic on top of PostgreSQL, used by both front endsweb– server-rendered HTML user interface (cookie sessions)api– JSON REST API under/api/v1(bearer tokens)mcp– Model Context Protocol server at/api/v1/mcpfor AI assistantsassistant– built-in assistant (Claude via the Anthropic API) using the MCP tools
Modules§
- api
- JSON REST API (
/api/v1). Authentication:Authorization: Bearer <token>with a personal access token created on the account page. - assets
- Static files embedded into the binary – stylesheets, scripts, logos and fonts – and how they are served.
- assistant
- The built-in assistant: Claude answers engineers’ questions about the
PDM data, using the MCP tool set (
mcp::tools) on the server. - auth
- Authentication primitives: password hashing, random tokens, cookies and the request extractors that resolve the current user.
- backup
- Backup and restore of the database and the file vault.
- backupcrypt
- Encryption of backup files (
teamcraft backup --encrypt). - bomtable
- Bills of materials exported by CAD programs: CSV/TSV and spreadsheets
(Excel
.xlsx/.xlsm/.xlsb/.xls, OpenDocument.ods). - cadformat
- File formats of the common CAD programs.
- cadrefs
- References inside CAD files: an assembly names its component files, a drawing the model it documents, a STEP file its external parts, a KiCad project its sheets.
- catprod
- CATIA V5 products (
.CATProduct): which documents are placed where (seedocs/src/research/catia-product-structure.md). - config
- Runtime configuration, read from environment variables.
- db
- Database pool and migrations.
- delivery
- Delivery of notifications by e-mail and to Mattermost.
- domain
- Pure domain rules: roles, lifecycle states, numbering and validation.
- error
- Application error type shared by services, the JSON API and the web UI.
- fusion
- Autodesk Fusion design archives (
.f3d). - htmltext
- Text of HTML reports (the report generators of FEA/CFD tools) for the
full-text search, the assistant (
read_file_text,propose_result_values) and the extraction templates; seedocs/src/research/html-report-text.md. - httprange
- HTTP range requests for file downloads (RFC 9110, section 14): a client
that lost the connection half-way through a large file asks for the rest
with
Range: bytes=<offset>-andIf-Range: "<sha256>"instead of starting over. - invasm
- Autodesk Inventor assemblies (
.iam): how often the assembly places each file it references, read from the file descriptor table in theUFRxDocstream of the compound file. - invpart
- Autodesk Inventor files (
.ipt,.iam): the segments below the OLE storageRSeStorage(seedocs/src/research/inventor-display-preview.md). - invplace
- Autodesk Inventor assemblies (
.iam): which files are placed where (seedocs/src/research/inventor-display-preview.md). - llm
- One provider-neutral API layer for the assistant (design:
docs/src/research/agent-interface.md). - localserver
teamcraft local: a test installation on one computer, for trying TeamCraft out without Docker or a database administrator. It runs a private PostgreSQL cluster and the server, both only on127.0.0.1, with every file in one data directory:- malware
- Optional malware scanning of uploads with a ClamAV daemon (
clamd), spoken to over itsINSTREAMprotocol on TCP (host:port) or, on Unix, a socket (unix:/run/clamav/clamd.ctl). No ClamAV code is linked. - massprops
- Mass properties of closed triangle meshes and their combination.
- mattermost
- Direct messages through the Mattermost REST API as a bot account.
- mcp
- Model Context Protocol server: lets an engineer’s AI assistant (Claude Code, Claude Desktop, any MCP client) work with the PDM data.
- mesh
- Triangle meshes and point clouds for the 3D preview.
- metrics
- Prometheus metrics (
GET /metrics, text exposition format 0.0.4). - models
- Database row types. They serialize directly into JSON API responses and template contexts.
- notify
- Error notifications to a Mattermost incoming webhook
(
MATTERMOST_ERROR_WEBHOOK). At most one message per minute is sent; further errors in that window are counted and reported with the next one. - nxasm
- Components and placements of Siemens NX assemblies (
.prtwithout a tessellation of their own), read from the/Root/FastLoad/Structurestream of the container (seenxpart). - nxpart
- Siemens NX part files (
.prt, NX 1980 and later): theSPLMSSTRstream container. - oidc
- OpenID Connect login (authorization code flow with PKCE), tested against Authentik but provider agnostic.
- pagecontext
- The page the user is on, as the assistant sidebar reports it.
- pdftext
- Text of PDF reports for the full-text search and the assistant
(
read_file_text); seedocs/src/research/pdf-text-extraction.md. - preview
- 3D preview of CAD files – pure Rust, no browser plug-ins or downloads.
- resultscan
- Result values from small, structured files at check-in – never from big result files (those are stored, not parsed).
- services
- Business logic. Every mutation checks permissions and lifecycle rules, runs in a database transaction and writes an audit log entry.
- shape
- Shape signatures for the similar part search – cheap, explainable, no ML.
- simmesh
- Simulation results (FEA/CFD) for the 3D preview – pure Rust, no ParaView.
- solversummary
- A short summary of solver output files (Fluent transcripts and report
files, Nastran
.f06and decks, STAR-CCM+ macros and batch logs): the solver and its version, how the run ended, the last iteration or time step, and counts ofFATAL/WARNINGmessages. - stepbom
- Product structure of STEP assemblies (ISO 10303-21 files of AP203, AP214
and AP242) as a BOM table for the import (see
crate::services::imports). - swpart
- SOLIDWORKS files from version 2015 on (
.sldprt,.sldasm,.slddrw): SOLIDWORKS’ own section container. - templates
- HTML templates (MiniJinja), embedded into the binary at compile time.
- textindex
- Text extraction for the full-text search over file contents.
- thumbnail
- Preview images that CAD programs store inside their own files – the
thumbnails Autodesk Vault or Teamcenter show for native files (findings in
docs/src/research/cad-previews.md). Only the image is read, never the geometry: - util
- Small string helpers without external dependencies.
- vault
- Content-addressed file vault on the local file system.
- web
- Server-rendered HTML user interface.
- webhooks
- Delivery of outgoing event webhooks.
Structs§
- AppState
- Shared state of the HTTP server.
Constants§
- CONTENT_
SECURITY_ POLICY - Content-Security-Policy of every response that does not set its own (the desktop sign-in page derives its policy from it).
Functions§
- router
- Builds the complete HTTP application.