How fxagro/akur works
Akur is an Indonesian modular ERP centered on company-scoped accounting workflows: users manage business records and transactions, then review ledgers and financial or tax reports. The web application pairs Next.js pages and client components with server actions, accounting logic, and Prisma-backed persistence; authentication and permissions provide a shared internal layer. The repository also includes a CLI for creating and managing modules. Several domain capabilities are documented in the README but their implementation was not sampled, so those branches are shown at subsystem level and undocumented links are omitted.
Main entry points: (app) ERP pages · prisma.ts Prisma client · index.ts CLI command router · posting.ts Automatic posting
Components 29
ERP application
- ERP pages
src/app/(app) - Prisma client
src/lib/prisma.ts
Business modules
- Sales and receipts
src/lib/actions/sales-actions.ts - Purchases and payments
src/lib/actions/purchase-actions.ts - Customers and suppliers
src/lib/actions/partner-actions.ts - Inventory
src/lib/actions/inventory-actions.ts - Bank and reconciliation
src/lib/actions/bank-actions.ts - Bank transactions
src/lib/actions/bank-transaction-actions.ts - Tax
src/lib/actions/tax-actions.ts - Fixed assets
src/lib/actions/asset-actions.ts - Depreciation
src/lib/actions/depreciation-actions.ts
Accounting core
- Chart of accounts
src/lib/actions/account-actions.ts - Journal entries
src/lib/actions/journal-actions.ts - Journal logic
src/lib/accounting/journal.ts - Automatic posting
src/lib/accounting/posting.ts - Financial reports
src/lib/accounting/reports.ts - General ledger
src/app/(app)/ledger/page.tsx
Identity and access
- Session and permissions
src/lib/auth-context.ts - Session management
src/lib/auth.ts - Login actions
src/lib/actions/auth-actions.ts
Module manager
- CLI command router
packages/cli/src/index.ts - Create module
packages/cli/src/commands/create.ts - Initialize project
packages/cli/src/commands/init.ts - List modules
packages/cli/src/commands/list.ts - Module catalog
packages/registry/src/catalog.ts - Module installer
packages/registry/src/installer.ts
Other components
- ERP user
- PostgreSQL database
- CLI operator
Connections 35
- ERP user → ERP pages: uses
- ERP pages → Session and permissions: checks access
src/app/(app)/ledger/page.tsx - ERP pages → Sales and receipts: manages sales
- ERP pages → Purchases and payments: manages purchases
- ERP pages → Customers and suppliers: manages partners
- ERP pages → Inventory: manages stock
- ERP pages → Bank and reconciliation: manages banking
- ERP pages → Bank transactions: records transactions
- ERP pages → Tax: manages tax
src/app/(app)/tax/spt-ppn/page.tsx - ERP pages → Fixed assets: manages assets
- ERP pages → Depreciation: records depreciation
- ERP pages → Chart of accounts: manages accounts
src/app/(app)/accounts/accounts-client.tsx - ERP pages → Journal entries: records journals
- ERP pages → General ledger: views ledger
src/app/(app)/ledger/page.tsx - General ledger → Session and permissions: requires permission
src/app/(app)/ledger/page.tsx - ERP pages → Financial reports: views reports
- Sales and receipts → Automatic posting: posts automatically
- Purchases and payments → Automatic posting: posts automatically
- Journal entries → Journal logic: uses journal logic
- Automatic posting → Journal logic: uses journal logic
- Login actions → Session management: manages sessions
src/lib/actions/auth-actions.ts - Session management → Prisma client: stores sessions
src/lib/auth.ts - Session and permissions → Prisma client: loads session
src/lib/auth-context.ts - Chart of accounts → Prisma client: reads and writes
src/lib/actions/account-actions.ts - Inventory → Prisma client: reads and writes
src/lib/actions/inventory-actions.ts - Customers and suppliers → Prisma client: reads and writes
src/lib/actions/partner-actions.ts - Fixed assets → Prisma client: reads and writes
src/lib/actions/asset-actions.ts - Tax → Prisma client: reads and writes
src/lib/actions/tax-actions.ts - Prisma client → PostgreSQL database: connects to
src/lib/prisma.ts - CLI operator → CLI command router: runs commands
packages/cli/src/index.ts - CLI command router → Create module: dispatches
packages/cli/src/index.ts - CLI command router → Initialize project: dispatches
packages/cli/src/index.ts - CLI command router → List modules: dispatches
packages/cli/src/index.ts - List modules → Module catalog: reads catalog
packages/cli/src/commands/list.ts - CLI command router → Module installer: dispatches install
packages/cli/src/index.ts