This project is a clean, modular Banking API built with FastEndpoints, following the REPR pattern (Request, Endpoint, Response) — a modern, streamlined alternative to traditional MVC architecture. The API emphasizes clear separation of concerns and lightweight endpoint definition. It features role-based access control with three roles:
The backend is powered by Event Sourcing, implemented with MartenDb, providing full traceability and consistency through immutable event logs.

UML use case diagram
BankAccount (Read model)
Failed to fetch :(
GistUrl : https://gist.githubusercontent.com/basdidon/69f8c2f00ff92a9a19f2892941db6174/raw/5a82b8b2e360fa76c08534317f25ab1a2069c8fb/BankAccount.cs
OpenThis file defines the read model for a bank account. The BankAccount class represents the current state of a user's bank account. Key properties include:
Events
These immutable event records represent actions that occur over time. They include:
Failed to fetch :(
GistUrl : https://gist.githubusercontent.com/basdidon/69f8c2f00ff92a9a19f2892941db6174/raw/5a82b8b2e360fa76c08534317f25ab1a2069c8fb/events.cs
OpenBankAccountProjection
Failed to fetch :(
GistUrl : https://gist.githubusercontent.com/basdidon/69f8c2f00ff92a9a19f2892941db6174/raw/e63f8ba016410fc9adcb69a7e28aef216a346a11/BankAccountProjection.cs
OpenThis class maps events to changes in the BankAccount state using Marten's SingleStreamProjection<T>
To prevent a Teller or Admin from arbitrarily withdrawing funds from an account owned by a regular user, additional logic is required. When a user intends to make a withdrawal, they must inform the Teller, who then sends a withdrawal request to the server. The server generates and sends a One-Time Password (OTP) to the user. The user provides the OTP to the Teller, who then submits a withdrawal confirmation request to complete the process.