How jhonkizzersanchez-ui/booksphere works
BookSphere is a plain-PHP school library application. Users enter through the web front controller, which dispatches API requests or page requests; the page path renders role-specific experiences such as authentication, catalog search, student borrowing views, and librarian management. Persistent MySQL authentication and staff approvals coexist with demo-backed catalog, loans, reviews, and reports. The graph preserves these documented capabilities, but several runtime links are omitted or marked unverified because their implementation excerpts were not provided.
Main entry points: pages.php Page dispatch · index.php Request entry · api.php API dispatch · layout.php Signed-in layout
Components 22
Web runtime
- Request entry
backend/public/index.php - Dev server router
backend/public/router.php - Page dispatch
backend/src/pages.php - API dispatch
backend/src/api.php - App bootstrap
backend/src/bootstrap.php
Accounts and access
- Authentication
backend/src/auth.php - Account administration
backend/src/admin.php - MySQL database
Library experience
- Demo library data
backend/src/data.php - Catalog and search
backend/views/search.php - Book details
backend/views/book-details.php - Student library views
backend/views/student-dashboard.php - My books
backend/views/my-books.php - Teacher dashboard
backend/views/teacher-dashboard.php
Staff operations
- Librarian panel
backend/views/librarian-panel.php - Admin dashboard
backend/views/admin-dashboard.php - Library reports
backend/views/librarian/reports.php - Book editor modal
backend/views/librarian/book-modal.php
Page presentation
- Signed-in layout
backend/views/layout.php - Page head
backend/views/partials/head.php - Toast presentation
backend/views/partials/toasts.php
Other components
- Browser user
Connections 23
- Browser user → Dev server router: requests pages
backend/public/router.php - Dev server router → Request entry: forwards requests
backend/public/router.php - Request entry → App bootstrap: loads runtime
backend/public/index.php - Request entry → API dispatch: dispatches API
backend/public/index.php - Request entry → Page dispatch: dispatches pages
backend/public/index.php - Authentication → MySQL database: reads and writes
backend/src/auth.php - Account administration → MySQL database: manages accounts
- Page dispatch → Signed-in layout: renders pages
- API dispatch → Authentication: handles account actions
- API dispatch → Account administration: handles admin actions
- Catalog and search → Demo library data: filters books
backend/views/search.php - Librarian panel → Demo library data: loads library data
backend/views/librarian-panel.php - Librarian panel → Book editor modal: includes modal
backend/views/librarian-panel.php - Signed-in layout → Page head: includes head
backend/views/layout.php - Signed-in layout → Toast presentation: includes toasts
backend/views/layout.php - Page dispatch → Catalog and search: selects view
- Page dispatch → Book details: selects view
- Page dispatch → Student library views: selects view
- Page dispatch → My books: selects view
- Page dispatch → Teacher dashboard: selects view
- Page dispatch → Librarian panel: selects view
- Page dispatch → Admin dashboard: selects view
- Page dispatch → Library reports: selects view