How hinatanie/light-brary works
LightBrary is a library-management system; the supplied tree covers its ASP.NET Core backend, not the React frontend. The intended user workflow is authentication and role-based access, book and copy discovery, then borrowing, return, renewal, and loss handling. The backend is organized around application services, repository interfaces, infrastructure, and domain entities. The README describes broader security and circulation behavior than the sampled implementation shows; several sampled service and repository classes are empty stubs, and no request-routing code appears in the tree, so those runtime links are not asserted.
Main entry points: Program.cs API host · IServices Service contracts · AppDbContext.cs EF data context · AuthService.cs Authentication
Components 17
API and identity
- API host
back_end/light_brary/Program.cs - Authentication
back_end/light_brary/Application/Services/AuthService.cs - JWT tokens
back_end/light_brary/Infrastructure/Authentication/JwtTokenService.cs - User management
back_end/light_brary/Application/Services/UserService.cs - Role management
back_end/light_brary/Application/Services/RoleService.cs
Library catalog
- Book catalog
back_end/light_brary/Application/Services/BookService.cs - Categories
back_end/light_brary/Application/Services/CategoryService.cs - Physical copies
back_end/light_brary/Application/Services/BookCopyService.cs
Circulation
- Borrow records
back_end/light_brary/Application/Services/BorrowRecordService.cs - Borrow details
back_end/light_brary/Application/Services/BorrowDetailService.cs
Application and storage
- Service contracts
back_end/light_brary/Application/Interfaces/IServices - Repository contracts
back_end/light_brary/Application/Interfaces/IRepositories - Repository implementations
back_end/light_brary/Infrastructure/Repositories - EF data context
back_end/light_brary/Infrastructure/Persistence/AppDbContext.cs - PostgreSQL
- Library domain model
back_end/light_brary/Domain/Entities
Other components
- Patron or staff
Connections 22
- Patron or staff → API host: uses API
- API host → Authentication: registers
back_end/light_brary/Program.cs - API host → Book catalog: registers
back_end/light_brary/Program.cs - API host → Categories: registers
back_end/light_brary/Program.cs - API host → Physical copies: registers
back_end/light_brary/Program.cs - API host → Borrow records: registers
back_end/light_brary/Program.cs - API host → Borrow details: registers
back_end/light_brary/Program.cs - API host → User management: registers
back_end/light_brary/Program.cs - API host → Role management: registers
back_end/light_brary/Program.cs - API host → EF data context: configures
back_end/light_brary/Program.cs - API host → Repository implementations: registers
back_end/light_brary/Program.cs - API host → JWT tokens: registers
back_end/light_brary/Program.cs - Authentication → JWT tokens: issues tokens
- Service contracts → Repository contracts: uses contracts
- Repository implementations → EF data context: accesses data
- EF data context → PostgreSQL: persists records
- EF data context → Library domain model: maps entities
back_end/light_brary/Infrastructure/Persistence/AppDbContext.cs - Book catalog → Service contracts: implements contract
back_end/light_brary/Application/Services/BookService.cs - Categories → Service contracts: implements contract
back_end/light_brary/Application/Services/CategoryService.cs - Physical copies → Service contracts: implements contract
back_end/light_brary/Application/Services/BookCopyService.cs - Borrow records → Service contracts: implements contract
back_end/light_brary/Application/Services/BorrowRecordService.cs - Borrow details → Service contracts: implements contract
back_end/light_brary/Application/Services/BorrowDetailService.cs