How lucaslims/l2sledger works
L2SLedger is a financial cash-flow and audit system with a React SPA and a .NET Clean Architecture backend. The main user journey is to authenticate, manage transactions and financial periods, then inspect balances/reports or request exports; administrators also manage users and audit records. The graph preserves these domain branches and the export worker/storage layer. Source evidence is sampled for authentication, transactions, periods, and exports; other feature links are shown as unverified rather than inferred from naming alone.
Main entry points: AuthenticationService.cs Authentication service · ExportProcessorHostedService.cs Export processor · client.ts HTTP API client · TransactionRepository.cs Transaction persistence
Components 26
Web application
- SPA routes and providers
frontend/src/app/App.tsx - Authentication UI
frontend/src/features/auth/services/authService.ts - HTTP API client
frontend/src/shared/lib/api/client.ts - Transactions UI
frontend/src/features/transactions - Dashboard UI
frontend/src/features/dashboard
API boundary
- Authentication endpoints
backend/src/L2SLedger.API/Controllers/AuthController.cs - Transaction endpoints
backend/src/L2SLedger.API/Controllers/TransactionsController.cs - Period endpoints
backend/src/L2SLedger.API/Controllers/PeriodsController.cs
Financial workflows
- Transaction use cases
backend/src/L2SLedger.Application/UseCases/Transaction - Financial periods
backend/src/L2SLedger.Application/UseCases/Periods - Category management
backend/src/L2SLedger.Application/UseCases/Categories - Balance calculation
backend/src/L2SLedger.Application/Services/PeriodBalanceService.cs - Cash flow reporting
backend/src/L2SLedger.Application/UseCases/Reports - Financial adjustments
backend/src/L2SLedger.Application/UseCases/Adjustments - Export requests
backend/src/L2SLedger.Application/UseCases/Exports
Identity and administration
- Authentication service
backend/src/L2SLedger.Application/UseCases/Auth/AuthenticationService.cs - Firebase token validation
backend/src/L2SLedger.Infrastructure/Identity/FirebaseAuthService.cs - User identity and status
backend/src/L2SLedger.Domain/Entities/User.cs - User administration
backend/src/L2SLedger.Application/UseCases/Users - Immutable audit trail
backend/src/L2SLedger.Application/UseCases/Audit
Persistence and exports
- Export processor
backend/src/L2SLedger.Infrastructure/BackgroundServices/ExportProcessorHostedService.cs - Export file storage
backend/src/L2SLedger.Infrastructure/Services/FileStorageService.cs - Transaction persistence
backend/src/L2SLedger.Infrastructure/Persistence/Repositories/TransactionRepository.cs
Other components
- Ledger user
- Firebase Authentication
- PostgreSQL
Connections 24
- Ledger user → SPA routes and providers: uses
frontend/src/app/App.tsx - SPA routes and providers → Authentication UI: offers login
- Authentication UI → HTTP API client: sends requests
frontend/src/features/auth/services/authService.ts - Ledger user → Transactions UI: manages entries
- Transactions UI → Transaction endpoints: calls API
- Dashboard UI → HTTP API client: requests summaries
- HTTP API client → Authentication endpoints: posts login
- Authentication endpoints → Authentication service: invokes login
backend/src/L2SLedger.API/Controllers/AuthController.cs - Authentication service → Firebase token validation: validates token
backend/src/L2SLedger.Application/UseCases/Auth/AuthenticationService.cs - Firebase token validation → Firebase Authentication: checks credentials
- Authentication service → User identity and status: checks status
backend/src/L2SLedger.Application/UseCases/Auth/AuthenticationService.cs - Transaction endpoints → Transaction use cases: dispatches operations
backend/src/L2SLedger.API/Controllers/TransactionsController.cs - Period endpoints → Financial periods: dispatches operations
backend/src/L2SLedger.API/Controllers/PeriodsController.cs - Transaction use cases → Transaction persistence: uses repository
- Transaction persistence → PostgreSQL: persists records
- Balance calculation → Transaction persistence: reads transactions
backend/src/L2SLedger.Application/Services/PeriodBalanceService.cs - Balance calculation → Category management: reads categories
backend/src/L2SLedger.Application/Services/PeriodBalanceService.cs - Export requests → Export processor: queues work
- Export processor → Export file storage: cleans old files
backend/src/L2SLedger.Infrastructure/BackgroundServices/ExportProcessorHostedService.cs - Export processor → PostgreSQL: updates export records
- Ledger user → User administration: administers accounts
- Ledger user → Immutable audit trail: reviews events
- Ledger user → Cash flow reporting: views cash flow
- Ledger user → Financial adjustments: records adjustments