Service Layer medium complexity backend
2
Dependencies
2
Dependents
4
Entities
0
Integrations

Description

Expense Service

Feature: Travel Expense Registration

expense-service

Responsibilities

  • Validate expense claim structure and enforce valid expense-type combinations before persisting
  • Persist claims and line items to expense_claims and expense_items tables in PostgreSQL
  • Apply configurable auto-approval thresholds against organization rules in module_configurations
  • Expose REST endpoints for claim submission, status retrieval, and cancellation
  • Provide stubbed integration hooks for Xledger and Dynamics activated by accounting-system-integration feature flag

Interfaces

POST /api/v1/expense-claims
GET /api/v1/expense-claims/:id
PATCH /api/v1/expense-claims/:id/status
GET /api/v1/expense-claims
validateClaim(claim: ExpenseClaim): ValidationResult
autoApprove(claim: ExpenseClaim, orgConfig: ModuleConfig): boolean

Relationships

Dependencies (2)

Components this component depends on

Dependents (2)

Components that depend on this component