“`
BlazorGraphQL – My Library & Anti-Library
A Blazor Server application for tracking both the books I’ve read and the books that continue to widen the horizon of what I still have to learn.
“`Project at a Glance
| Role | Full-stack Developer & Designer |
|---|---|
| Stack | .NET 9 Blazor Server · GraphQL (Hot Chocolate) · EF Core + SQLite · Bootstrap 5 |
| Focus | Book tracking, anti-library thinking, and full-stack application architecture |
| Current Features | Create, view, update, and delete books · Inline editing for status and progress · GraphQL-driven UI updates |
| Timeline | May – June 2025, with continued iteration and refinement |
Project Overview
This project began as a personal library tracker, but it also draws on Nassim Nicholas Taleb’s idea of the anti-library: the collection of unread books that serves not as a sign of ignorance, but as a reminder of the scale of what remains to be learned.
“`I used that concept as a thematic foundation for a Blazor Server application that combines literary aesthetics with practical full-stack engineering. The app allows me to catalog books, track reading progress, update statuses inline, and reflect on what I’ve read while also keeping visible the larger horizon of future inquiry.
On the technical side, the project became an opportunity to work through GraphQL integration, Entity Framework persistence, dependency injection, package modernization, and a more deliberate layered architecture separating Domain, Application, Infrastructure, GraphQL, and UI concerns.
“`Architecture
The application was refactored from a flatter early structure into a layered layout inspired by Clean Architecture principles. The goal was not to over-engineer the project, but to create clearer boundaries between the UI, API surface, application logic, domain entities, and persistence layer.
“`Blazor UI
```
↓
GraphQL Queries / Mutations
↓
Application Services
↓
EF Core AppDbContext
↓
SQLite
“`
Domain/
```
Entities/
Application/
Services/
Infrastructure/
Data/
GraphQL/
Queries/
Mutations/
Pages/
Blazor UI
Screenshots
Technical Highlights
- Blazor Server front end – interactive C#-driven UI without a separate JavaScript framework.
- GraphQL API layer – query and mutation operations powering book creation, retrieval, updates, and deletion.
- EF Core + SQLite persistence – lightweight local storage with migrations and schema evolution.
- Layered architecture – refactored into Domain, Application, Infrastructure, GraphQL, and UI boundaries.
- BookService application layer – centralizes book logic rather than placing everything directly in the UI or data layer.
- Inline editing workflow – allows status and progress changes directly from the book cards.
- Progress normalization – stores progress as a decimal value while presenting it as a user-friendly percentage.
- Destructive action safety – delete flow includes a confirmation step before removal.
Engineering Challenges Solved
- Refactored an initially flat Blazor project into a clearer layered structure.
- Aligned the package ecosystem around .NET 9, EF Core 9, and modern Hot Chocolate GraphQL packages.
- Reworked GraphQL query and mutation classes after older Hot Chocolate patterns became incompatible with the updated stack.
- Resolved UI binding issues in Blazor loops by simplifying event handling and state updates.
- Fixed progress tracking bugs caused by mismatched percentage display values and normalized database values.
- Cleaned up source control after a major project restructuring, excluding local build artifacts and IDE cache files.
Code Samples
Book model snippet
The core entity for the application, representing the shape of the data persisted through EF Core and passed through GraphQL.
AddNewBook snippet
The form submission logic that constructs a GraphQL mutation from user input, posts it to the endpoint, and refreshes the UI after the new book is saved.
FetchBooks.razor snippet
The page-level logic responsible for loading books, rendering the collection, and coordinating front-end interactions with the GraphQL layer.
BookMutation.cs snippet
The GraphQL mutation resolver layer exposing create, update, and delete operations for books through a cleaner backend API surface.
BookQuery.cs snippet
The GraphQL query resolver responsible for exposing the book collection to the Blazor front end in a flexible, query-driven way.
Project Evolution
- Initial CRUD-oriented book catalog prototype
- GraphQL query and mutation integration
- EF Core + SQLite persistence with migrations
- Refactor into layered architecture
- Inline editing for reading status and progress
- Progress normalization and UI-state stabilization
- Git cleanup and repository documentation pass
What This Project Demonstrates
- Designing and building a full-stack application in the .NET ecosystem
- Using GraphQL mutations and queries to drive a Blazor UI
- Refactoring toward a layered architecture after an initial flat structure
- Debugging issues across UI, HTTP, GraphQL, service, and database layers
- Combining a practical software system with a distinct conceptual and visual identity
Coming Next
- Updated screenshots reflecting the current inline editing workflow
- Author and category normalization through richer relational modeling
- Filtering and dashboard views for wishlist, reading, and completed books
- Anti-library analytics showing read versus unread proportions
- Bulk import via CSV, JSON, or image-assisted entry workflows
- Optional authentication for personal or multi-user libraries
Key Takeaway
BlazorGraphQL demonstrates practical experience building, refactoring, and stabilizing a modern .NET web application with Blazor Server, GraphQL, EF Core, SQLite, dependency injection, and layered application design.
