The finance stack is the first place many people look in an ERP, and in the tdk-erp-system example it is one of seven domain stacks. It contains fifteen resources: fourteen backend APIs and one React dashboard. This article walks through what they are, how to start them, and how to check them.
What runs
The backends are Hono 4 services on Bun. Each one covers one part of financial work:
-
general-ledger-apihandles core financial accounting. -
accounts-payable-apimanages vendor payments. -
accounts-receivable-apihandles customer invoicing. -
budgeting-apicovers budget planning and control. -
financial-reporting-apiproduces financial statements. -
tax-compliance-apihandles tax calculation and filing. -
payroll-processing-apicalculates payroll. -
revenue-recognition-apicovers revenue accounting. -
audit-trail-apilogs financial audit events.
Others cover expenses, fixed assets, cash flow, banking connectivity, cost allocation, and financial analytics. The frontend, finance-dashboard-app, is a Vite 5 and React app for executives.
Ports
The backends use ports 4010 to 4024, and the dashboard uses port 3010. Each backend exposes a /health route, which the README links directly, so you can check a service in a browser or with curl.
Starting the stack
With Docker running and TDK CLI installed, start the finance stack from the repository root:
tdk doctor --json
tdk up finance
Before starting, you can read the plan without starting anything:
tdk up finance --dry-run
Checking it
Ask for readiness rather than assuming it:
tdk status --json
If a service fails, read its recent output:
tdk logs --json --service general-ledger-api --tail 200
Open the dashboard on port 3010 once the backends report ready. If the dashboard loads but shows errors, start with the backend it calls, not the dashboard.
Dependencies
Services declare their dependencies in service.json, using dependsOn. A reporting service that reads from the ledger should list the ledger as a dependency, so TDK starts the ledger first. The finance stack is a good place to check how that works, because most of its services share the ledger's data.
Stopping
When you are done, stop the stack:
tdk down
Summary
The finance stack is fifteen resources on known ports, started with one command and checked with two. Keep the readiness output in view, read logs for the first error, and check the backend before the dashboard.
Top comments (0)