You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/composedb/core-concepts.mdx
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ type Posts @createModel(accountRelation: LIST, description: "A simple Post") {
58
58
59
59
#### Account to Model Relations
60
60
61
-
Anydocumentcanalwaysbequeriedbyitsauthor'saccountusingtherequired `accountRelation` property. See [AccounttoModelRelations](./guides/data-modeling/relations.mdx#account-to-model-relations) for more.
61
+
Anydocumentcanalwaysbequeriedbyitsauthor'saccountusingtherequired `accountRelation` property. See [AccounttoModelRelations](./guides/data-modeling/relations.mdx#account-to-model) for more.
62
62
63
63
##### Model
64
64
@@ -85,7 +85,7 @@ Let's query the `DisplayName` using the author's account:
85
85
86
86
#### Model to Account Relations
87
87
88
-
Enableadocumenttobequeriedbyareferencedaccountusingthe `@accountReference` directive. See [ModeltoAccountRelations](./guides/data-modeling/relations.mdx#model-to-account-relations) for more.
88
+
Enableadocumenttobequeriedbyareferencedaccountusingthe `@accountReference` directive. See [ModeltoAccountRelations](./guides/data-modeling/relations.mdx#model-to-account) for more.
89
89
90
90
##### Model
91
91
@@ -113,7 +113,7 @@ Let's query messages based on recipient using `@accountReference`:
113
113
114
114
#### Model to Model Relations
115
115
116
-
Enable a document to be queried by its relationship to other documents using the `@documentReference` and `@relationFrom` directives. See [Model to Model Relations](./guides/data-modeling/relations.mdx#model-to-model-relations) for more.
116
+
Enable a document to be queried by its relationship to other documents using the `@documentReference` and `@relationFrom` directives. See [Model to Model Relations](./guides/data-modeling/relations.mdx#model-to-model) for more.
Copy file name to clipboardExpand all lines: docs/composedb/guides/composedb-server/running-in-the-cloud.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -323,7 +323,7 @@ docker run -d \
323
323
324
324
### Editing the `daemon.config.json` file
325
325
326
-
To have the settings persist in your Ceramic node, edit the `daemon.config.json` file to include the configurations. The default location is `~/.ceramic/daemon.config.json`. For a full file example, see the [Ceramic](../../../protocol/js-ceramic/guides/ceramic-nodes/running-cloud#example-daemonconfigjson) docs.
326
+
To have the settings persist in your Ceramic node, edit the `daemon.config.json` file to include the configurations. The default location is `~/.ceramic/daemon.config.json`. For a full file example, see the [Ceramic](./server-configurations#default-configurations) docs.
Copy file name to clipboardExpand all lines: docs/composedb/guides/composedb-server/server-configurations.mdx
+1-3Lines changed: 1 addition & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -192,16 +192,14 @@ Only Postgres is currently supported for production usage.
192
192
| remote | IPFS running in separate compute process; recommended for production and everything besides early prototyping | ✅ |
193
193
194
194
### Persistent Storage
195
-
To run a Ceramic node in production, it is critical to persist the [Ceramic state store](../../../protocol/js-ceramic/guides/ceramic-nodes/running-cloud#ceramic-state-store) and the [IPFS datastore](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#datastorespec). The form of storage you choose should also be configured for disaster recovery with data redundancy, and some form of snapshotting and/or backups.
195
+
To run a Ceramic node in production, it is critical to persist the [Ceramic state store](#ceramic-state-store) and the [IPFS datastore](https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#datastorespec). The form of storage you choose should also be configured for disaster recovery with data redundancy, and some form of snapshotting and/or backups.
196
196
197
197
**Loss of this data can result in permanent loss of Ceramic streams and will cause your node to be in a corrupt state.**
198
198
199
199
The Ceramic state store and IPFS datastore are stored on your machine's filesystem by default. The Ceramic state store defaults to `$HOME/.ceramic/statestore`. The IPFS datastore defaults to `ipfs/blocks` located wherever you run IPFS.
200
200
201
201
The fastest way to ensure data persistence is by mounting a persistent volume to your instances and configuring the Ceramic and IPFS nodes to write to the mount location. The mounted volume should be configured such that the data persists if the instance shuts down.
202
202
203
-
You can also use AWS S3 for data storage which is supported for both Ceramic and IPFS. Examples of the configuration are shared on the Ceramic docs [here](../../../protocol/js-ceramic/guides/ceramic-nodes/running-cloud#example-aws-s3-policies).
204
-
205
203
### IPFS Datastore
206
204
207
205
The IPFS datastore stores the raw IPFS blocks that make up Ceramic streams. To prevent data corruption, use environment variables written to your profile file, or otherwise injected into your environment on start so that the datastore location does not change between reboots.
Copy file name to clipboardExpand all lines: docs/composedb/set-up-your-environment.mdx
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,11 +17,11 @@ By the end of this guide you'll have a good understanding of how to get started
17
17
18
18
There are a few ways to set up your environment. Choose the one that best fits your needs:
19
19
20
-
-[Using `create-ceramic-app`](#installation-using-create-ceramic-app) - get up and running quickly with a basic ComposeDB application with one command. Good for the first quick experience with Ceramic and ComposeDB.
21
-
-[Using the Wheel](#installation-using-wheel) - the recommended and the easiest way to configure your full working environment and install the necessary dependencies.
22
-
-[Using JavaScript package managers](#installation-using-javascript-package-managers) - an alternative, more manual, way to configure your working environment which supports `npm`, `pnpm` and `yarn`.
20
+
-[Using `create-ceramic-app`](#2a-installation-using-create-ceramic-app) - get up and running quickly with a basic ComposeDB application with one command. Good for the first quick experience with Ceramic and ComposeDB.
21
+
-[Using the Wheel](#2b-installation-using-wheel) - the recommended and the easiest way to configure your full working environment and install the necessary dependencies.
22
+
-[Using JavaScript package managers](#2c-installation-using-javascript-package-managers) - an alternative, more manual, way to configure your working environment which supports `npm`, `pnpm` and `yarn`.
23
23
24
-
**Install and start the `ceramic-one` binary**
24
+
##### Install and start the `ceramic-one` binary
25
25
26
26
All of the configuration options listed above **require a `ceramic-one` binary up and running**, which provides a data network access. You can run `ceramic-one` on your
27
27
local machine using two simple steps listed below.
@@ -145,7 +145,7 @@ The easiest and recommended way to configure your full local development environ
145
145
146
146
In order to use Wheel, you’ll have to install a few dependencies:
147
147
148
-
→ **Node.js**
148
+
##### Node.js
149
149
150
150
If you don’t already have them installed, you will need to install at least:
151
151
@@ -159,12 +159,12 @@ node -v
159
159
npm -v
160
160
```
161
161
162
-
→ **jq**
162
+
##### jq
163
163
164
164
`jq` is a lightweight and flexible command-line JSON processor. The installation method depends on your operating system. Install it using one of the methods defined in
165
165
the [official tutorial here](https://stedolan.github.io/jq/download/).
166
166
167
-
→ **PostgreSQL** (optional)
167
+
##### PostgreSQL (optional)
168
168
169
169
PostgreSQL is only required for a production configuration on the Mainnet. If you are new to ComposeDB on Ceramic and would like to quickly test it out, you can skip the PostgreSQL installation and come back to it once you are ready to scale your project. You will need Postgres installed on your machine to store indexed data.
170
170
@@ -311,7 +311,7 @@ Check out [this video tutorial](https://www.youtube.com/watch?v=r68FXBTCBZ4) for
311
311
</table>
312
312
313
313
Another way to install the dependencies and configure Ceramic is using JavaScript package managers. This option requires more manual steps. The guide below covers this
314
-
process step-by-step. If you have followed the [Wheel installation](#installation-using-wheel) guide above, you can skip this section.
314
+
process step-by-step. If you have followed the [Wheel installation](#2b-installation-using-wheel) guide above, you can skip this section.
315
315
316
316
#### Install the dependencies
317
317
@@ -322,7 +322,7 @@ mkdir my-project #creates a new directory
322
322
cd my-project #targets the created directory
323
323
```
324
324
325
-
→ **Node.js**
325
+
##### Node.js
326
326
327
327
If you don’t already have them installed, you will need to install Node.js v20 and a package manager. We primarily use `pnpm`, but `npm` and `yarn` are supported as well.
328
328
@@ -336,11 +336,11 @@ node -v
336
336
pnpm -v
337
337
```
338
338
339
-
→ **ceramic-one**
339
+
##### ceramic-one
340
340
341
341
Make sure you have the `ceramic-one` binary up and running. To do that, follow the steps listed [here](#2-installation).
342
342
343
-
→ **Ceramic**
343
+
##### Ceramic
344
344
345
345
ComposeDB runs on Ceramic, so you will need to run a Ceramic node. To get started, we recommend running a local Ceramic node. If you're interested in running the production node, you can follow one of the [guides here](./guides/composedb-server/).
346
346
@@ -383,7 +383,7 @@ yarn global add @ceramicnetwork/cli
383
383
</TabItem>
384
384
</Tabs>
385
385
386
-
→ **ComposeDB**
386
+
##### ComposeDB
387
387
388
388
Next install the ComposeDB CLI, which enables you to interact with ComposeDB data from your terminal:
All dependencies are installed. Now you can start setting up your project. The first step is to run a local Ceramic node.
478
478
479
-
→ **Run a Ceramic node**
479
+
##### Run a Ceramic node
480
480
481
481
You can check that everything was installed correctly by spinning up a Ceramic node. Running the command below will start the Ceramic node in local mode and connect to Clay testnet.
482
482
Indexing is a key component of ComposeDB, which syncs data across nodes. Enable indexing by toggling:
@@ -523,7 +523,7 @@ IMPORTANT: Ceramic API running on 0.0.0.0:7007
523
523
Now, that you have installed everything successfully and are able to run the node, let's create a developer account. You can stop
524
524
the node for now by using the keyboard combination `Control+C`.
525
525
526
-
→ **Generate your private key**
526
+
##### Generate your private key
527
527
528
528
You will need a private key for authorizing ComposeDB CLI commands in the later stages of development. You can generate it using the command below:
529
529
@@ -546,7 +546,7 @@ Store your private key securely - the key allows changes to be made to your app.
546
546
547
547
:::
548
548
549
-
→ **Generate your account**
549
+
##### Generate your account
550
550
551
551
Indexing is one of the key features of ComposeDB. In order to notify the Ceramic node which models have to be indexed, the ComposeDB tools have to interact with the restricted Admin API. Calling the API requires an authenticated Decentralized Identifier (DID) to be provided in the node configuration file. Create a DID by running the following command, using the private key generated previously instead of the placeholder variable `your-private-key`:
552
552
@@ -581,7 +581,7 @@ cd ~/.ceramic
581
581
Inside of this directory you should find the following files:
582
582
583
583
-`daemon.config.json` - your Ceramic node configuration file
584
-
-`statestore` - a local directory for [persisting the data](../protocol/js-ceramic/guides/ceramic-nodes/running-cloud#ceramic-state-store)
584
+
-`statestore` - a local directory for [persisting the data](./guides/composedb-server/server-configurations#ceramic-state-store)
585
585
586
586
Open the `daemon.config.json` file using your preferred code editor and provide the authenticated DID, generated in the [generate your account](#generate-your-account) step of this guide, in the `admin-dids` section of the file as shown in the example below:
0 commit comments