@classytic/arc-accounting
v0.3.0
Published
Composable double-entry accounting for @classytic/arc apps — Chart of Accounts, Journal Entries, Invoices, AP/AR, fiscal periods, tax. DI-first: inject your engine + permission gates, get arc ResourceDefinitions. Vertical-agnostic (commerce, hotel, …).
Downloads
407
Readme
@classytic/accounting
Composable double-entry accounting for @classytic/arc apps — Chart of Accounts,
Journal Entries, Invoices, AP/AR, fiscal periods, and BD tax. Vertical-agnostic:
inject your engine + permission gates, get arc ResourceDefinitions back.
Status: scaffold / pilot. The DI contract (
types.ts,create-accounting-resources.ts) is in place; resources are being lifted out ofbe-prod/src/resources/accountingone at a time (see the roadmap increate-accounting-resources.ts).
Usage (target shape)
import { createAccountingResources } from '@classytic/accounting';
import { requireRoles } from '@classytic/arc/permissions';
import { requireHeadOfficeAdmin, requireFinanceManager } from '#shared/permissions.js';
const resources = createAccountingResources({
permissions: {
view: requireFinanceManager(),
manage: requireRoles('admin', 'finance_admin'),
post: requireRoles('admin', 'finance_admin'),
headOffice: requireHeadOfficeAdmin(),
},
});
// hand `resources` to your arc resource loader — same as any defineResource().be-prod and hotel-server call this with their own role matrices; the accounting domain (models, repositories, posting service, resource wiring) is identical and lives here once.
Peer dependencies
@classytic/arc, @classytic/mongokit, mongoose, zod — resolved from the host.
This package never bundles them.
