# Backend Variables Library

Variables below are organized by the primary service which consumes them. The exception being "Multi-Service" which lists variables that are utilized in multiple deployments.

Use the bar on the right for quick navigation. To find a specific variable, use your browsers `ctrl+f` function.&#x20;

***

## Blockchain-Networks 🏘

Variables used exclusively by the [Blockchain-Networks service](https://docs.rairprotocol.org/rairprotocol/codebase/rairdapp/rairsync).

For a full integration guide to each blockchain see.&#x20;

### Blockchain Explorer Gateways

<details>

<summary>*_gateway = {URL}</summary>

Type - String

URL to blockchain explorer gateway.

</details>

***

## Media-Service 🏖

Variables used exclusively by the Media-Service.

### Port

<details>

<summary>media_service_port= {Port}</summary>

Type - Int

The port number assigned to Media-Service.

</details>

***

### Rairnode URL

<details>

<summary>base_rairnode_url = {URL}</summary>

Type - String

Used to locate the Rairnode service from Media-Service.&#x20;

http\://{container\_name}:{ports}

</details>

***

## Minting-Network 🏭

Variables used exclusively by the Minting-Network service.

### Sentry (Error Reporting)

<details>

<summary>sentry_enabled = {T/F}</summary>

Type - Boolean

Enable Sentry for Error Reporting

</details>

<details>

<summary>sentry_endpoint = {URL}</summary>

Type - String

</details>

<details>

<summary>sentry_trace_rate = {Rate}</summary>

Type - Float

</details>

<details>

<summary>sentry_release = {Build}</summary>

Type - String

</details>

***

## Rairnode 🏛

Variables used exclusively by the Rairnode service.

### Admin NFT

<details>

<summary>admin_contract = {0xAddress}</summary>

Type - String

Allows users, verified by a smart contract, administrative capabilities inside the application.

</details>

<details>

<summary>admin_nft_chain = {blockchain}</summary>

Blockchain the admin contract is deployed on.&#x20;

</details>

***

### Blockchain-Network URL

<details>

<summary>base_bcn_url= {URL}</summary>

Type - String

Used to locate the Blockchain-Networks service from Rairnode.&#x20;

http\://{container\_name}:{ports}

</details>

***

### Docker Hostname

<details>

<summary>hostname = {Name}</summary>

Type - String

The hostname to be used inside the containers.&#x20;

</details>

***

## Multi-Service 🏟

Variables used by multiple services.

### Alchemy

<details>

<summary>alchemy_api_key = {Key}</summary>

Type - String

The Alchemy free tier should provide the necessary functionality to get started.&#x20;

</details>

***

### Google Cloud

#### Authentication

<details>

<summary>gcp_project_id = {ID}</summary>

Type - String

Unique identifier for a GCP project.

</details>

<details>

<summary>gcp_credentials = {Key}</summary>

Type - String

Private key for authenticating with GCP.

</details>

#### Storage

<details>

<summary>gcp_image_bucket_name= {Name}</summary>

Type - String

Unique name for a GCP image bucket.

</details>

<details>

<summary>gcp_video_bucket_name = {Name}</summary>

Type - String

Unique name for a GCP video bucket.

</details>

<details>

<summary>gcp_gateway = {URL}</summary>

Type - String

Gateway to the GCP storage API.&#x20;

<http://storage.googleapis.com/>

</details>

***

### Hashicorp Vault

#### Vault URL

<details>

<summary>VAULT_URL = {URL}</summary>

Type - String

For connecting to a remote Vault cluster.

</details>

#### Rairnode Config

<details>

<summary>*_generate_mongo_uri_with_vault_credential_util = {T/F}</summary>

Type - Boolean

Select whether to generate the Mongo URI for the \*service database using vault credentials.&#x20;

</details>

<details>

<summary>VAULT_*_APP_ROLE_ID = {ID}</summary>

Type - String

RoleID is an identifier that selects the AppRole against which the other credentials are evaluated.

</details>

<details>

<summary>VAULT_*_APP_ROLE_SECRET_ID = {ID}</summary>

Type - String

SecretID is a credential that is required by default for any login.

</details>

<details>

<summary>VAULT_*_use_x509_cert_auth = {T/F}</summary>

Type - Boolean

Select whether to use x509 auth certificates for passwordless authentication.

</details>

#### Mongo Config

<details>

<summary>mongo_db_name= {Name}</summary>

Type - String

For Vault management of Mongo Instances

</details>

<details>

<summary>*_mongo_db_hostname = {Hostname}</summary>

Type - String

Hostname for Vault managed Mongo instances

</details>

### Super Admin Vault Key

<details>

<summary>SUPER_ADMIN_VAULT_STORE = {Key}</summary>

Type - String

Vault key for a list of users with Super Admin access to the marketplace.

</details>

***

### Pinning

<details>

<summary>ipfs_service= {pinata or ipfs}</summary>

Type - String

RAIR uses IPFS for pinning of token images and metadata. An alternative service such as Pinata can be used if you arent running your own IPFS nodes.&#x20;

</details>

<details>

<summary>ipfs_gateway = {URL}</summary>

Type - String

</details>

<details>

<summary>ipfs_api = {URL}</summary>

Type - String

</details>

***

### Long-term Sync

<details>

<summary>sync_contract_repeat_every = {Minutes}</summary>

Type - Int

Sets time intervals for the syncing of smart contracts. Only for data that changes onchain. Time between end of sync task and next time it starts.

</details>

<details>

<summary>sync_contract_task_interval = {Minutes}</summary>

Type - Int

Sets time intervals for the syncing of smart contracts. Only for data that changes onchain. Time between start of one sync and the next. Waits between blockchains&#x20;

</details>

***

### MongoDB

#### Local

<details>

<summary>localdbuser= {Username}</summary>

Type - String

Local Mongo Username

</details>

<details>

<summary>localdbpass= {Password}</summary>

Type - String

Local Mongo Password

</details>

<details>

<summary>localdbhost= {Hostname}</summary>

Type - String

Local Mongo Hostname

</details>

#### Remote

<details>

<summary>dbuser = {Username}</summary>

Type - String

Remote Mongo Username

</details>

<details>

<summary>dbpass = {Password}</summary>

Type - String

Remote Mongo Password

</details>

<details>

<summary>dbhost = {Hostname}</summary>

Type - String

Remote Mongo Hostname

</details>

#### Logging

<details>

<summary>mongo_log_collection=Log</summary>

Type - String

</details>

<details>

<summary>log_level = {0-6}</summary>

Type - Int

MongoDB offers different log levels to control the verbosity of the logs. These log levels include:

* **0 (off)**:  Disables logging.
* **1 (fatal)**:  Logs only fatal errors that lead to a shutdown.
* **2 (error)**:  Logs errors that do not require a shutdown.
* **3 (warning)**:  Logs warnings and errors.
* **4 (info)**:  Logs informational messages, warnings, and errors.
* **5 (verbose)**:  Logs output, including informational, warning, and error messages.
* **6 (debug)**:  Logs debugging information.

</details>

***

### Product Cover

<details>

<summary>default_product_cover = {URL}</summary>

Type - String

Default image for NFTs that have no metadata.

</details>

***

### RPC Endpoints

<details>

<summary>*_rpc = {URL}</summary>

Type - String

Rublic RPC (Remote Procedure Call) endpoints to connect to remote blockchains for lookup and synchronization.

</details>

***

### Redis (Session Management)

<details>

<summary>redisthhost = {Name}</summary>

Type - String

Hostname

</details>

<details>

<summary>redisport = {Port}</summary>

Type - Int

Port Number

</details>

<details>

<summary>session_ttl = {Lifespan in Seconds}</summary>

Type - Int

The session ttl (time to live) is the length of time a session can be idle before being dropped from the database.

</details>

***

### Session Secret

&#x20;

<details>

<summary>session_secret = {Secret}</summary>

Type - String

Secret used by Rairnode to sign user sessions to prevent tampering.

</details>

***

### Smart Contracts

For a list of RAIR-deployed smart contracts see [RAIRsolidity](https://docs.rairprotocol.org/rairprotocol/codebase/rairsolidity).

<details>

<summary>*_diamond_factory_address = {0xAddress}</summary>

</details>

<details>

<summary>*_diamond_marketplace_address = {0xAddress}</summary>

</details>

<details>

<summary>*_factory_address = {0xAddress}</summary>

</details>

<details>

<summary>*_minter_address = {0xAddress}</summary>

</details>

<details>

<summary>*_resale_address = {0xAddress}</summary>

</details>

<details>

<summary>*_credit_address = {0xAddress}</summary>

</details>

***

## Depreciated 🏚

Variables no longer used for deployment, but are still available.&#x20;

### Infura

Infura provides access to Ethereum and IPFS networks. It allows developers to interact with these networks without needing to run their own nodes.

<details>

<summary>infura_project_id = {id}</summary>

Required to authenticate and authorize requests to Infura’s API endpoints.

</details>

***

### Pinata

<details>

<summary>pinata_key = {Key}</summary>

Type - String

</details>

<details>

<summary>pinata_secret = {Secret}</summary>

</details>

<details>

<summary>pinata_gateway = {URL}</summary>

</details>

***

### Zoom Meeting Functionality

We were once testing integration for token-gated Zoom meetings. These are the leftovers.

<details>

<summary>zoom_api_key = {Key}</summary>

</details>

<details>

<summary>zoom_api_secret= {Secret}</summary>

</details>

<details>

<summary>meeting_id=</summary>

</details>
