How ametox/personalbookshelf works
PersonalBookshelf is a Laravel web app for finding books, viewing details, and organizing books into user-owned categories. The main workflow routes a search to the book controller, which queries Open Library, stores results in the session, and renders book views; signed-in users can manage categories and add or remove books. Registration and login support that personal shelf workflow. The source excerpts show controller, model, route, and view responsibilities; database links reflect Eloquent operations, while unsampled details are omitted.
Main entry points: BookController.php Book controller · UserController.php User controller · app.js Browser entry · web.php Web routes
Components 18
Web routing
- Web routes
BookShelf/routes/web.php
Book discovery
- Book controller
BookShelf/app/Http/Controllers/BookController.php - Book model
BookShelf/app/Models/Book.php - Open Library
- Search home
BookShelf/resources/views/home.blade.php - Book detail
BookShelf/resources/views/displayBook.blade.php
Personal shelves
- Category model
BookShelf/app/Models/Category.php - Shelf view
BookShelf/resources/views/displayBookShelf.blade.php - Category contents
BookShelf/resources/views/displayCategoryContent.blade.php - Application database
BookShelf/database
Accounts
- User controller
BookShelf/app/Http/Controllers/UserController.php - User model
BookShelf/app/Models/User.php - Login and register
BookShelf/resources/views/login.blade.php
Browser interface
- Browser entry
BookShelf/resources/js/app.js - Alpine interface
BookShelf/resources/js/alpineScript.js - Interface code
BookShelf/resources/js/code.js - JS bootstrap
BookShelf/resources/js/bootstrap.js
Other components
- Reader
Connections 17
- Reader → Web routes: requests pages
BookShelf/routes/web.php - Web routes → Book controller: dispatches book routes
BookShelf/routes/web.php - Web routes → User controller: dispatches account routes
BookShelf/routes/web.php - Book controller → Open Library: searches and fetches
BookShelf/app/Http/Controllers/BookController.php - Book controller → Book model: queries and saves
BookShelf/app/Http/Controllers/BookController.php - Book controller → Category model: manages categories
BookShelf/app/Http/Controllers/BookController.php - Book controller → Application database: reads and writes
BookShelf/app/Http/Controllers/BookController.php - Book controller → Search home: renders search
BookShelf/app/Http/Controllers/BookController.php - Book controller → Book detail: renders details
BookShelf/app/Http/Controllers/BookController.php - Book controller → Shelf view: renders shelf
BookShelf/app/Http/Controllers/BookController.php - Book controller → Category contents: renders category
BookShelf/app/Http/Controllers/BookController.php - User controller → User model: creates users
BookShelf/app/Http/Controllers/UserController.php - User controller → Application database: persists accounts
BookShelf/app/Http/Controllers/UserController.php - User controller → Login and register: renders forms
BookShelf/app/Http/Controllers/UserController.php - Browser entry → Alpine interface: loads interface
BookShelf/resources/js/app.js - Browser entry → Interface code: loads interface code
BookShelf/resources/js/app.js - Browser entry → JS bootstrap: loads bootstrap
BookShelf/resources/js/app.js