> For the complete documentation index, see [llms.txt](https://tech.socialsafety.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tech.socialsafety.net/ssn-for-organisations/architecture.md).

# Architecture

The CBO provides an efficient API for interacting with listings, services and organizations in our graph database.&#x20;

## Schema

SSN for organization uses the same schema and architecture as SS service. See full details [here](/ssn-api/architecture.md)

### SSN FOR ORG API

A Graphql API is exposed [here](https://ssn-for-orgs-staging.herokuapp.com/graphql), and from here you can interact and see the schema along with documentation.&#x20;

### Technology Stack

We majorly use GRANDstack and a mixture of other tools listed below:

* **Programming Language**: JavaScript
* **Frameworks**: Nodejs, Express, Apollo, Graphql, React
* **Core Database:** Neo4j, MongoDb
* In-memory Cache: Redis

### Devops and Hosting

#### SSN Org API hosting

The CBO API is hosted on Heroku under the pipeline name[ ](https://dashboard.heroku.com/pipelines/f9d61a09-d02f-4a56-bc8f-ba923a093d76)[ssn-for-organization](https://dashboard.heroku.com/pipelines/e134739a-87eb-4732-a55d-6e234a73308c). We have two hosted instances for both staging and production environment.&#x20;

* **Staging**: The staging environment is hosted under the name ssn-for-orgs-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 to staging on every push to dev branch.&#x20;
* **Production**: The production environment is hosted under the name ssn-for-orgs-prod

> Note: Since we expose a graphql server as, you can access the staging graphql server [here](https://ssn-for-orgs-staging.herokuapp.com/graphql) and for production here

### 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-for-orgs
```

* Cd into project folder and Install packages using yarn.

```bash
cd ssn-for-orgs
yarn 
```

* Get your `.env` file from your tech lead and add to your project folder.&#x20;
* Start the application locally:

```
yarn start
```

> We may use postman for interacting and testing some part of CBO API. Go to the Philanthrolab [team workspace](https://philanthrolab.postman.co/workspace/Team-Workspace~36f68e3a-2d05-4f4b-831f-48d60fd98ea3/documentation/13777544-174fec2d-8630-46b6-909d-d7c78fc2a73e) on postman to interact with your local instance.&#x20;
