How andiswambonambi08/ronditrack works
RondiTrack is a Minimal API for stokvels (rotating savings groups). Its main workflow is to create users and stokvels, enroll eligible members, create a cycle, then record a member contribution with idempotency protection. Plain CRUD remains in endpoint handlers; cross-entity membership and contribution decisions run through StokvelService and domain rules. The graph also includes centralized validation and Problem Details handling. Endpoint details and the service workflow are supported by sampled source; the README documents user, cycle, mapping, and validation capabilities whose implementations were not all sampled.
Main entry points: StokvelEndpoints.cs Stokvel routes · ContributionCycleEndpoints.cs Cycle routes · StokvelService.cs Stokvel service · UserEndpoints.cs User routes
Components 20
HTTP API
- User routes
Endpoints/UserEndpoints.cs - Stokvel routes
Endpoints/StokvelEndpoints.cs - Cycle routes
Endpoints/ContributionCycleEndpoints.cs - API composition
Program.cs
Business logic
- User domain
Domain/User.cs - Stokvel rules
Domain/Stokvel.cs - Contribution cycle
Domain/ContributionCycle.cs - Contribution record
Domain/Contribution.cs - Stokvel service
Services/StokvelService.cs
In-memory state
- User repository
Data/InMemoryUserRepository.cs - Stokvel repository
Data/InMemoryStokvelRepository.cs - Cycle repository
Data/InMemoryContributionCycleRepository.cs - Idempotency store
Data/InMemoryIdempotencyStore.cs
Contracts and errors
- Request validation
Validation/ValidationFilter.cs - Request validators
Validation/Validators - HTTP DTOs
Dtos - DTO mapping
Mapping - Domain exceptions
Domain/Exceptions/DomainExceptions.cs - Problem responses
ErrorHandling/RondiTrackExceptionHandler.cs
Other components
- API client
Connections 31
- API client → User routes: sends requests
- API client → Stokvel routes: sends requests
- API client → Cycle routes: sends requests
- API composition → User routes: maps routes
- API composition → Stokvel routes: maps routes
- API composition → Cycle routes: maps routes
- User routes → Request validation: validates input
- Stokvel routes → Request validation: validates input
- Cycle routes → Request validation: validates input
- Request validation → Request validators: validates DTOs
- User routes → User repository: CRUD access
- Stokvel routes → Stokvel repository: CRUD access
- Cycle routes → Cycle repository: CRUD access
- Stokvel routes → Stokvel service: delegates decisions
- Stokvel service → Stokvel repository: reads stokvels
- Stokvel service → User repository: reads users
- Stokvel service → Cycle repository: reads cycles
- Stokvel service → Idempotency store: checks and saves
- Stokvel service → Stokvel rules: enforces rules
- Stokvel rules → User domain: checks activity
- Stokvel rules → Contribution record: records contribution
- Cycle routes → Stokvel repository: checks parent
- User routes → DTO mapping: maps responses
- Stokvel routes → DTO mapping: maps responses
- Cycle routes → DTO mapping: maps responses
- DTO mapping → HTTP DTOs: produces responses
- User routes → HTTP DTOs: binds requests
- Stokvel routes → HTTP DTOs: binds requests
- Cycle routes → HTTP DTOs: binds requests
- Problem responses → Domain exceptions: maps failures
- API composition → Problem responses: handles exceptions