Technical note · Enes Küçükpehlivan
A shared .NET API for mobile and web
Boundaries between clients, business rules and data access, using the Minenin Dünyası architecture.
- Flutter / Vue
- Web API
- Business
- Dapper / PostgreSQL
Multiple clients, shared business rules
In Minenin Dünyası, Flutter and Vue clients connect to the same business layer through an ASP.NET Core 8 Web API. This boundary allows shared rules to live on the server instead of being duplicated across clients.
API contracts and authentication
JWT Bearer authentication and Swagger/OpenAPI belong to the API layer. Authentication establishes identity; resource-level authorization needs separate consideration. OpenAPI helps clients understand and exercise a shared contract.
Business / DB / Models boundaries
The project separates business logic, data access and models. Dapper and Npgsql handle PostgreSQL access. Dapper gives direct control over queries, with the corresponding responsibility for query maintenance and explicit mapping. Choosing a data access library alone does not guarantee performance.
Client responsibilities
Flutter uses Dio and Riverpod, while Vue uses Axios and Pinia. Clients focus on presentation and local state, with shared business rules on the API side. Firebase Admin and FCM support notifications.
Tradeoffs
A shared API couples clients to its contract. Future changes should account for compatibility, error responses and version transitions. This note describes the architecture; it makes no load-testing or measured performance claims.