| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A full-stack Express + PostgreSQL (Neon) bookstore inventory application featuring CRUD, image uploads, search, sorting, filtering, and clean server-rendered views using EJS + Tailwind CSS.
Built as part of The Odin Project, but structured like a production-grade MVC application.
Render: https://chapterhub-inventory.onrender.com/
Go to Live demo Section to see more pages - Error 500 Page, Edit Genre Page , Delete Book Page
chapterhub-inventory/ │ ├─ app.js ├─ package.json ├─ nodemon.json │ ├─ db/ │ ├─ seed.js │ ├─ pool.js │ ├─ data/ │ │ ├─ books.js │ │ └─ genres.js │ └─ queries/ │ ├─ books.js │ └─ genres.js │ ├─ controllers/ │ ├─ booksController.js │ └─ genresController.js │ ├─ routes/ │ ├─ booksRouter.js │ ├─ genresRouter.js │ └─ indexRouter.js │ ├─ validators/ │ ├─ booksValidators.js │ └─ genresValidators.js │ ├─ middlewares/ │ ├─ upload.js │ └─ setLocals.js │ ├─ views/ │ └─ public/
| Column | Type | Notes |
|---|---|---|
| id | identity (PK) | auto-generated |
| name | varchar(100) | unique, required |
| description | text | optional |
| created_at | timestamptz | defaults to NOW() |
| Column | Type | Notes |
|---|---|---|
| id | identity (PK) | auto-generated |
| title | varchar(255) | required |
| author | varchar(255) | optional |
| description | text | optional |
| year | integer | optional |
| genre_id | integer (FK) | references genres(id) |
| image_url | text | uploaded path |
| price | numeric(10,2) | default 0 |
| quantity | int | default 0 |
| created_at | timestamptz | defaults to NOW() |
| UNIQUE(title, author) | prevents duplicates |
📌 Index:
CREATE INDEX idx_books_genre_id ON books(genre_id);git clone https://github.com/devxsameer/chapterhub-inventory.git
cd chapterhub-inventorypnpm installDATABASE_URL=your_neon_connection_string PORT=6969
Fresh reset:
pnpm seed:resetNormal seed:
pnpm seedpnpm devpnpm css:buildpnpm start
Server runs at:
http://localhost:6969
Sameer Ali
Full-stack developer & Odin Project learner.
MIT License — free to modify & share.
| Back | FazBrowse Home | New Git URL |