Certainly! Here is a README file for the Book-Rental-Service project based on the provided screenshots and specifications.
Book-Rental-Service is a web application built using Laravel and other associated technologies. It allows users to search for books, view details, and request to borrow books. The application distinguishes between reader and librarian roles with specific functionalities available to each.
- Navigation Bar: Common layout across the application, contains links to various sections.
- Main Page: Displays:
- Number of users
- Number of genres
- Number of books
- Number of active book rentals (accepted status)
- List of genres with links to genre-specific pages
- Book search functionality
- List by Genre: Shows books in a selected genre.
- Search: Allows searching for books by title or author.
- Book Detail Page: Displays detailed information about a specific book.
- Registration: Users can create a new account. Registered users default to reader role.
- Login: Users can log in to access more features. Pre-seeded accounts:
- Reader:
reader@brs.com/password - Librarian:
librarian@brs.com/password
- Reader:
- Borrow a Book: Authenticated readers can request to borrow books.
- My Rentals: Shows lists of all rental requests and statuses.
- Rental Details: Detailed view of a rental including processing dates and status updates.
- Add New Book: Librarians can add new books to the library.
- Edit a Book: Modify details of existing books.
- Delete a Book: Remove a book from the library.
- Genre List: View all genres in the system.
- Add New Genre: Librarians can add new genres.
- Edit a Genre: Modify existing genres.
- Delete a Genre: Remove a genre from the system.
- Rental List: View all rental requests and statuses.
- Rental Details (Librarian): Manage rental requests, update statuses, and set deadlines.
- Profile Page: Displays user's profile information.
- Soft Delete: Use soft deletes for genres and books.
- PHP 7.3 or higher
- Composer
- Node.js and npm
- MySQL or another compatible database
-
Clone the repository:
git clone <repository-url> cd book-rental-service
-
Install PHP dependencies:
composer install
-
Install JavaScript dependencies:
npm install
-
Build the frontend assets:
npm run prod
-
Setup environment variables:
- Copy
.env.exampleto.envand configure the database and other settings.
- Copy
-
Run migrations and seed the database:
php artisan migrate --seed
-
Serve the application:
php artisan serve
- Visit
http://localhost:8000in your browser to access the application. - Use the pre-seeded credentials to log in as a reader or librarian.
- Navigate through the application using the provided navigation bar.