> For the complete documentation index, see [llms.txt](https://docs.oceanenterprise.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oceanenterprise.io/developers/architecture.md).

# High-Level Architecture

This page describes the architecture of a Ocean Enterprise system

Ocean Enterprise has a multi-layer architecture, as presented in the following diagram.&#x20;

<figure><img src="https://1789397093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH0zpgrXbeZ7u6UuCV9Gz%2Fuploads%2FMRyW7X75nxpfu8poq1K4%2Fimage.png?alt=media&amp;token=b7010e32-2f6b-4eaa-87e5-d4d01b7fa6c4" alt=""><figcaption></figcaption></figure>

**Data Storage Layer:**  handles saving and retrieving of the data managed by the OE stack. The following types of storage are used:

* *IPFS* for storing the asset description. When an asset is created in OE, its description, including all metadata attached to the asset, is saved in IPFS.
* *Blockchain* for storing the reference to the asset description. After the description of the asset is created in IPFS, the reference to the IPFS object is saved in a transaction on the blockchain.
* *Web storage* for storing the actual content of the assets. For assets of type dataset or algorithm, their content is saved on a storage platform accessible via the HTTP protocol. The storage platform can be either on the publisher's premises or in the cloud.&#x20;

**Business Logic Layer:** Ocean Enterprise enables a decentralized exchange of data, on one side, and value, on the other side, between a publisher and a consumer. The core element that enables this exchange is represented by the Smart Contracts deployed on-chain.  To this end, the OE Smart Contracts implement the flows for publishing and consuming assets. This layer includes factory contracts, templates for data NFTs and data tokens, fixed-rate exchange contracts for paid assets, and Dispenser contracts for free assets.&#x20;

**Services Layer:** Represented by the Ocean Node component, this layer acts as a bridge between the Business Logic Layer and SDK, orchestrating how requests are processed and how business logic is executed. It provides the following services:

* orchestration of the entire consumption flows (download and Compute-To-Data).
* validation for requests.
* data encryption/decryption
* data streaming of the purchased asset to the consumer
* indexing mechanisms for assets
* abstraction of the complexity of the business and data layer, exposing clean APIs&#x20;

**SDK:** The ocean.js library encapsulates the Smart Contract functions to create assets as well as the services provided by Ocean Node in JavaScript functions, which can be used to develop OE-enabled business applications.&#x20;

**User Interface:** This facilitates the interaction between an end-user and the system. OE provides two interfaces:

* *Ocean Enterprise Marketplace*: a graphical interface where users can publish, retrieve, and consume assets in a very user-friendly manner. The user interface controls how data is displayed and how it responds to user actions. It also performs input validations before passing data to deeper levels.
* *Command Line Interface (CLI)*: a set of high-level tools that enable the creation and consumption of OE assets from a command line interface. This is appropriate when OE assets need to be manipulated in back-end like applications, where a user interface is not required. &#x20;

**Access Control Layer:** Is a critical component that governs who can interact with specific resources in OE and under what conditions.  It acts as a gatekeeper, enforcing policies that determine user permissions based on identity or other descriptive attributes. This layer controls, for instance, who is allowed to connect to the dataspace, publish assets, consume a specific asset, or which algorithm is allowed to be executed on a specific dataset.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.oceanenterprise.io/developers/architecture.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
