GithubHelp home page GithubHelp logo

elit-altum / authexp-express-starter Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 3.0 126 KB

A MVC architecture Express starter app with user and authentication factors handled for you ๐Ÿ”‘

JavaScript 100.00%
express-starter express mvc-architecture starter-template user-management authentication-backend starter mvc hackathon hackathon-starter hacktoberfest

authexp-express-starter's Introduction

AuthExp ๐Ÿ”

โœ”๏ธ A simple, intuitive and ready to use MVC express starter with user authentication handled for you.

โœ”๏ธ Highly customizable to suit your needs. Can be extended to a REST API or to a full fledged server/client side rendering webapp.*

01. Introduction ๐Ÿš€

User authentication and storage is one of the most common and fundamental tasks for any project. But it takes a lot of time, precautions & testing to set it up reliably and securely.

This starter app was created to solve this issue precisely. It helps you quickly bootstrap your Node + Express projects with all user authentication & storage factors handled. So that you can focus on the core logic of your project, rather than the tedious and repetitive task of setting up authentication.

This starter app has built-in core support for:

  • Login users using username + password
  • Sign-in / register new users.
  • Password reset and forgot password.
  • Updating, deleting and fetching users.
  • User profile images.
  • Express middlewares for protected and role-specific routes

All routes of this app have been thoroughly tested with many security middlewares and request headers in place. Feel assured that your project's authentication is secure and reliable.๐Ÿ˜„

02. Setup ๐Ÿ—๏ธ

  1. Add environment variables to the sample-config.txt file at the root of the directory and follow the instructions specified. Rename that file to .env after making the changes. dotenv is being used to parse these environment variables.

  2. Install all dependencies using npm by running: npm i from the root of the directory.

  3. Scripts have been provided for easier use.

    • npm run dev : Starts the server on the specified port using nodemon. Every save will refresh the server.
    • npm start : A script which runs the app in production using node. Mostly used for heroku or other hosting platforms after being built there to start the server.

03. MVC Structure โš™๏ธ

  1. The MVC architecture splits your application files broadly into 3 components - Models, Views and Controllers.
    • Models: The database schemas or guidelines which control the data being stored in the database. It is responsible for data validations.
    • Controllers: This part of the application can be split into routes and controllers.
      • Routes: The different API endpoints of your http server.
      • Controllers: The functions which would actually handle all requests coming to these endpoints and provide a response.
    • Views: These consist of the frontend of the app. If your app is a server-side-rendering app this would most probably consist of templates/views written in pug, ejs etc.
  2. You can read more about the MVC architecture here

authexp-express-starter's People

Contributors

16sweetyjain avatar elit-altum avatar raj5036 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

authexp-express-starter's Issues

[FEAT] - Email templates for welcome emails

Is your feature request related to a problem? Please describe.
Currently all welcome emails being sent by SendGrid are very plain and dull. It would be great to add some well-designed email templates for sending emails and integrating it with the backend.

Describe the solution you'd like
A new integrated template for emails which will be used for sending welcome emails when a user signs up.

Additional context
You may use HTML to create a template from scratch or customize an already existing template. Please make sure the template is under a free license.

Would you like to work on the issue?
No, this is only for beginners / first-time contributors

[FEAT] - Setup Prettier as the default formatter instead of ESLint

Is your feature request related to a problem? Please describe.
Currently ESLint is being as the default style guide but moving to prettier would be more consistent as it also supports Angular, Vue and other framework syntax.

Describe the solution you'd like
Setup prettier as the default formatter and a .prettierrc file for rule modifications.

Additional context
Editors like VSCode provide out of the box support for prettier but having a fallback would be a safer option.

Would you like to work on the issue?
No, This is a beginner only issue.

[FEAT] - Update ESLint rules to ES6 2020

Is your feature request related to a problem? Please describe.
Currently ESLint marks ES6 syntax like arrow functions, const and class keywords etc. as a linting issue.

Describe the solution you'd like
ESLint rules should be fixed so that the new ES6 syntax is not linted as an error.

Additional context
Screenshot:
Arrow functions being linted by ESLint
image

Would you like to work on the issue?
No, this is a beginner only issue.

[FEAT] - Allow users to login with username or email

Is your feature request related to a problem? Please describe.
Currently users can only login by providing username and password. This option might not be feasible for all use cases. We should extend support for signing up with either the username or the email (whichever the user provides) along with the password for more flexibility.

Describe the solution you'd like
Modification in the login controller so that it allows logging in with either email or username whichever is provided in the request body.

Would you like to work on the issue?
No, this is for beginners only.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.