How muhammadhuzaifashah/library_management-system works
This is a FastAPI library-management service. Members register or log in, then use authenticated catalog and lending endpoints; administrators manage books, members, and borrowing activity. The main domain stages are identity/access, catalog inventory, and loan/return processing, backed by relational models and configured persistence. The Leaf frontend is served by the same application and uses the existing API. The README documents these capabilities; edges below are limited to relationships shown in sampled source or explicitly documented, so unsampled frontend request wiring is not asserted.
Main entry points: users.py Account endpoints · borrowings.py Borrow and return · database.py Database sessions · auth.py Login endpoint
Components 16
Application interface
- Leaf interface
app/frontend - API application
app/main.py
Identity and access
- Login endpoint
app/routers/auth.py - Account endpoints
app/routers/users.py - JWT authorization
app/outh2.py - Password and commit helpers
app/utils.py
Catalog management
- Catalog endpoints
app/routers/books.py
Lending operations
- Borrow and return
app/routers/borrowings.py - Loan limits and fines
app/config.py
Persistence and contracts
- Service settings
app/config.py - Database sessions
app/database.py - Library records
app/models.py - API schemas
app/schemas.py - Relational database
Other components
- Members
- Administrators
Connections 37
- API application → Login endpoint: registers
app/main.py - API application → Account endpoints: registers
app/main.py - API application → Catalog endpoints: registers
app/main.py - API application → Borrow and return: registers
app/main.py - API application → Leaf interface: serves
app/main.py - API application → Database sessions: health-checks
app/main.py - Members → Leaf interface: uses
README.md - Administrators → Leaf interface: uses
README.md - Members → Login endpoint: logs in
README.md - Members → Account endpoints: manages account
README.md - Administrators → Account endpoints: manages accounts
README.md - Login endpoint → Password and commit helpers: verifies password
app/routers/auth.py - Login endpoint → JWT authorization: creates token
app/routers/auth.py - Account endpoints → Password and commit helpers: hashes password
app/routers/users.py - Account endpoints → JWT authorization: checks access
app/routers/users.py - Catalog endpoints → JWT authorization: checks access
app/routers/books.py - Borrow and return → JWT authorization: checks access
app/routers/borrowings.py - Administrators → Catalog endpoints: manages catalog
README.md - Members → Catalog endpoints: searches catalog
README.md - Members → Borrow and return: borrows and returns
README.md - Administrators → Borrow and return: reviews activity
README.md - Borrow and return → Loan limits and fines: reads limits
app/routers/borrowings.py - Login endpoint → Database sessions: queries users
app/routers/auth.py - Account endpoints → Database sessions: persists accounts
app/routers/users.py - Catalog endpoints → Database sessions: queries inventory
app/routers/books.py - Borrow and return → Database sessions: persists loans
app/routers/borrowings.py - JWT authorization → Database sessions: loads user
app/outh2.py - Database sessions → Service settings: configures connection
app/database.py - Database sessions → Relational database: connects
README.md - Catalog endpoints → Library records: queries books
app/routers/books.py - Borrow and return → Library records: updates loan records
app/routers/borrowings.py - Account endpoints → Library records: updates users
app/routers/users.py - Login endpoint → Library records: loads user
app/routers/auth.py - Login endpoint → API schemas: validates token response
app/routers/auth.py - Catalog endpoints → API schemas: validates payloads
app/routers/books.py - Borrow and return → API schemas: validates payloads
app/routers/borrowings.py - Account endpoints → API schemas: validates payloads
app/routers/users.py