Membership Club

Project Screenshot

Description

An ExpressJS app with local Passport authorization strategy

Problems Faced

This is my first Express app that required authentication. The problems were to connect functionality of database, authentication, and showing the correct page to the user based on the route.

What I did

To solve that problem, I used Model-View-Controller (MVC) pattern, where the app is thought of as a collection of controller functions, which are invoked based on what route user's request specified, that fetch requested data form the database (I used MongoDB), filter and sanitize it, pass it into views (HTML templates, I used EJS templating language), which are sent to the client. I also used Passport-local authentication strategy with session, and I restricted some routes based on whether the user is logged in or not. Additionally, the user isn't able to see some information on the message board unless he is signed in.

Mykyta Medvediev, 2023