FinanceOS is a reusable TypeScript operating layer for finance features across Appneural platforms and ERPs.
It covers:
- Customers and vendors
- Chart of accounts
- Tax rules
- Invoices and billing
- Payments
- Refunds
- Expenses and approvals
- Subscription plans and recurring billing
- Budgets
- Double-entry ledger entries
- Profit and loss report
- Receivables aging report
- Finance analytics
- Event logs
- Audit logs
- Role-based permissions
Runtime Node.js >= 20
Language TypeScript
Storage JSON file store for starter use
Database PostgreSQL schema included for production migration
Dependencies nonenpm run build
npm startDefault server:
http://localhost:4900Health:
GET /healthDocs:
GET /docsFinanceOS starts with demo data for:
Tenant: demo-tenant
Customers: cust_demo_acme, cust_demo_retail
Vendors: vend_demo_cloud, vend_demo_media
Tax rules: tax_gst_18, tax_gst_5, tax_zero
Invoices: inv_demo_paid, inv_demo_open
Plan: plan_demo_growth
Subscription: sub_demo_acme
Budgets: budget_demo_marketing, budget_demo_cloudReset seed data:
npm run resetUse these headers when calling protected APIs:
x-tenant-id: demo-tenant
x-user-id: admin-user
x-role: finance_adminSupported roles:
viewer
finance_clerk
billing_agent
accountant
finance_manager
tax_manager
finance_admin
admin
owner
auditorcurl -H "x-role: finance_admin" http://localhost:4900/financeos/overviewcurl -X POST http://localhost:4900/financeos/customers \
-H "Content-Type: application/json" \
-H "x-role: finance_admin" \
-d '{
"displayName": "New Client Pvt Ltd",
"email": "finance@newclient.example",
"paymentTermsDays": 15
}'curl -X POST http://localhost:4900/financeos/invoices \
-H "Content-Type: application/json" \
-H "x-role: finance_admin" \
-d '{
"customerId": "cust_demo_acme",
"lineItems": [
{
"description": "CommerceOS implementation",
"quantity": 1,
"unitPrice": 5000,
"taxRuleId": "tax_gst_18"
}
]
}'curl -X POST http://localhost:4900/financeos/invoices/INVOICE_ID/send \
-H "x-role: finance_admin"curl -X POST http://localhost:4900/financeos/payments \
-H "Content-Type: application/json" \
-H "x-role: finance_admin" \
-d '{
"invoiceId": "INVOICE_ID",
"amount": 5900,
"method": "upi"
}'curl -X POST http://localhost:4900/financeos/expenses \
-H "Content-Type: application/json" \
-H "x-role: finance_admin" \
-d '{
"vendorId": "vend_demo_cloud",
"category": "Cloud",
"description": "Server hosting",
"amount": 2500,
"taxAmount": 450
}'GET /financeos/reports/profit-loss
GET /financeos/reports/agingsrc/
├── core/
│ ├── datastore.ts
│ ├── domain.ts
│ ├── event-bus.ts
│ ├── http.ts
│ └── security.ts
│
├── engines/
│ ├── tax-engine.ts
│ └── ledger-engine.ts
│
├── services/
│ └── finance.service.ts
│
├── modules/
│ └── routes.ts
│
├── seed-state.ts
└── main.tsThis starter uses a JSON file store so it can run without installing a database. For production:
- Replace
DataStorewith PostgreSQL repositories. - Use the schema in
database/schema.sql. - Add idempotency keys for payment and refund APIs.
- Integrate real payment gateways and tax engines.
- Enforce SecurityOS permissions centrally.
- Publish
finance.*events to AutomationOS and AnalyticsOS. - Add background jobs for recurring subscription billing and overdue invoice detection.
npm testThe test suite covers:
- Seed overview and analytics
- Invoice creation, send, payment, and ledger posting
- Refund processing
- Expense submission, approval, payment, budgets, and P&L
- Subscription invoice generation
- Role permissions
- Official package:
@appneurox/financeos - Manifest:
manifest.json - Domain API namespace:
/v1/finance - Modes: standalone and PlatformOS integrated
- Related systems: CommerceOS, BusinessOS
See docs/planning.md for the planning contract applied from APPNEURAL Plannings/OSs.