How rey1332/printstream works
PrintStream is a self-hosted business operations and data intelligence platform. Users enter through the application, manage ERP workspaces and business records, and can import or connect data, build and run pipelines, query datasets, and expose permitted data to MCP assistants. Administration governs accounts, companies, access, and service settings. The README documents broad ERP and Terminal capabilities; sampled source excerpts and the source index support only selected implementation links, so other feature relationships are not inferred.
Main entry points: request.ts Session handling · workspace/route.ts Workspace API · data/route.ts Data API · page.tsx ERP workspace
Components 27
Application access
- Application shell
src/app/page.tsx - Sign-in and MFA
src/app/login/page.tsx
ERP operations
- Data API
src/app/api/data/route.ts - Data access engine
src/server/db/execute.ts - ERP workspace
src/app/erp/page.tsx - ERP rules
src/app/erp/lib/erpRules.ts - Workspace API
src/app/api/erp/workspace/route.ts - ERP import
src/app/erp/import/ingestClient.ts - Import planning
src/lib/ingest/plan.ts
Data and analytics
- Terminal workbench
src/app/terminal/page.tsx - Terminal API
src/app/api/terminal/route.ts - Terminal services
src/server/terminal/service.ts - Pipeline editor
src/app/pipelines/[id]/PipelineEditor.tsx - Workflow API client
src/lib/workflow/storage.ts - Workflow executor
src/lib/workflow/executor.ts - Pipeline runtime
src/server/terminal/pipelines.ts - MCP endpoint
src/app/api/mcp/route.ts - Intelligence runtime
src/server/intel/service.ts
Identity and governance
- Auth API
src/app/api/auth/[action]/route.ts - Authentication service
src/server/auth/service.ts - Session handling
src/server/auth/request.ts
Platform services
- PostgreSQL executor
src/server/db/executor.ts - Administration
src/app/admin/page.tsx - Admin services
src/server/admin/service.ts - Company mail gateway
src/server/mail/gateway/engine.ts
Other components
- Business user
- External mail provider
Connections 31
- Business user → Application shell: opens
README.md - Business user → Sign-in and MFA: signs in
README.md - Sign-in and MFA → Auth API: authenticates
- Auth API → Authentication service: calls
src/app/api/auth/[action]/route.ts - Auth API → Session handling: reads session
src/app/api/auth/[action]/route.ts - Authentication service → PostgreSQL executor: uses transactions
src/server/auth/service.ts - Session handling → Authentication service: loads dependencies
src/server/auth/request.ts - Business user → ERP workspace: manages operations
README.md - ERP workspace → Data API: reads and writes
- Data API → Session handling: checks identity
src/app/api/data/route.ts - Data API → Data access engine: executes requests
src/app/api/data/route.ts - Data access engine → PostgreSQL executor: runs transactions
src/server/db/execute.ts - ERP workspace → ERP rules: applies rules
- Business user → ERP import: imports data
README.md - ERP import → Import planning: plans import
src/app/erp/import/ingestClient.ts - Business user → Terminal workbench: explores data
README.md - Terminal workbench → Terminal API: requests actions
- Terminal API → Terminal services: dispatches actions
src/app/api/terminal/route.ts - Terminal API → Intelligence runtime: dispatches intelligence
src/app/api/terminal/route.ts - Business user → Pipeline editor: builds pipelines
README.md - Pipeline editor → Workflow API client: loads and runs
src/app/pipelines/[id]/PipelineEditor.tsx - Workflow API client → Pipeline runtime: calls workflow API
- Pipeline runtime → Workflow executor: executes graph
src/server/terminal/pipelines.ts - Business user → MCP endpoint: connects assistant
README.md - MCP endpoint → Session handling: checks session
src/app/api/mcp/route.ts - Business user → Administration: administers service
README.md - Administration → Admin services: manages platform
- Workspace API → Session handling: reads session
src/app/api/erp/workspace/route.ts - Workspace API → ERP rules: validates roles
src/app/api/erp/workspace/route.ts - Workspace API → Company mail gateway: sends invitations
- Company mail gateway → External mail provider: dispatches mail