This is a simple Book Management System web application that allows users to register new books and search for existing books in a database. The application features a clean, modern UI with a blurred glass effect background, animated buttons, and a toggle switch to navigate between registration and search functionalities.
- Book Registration: Add new books with author, title, genre, and price information
- Book Search: Search for books by title keywords
- Modern UI: Responsive design with animations and visual effects
- Blurred glass effect container
- Animated buttons with hover effects
- Custom styled input fields with highlight animations
- Custom dropdown menu for genre selection
- Custom scrollbar for search results
- Toggle Switch: Easy navigation between registration and search interfaces with custom icons
- Data Validation: Client-side validation for price field
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js, Express.js
- Database: SQLite3
- Node.js and npm installed on your computer
- Clone this repository
- Navigate to the project directory in your terminal
- Install the required dependencies:
npm install
- The database table will be automatically created when you start the server. If you want to initialize it separately, you can run:
node init-db.js
- Start the server:
or
node server.js
npm start
- Open your browser and navigate to
http://localhost:3000
- Make sure the toggle switch is in the left position (default)
- Fill in the author, title, select a genre, and enter a price
- Click the "Register" button
- A success message will appear if the book was registered successfully
- Toggle the switch to the right position to access the search interface
- Enter a keyword in the search field
- Click the "Search" button
- Results will be displayed below, showing all books with titles matching the keyword
GET /books/:keyword
- Search for books by keyword in titlePOST /books
- Register a new book
The application uses a SQLite database with a single table:
Books Table:
- author (text)
- title (text)
- genre (text)
- price (numeric)
The application uses the following assets for its visual design:
library.jpg
: Background image for the applicationregister-icon.png
: Icon for the registration togglesearch-icon.png
: Icon for the search toggle