Molybdenum
Production ready Authentication Server boilerplate for Node.js/Typescript and SQL tool chain
The application is built with the following reasons in mind:
-
To provide a minimal authentication server that can be coupled with a frontend (or mobile) application to provide basic authentication and authorization.
-
As a guide for developers who want to build their own authentication server.
-
To serve as a boilerplate for (backend) developers who don't want to start from scratch when building their own authentication server.
-
To serve as a learning resource for developers who want to learn how to build an authentication server especially with Node.js, Express.js, Typescript and SQL.
Features
Molybdenum ships with the following authentication and authorization features:
- User registration
- User login
- User logout
- User password reset
- User email verification
- User account deletion
- User account update
- User account retrieval
- User account activation
- User account deactivation
- User account password change
- User account password reset
- User account password reset request
- User account password reset verification
- User account password reset verification request
Getting Started
Currently, the only way to get started with the project is to clone, fork or download the repository.
Requirements
The following are required to run the application in development or in production.
- Node.js >= 16.0.0
- MySQL >= 8.0.0 or a preferred SQL server such as PostgreSQL or SQLite
TypeScript >= 4.3.5 - Yarn >= 1.22.0 or a preferred Node package manager such as npm or pnpm
- Docker >= 20.10.0 (optional)
Installation (development)
Molybdenum is built with using yarn for package management. To use other Node package manager such as npm or pnpm.
Delete the yarn.lock
file and run npm install
or pnpm install
to install the dependencies. Also, use your preferred package manager in place of yarn
to execute
the following commands.
- Clone the repository and run
yarn
to install the dependencies. - Create a
.env
file in the root directory and populate it using the.env.example
file. - Run
yarn start
to start the server. - Run
yarn test
to run the tests. - Run
yarn run build
to build the application for production.
Demo
Try out a live deployment demo of the application.
Documentation
Check out the documentation for more information.
API Documentation
HTTP Verb | endpoint | Description | Request Body | Response Body | Response Code | |
---|---|---|---|---|---|---|
1. | GET, PUT, POST, PATCH, DELETE | / | the base URL | not applicable | HTML page | 200 |
2. | POST | /auth/sign-up | the account registration | json { "firstname" : "adeoye"} | HTML page | 201 |
3. | GET | /auth/confirm-email | account verification endpoint | not applicable | HTML page | 200 |
License
Molybdenum is Licensed under the MIT License.