I made fullstack Express.js app with Vanilla JavaScript frontend and with MongoDB and Mongoose nosql database.
This is online shop where you can log in, see products that are uploaded by other users for sale, upload your own products for sale, edit and delete only your own products, add items to your cart, purchase orders, download Invoices for your orders, reset your password, logout and more!
In this app:
- I'm using session with the express-session package for storing the loged in user
- I've implemented XSS Attacks protection with the csurf package where you must send token with every POST/PUT/PATCH/DELETE request
- EJS view engine for views templates
- Multer package for uploading images
- PDFKit package for creating PDF documents on the fly where I'm using the core package filesystem for creating writable streams and storing the invoice in the pdf where user can preview the document and download it
- Sending E-mails with nodemailer (other services requested payment) when Signing up and when you request to reset your password
- Using Express-validator package to validate the body data when trying to post and patch data
- I've integrated Stripe payment when purchasing the order ( dummy stripe credit card: all 424242..)
- Beautiful pagination for the products page and shop page.
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
Node package manager - npm.
- Clone the repo
git clone https://github.com/aleksandromilenkov/expressShop.git
- In the top level terminal of the folder just do npm install
npm install
- Type this command in the terminal
npm run start
Now go to localhost:3000 and you will see the app.
Use this app for whatever you like.
- Express.js
- EJS
- FetchAPI
- Node.js
- express-session
- MongoDB
- Mongoose
- Csurf
- Multer
- Bcrypt
- Stripe
- Pdfkit
- Nodemailer
- And more...