Skip to content
/ crypt Public

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

License

Notifications You must be signed in to change notification settings

ppalone/crypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

93 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 πŸ“.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •