Users can create a new account, add and browse items, search for items, add items to the cart, place orders and make payments. Users can access their order history as expected in a real-life app.
Follow the steps below to get run the app in the local environment.
-
npm
npm install npm@latest -g
-
Clone the repo
git clone https://github.com/suyashvsingh/amazon-clone
-
Install NPM packages
npm install --prefix frontend && npm install
-
Create a database at Mongo Cloud
-
Create a
.env
file.MONGO_URI_PRODUCTS_DATABASE = "Enter MongoDB database URL"; JWT_SECRET = "Enter a JWT secret key";
-
Start the frontend and backend simultaneously
npm run dev
While the backend is running, send a POST request to http://localhost:5000/api/products to populate the products available on the Home page.
Enter the card number: 378282246310005 for all orders for a successful transaction.