Lucia's Bookstore
Lucia's Bookstore is a full-stack bookstore application that demonstrates a dynamic shop page and admin interface. The shop page lists books from a PostgreSQL database, loading 50 at a time with pagination, and features hover-triggered previews and a shopping cart modal. The admin page, protected by a session, provides a form to add new books and a search bar to query the store's inventory. The code uses Express for routing, PostgreSQL for data persistence, and EJS templates to render the book listings and interactive elements.
AI-generated descriptionLucia's Bookstore
Set up instructions
Clone or Fork repo
Run
npm iRun
npn run create:db- ensure that DB has been created
Make a
.envfile :echo DATABASE_URL=postgres://whoami@localhost:5432/lucia-bookstore > .envRun the migrations:
npm run migrate
Taken Issues:
Add Admin page #6: As an admin I want to be able to log in and be redirected to an admin page.
Admin contains:
a form that allows admin to enter new books into the DB. sets a session that allows you to now edit books on the home page. has a search bar to search the store for books by their info.
Add shop page #9: As a user, I should be able to navigate to a shop page that will list all books in the store.
I should be able to click on a book and navigate to a detail page. I should be able to add a book to my current shopping cart instance. only 50 books should load at a time. If there are more than 50, I can browse the next page my clicking the next button. hovering over the shopping cart should display a modal with current shopping cart items. hovering over a book should prompt a preview button. When clicked, displays a preview page for the book.
Add user home page #5: As a user ( regardless of being logged in or now) I should be able to:
see a header with navigation to various parts of the application( justified center, below image ) a search bar to search store ( justified right ) a logo( justified left ) a jumbotron like an image to separate the navbar from logo and search bar a list of the 20 newest book arranged into 5 columns a footer with contact link, FAQ's, Terms of Use