Skip to content

Latest commit

 

History

History
78 lines (58 loc) · 2.33 KB

README.md

File metadata and controls

78 lines (58 loc) · 2.33 KB

accounting-services/auth

Serves API end-points for any operations (creation, updation, deletion etc.) on organization accounts and users. It's named auth since it takes care of both authentication and authorisation.

Development

🚧 Warning

It is currently not possible for developers not associated with Normative to start this service as it requires access to protected resources.

One time Set-up

One time set-up, for system dependencies such as nvm and npm. Before beginning, ensure nvm is installed and you're a member of npmjs.com/org/normative.

$ nvm use
$ npm login # login to personal npm account
$ nvm install-latest-npm

Environment Setup

Make a copy of .env.sample, fill the values (ex: MONGO_URI) and save as .env.dev in the same folder.

Local server

$ nvm use
$ npm install
$ npm start auth # running on localhost:5000

Running unit tests

Tests are written using Jest.

$ nvm use
$ npm run test auth

Repo structure

./
├── src/
  ├── app/                  -- Home for starting the microservice.
  ├── assets/               -- Contains trademarked assets
  ├── authz/                -- Houses the authentication logic
  ├── components/           -- Container for common stuff like email, auth0
  ├── organizationAccount/  -- Houses the application logic for organization accounts
  ├── user/                 -- Houses the application logic for user
  └── main.ts               -- Script to start the microservice
├── Dockerfile
├── README.md
├── jest.config.js
├── tsconfig.app.json
├── tsconfig.json
└── tsconfig.spec.json