A complete full-stack bookstore inventory system built with Express and PostgreSQL (Neon), offering CRUD operations, image uploads, sorting, filtering, and elegant server-rendered interfaces using EJS + Tailwind CSS.
Although developed as part of The Odin Project, the codebase follows a clean, production-oriented MVC architecture.
Vercel: https://inventory-application-liard.vercel.app/
- Create, edit, delete books (CRUD)
- Upload cover images (Multer)
- Metadata support: title, author, year, genre, description
- Full validation with express-validator
- Filter books by genres
- Sort options:
- Title (A–Z / Z–A)
- Year (Oldest / Newest)
- PostgreSQL hosted on NeonDB
- Tailwind CSS v4
- Modern, minimal, responsive UI
- Clean EJS templates
- Node.js
- Express 5
- Express Validator
- Multer (image uploads)
- PostgreSQL (NeonDB)
- EJS
- Tailwind CSS 4
- Vanilla JavaScript
Folder Structure
books-inventory/
│
├─ app.js
├─ package.json
|
├─ db/
│ └─ pool.js
│
├─ controllers/
│ ├─ indexController.js
│ └─ booksController.js
|
├─ services/
│ └─ booksService.js
|
├─ repository/
│ └─ booksRepository.js
|
├─ utils/
│ └─ normalizeGenre.js
|
├─ routes/
│ ├─ booksRouter.js
│ └─ indexRouter.js
│
├─ validators/
│ └─ booksValidators.js
│
├─ middlewares/
│ └─ upload.js
│
├─ public/
│ ├─ js/
| │ └─ sidebar.js
│ ├─ css/
| | ├─ style.css
| | └─ custom.css
│ ├─ uploads/ <- bookcovers
| └─ img/
|
└─ views/
├─ components/
| ├─ cardsBooks.ejs
| ├─ footer.ejs
| ├─ navbar.ejs
| ├─ form.ejs
| └─ sidebar.ejs
|
├─ updateBook.ejs
├─ index.ejs
├─ createBook.ejs
├─ books.ejs
└─ deleteBook.ejs
- Clone the repository
git clone https://github.com/AliceSilva/books-inventory.git
cd books-inventory- Install dependencies
npm install- Create
.env
DATABASE_URL=your_neon_connection_string
PORT=8080
Development mode (server + Tailwind watcher)
npm run devBuild Tailwind for production
npm run css:buildStart server normally
npm start
Server runs at:
http://localhost:6969
- Uploads stored in:
public/uploads/ - Max file size: 5MB
MIT License — free to modify & share.





