Secure frontend / backend application that allows users to share their secrets anonymously with others. Secrets can be created, read, updated, and deleted.
- To view the website live click HERE (Render hosting service - app goes to sleep while inactive).
- NodeJS runtime environment
- EJS view engine
- Express Session middleware
- Connect-ensure-login middleware
- Style & Layout
- SCSS styling syntax
- Bootstrap CSS framework
- Fontawesome Icons
- MongoDB database
- Mongoose library
- Mongoose findOrCreate plugin
- Passport-local-mongoose for generating salt/hash fields in db
- Passport authentication middleware
- Passport-local strategy
- Google OAuth 2.0 strategy
Using MongoDB with 2 collections:
users {_id, username, salt, hash, secrets}
secrets [ {_id, secret} ]
How a stored User looks like:
{
_id: ObjectId('64021ee2f65e6556557ad5u5'),
username: "Emma",
salt: "1d9cdec6fe3016817341533a30ef33509d27be87623cecb8s...",
hash: "051ee50e1e8de673a6d9a082e9e462855af8b199dcajd9edu...",
secrets: [
{
_id: ObjectId('64021ee9f65e6556557ad5ue'),
secret: "When my roommates aren't home, I don't w...",
},
{
_id: ObjectId('64021ef9f65e6556557ads0b'),
secret: "Everyday my brother knocks on my door and...",
}
]
}
/login
/register
Sign Up or Sign In with an account or google auth.
/submit
The submit page where users can share their own secrets.
/mysecrets
The secrets page where users can modify their published secrets .