Skip to content

Library API Documentation

Library API is a Django REST Framework application for managing books, the libraries that hold them, the users who borrow them, and the loans that tie it all together.

  • Stack: Python 3.10+, Django 4.2, Django REST Framework, SQLite (dev).
  • Auth: None yet — every endpoint is currently open (see Authentication).
  • API docs (live): drf-spectacular at /api/docs/ (Swagger) and /api/redoc/ (ReDoc).

Documentation map

Section What you'll find
System Architecture Cross-cutting conventions (settings, schema, filtering) and a per-app model/serializer/view breakdown.
API Reference Per-resource reference — purpose, business rules, and route for each endpoint.
Business Rules How the domain actually behaves — loan lifecycle, availability, fees.
Onboarding Getting a new developer productive.
Development Local setup, workflows, and how to deploy these docs.
Troubleshooting Common problems and how to resolve them.

The domain in one picture

BookLibrary (a branch)
   ├── Book       (library = FK → BookLibrary)
   └── User       (library = FK → BookLibrary)

Loan
   ├── loanee     (FK → User)
   └── book       (FK → Book)

A library holds many books and registers many users. A loan records one user borrowing one book, and flips that book's availability while it is out.