The Books Inventory Application is a web-based inventory system to manage book data categorized by genres. It enables users to create, update, delete, and view books and genres, ensuring seamless organization and management.
- Categorized Books: Manage books organized by genres.
- CRUD Operations:
- Create, Read, Update, Delete genres and books.
- Form Validation: Ensures data security and accuracy.
- Genre-Based Filtering: Fetch all books by their respective genre.
- Backend: Express.js
- Frontend: EJS for templating
- Database: PostgreSQL
- ORM: Raw SQL queries wrapped in Classes for organization
-
Books
id
: Unique identifiertitle
: Title of the bookauthor
: Author of the bookprice
: Price of the bookstock
: Number of copies in stockgenre_id
: Foreign key referencing Genres
-
Genres
id
: Unique identifiername
: Genre name
-
Books:
- Add new books with attributes like title, author, price, stock, and genre.
- Update book details.
- Delete books.
- Fetch all books by genre.
-
Genres:
- Add new genres.
- Update genre names.
- Delete genres.
-
Clone the Repository
git clone https://github.com/yourusername/bookstore.git cd bookstore
-
Install Dependencies
npm install
-
Set Up Environment Variables Create a
.env
file in the root directory and configure the following:PORT=your_port DATABASE_URL=your_database_url
-
Navigate to Root Directory and Start the App
node app.js
-
Access the App Visit
http://localhost:<PORT>
in your browser.
Contributions are welcome! Feel free to fork the repository and submit a pull request.
- Fork the Project.
- Create your Feature Branch:
git checkout -b feature/amazing_feature
. - Commit your Changes:
git commit -m 'Add some amazing_feature'
. - Push to the Branch:
git push origin feature/amazing_feature
. - Open a Pull Request.
If you have any questions, feel free to reach out:
- Email: Aditya Kirti
- GitHub: addy118