How tmuhammadqodir/libraryofbooks works
LibraryOfBooks is an online library with a Blazor UI and ASP.NET Web API: users can sign in, browse books, and add books of their own. The principal flow is UI requests to API endpoints, service-layer book handling, and persistence; book creation also uploads image and document assets. The product includes categories, user accounts, comments, favorites, likes, and profile assets. The excerpts show book-service persistence and asset calls, but not all controller-to-service wiring or UI request targets, so those links are marked unverified or omitted.
Main entry points: Controllers API endpoints · AppDbContext.cs Library database · Program.cs Library UI · BookService.cs Book catalog
Components 18
Blazor client
- Library UI
web/LibraryOfBooks.Web/Program.cs - Client services
web/LibraryOfBooks.Web/Services - Auth state
web/LibraryOfBooks.Web/Services/CustomAuthenticationStateProvider.cs
HTTP API
- API endpoints
src/LibraryOfBooks.WebApi/Controllers - Error handling
src/LibraryOfBooks.WebApi/Middlewares/ExceptionHandlerMiddleware.cs
Application services
- Authentication
src/LibraryOfBooks.Service/Services/AuthService.cs - Book catalog
src/LibraryOfBooks.Service/Services/BookService.cs - Categories
src/LibraryOfBooks.Service/Services/BookCategoryService.cs - User accounts
src/LibraryOfBooks.Service/Services/UserService.cs - Comments
src/LibraryOfBooks.Service/Services/CommentService.cs - Asset files
src/LibraryOfBooks.Service/Services/AssetService.cs
Data and domain
- Generic repository
src/LibraryOfBooks.DataAccess/Repositories/Repository.cs - Library database
src/LibraryOfBooks.DataAccess/Contexts/AppDbContext.cs - Book model
src/LibraryOfBooks.Domain/Entities/Book.cs - User model
src/LibraryOfBooks.Domain/Entities/User.cs - Category model
src/LibraryOfBooks.Domain/Entities/BookCategory.cs - Asset model
src/LibraryOfBooks.Domain/Entities/Asset.cs
Other components
- Library user
Connections 17
- Library user → Library UI: uses
- Library UI → Client services: invokes
web/LibraryOfBooks.Web/Program.cs - Client services → API endpoints: requests
- Library UI → Auth state: tracks sign-in
web/LibraryOfBooks.Web/Program.cs - API endpoints → Authentication: dispatches
- API endpoints → Book catalog: dispatches
- API endpoints → Categories: dispatches
- API endpoints → User accounts: dispatches
- API endpoints → Comments: dispatches
- Book catalog → Generic repository: reads and writes
src/LibraryOfBooks.Service/Services/BookService.cs - Book catalog → Asset files: uploads and removes
src/LibraryOfBooks.Service/Services/BookService.cs - Authentication → Generic repository: looks up user
src/LibraryOfBooks.Service/Services/AuthService.cs - Generic repository → Library database: queries and saves
src/LibraryOfBooks.DataAccess/Repositories/Repository.cs - Library database → Book model: maps
src/LibraryOfBooks.DataAccess/Contexts/AppDbContext.cs - Library database → User model: maps
src/LibraryOfBooks.DataAccess/Contexts/AppDbContext.cs - Library database → Category model: maps
src/LibraryOfBooks.DataAccess/Contexts/AppDbContext.cs - Library database → Asset model: maps
src/LibraryOfBooks.DataAccess/Contexts/AppDbContext.cs