γ A secret & secure place where you only can view your blogs π
- Secure Authentication and Authorization with passport.js and express sessions
- Email verification
- Prevention from bots
- Reset password
- Change password
- Filtering blogs
- Search blogs
-
Make sure you have node installed on your machine.
-
Clone the repository and install the dependenies.
npm install
-
Rename
.env.example
to.env
-
Add your environmental variables in
.env
fileMONGO_URI - obtained from Mongodb atlas or put uri of your local mongo server SENDGRID_API_KEY - obtained from sendgrid SENDGRID_FROM - registered email at sendgrid DOMAIN_URL - your localhost port eg. http://localhost:8000 GOOGLE_RECAPTCHA_SECRET - obtained from the Google recaptcha v2 SESSION_SECRET - a random string (Eg. 'randomsecret')
-
Run the project
npm run start
-
Format code
npm run format
βββ config
βΒ Β βββ database.js
βΒ Β βββ passport.js
βββ controllers
βΒ Β βββ auth
βΒ Β βΒ Β βββ auth.js
βΒ Β βββ blogs
βΒ Β βΒ Β βββ blogs.js
βΒ Β βββ forget
βΒ Β βΒ Β βββ forget.js
βΒ Β βββ profile
βΒ Β βΒ Β βββ profile.js
βΒ Β βββ reset
βΒ Β βΒ Β βββ reset.js
βΒ Β βββ verify
βΒ Β βββ verify.js
βββ index.js
βββ middlewares
βΒ Β βββ auth.js
βΒ Β βββ ratelimiter.js
βββ models
βΒ Β βββ Blog.js
βΒ Β βββ Token.js
βΒ Β βββ User.js
βββ package.json
βββ package-lock.json
βββ public
βΒ Β βββ css
βΒ Β βΒ Β βββ style.css
βΒ Β βββ js
βΒ Β βββ app.js
βββ README.md
βββ routes
βΒ Β βββ auth.js
βΒ Β βββ blogs.js
βΒ Β βββ forget.js
βΒ Β βββ index.js
βΒ Β βββ profile.js
βΒ Β βββ reset.js
βΒ Β βββ verify.js
βββ services
βΒ Β βββ sendgrid.js
βββ utils
βΒ Β βββ date.js
βββ validators
βΒ Β βββ validators.js
βββ views
βββ auth
βΒ Β βββ login.ejs
βΒ Β βββ register.ejs
βββ blogs
βΒ Β βββ add.ejs
βΒ Β βββ blog.ejs
βΒ Β βββ blogs.ejs
βΒ Β βββ edit.ejs
βββ errors
βΒ Β βββ 404.ejs
βββ forget
βΒ Β βββ forget.ejs
βββ index.ejs
βββ partials
βΒ Β βββ footer.ejs
βΒ Β βββ header.ejs
βΒ Β βββ messages.ejs
βΒ Β βββ navbar.ejs
βββ profile
βΒ Β βββ changepassword.ejs
βΒ Β βββ profile.ejs
βββ reset
βββ reset.ejs
Made with contributors-img.