Case study · Full-stack e-commerce
Tailwaggers Pet Shop
An e-commerce website for a pet shop with accounts, a shopping cart, orders, online payments and an admin area, built with HTML, CSS and JavaScript on the frontend and Node.js, Express.js and MongoDB on the backend.
- Type
- Full-stack e-commerce
- Built by
- Nishan Bharati
- Started
- November 2025
- Status
- Source code on GitHub. No public deployment.
- Stack
- HTML
- CSS
- JavaScript
- Bootstrap 5
- Node.js
- Express.js
- MongoDB
- Mongoose
- express-session
- Socket.IO
- Stripe
- Khalti
- Nodemailer
What it does
A pet shop storefront where customers browse products, fill a cart, check out and pay online, and where the shop owner manages products, orders, users, payments and contact messages from an admin area.
Features
- Sign-up, login and logout, with email verification and password reset
- Product browsing by category and product search
- Shopping cart, checkout and order management
- Online payment routes for Stripe and for Khalti, a Nepali payment gateway
- An admin area for products, orders, users, payments and contact messages
- Real-time admin notifications over Socket.IO
How it works
Server structure
An Express server split into routes, controllers, models and middleware. Mongoose models cover users, products, carts, orders, payments and contact messages.
Sessions
Logins are tracked with express-session, and sessions are stored in MongoDB through connect-mongo. The same session middleware is shared with Socket.IO, so only signed-in admins join the admin notification channel.
Payments and email
Separate route files handle Stripe payments, Khalti payment verification, password reset and email verification. Verification emails are sent with Nodemailer.
What I would improve next
- Serve only a dedicated public folder as static files instead of the project root, and keep environment files out of the repository.
- Require a SESSION_SECRET environment variable instead of falling back to a default value.
- Remove the debug and test scripts from the repository root.
- Deploy a demo with payments in test mode.
Built by Nishan Bharati, MERN Stack Developer and co-founder of Navya EdTech. Want something similar built?
Get in touch