Skip to content

SrikarKSV/vanilla-node-webapp

Repository files navigation

Anonymous Confessions - A CRUD webapp written in vanilla NodeJS

The goals of the project:

  • Understand how expressjs works under the hood
  • Connect the small pieces that expressjs takes care of
  • Imitate the functionality that some useful middlewares takes care of
  • Study the source code of these middlewares to imitate their functionality

NOT the goals of the project:

  • To create the entire functionality of expressjs
  • To create every functionality from scratch
  • To not use a single external package

Todos:

  • Make a logger
  • Use pug and render error.stack if error or the html
  • Write error control, use EventEmitter
  • Learn to use headers to redirect users
  • Landing page which will have 5 most popular confessions in last 24 hours (Usage of aggregations)
  • Confession should be accompanied by title, date and beginning of confession
  • Use sessions to give flashes
  • Confessions page with pagination
  • Try authentication for moderator to delete or edit the confession
  • Make two user roles for staff - moderator and admin
  • Create dashboard for staff to moderate confessions
  • Only admin can make new staff accounts
  • Moderator can mark and edit confessions but not delete
  • Admin can view the marked confessions and unmark or delete them
  • Profile page for staff with titles they edited and marked
  • Create own sessions without packages (Check vanilla-sessions branch for the implementation)
  • Create csrf tokens and validate them
  • Use Intl.RelativeTimeFormat API to get relative time