Hello,
I am working on a wiki-style encyclopedic resource application designed to centralize and organize documentation related to the universe of my fantasy novel. This project is personal and primarily has a pedagogical purpose (training myself on modern architectures and anticipating a future move to microservices). At the same time, I want to obtain a robust and scalable foundation to avoid having to rewrite everything at each new iteration.
Some key points about my context:
- Limited budget: my goal is to keep costs around €10/month on Azure, which excludes for now the use of multiple databases or complex container orchestration.
- Minimal Azure infrastructure: a single App Service and a single database to host the entire solution.
- Small team: I am the sole developer (“one-man team” approach), although I occasionally benefit from feedback or virtual assistants.
- Time constraint: this is a long-term project, carried out in irregular phases depending on my availability.
- Current usage: the application is almost exclusively used by myself, with possibly two or three secondary users. However, I want to anticipate scalability for broader use in the medium term.
- History: this is the eighth version of my project, started several years ago. Each version allowed me to experiment with the evolution of .NET (the first iteration going back to .NET 3.5).
- Main objective: to have a modular and scalable architecture, avoiding complete rewrites at every technological change.
- Architectural vision: remain for now on an organized monolith, but ensure that the structure is “microservices ready” for a future evolution.
- Design principles: follow DRY and SOLID best practices to obtain a healthy and maintainable foundation.
Chosen Software Architecture
The implemented architecture is based on a modular monolith. It remains simple to respect my current constraints but is designed to be able to evolve towards a distributed architecture if necessary.
Shared/Base Layer
A common project gathers:
- Interfaces and cross-cutting abstractions (e.g., DbContext, initialization).
- Elements related to dependency injection and utilities.
This base ensures consistency and reduces redundancy between domains.
Business Domains
Each functional domain is isolated in a dedicated project:
- Currently, only the Content domain is developed (content management, with front-office and back-office).
- A topic has a mandatory summary and a set of chapters.
- Each chapter contains one or more sections.
- In the future, other domains will follow, such as Audit to log all changes.
Each domain project contains:
- Repositories (data access)
- Business services
- Fluent API (DbContext and relationship configuration)
Business Models
The EF Core entities defined in the Model projects are used directly up to the Blazor front-end:
- This choice avoids, for now, the multiplication of DTOs or ViewModels.
- Since the entities already reflect what must be displayed, this approach keeps the project lighter and more readable.
Data Seeders
Two types of seeders are planned:
- Actual Data Seeders (import of real data)
- Dummy Data Seeders (generation of test data)
They can be executed independently via PMC or via YAML pipelines.
Unified API
A single API gathers all the functionalities exposed by the domains:
- It acts as a gateway between the Blazor front-end and the business logic.
- This choice simplifies maintenance and remains compatible with a future evolution toward a microservices split.
Blazor Front-End
The front-end is developed in Blazor, which directly consumes the API:
- This architecture allows a clear separation between logic and presentation.
- It remains extensible: the front could be rewritten or replaced without affecting the business logic.
Global Breakdown
+------------------+
| Front-End |
| Blazor (UI) |
+------------------+
|
V
+------------------+
| API |
| (unified) |
+---------+--------+
|
V
---------------------------------------------------------
| |
V V
+---------------+ +---------------+
| Domain 1 | | Domain 2 |
| (Services, | | (Services, |
| Repos, |---- ----| Repos, |
| DbContext, | | | | DbContext, |
| Fluent API) | | | | Fluent API) |
+------+--------+ | | +------+--------+
| | | |
V | | V
+---------------+ | | +---------------+
| Model 1 | | | | Model 2 |
| (EF Entities) | | | | (EF Entities) |
+---------------+ | | +---------------+
| |
\___________ __________/
|
V
+-----------------------------+
| Shared / Base Layer |
| (Interfaces, abstractions |
| DbContext, DI, utilities) |
+-----------------------------+
Questions and Validation Points
Choice of Blazor mode
- For now, Blazor Server seems the most suitable choice (cf. Patrick God’s resources on YouTube).
- Question: to what extent will it be possible to migrate later to Blazor Auto (Server + WASM)?
- What constraints should I anticipate today to keep this option open?
Security and Account Management
- I want to use Identity with individual accounts.
- With the architecture separating the front (Blazor) and the back (API), I wonder where to place the security logic.
- Current assumption: authentication via JWT, with validation on the API side.
- Questions:
- Should I create an Accounts domain with specific controllers to manage users and roles?
- Or should I keep the Identity implementation on the Blazor side, and only expose an API for administration (locking, role assignment, etc.)?
Relevance of the Current Architecture
- I chose a modular monolith with separate projects per domain.
- Objectives:
- Pedagogical (learning a “microservices ready” approach)
- Practical (being able to replace the front without rewriting everything)
- Question: is this choice relevant, or is it disproportionate (over-engineered) for my context?
Direct Use of Entities
- My business entities directly reflect what must be displayed.
- I therefore do without DTOs or ViewModels.
- Question: is this acceptable in a project of this type, or should I plan for a DTO layer from the start?
Thanks
Thank you in advance for the time you will take to read this detailed version and share your feedback. Your advice is very valuable for validating my choices and progressing in this project.