ppalone / crypt

γŠ™οΈ A secret & secure place where you can only view your blogs πŸ“.

Home Page:https://crypt.ppalone.me/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crypt

γŠ™ A secret & secure place where you only can view your blogs πŸ“

Features 🍰

  • Secure Authentication and Authorization with passport.js and express sessions
  • Email verification
  • Prevention from bots
  • Reset password
  • Change password
  • Filtering blogs
  • Search blogs

How to run on your local machine?

  • 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 file

    MONGO_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
    

Project Structure

β”œβ”€β”€ 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

Contributors

Made with contributors-img.

About

γŠ™οΈ A secret & secure place where you can only view your blogs πŸ“.

https://crypt.ppalone.me/

License:MIT License


Languages

Language:JavaScript 57.9%Language:EJS 28.8%Language:CSS 12.9%Language:Shell 0.5%