The Mini Library Management System is a lightweight web-based application that allows users to manage their book collection effectively. Users can add books, categorize them by genres, update their reading status, and search for specific books. The project is built using PHP and MySQL for the backend, and HTML/CSS with Bootstrap for the frontend, and little bit JavaScript for read data.
- Add and Manage Books: Add books with details like title, author, genres, synopsis, and start reading date.
- Update Reading Status: Mark books as "Want to Read," "Reading," or "Finished Reading" along with the finish date.
- Search Functionality: Search books by title in a dropdown preview.
- Categorize by Genre: Books can be categorized and displayed with their respective genres.
- Responsive Design: The application adapts to various screen sizes.
- Dynamic Dropdown for Search Results: Displays book details in a dropdown as you type in the search field.
To use the Mini Library Management System, create the following tables in your database:
CREATE TABLE books (
id INT AUTO_INCREMENT PRIMARY KEY,
judul VARCHAR(255) NOT NULL,
penulis VARCHAR(255) NOT NULL,
status ENUM('Ingin Dibaca', 'Sedang Dibaca', 'Selesai Dibaca') NOT NULL DEFAULT 'Ingin Dibaca',
sinopsis TEXT,
tgl_mulai_baca DATE,
tgl_selesai_baca DATE
);
CREATE TABLE genres (
id INT AUTO_INCREMENT PRIMARY KEY,
nama_genre VARCHAR(255) NOT NULL
);
CREATE TABLE books_genres (
book_id INT NOT NULL,
genre_id INT NOT NULL,
PRIMARY KEY (book_id, genre_id),
FOREIGN KEY (book_id) REFERENCES books(id) ON DELETE CASCADE,
FOREIGN KEY (genre_id) REFERENCES genres(id) ON DELETE CASCADE
);
CREATE TABLE genres (
id INT AUTO_INCREMENT PRIMARY KEY,
nama VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL
);
Follow these steps to implement the Mini Library Management System on your local device:
- XAMPP/WAMP/MAMP: A local web server with PHP and MySQL support.
- Browser: Any modern browser (e.g., Chrome, Firefox).
-
Clone or Download the Project:
git clone https://github.com/your-repo/mini-library.git
-
Move the Project to the Server: Copy the project folder to the
htdocs
directory in XAMPP (or equivalent in other tools). -
Import the Database:
- Open
phpMyAdmin
. - Create a new database (e.g.,
mini_library
). - Import the
mini_library.sql
file from the project folder.
- Open
-
Configure Database Connection: Update the
dbconn.php
file with your database credentials:$conn = new mysqli("localhost", "username", "password", "mini_library"); if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); }
-
Run the Application: Open your browser and navigate to:
http://localhost/mini-library
- Add Books: Navigate to the "Add Book" section and fill in the required details.
- Search Books: Use the search bar in the header to find books by title.
- Update Status: View a book's details and update its status (e.g., mark as finished).
Feel free to fork the repository and submit pull requests for new features or bug fixes. Contributions are always welcome!
This project is licensed under the MIT License.