Architecture
Documentation Map
-
Architecture
-
Channel:
latest -
Source repo:
JaddaHelpifyr/jhf-spindle
Architecture
Core Positioning
Helpifyr Spindle is an isolated ERPNext stack that integrates with the existing OpenClaw environment without sharing runtime state. Its Helpifyr role is to own ERP-backed execution, ledger truth, and auditable workflow side effects while adjacent systems handle orchestration or review UX.
Roles
- ERPNext / Frappe: source of truth for finance, operations, inventory, assets, and HR records
jhf_spindle_core: custom integration and workflow layer inside ERPNext- business identity source of truth for Helpifyr users, service accounts, and agent registry metadata
- OpenClaw: approval and HITL control plane
- n8n: external orchestration, intake, OCR handoff, notifications, and scheduled syncs
- Mission-Control / Plane: exception and project tracking surfaces
- Helpifyr Spindle MCP Gateway: agent-facing MCP layer for finance context and controlled ERP actions
Runtime Boundary
- isolated Docker Compose project:
Helpifyr Spindle - isolated Docker network
- isolated MariaDB and Redis services
- dedicated reverse-proxy route:
<internal-runtime-redacted>(legacy aliases<internal-runtime-redacted>and<internal-runtime-redacted>remain redirect-only for compatibility) - dedicated MCP host port and streamable HTTP endpoint
- outbound-only integration to existing OpenClaw and n8n endpoints
Main Components
- ERPNext / Frappe runtime
jhf_spindle_coreapplication layer- custom DocTypes for approval, dispatch, resilience, and integration evidence
- MCP gateway for operator and agent access
- repo-owned infra scripts for bootstrap, alignment, smoke, release, and metadata export
Main Flows
Revenue Events
- Paddle or Stripe sends a webhook to ERPNext
jhf_spindle_corevalidates and records an append-onlyIntegration Event- A normalized
Revenue Eventis created or deduplicated - Downstream posting and reconciliation stay inside ERPNext workflows
Supplier Intake
- n8n or another intake adapter posts supplier invoice metadata
- ERPNext records an append-only
Integration Event Supplier Intakebecomes the review-stage record- A later workflow turns that into purchase invoices and approval packets
OpenClaw Approval Bridge
- ERPNext creates an outbound approval request
Approval Packetpersists the decision context and callback token hash- OpenClaw runs HITL review outside ERPNext
- OpenClaw calls back with the decision
- ERPNext verifies the callback token and updates the packet state
MCP Layer
- An agent connects to the Helpifyr Spindle MCP endpoint
- MCP tools read finance and integration state directly from Frappe
- MCP tools can request approvals or post already-approved staging records
- OpenClaw stays the decision plane and ERPNext stays the system of record
Internal And External Interfaces
Internal:
- custom DocTypes
- background workers and scheduler jobs
- bootstrap, alignment, smoke, and release scripts
External:
- provider webhooks
- signed callbacks from OpenClaw and
n8n - MCP HTTP endpoint
- webhook dispatch toward
jhf-wire
Operating Assumptions
- repo and host should stay aligned to avoid runtime drift
- callback secrets and MCP API keys stay outside git
- reverse-proxy health is part of the runtime contract
- external systems may enrich, review, or orchestrate, but must not replace the ledger
Expected Role Toward jhf-fabric
- expose repo-owned identity, capability, dependency, lifecycle, and integration metadata
- allow Fabric to read presence and operator-safe summaries
- not allow Fabric to bypass approval, posting, or destructive runtime controls
Data Model Additions
Integration Event: append-only ingress and egress event logRevenue Event: normalized payment-provider revenue intakeSupplier Intake: pre-accounting invoice stagingApproval Packet: OpenClaw-facing approval contractSync Cursor: replay and connector progress storageBusiness Identity: business-facing identity source of truthIdentity Account Binding: spindle-to-IdP binding recordAgent Registry Entry: business-owned agent registry metadata- MCP Gateway resources and tools: agent-safe control surface over the existing workflow layer
Localization Baseline
- one ERPNext site
- three companies:
Helpifyr Spindle DEHelpifyr Spindle ATHelpifyr Spindle CH
- retention-profile field on
Company - company-aware naming-series defaults
- placeholders for DE e-invoice export and archiving references
License notice: AGPLv3 (GNU Affero General Public License v3.0)
Website: https://helpifyr.com