Full-Stack E-commerce Webapp complete with CRUD functionality. Runs on NodeJS in the backend, with ExpressJS used for routing, ejs used for HTML templating and MongoDB used for database. Uses MVC for modern web standards and easier maintainance.
- Technology: MVC pattern, Javascript, NodeJS, EJS templating engine for server-side rendering
- Cloud Service Provider: Heroku
- Database: MongoDB
-
User can register themselves on the website through the login form.
-
CRUD Operations:
-
User can add product to their cart
-
User can delete the products in their cart
-
User can order the products in their cart
-
User can generate invoice pdfs for the orders they created and download them
-
User can add product to the global product list
-
User can upload image for the product
-
User can edit the product details for the ones they added
-
User can delete the product from the list
- Security:
- Website is immune to CSRF(Cross Site Forgery Request) attacks
- One user cannot create, update or delete data on behalf of other user
- Error:
- 404 page is served if user tries to load unrecognized route
- 500 page is served if something wrong happens on the server side
- Pagination for better User Interface and Experience and also to reduce the load on the DB.
- Clone this repository
- Install packages with
npm install
- Run the app with
npm run start:dev
To connect to the mongo database, it is necessary to set the proper credentials in a config file.
In development it is necessary to have the following configuration in the nodemon.json file:
{
"env": {
"MONGO_USER": "YOUR USERNAME",
"MONGO_PASSWORD": "YOUR PASSWORD",
"MONGO_DEFAULT_DATABASE": "shop"
}
}