This project is a Single Sign-On (SSO) REST API with Multi-Tenancy, constructed using Node.js and TypeScript.
The SSO API is a project that allows users to authenticate once and gain access to the resources of multiple software systems.
- Node.js
- TypeScript
- PostgreSQL (or any database you prefer, just make sure to install the corresponding driver)
- Clone the repository
- Install the dependencies with
npm install
- Copy
.env.example
to.env
and fill in your database credentials and other configurations - Run the migrations with
npm run migration:run
- Build the project with
npm run build
- Start the server with
npm run start
npm run test
: Runs the tests (currently not specified)npm run prebuild
: Removes thedist/
directorynpm run build
: Compiles TypeScript files into JavaScriptnpm run watch-ts
: Watches for changes in TypeScript filesnpm run start-ts
: Starts the server from the compiled JavaScript filesnpm run start
: Builds and starts the servernpm run dev
: Starts the server in development mode with nodemonnpm run create
: Creates a new TypeORM migrationnpm run migration:generate
: Generates a new TypeORM migrationnpm run migration:create
: Creates a new TypeORM migrationnpm run migration:run
: Runs the TypeORM migrationsnpm run migration:revert
: Reverts the last TypeORM migration
This project uses several dependencies, including:
bcrypt
for password hashingjsonwebtoken
for JWT handlingtypeorm
for ORMzod
for schema validationexpress
for the serverdotenv
for environment variable managementwinston
for logging
Murat Demirci