Architecture

This document outlines the high level architectural design for SSN Auth API.

Schema

User schema is based on the different services SSN Auth API handles. At the moment, it handles four services:

  1. SSN for Organization. See user schema here.

  2. Social Safety Net. See user schema here.

  3. Datalabs. See user schema here.

  4. SSN Admin Dashboard. See user schema here.

SSN AUTH API

To view and use the SSN API, visit the Postman playground here, you can also understand what fields are used from the schema key page.

Technology Stack

We are using the following tech stack for SSN AUTH API:

  • Programming Language: JavaScript

  • Frameworks: Nodejs and Express

  • Core Database: Mongo Db

Devops and Hosting

SSN Auth Database

  • Staging Instance: We use mongo db Atlas for all staging relating work. This is quick for doing iterations.

  • Production Instance: Custom Mongo db databases is hosted on GCP for production instance under the name ssn-auth-mongodb-production​

SSN Auth API hosting

The SSN API is hosted on Heroku under the pipeline name ssn-auth. We have two hosted instances for both staging and production environment.

  • Staging: The staging environment is hosted under the name ssn-auth-staging. It is directly linked to the dev branch on the GitHub repository. Heroku CI/CD has been configured to automatically run tests and deploy a new version on every push to dev branch.

  • Production: The production environment is hosted under the name ssn-auth-prod. It is directly linked to the main branch on the GitHub repository. Heroku CI/CD has been configured to automatically run tests and deploy a new version on every push to main branch.

Development environment setup

For developers, to set up a local environment, follow the steps below:

  • Ensure you have Nodejs (v12 and above), Yarn and Git installed.

  • Clone the repository:

git clone https://github.com/PhilanthroLab/SSN-Auth

  • Cd into project folder and Install packages using yarn.

  • Get the .env files from your tech lead and add to your project folder.

Last updated

Was this helpful?