How pratikgholam/loan-application-api works
This is an ASP.NET Core REST API for applicants to register, create profiles, submit and track loan applications, and for loan officers/admins to review them and view status summaries. The main workflow runs from the application controller through the application service to loan-domain transitions and PostgreSQL persistence; status changes append audit history. Authentication and reporting are separate branches. Some links are grounded in README statements or the source index rather than complete excerpts, so those links are marked dashed when the runtime call is not directly shown.
Main entry points: ApplicationsController.cs Applications API · AuthController.cs Authentication API · ApplicationService.cs Application service · ReportService.cs Status reporting
Components 17
API endpoints
- Applications API
src/LoanApplication.Api/Controllers/ApplicationsController.cs - Authentication API
src/LoanApplication.Api/Controllers/AuthController.cs - Reports API
src/LoanApplication.Api/Controllers/ReportsController.cs - API contracts
src/LoanApplication.Api/DTOs
Identity and access
- Current user
src/LoanApplication.Api/Common/CurrentUserService.cs - User and roles
src/LoanApplication.Api/Entities/User.cs - Password hashing
src/LoanApplication.Api/Services/PasswordHasher.cs - JWT tokens
src/LoanApplication.Api/Services/TokenService.cs
Loan lifecycle
- Application service
src/LoanApplication.Api/Services/ApplicationService.cs - Loan lifecycle
src/LoanApplication.Api/Entities/Loan.cs - Status history
src/LoanApplication.Api/Entities/StatusHistory.cs - Applicant profile
src/LoanApplication.Api/Entities/Applicant.cs
Persistence and reporting
- EF Core context
src/LoanApplication.Api/Data/AppDbContext.cs - PostgreSQL
- Status reporting
src/LoanApplication.Api/Services/ReportService.cs
Other components
- Applicant
- Loan officer
Connections 19
- Applicant → Authentication API: registers or logs in
README.md - Applicant → Applications API: submits and tracks
README.md - Loan officer → Applications API: reviews applications
README.md - Loan officer → Reports API: requests summaries
README.md - Applications API → Application service: dispatches
src/LoanApplication.Api/Controllers/ApplicationsController.cs - Applications API → Current user: gets identity
src/LoanApplication.Api/Controllers/ApplicationsController.cs - Applications API → API contracts: accepts and returns
src/LoanApplication.Api/Controllers/ApplicationsController.cs - Application service → EF Core context: reads and writes
src/LoanApplication.Api/Services/ApplicationService.cs - Application service → Loan lifecycle: creates and transitions
src/LoanApplication.Api/Services/ApplicationService.cs - Application service → Applicant profile: loads and creates
src/LoanApplication.Api/Services/ApplicationService.cs - Loan lifecycle → Status history: appends transitions
src/LoanApplication.Api/Entities/Loan.cs - EF Core context → PostgreSQL: persists data
README.md - Authentication API → EF Core context: reads and writes users
src/LoanApplication.Api/Controllers/AuthController.cs - Authentication API → Password hashing: hashes credentials
src/LoanApplication.Api/Controllers/AuthController.cs - Authentication API → JWT tokens: issues tokens
src/LoanApplication.Api/Controllers/AuthController.cs - User and roles → Current user: provides role identity
src/LoanApplication.Api/Common/CurrentUserService.cs - Reports API → Status reporting: requests summary
src/LoanApplication.Api/Controllers/ReportsController.cs - Status reporting → PostgreSQL: queries aggregates
README.md - Status reporting → API contracts: returns summary DTO
src/LoanApplication.Api/Services/ReportService.cs