How rocafi/api_banca works
Project type and purpose
• API_Banca is a backend Web API built on .NET 8. Its sole responsibility is to expose RESTful endpoints for managing Users, Accounts and Transactions in a simple banking context. It uses Entity Framework Core over a SQLite file-based database. There is also a separate unit-test project (API_Banca.Tests).
File structure
• Top level:
• API_Banca.sln – solution file.
• API_Banca/ – main Web API project.
• API_Banca.Tests/ – unit tests.
• README.md, .gitignore, etc.
• Inside API_Banca:
• Controllers/ – HTTP layer (AccountController, TransactionController, UserController).
• Services/ – business logic for each aggregate (AccountServices, TransactionServices, UserServices).
• Data/ – EF Core DataContext.
• Models/ – POCOs: User, Account, Transaction.
• Program.cs & launchSettings.json – app host and configuration (DI container, middleware).
• appsettings.json and SQLite files.
• Tests:
• Verify service and data logic via in-memory or test database helpers.
README for additional insights
• Confirms it’s a simple CRUD API.
• Endpoints grouped by resource path (/api/user, /api/account, /api/transaction).
• Notes the DB resets by default on startup (EnsureDeleted() in Program.cs).
• Shows test execution via dotnet test.
Elements
Client → Controllers → Services → DataContext → SQLite
• Blue for runtime components (Host, Controllers, Services).
• Green for persistence (DataContext, SQLite).
• Orange for external pieces (Client, Tests).
• Rectangles for code components.