diff --git a/docs/.gitignore b/docs/.gitignore index 007f36e..8831b3c 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -6,4 +6,6 @@ # Ignore all .env files except .env.example .env* -!.env.example \ No newline at end of file +!.env.example + +public/_pagefind \ No newline at end of file diff --git a/docs/Dockerfile b/docs/Dockerfile index 41ef78b..2809f68 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -22,6 +22,7 @@ FROM dependencies-env COPY ./package.json ./pnpm-lock.yaml /app/ COPY --from=production-dependencies-env /app/node_modules /app/node_modules COPY --from=build-env /app/.next /app/.next +COPY --from=build-env /app/public /app/public WORKDIR /app EXPOSE 3000 CMD ["pnpm", "start"] \ No newline at end of file diff --git a/docs/app/configuration/page.mdx b/docs/app/configuration/page.mdx index e667ace..42b823b 100644 --- a/docs/app/configuration/page.mdx +++ b/docs/app/configuration/page.mdx @@ -1,5 +1,5 @@ --- -title: Configuration - Boros +title: Configuration sidebarTitle: Configuration asIndexPage: true --- @@ -8,7 +8,93 @@ asIndexPage: true Boros uses a `config.toml` file to define some configuration parameters. At least one Cardano Node Peer is required and a U5C server. -Use this [config.toml](https://github.com/txpipe/boros/blob/main/examples/config.toml) to create yours. +## Schema + +Example `config.toml` + +```toml +[storage] +db_path = "boros.db" + +[server] +listen_address="0.0.0.0:50052" + +[peer_manager] +peers = [ + "Node:3001", + "Node:3001", +] + +[monitor] +retry_slot_diff = 1000 + +[u5c] +uri = "https://mainnet.utxorpc-v0.demeter.run" + +# metadata is optional +[u5c.metadata] +"dmtr-api-key" = "your key" +``` + +### `storage` section + +The `storage` section defines the options to start the local database. This db saves the transaction that the user sends and controls the status. + +| property | type | example | +| ---------- | ------- | --------------------- | +| db_path | string | "/etc/boros/local.db" | + +- `db_path`: path to create the boros db + +### `server` section + +The `server` section controls the options for the gRPC endpoint that can be used by clients. + +| property | type | example | +| -------------- | ------ | --------------- | +| listen_address | string | "0.0.0.0:50051" | + +- `listen_address`: the local address (`IP:PORT`) to listen for incoming gRPC connections. + +### `peer_manager` section + +The `peer_manager` section defines the options that the peer manager uses to connect to the Cardano Node peer and to propagate the transactions. + +| property | type | example | +| -------------- | ------ | ---------------------------- | +| peers | array | [ "Node:3001", "Node:3001" ] | + +- `peers`: The peers address (`DNS or IP:PORT`) to connect to the Cardano Node and to propagate transactions. + +### `monitor` section + +The `monitor` section defines the options to control the monitor stage. + +| property | type | example | +| -------------- | ------ | ------- | +| retry_slot_diff | number | 1000 | + +- `retry_slot_diff`: The number of slot units used to determine when to retry a transaction. If (slot_current_block - slot_tx_sent) > retry_slot_diff, the transaction will be retried. + +### `u5c` section + +The `u5c` section defines the options for U5C to connect to chainsync. + +| property | type | example | +| ----------- | ------ | ---------------------------------------- | +| uri | string | "https://mainnet.utxorpc-v0.demeter.run" | + +- `uri`: The uri to connect to a U5C server. + +### `u5c.metadata` section + +The `u5c.metadata` section is optional and defines metadata for U5C connection, it's a hashmap key value. + +| property | type | example | +| ----------- | ------ | ------- | +| key | string | "value" | + +- `key`: a string value. ## Tips diff --git a/docs/app/design/adrs/001-pipeline/page.md b/docs/app/design/adrs/001-pipeline/page.md index 69165bb..40d0a6c 100644 --- a/docs/app/design/adrs/001-pipeline/page.md +++ b/docs/app/design/adrs/001-pipeline/page.md @@ -1,5 +1,5 @@ --- -title: Pipeline - Boros Docs +title: Pipeline sidebarTitle: Pipeline --- diff --git a/docs/app/design/adrs/002-entry-point/page.md b/docs/app/design/adrs/002-entry-point/page.md index aa6a1aa..543075a 100644 --- a/docs/app/design/adrs/002-entry-point/page.md +++ b/docs/app/design/adrs/002-entry-point/page.md @@ -1,5 +1,5 @@ --- -title: Entry point - Boros Docs +title: Entry point sidebarTitle: Entry point --- diff --git a/docs/app/design/adrs/003-storage/page.md b/docs/app/design/adrs/003-storage/page.md index cc05cc5..f2e8445 100644 --- a/docs/app/design/adrs/003-storage/page.md +++ b/docs/app/design/adrs/003-storage/page.md @@ -1,5 +1,5 @@ --- -title: Storage - Boros Docs +title: Storage sidebarTitle: Storage --- diff --git a/docs/app/design/adrs/page.mdx b/docs/app/design/adrs/page.mdx index 7835216..b7b505b 100644 --- a/docs/app/design/adrs/page.mdx +++ b/docs/app/design/adrs/page.mdx @@ -1,5 +1,5 @@ --- -title: Design Adrs - Boros Docs +title: Design Adrs sidebarTitle: Adrs asIndexPage: true --- diff --git a/docs/app/design/page.mdx b/docs/app/design/page.mdx index 18df4dd..209a361 100644 --- a/docs/app/design/page.mdx +++ b/docs/app/design/page.mdx @@ -1,5 +1,5 @@ --- -title: Design - Boros +title: Design sidebarTitle: Design asIndexPage: true --- diff --git a/docs/app/installation/docker/page.mdx b/docs/app/installation/docker/page.mdx index c72df5d..cdcf20b 100644 --- a/docs/app/installation/docker/page.mdx +++ b/docs/app/installation/docker/page.mdx @@ -1,5 +1,5 @@ --- -title: Docker - Boros +title: Docker sidebarTitle: Docker asIndexPage: true --- diff --git a/docs/app/installation/from_source/page.mdx b/docs/app/installation/from_source/page.mdx index af29f43..1b61877 100644 --- a/docs/app/installation/from_source/page.mdx +++ b/docs/app/installation/from_source/page.mdx @@ -1,5 +1,5 @@ --- -title: From Source - Boros +title: From Source sidebarTitle: From Source asIndexPage: true --- diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx index 7dbb95d..2a240ae 100644 --- a/docs/app/layout.tsx +++ b/docs/app/layout.tsx @@ -6,6 +6,9 @@ import 'nextra-theme-docs/style.css'; export const metadata = { // Define your metadata here // For more information on metadata API, see: https://nextjs.org/docs/app/building-your-application/optimizing/metadata + title: { + template: '%s - Boros', + }, }; const banner = ( diff --git a/docs/package.json b/docs/package.json index f9589d3..6af1afc 100644 --- a/docs/package.json +++ b/docs/package.json @@ -9,7 +9,8 @@ "start": "next start", "lint": "eslint --cache --cache-location ./node_modules/.cache/eslint .", "lint:fix": "eslint . --fix", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "postbuild": "pagefind --site .next/server/app --output-path public/_pagefind" }, "keywords": [], "author": "", @@ -32,6 +33,7 @@ "eslint-plugin-import": "^2.31.0", "eslint-plugin-react-hooks": "^5.1.0", "globals": "^15.14.0", + "pagefind": "^1.3.0", "typescript": "5.7.3" } } diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index b03eca3..e2f3355 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -54,6 +54,9 @@ importers: globals: specifier: ^15.14.0 version: 15.14.0 + pagefind: + specifier: ^1.3.0 + version: 1.3.0 typescript: specifier: 5.7.3 version: 5.7.3 @@ -449,6 +452,31 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@pagefind/darwin-arm64@1.3.0': + resolution: {integrity: sha512-365BEGl6ChOsauRjyVpBjXybflXAOvoMROw3TucAROHIcdBvXk9/2AmEvGFU0r75+vdQI4LJdJdpH4Y6Yqaj4A==} + cpu: [arm64] + os: [darwin] + + '@pagefind/darwin-x64@1.3.0': + resolution: {integrity: sha512-zlGHA23uuXmS8z3XxEGmbHpWDxXfPZ47QS06tGUq0HDcZjXjXHeLG+cboOy828QIV5FXsm9MjfkP5e4ZNbOkow==} + cpu: [x64] + os: [darwin] + + '@pagefind/linux-arm64@1.3.0': + resolution: {integrity: sha512-8lsxNAiBRUk72JvetSBXs4WRpYrQrVJXjlRRnOL6UCdBN9Nlsz0t7hWstRk36+JqHpGWOKYiuHLzGYqYAqoOnQ==} + cpu: [arm64] + os: [linux] + + '@pagefind/linux-x64@1.3.0': + resolution: {integrity: sha512-hAvqdPJv7A20Ucb6FQGE6jhjqy+vZ6pf+s2tFMNtMBG+fzcdc91uTw7aP/1Vo5plD0dAOHwdxfkyw0ugal4kcQ==} + cpu: [x64] + os: [linux] + + '@pagefind/windows-x64@1.3.0': + resolution: {integrity: sha512-BR1bIRWOMqkf8IoU576YDhij1Wd/Zf2kX/kCI0b2qzCKC8wcc2GQJaaRMCpzvCCrmliO4vtJ6RITp/AnoYUUmQ==} + cpu: [x64] + os: [win32] + '@react-aria/focus@3.19.1': resolution: {integrity: sha512-bix9Bu1Ue7RPcYmjwcjhB14BMu2qzfJ3tMQLqDc9pweJA66nOw8DThy3IfVr8Z7j2PHktOLf9kcbiZpydKHqzg==} peerDependencies: @@ -2131,6 +2159,10 @@ packages: package-manager-detector@0.2.8: resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} + pagefind@1.3.0: + resolution: {integrity: sha512-8KPLGT5g9s+olKMRTU9LFekLizkVIu9tes90O1/aigJ0T5LmyPqTzGJrETnSw3meSYg58YH7JTzhTTW/3z6VAw==} + hasBin: true + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -3097,6 +3129,21 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.18.0 + '@pagefind/darwin-arm64@1.3.0': + optional: true + + '@pagefind/darwin-x64@1.3.0': + optional: true + + '@pagefind/linux-arm64@1.3.0': + optional: true + + '@pagefind/linux-x64@1.3.0': + optional: true + + '@pagefind/windows-x64@1.3.0': + optional: true + '@react-aria/focus@3.19.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: '@react-aria/interactions': 3.23.0(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -5502,6 +5549,14 @@ snapshots: package-manager-detector@0.2.8: {} + pagefind@1.3.0: + optionalDependencies: + '@pagefind/darwin-arm64': 1.3.0 + '@pagefind/darwin-x64': 1.3.0 + '@pagefind/linux-arm64': 1.3.0 + '@pagefind/linux-x64': 1.3.0 + '@pagefind/windows-x64': 1.3.0 + parent-module@1.0.1: dependencies: callsites: 3.1.0