Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 

Repository files navigation

Bookstore Application

This is a full-stack bookstore application built with a React frontend and an Express backend. The application allows users to browse books, add them to a cart, and complete purchases. Admin users can manage books and view sales.

Features

  • Frontend: Built with React, Redux, and TailwindCSS.
  • Backend: Built with Express, MongoDB, and Cloudinary for image storage.
  • Authentication: JWT-based authentication with role-based access control.
  • Cart Management: Persistent cart storage using localStorage.
  • Admin Dashboard: Manage books and view sales.

Setup Instructions

Prerequisites

Ensure you have the following installed:

  • Node.js (v16 or later)
  • npm or yarn
  • MongoDB (local or cloud instance)
  • Cloudinary account (for image uploads)

Backend Setup

  1. Navigate to the backend directory:
    cd backend
  2. Install dependencies:
npm install
  1. Create a .env file in the backend directory with the following variables:
PORT=5000
MONGO_URL=<your-mongodb-connection-string>
JWT_SECRET=<your-jwt-secret>
JWT_EXPIRATION=1d
CLOUDINARY_NAME=<your-cloudinary-name>
CLOUDINARY_KEY=<your-cloudinary-api-key>
CLOUDINARY_SECRET=<your-cloudinary-api-secret>
LIVE_URL=<frontend-url>
  1. Start the backend server:
npm run dev
  1. Access the backend at: http://localhost:5000

Frontend Setup

1.Navigate to the frontend directory:

cd frontend/bookstoreui
  1. Install dependencies:
npm install
  1. Create a .env file in the frontend/bookstoreui directory with the following variable:
VITE_BACKEND_URL=http://localhost:5000
  1. Start the development server:
npm run dev
  1. Open the application in your browser at: http://localhost:5173

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages