How maikho/myhomepage works
Purpose and Runtime
MaikHo is a personal .NET 10 modular-monolith platform for a public Markdown portfolio/blog and an authenticated single-user workspace. It runs as an ASP.NET Core Blazor Web App with Interactive Server Rendering; Radzen supports private management UI. The executable composition root is src/MaikHo.Web/Program.cs, with Razor routing rooted in src/MaikHo.Web/Components/Routes.razor.
Layered Modular Monolith
The intended dependency flow is Web → Application → Domain/Contracts, with Infrastructure implementing Application ports. Core projects are src/MaikHo.Domain/MaikHo.Domain.csproj, src/MaikHo.Application/MaikHo.Application.csproj, and src/MaikHo.Infrastructure/MaikHo.Infrastructure.csproj. Application services own use cases and depend on repository/storage abstractions rather than SQLite, filesystems, or HTTP directly.
Public Portfolio Content Pipeline
Public routes render Markdown-backed pages, projects, and blog content through Razor pages such as src/MaikHo.Web/Components/Pages/Blog.razor and src/MaikHo.Web/Components/Pages/BlogPost.razor. Content is read from repository-shipped content/ but may be overlaid by a configured published-content root. Markdown parsing, target selection, link policy, and filesystem publishing sit in src/MaikHo.Infrastructure/Portfolio/MarkdownPublicContentRepository.cs and src/MaikHo.Infrastructure/Portfolio/MarkdownPublicContentPublisher.cs.
Private Authentication Boundary
/setup, /login, and /app establish a closed single-user browser experience. The web-facing sign-in behavior is in src/MaikHo.Web/Authentication/PrivateSignInService.cs; persistent user lookup/setup is isolated behind src/MaikHo.Application/Authentication/IPrivateUserStore.cs and implemented by src/MaikHo.Infrastructure/Authentication/SqlitePrivateUserStore.cs. Private pages and file actions must be server-authorized; no public registration is intended.
Private Workspace Modules
Notes, todos, startpage links, documents, and public-content authoring are separate application modules with service-centered use cases:
• Notes: src/MaikHo.Application/Notes/NoteService.cs, UI in src/MaikHo.Web/Components/Pages/Notes.razor.
• Todos: src/MaikHo.Application/Todos/TodoService.cs, UI in src/MaikHo.Web/Components/Pages/Todos.razor.
• Startpage: src/MaikHo.Application/Startpage/StartpageService.cs, UI in src/MaikHo.Web/Components/Pages/Startpage.razor.
• Content publication: src/MaikHo.Application/Portfolio/PublicContentPublisherService.cs, UI in src/MaikHo.Web/Components/Pages/PublicContentPublisher.razor.
Persistence, Files, and External HTTP
SQLite repositories use handwritten parameterized SQL, including src/MaikHo.Infrastructure/Notes/SqliteNoteRepository.cs, src/MaikHo.Infrastructure/Todos/SqliteTodoRepository.cs, and src/MaikHo.Infrastructure/Documents/SqliteDocumentRepository.cs. PDFs are validated and modeled by the Documents application module, then stored outside web root via src/MaikHo.Infrastructure/Documents/LocalPrivateDocumentFileStore.cs; download/view flows originate in src/MaikHo.Web/Components/Pages/DocumentViewer.razor. Startpage metadata retrieval is an outbound HTTP boundary in src/MaikHo.Infrastructure/Startpage/HttpStartpageLinkMetadataReader.cs.
Deployment and Future Boundary
Production is planned as Kestrel bound to localhost behind Caddy on Ubuntu, managed by systemd; deployment contracts are captured in docs/deployment/ubuntu-server.md and docs/decisions/ADR-0007-caddy-reverse-proxy.md. SQLite, private document objects, published-content overlay, and data-protection keys are host-managed persistent paths. A versioned /api/v1 and Avalonia client are explicitly future work; current browser authentication must remain distinct from the future OIDC/PKCE-native API boundary.
Main entry points: Program.cs ASP.NET Core composition · ubuntu-server.md Ubuntu reverse-proxy deployment · Routes.razor Razor routes · MarkdownPublicContentRepository.cs Markdown public content
Components 22
Web host & UI
- ASP.NET Core composition · Blazor Interactive Server host and dependency composition root.
src/MaikHo.Web/Program.cs - Razor routes
src/MaikHo.Web/Components/Routes.razor - Public blog pages
src/MaikHo.Web/Components/Pages/Blog.razor - Blog post page
src/MaikHo.Web/Components/Pages/BlogPost.razor - Private sign-in · Establishes the closed single-user browser session.
src/MaikHo.Web/Authentication/PrivateSignInService.cs - Private workspace UI · Server-authorized management pages for private modules.
- Document viewer
src/MaikHo.Web/Components/Pages/DocumentViewer.razor
Application & domain
- Domain model
src/MaikHo.Domain/MaikHo.Domain.csproj - Application layer · Use cases depend on domain contracts and ports.
src/MaikHo.Application/MaikHo.Application.csproj - Private user store port
src/MaikHo.Application/Authentication/IPrivateUserStore.cs - Notes use cases
src/MaikHo.Application/Notes/NoteService.cs - Todo use cases
src/MaikHo.Application/Todos/TodoService.cs - Startpage use cases
src/MaikHo.Application/Startpage/StartpageService.cs - Content publication use cases
src/MaikHo.Application/Portfolio/PublicContentPublisherService.cs - Documents use cases · Validates and models private PDF documents.
Infrastructure
- Markdown public content · Reads repository content and the published-content overlay.
src/MaikHo.Infrastructure/Portfolio/MarkdownPublicContentRepository.cs - Markdown publisher · Selects targets, applies link policy, and publishes content files.
src/MaikHo.Infrastructure/Portfolio/MarkdownPublicContentPublisher.cs - SQLite private user store
src/MaikHo.Infrastructure/Authentication/SqlitePrivateUserStore.cs - SQLite workspace repositories · Handwritten parameterized SQL persists notes, todos, and document metadata.
src/MaikHo.Infrastructure/Notes/SqliteNoteRepository.cs - Private document file store · Stores PDFs outside the web root.
src/MaikHo.Infrastructure/Documents/LocalPrivateDocumentFileStore.cs - Link metadata HTTP
src/MaikHo.Infrastructure/Startpage/HttpStartpageLinkMetadataReader.cs
Host operations
- Ubuntu reverse-proxy deployment · Kestrel on localhost behind Caddy and systemd; persistent paths are host-managed.
docs/deployment/ubuntu-server.md
Connections 29
- ASP.NET Core composition → Razor routes: hosts
- ASP.NET Core composition → Application layer: composes
- ASP.NET Core composition → Markdown public content: registers
- ASP.NET Core composition → SQLite private user store: registers
- Razor routes → Public blog pages: public routes
- Razor routes → Private sign-in: /setup, /login
- Razor routes → Private workspace UI: /app
- Public blog pages → Blog post page: navigates to
- Public blog pages → Markdown public content: reads content
- Blog post page → Markdown public content: reads Markdown
- Private sign-in → Private user store port: uses
- Private user store port → SQLite private user store: implemented by
- Private workspace UI → Notes use cases: notes
- Private workspace UI → Todo use cases: todos
- Private workspace UI → Startpage use cases: startpage
- Private workspace UI → Content publication use cases: authoring
- Document viewer → Documents use cases: views and downloads
- Application layer → Domain model: depends on
- Notes use cases → SQLite workspace repositories: persists
- Todo use cases → SQLite workspace repositories: persists
- Documents use cases → SQLite workspace repositories: stores metadata
- Documents use cases → Private document file store: stores PDFs
- Startpage use cases → Link metadata HTTP: retrieves metadata
- Content publication use cases → Markdown publisher: publishes
- Markdown publisher → Markdown public content: writes overlay read by
- Ubuntu reverse-proxy deployment → ASP.NET Core composition: runs Kestrel
- Ubuntu reverse-proxy deployment → SQLite workspace repositories: hosts persistent data
- Ubuntu reverse-proxy deployment → Private document file store: hosts persistent files
- Ubuntu reverse-proxy deployment → Markdown publisher: hosts content overlay