> For the complete documentation index, see [llms.txt](https://docs.rairprotocol.org/rairprotocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rairprotocol.org/rairprotocol/whitepaper-draft/start/codebase.md).

# Codebase

RAIRprotocol is designed as a modular and extensible open source development structure.&#x20;

## Official Repositories

RAIRprotocol utilizes 4 main open source repositories. Each is governed by its own issue creation and code review proceess to govern merging new pull requests to main.&#x20;

* RAIR-DAPP: Core codebase repository that contains all underying system logic including full open source backend.&#x20;
* RAIR-SDK: Abstracted code base designed to help new developers more quickly deploy RAIRprotocol via frontend function calls rather than inteacting with the underlying API natively.&#x20;
* RAIR-Solidity (aka RAIR-onchain) Codebase that houses all onchain logic pertinent to RAIRprotocol. Current spec utlizies ERC2535 dimaond multi-proxy Solidity code, though may be extensible to other blockchain types in the future
* RAIR-Official-Templates-Library: Repository for overified frontend application examples deployed using RAIRprotocol.&#x20;

### RAIR-DAPP

RAIR-dApp is a the heart of RAIRprotocol. This is the source code for all derivative repositories (templates, SDK) Onchain logic is designed to work directly with RAIR-DAPP.

RAIR-DAPP is a mono-repo, meaning it is designed to deploy as one monolithic unit.

<figure><img src="/files/7zagc1d97OAcOlpCdKe5" alt=""><figcaption><p>sample localhost:3001 deployment</p></figcaption></figure>

### Microservices Architecture

RAIRprotocol is currently designed with 6 core microservices that encompass the totality of RAIRprotocol dApp building logic. This may be extended to additional microservices in the future.&#x20;

* RAIR-Node: Within RAIR-DAPP, RAIR-Node is the core backend logic all other microservices are designed around. A key differentiator of RAIRprotocol over competing projects (as mentioned in the whitepaper intro) is the full open sourcing of RAIR-node. Users can deploy their own backend and thus their own API endpoints to their own cloud architecture through RAIR-node.
* RAIR-Front: The default frontend application that utilizes the underlying RAIR-node API endpoints This reference implementation is designed to show developers the full suite of RAIRprotocol functionality, to then be extended and modifited as needed.
* RAIR-Sync: The core syncing for RAIRprotocol. Continuously scrapes onchain data using RPC infrastucture to populate offchain databases.
* RAIR-Stream: Core DRM (digitial rights management) engine that allows users to encrypt and decrypt streaming content using onchain ownership idenfiers (primarily NFTs)
* RAIR-Infra: All cloud architecture that powers RAIRprotocol is also fully open sourced. This includes all Kubernetes workflows (manfiest files, config maps) + all automated testing scripts and other useful infrastructure code.&#x20;

{% hint style="info" %}
For full details about each microservice, and up to date documentation see Github directly or our deciated [Codebase section ](/rairprotocol/codebase/rairsolidity.md)as the whitepaper is canonical text and will not be updated.&#x20;
{% endhint %}
