A fun project which provides Complete Authentication and Registration of all users.
GPL-3.0 License
A fun project which provides Complete Authentication and Registration of all users with:
The Server is made on Node.js
(v10.12.0)
Express.js
is used as the server framework (v4.16.0)
The database used is MongoDB
and is hosted on a MongoDB Atlas Cluster
.
Mongoose.js
is used as an ODM (v5.4.1)
The Front-end is made with Vanilla HTML, CSS and JS
.
Materialize.css
is used for better styling of the project.
Font Awesome
for icons
and Animate.css
for animations
Many security precautions have been taken:
Passport.js
has been integrated into the application for Secure Authentication of User Credentials over OAuth 2.0 from Google
, Facebook
, GitHub
, LinkedIn
and Local Email Verification
.
connect-redis
for in-memory session storage, better performance.The file ./bin/config/config
exports the config object which is a cover over the .env file for better protections and encapsulation (Create a .env
file first in bin folder
).
the ./bin/config
directory also have the development.js
, production.js
and testing.js
files for fine tuning the config object in the respective NODE_ENV
for more info open these files and go through the comments.
For security Helmet is used with its defaults and additionally Content Security Policy
Additionally other mechanisms are also used:-
./middlewares/security/globalSecurity.js
and disable it and import ./middlewares/security/csurfSetup.js
to the file where it is required. for more details refer csurf../middlewares/security/limiterSetup.js
The response object is gzip compressed using compression. To request for an uncompressed response use x-no-compression in the request header.
npm install
- installs all the dependenciesnpm start
- lints the server and client script, starts eslint on watch mode on server scripts and starts the project at localhost:1998 in debug mode.npm run start-w
- Restarts the server(using nodemon) on every save and lints the server and client side scripts on each save.npm run start-w-lite
- Simply restarts the server(using nodemon) on every save.npm run lint-server
- lints the server scripts (all scripts except that in node_module and public directory) once.npm run lint-client
- lints the client scripts (all scripts in the public directory) once.npm run lint-w
- starts the linter in watch mode. When called from root directory it watches the server scripts and when called in public directory it watches the client scripts.npm run localTunnel
- exposes localhost:1998 to the world wide webnpm run lt
- runs npm start
and npm run localTunnel
in parallelUse
npm run --silent <your-script>
to hide the internal logs from your terminal window.eg:npm run --silent start-w
ornpm run --silent start-w-lite