Skip to content

A fullstack e-commerce application for selling books online.

Notifications You must be signed in to change notification settings

PrashantGM/bookstore-webapp

Repository files navigation

REQUIREMENTS
You must have:

  1. Node and PostgreSQL installed on your PC.
  2. Stripe account for payment feature.
  3. Optional: Cloudinary account to opt in saving images in cloud. (By default, images are saved locally.)
  4. Optional: Code Editor eg; VS Code.

STEPS TO RUN BOOKSTORE-WEBAPP

  1. Download .zip file or clone the app with :  git clone https://github.com/PrashantGM/bookstore-webapp.git.
  2. Open the project folder in your favorite text editor and run npm install on the terminal.
  3. Set up stripe account, go to developer's section and get secret key. Also, set up webhook listener from your terminal by running following commands and get webhook test key.
    stripe login
    stripe listen --forward-to http://localhost:8000/order/stripe/webhook
  4. Optional: Set up cloudinary account and get its account name, api key and secret.
  5. Create .env file on project's root directory and include aforementioned keys with other .env variables below:
   PORT= <port your app is listening to>
   CLOUD_NAME= <your cloudinary account name>
   CLOUD_API_KEY= <your cloudinary api key>
   CLOUD_API_SECRET= <your cloudinary api secret>
   JWT_SECRET= <secret for signing jwt token>
   JWT_LIFE_TIME= <life time of jwt token eg;1d>
   STRIPE_KEY= <stripe secret key>
   WEBHOOK_TEST_KEY= <test key for stripe webhook>
  1. Run npx prisma migrate dev on the terminal.
  2. Then, execute npm run dev. App will be live on http://localhost:8000.

Notice:

  • If optional requirements weren't applied, relevant source code must be disabled to avoid errors.
  • First user registered is assigned with admin role.

APP UI SNIPPETS

HOMEPAGE

homepage


BOOKS BY GENRE

books-by-genre


BOOK PAGE

book-page


CART

cart


STRIPE PAYMENT

stripe


ORDERS

orders


ADMIN DASHBOARD

admin


ADD BOOK(ADMIN)

add


UPDATE BOOK(ADMIN)

update