StorylineShop is an e-commerce platform for selling books online.
2024-10-12.03-34-00.mp4
- Secure JWT-based authentication with role-based access control (admin, user) and hash encryption of users passwords.
- Manage books (title, author, price, etc.), with efficient pagination and filtering options in the admin mode.
- Users can add books to the cart, place orders, and track order statuses.
- Secure online payments using Stripe, with transaction history and receipts.
- Organized codebase using the MVC design pattern with a complex data model for users, products, carts, and orders.
- Clone the repo and Install the used dependencies.
- Make account on MongoDB Atlas and create a cluster.
- Copy your connection string and put it here.
mongoose
.connect(
"your connection string"
)
.then((result) => {
app.listen(3000);
})
.catch((err) => {
console.log(err);
});
- Make account on stripe and copy your secret api key and put it here in the shop.js.
const stripe = require("stripe")(
"your secret api key on stripe"
);
- Copy your public api key and put it here in the checkout.ejs view.
orderBtn.addEventListener('click', function() {
stripe.redirectToCheckout({
sessionId: '<%= sessionId %>'
})
});
-
Finally run npm start and start the project.
-
You can see the project requirement Here.