Skip to content
Susanna Nevalainen edited this page Dec 5, 2020 · 10 revisions

πŸ’š Full-stack Node - Complete Guide

This repository includes notes I made while creating a full-stack online store template with node.js to understand better the history of web frontend and how to use node.js as a backend with local, SQL and NoSQL databases. For frontend, the project uses node.js with ejs templating engine. This approach was a common approach to build websites before REST APIs decoupled frontend and backend into separate independent entities and frontend frameworks like Vue/Angular/React took over.

The main idea is to use MVC approach:

  • controllers represent the logic of node app in js; they connect views and models, include database actions, and render views
  • views are what user sees, written in HTML and templating engine language (ejs, handlebars, pug etc)
  • models data representation (classes/schemas)

Features

Client

  • πŸ”’ Authentication
  • βž• Add product to cart
  • πŸ—‘οΈ Delete product from cart
  • πŸ‘οΈ View product details
  • πŸ›’ View cart
  • πŸ’³ Make order
  • 🧾 noteView orders
  • βœ‰οΈ Receive welcome email after signup

Admin

  • πŸ”’ Authentication
  • βž• Add products
  • ✏️ Edit products
  • πŸ—‘οΈ Delete products

Table of contents

Passing data between routes

Storing data

  • Cookies & Sessions
  • Password encryption - bcrypt
  • Protecting from CSRF - csurf