https://github.com/fiereeinar/members-only
Backend authentication and authorization with PassportsJS
https://github.com/fiereeinar/members-only
authentication ejs expressjs nodejs passportjs tailwindcss
Last synced: 3 months ago
JSON representation
Backend authentication and authorization with PassportsJS
- Host: GitHub
- URL: https://github.com/fiereeinar/members-only
- Owner: FiereEinar
- Created: 2024-06-03T23:57:35.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-07T01:39:37.000Z (about 2 years ago)
- Last Synced: 2026-01-03T14:31:03.738Z (6 months ago)
- Topics: authentication, ejs, expressjs, nodejs, passportjs, tailwindcss
- Language: EJS
- Homepage:
- Size: 199 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Members Only
A private clubhouse where members can write anonymous posts. Within the clubhouse, members can identify the author of each post, but outside the clubhouse, viewers can only read the stories without knowing who wrote them. Admins have the ability to delete posts.
## Project Objectives
This project aims to provide practical experience with the following skills:
- Managing sessions using the [express-session](https://www.npmjs.com/package/express-session) middleware.
- Implementing user authentication with the [PassportJS](https://www.passportjs.org/) middleware in an Express application.
- Securing passwords through hashing and salting with the [bcryptjs](https://www.npmjs.com/package/bcryptjs) package.
- Utilizing a MongoDB database to store user information and messages.
- Applying the [Model-View-Controller (MVC)](https://developer.mozilla.org/en-US/docs/Glossary/MVC) software design pattern:
- Creating models to define the data structures required by the application.
- Setting up routes to request different types of information and templates (views) to render the data as HTML for browser display.
- Developing controllers to update models and/or views in response to user input.
- Building views and handling forms in Express using the PUG templating engine.
- Deploying the application to production with security measures such as hiding keys using environment variables (`env`).
- Managing image uploads for user profiles and images for posts with the help of [Cloudinary](https://cloudinary.com/).
## Technologies Used
- Express
- Node.js
- MongoDB
- Mongoose
- EJS
- TailwindCSS
## Libraries and Middleware Used
- [PassportJS](https://www.passportjs.org/) – Authentication middleware for Express.
- [bcryptjs](https://www.npmjs.com/package/bcryptjs) – For securing passwords by hashing and salting.
- [express-session](https://www.npmjs.com/package/express-session) – Create a session middleware with the given options.
- [express-async-handler](https://www.npmjs.com/package/express-async-handler) – Asynchronous exception-handling middleware.
- [express-validator](https://www.npmjs.com/package/express-validator) – User input validation middleware.
- [dotenv](https://www.npmjs.com/package/dotenv) – For keeping my database connection strings and API keys secret.
- [luxon](https://www.npmjs.com/package/luxon) – Library for working with dates and times in JavaScript.
- [cloudinary](https://cloudinary.com/) – Used for uploading/storing images
- [multer](https://www.npmjs.com/package/multer) – Node.js middleware for handling multipart/form-data, which is primarily used for uploading files.
## Secrets
Please be responsible
- Member secret word - "`fiere`"
- Admin secret word - "`imissher`"