How westamz/bookshelf works
Bookshelf is a React/.NET digital library: users authenticate, browse and search the catalog, and inspect book and author details. The frontend routes pages through domain services to the API; backend controllers access the relational library and identity context. The graph retains account, comment, genre, author, book, and seeded-data capabilities documented in the README. Edges are limited to relationships evidenced by excerpts, the source index, or README; unexcerpted feature wiring is not inferred.
Main entry points: ApplicationDbContext.cs EF and Identity context · router.tsx Routes and access · books Book pages · auth Login and register
Components 20
Web client
- Routes and access
frontend/src/router.tsx - Book pages
frontend/src/pages/books - Author pages
frontend/src/pages/authors - Login and register
frontend/src/pages/auth - Auth state
frontend/src/contexts/AuthContext.tsx - Book service
frontend/src/services/BooksService.ts - Author service
frontend/src/services/AuthorsService.ts - Auth service
frontend/src/services/AuthService.ts - Genre service
frontend/src/services/GenreService.ts
API services
- Account endpoints
backend/BookshelfAPI/Controllers/AccountController.cs - Book endpoints
backend/BookshelfAPI/Controllers/BooksController.cs - Author endpoints
backend/BookshelfAPI/Controllers/AuthorController.cs - Genre endpoints
backend/BookshelfAPI/Controllers/GenreController.cs - Comment endpoints
backend/BookshelfAPI/Controllers/CommentsController.cs
Library domain
- Library entities
backend/BookshelfAPI/Entities - Sample data seeder
backend/BookshelfAPI/Data/DbSeeder.cs
Data and identity
- EF and Identity context
backend/BookshelfAPI/ApplicationDbContext.cs
Other components
- Reader
- Bookshelf API
- SQL Server
Connections 28
- Reader → Routes and access: navigates
frontend/src/router.tsx - Routes and access → Book pages: routes to
frontend/src/router.tsx - Routes and access → Author pages: routes to
frontend/src/router.tsx - Routes and access → Login and register: routes to
frontend/src/router.tsx - Routes and access → Auth state: checks access
frontend/src/router.tsx - Login and register → Auth service: requests auth
frontend/src/pages/auth/login/LoginPage.tsx - Auth service → Auth state: updates session
frontend/src/services/AuthService.ts - Login and register → Auth state: uses session
frontend/src/pages/auth/login/LoginPage.tsx - Book pages → Book service: requests books
frontend/src/pages/books/BooksPage.tsx - Book pages → Genre service: requests genres
frontend/src/pages/books/BooksPage.tsx - Author pages → Author service: requests authors
frontend/src/pages/authors/AuthorsPage.tsx - Book service → Bookshelf API: HTTP requests
README.md - Author service → Bookshelf API: HTTP requests
frontend/src/services/AuthorsService.ts - Auth service → Bookshelf API: HTTP requests
frontend/src/services/AuthService.ts - Genre service → Bookshelf API: HTTP requests
README.md - Bookshelf API → Book endpoints: routes requests
README.md - Bookshelf API → Author endpoints: routes requests
README.md - Bookshelf API → Account endpoints: routes requests
README.md - Bookshelf API → Genre endpoints: routes requests
README.md - Bookshelf API → Comment endpoints: routes requests
README.md - Book endpoints → EF and Identity context: queries and saves
backend/BookshelfAPI/Controllers/BooksController.cs - Author endpoints → EF and Identity context: accesses data
backend/BookshelfAPI/Controllers/AuthorController.cs - Genre endpoints → EF and Identity context: accesses data
backend/BookshelfAPI/Controllers/GenreController.cs - Comment endpoints → EF and Identity context: accesses data
backend/BookshelfAPI/Controllers/CommentsController.cs - Account endpoints → EF and Identity context: manages identity
- EF and Identity context → Library entities: maps entities
backend/BookshelfAPI/ApplicationDbContext.cs - Sample data seeder → EF and Identity context: seeds records
backend/BookshelfAPI/Data/DbSeeder.cs - EF and Identity context → SQL Server: persists data
README.md