Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache: 'yarn'
- run: yarn install
- run: yarn build
132 changes: 116 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,141 @@
# Powerloom Docs
# Powerloom Documentation

This is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
Official documentation for Powerloom - The Decentralized Data Protocol

[View Documentation](https://docs.powerloom.io) | [Discord](https://discord.com/invite/powerloom) | [Twitter](https://twitter.com/PowerLoomHQ)

## About

This repository contains the official documentation for Powerloom, a decentralized data protocol that enables developers to build data-driven applications with verifiable, real-time data.

## Quick Start

### Prerequisites

- Node.js ≥ 20.0.0
- Yarn package manager

### Installation

```
$ yarn
```bash
# Clone the repository
git clone https://github.com/Powerloom/docs.git
cd docs

# Install dependencies
yarn install --frozen-lockfile
```

### Local Development
### Development

```
$ yarn start
```bash
# Start the development server
yarn start

# The site will be available at http://localhost:3000
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
The development server features hot reloading - most changes are reflected immediately without restarting.

### Build

```bash
# Create production build
yarn build

# Test the production build locally
yarn serve
```

## Project Structure

```
$ yarn build
docs/
├── docs/ # Documentation content
│ ├── Protocol/ # Protocol specifications
│ ├── build-with-powerloom/ # Developer guides
│ ├── chain-migration/ # V1 to V2 migration guides
│ └── participate/ # Network participation guides
├── src/ # Custom React components
├── static/ # Static assets (images, files)
├── docusaurus.config.js # Site configuration
└── sidebars.js # Navigation structure
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.
## Key Features

- **Fast Builds**: Powered by Docusaurus 3.8.1 with experimental Rspack bundler
- **Full-Text Search**: Integrated Typesense search for instant results
- **Dark Mode**: Automatic theme switching based on system preferences
- **MDX Support**: Enhanced Markdown with React components

## Contributing

### Deployment
We welcome contributions to improve our documentation!

Using SSH:
### Documentation Guidelines

- Use clear, concise language
- Include code examples where applicable
- Add screenshots for UI-related content
- Cross-reference related topics with links
- Follow the existing file structure

### Commit Convention

We use conventional commits:
- `feat:` New documentation or features
- `fix:` Corrections to existing docs
- `chore:` Maintenance tasks
- `docs:` Documentation-only changes

## Configuration

### Environment Variables

Create a `.env` file for local configuration:

```bash
# Typesense Search (optional)
TYPESENSE_API_KEY=your_api_key
TYPESENSE_HOST=your_host
```
$ USE_SSH=true yarn deploy

## Deployment

The documentation is automatically deployed via GitHub Actions on merges to `main`.

### Manual Deployment

For GitHub Pages deployment:

```bash
# Using SSH
USE_SSH=true yarn deploy

# Using HTTPS
GIT_USER=<Your GitHub username> yarn deploy
```

Not using SSH:
## Troubleshooting

**Build fails with memory error**
```bash
NODE_OPTIONS="--max-old-space-size=4096" yarn build
```
$ GIT_USER=<Your GitHub username> yarn deploy

**Port 3000 already in use**
```bash
yarn start --port 3001
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
## Resources

- **Live Documentation**: https://docs.powerloom.io
- **Powerloom Website**: https://powerloom.io
- **GitHub**: https://github.com/Powerloom
- **Discord Community**: https://discord.com/invite/powerloom

## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
2 changes: 1 addition & 1 deletion docs/Protocol/Specifications/Epoch.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ The Force Consensus service is an optional mechanism that can be run by anyone i

The Force Consensus service operates slightly differently than the Epoch Generator and is heavily optimized to handle a large number of projects. The sequence diagram explaining the flow is given below.

![Force consensus mechanism](https://raw.githubusercontent.com/PowerLoom/onchain-consensus/feat/force_consensus_only_relevant_projects/docs/images/force_consensus.png)
![Force consensus mechanism](https://raw.githubusercontent.com/Powerloom/onchain-consensus/feat/force_consensus_only_relevant_projects/docs/images/force_consensus.png)

- [Epoch Generator Source Code on Github](https://github.com/powerloom/onchain-consensus/blob/63d09aa9ab1d98a2fed55e05b7760c12692fea83/epoch_generator.py)
2 changes: 1 addition & 1 deletion docs/build-with-powerloom/devnet/FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ This ensures they do not have to spend gas fees to submit snapshots on the Power
To check if your node is running actively, navigate to https://devnet-mint.powerloom.dev. This dashboard shows both your minted slots and real-time node status, allowing you to monitor your snapshotter's performance.

### Where can I seek help if I encounter issues not covered in the troubleshooting section?
Refer to the troubleshooting section of the documentation for common solutions or reach out to the PowerLoom team on [Discord](https://discord.com/invite/powerloom) for further assistance.
Refer to the troubleshooting section of the documentation for common solutions or reach out to the Powerloom team on [Discord](https://discord.com/invite/powerloom) for further assistance.

### Is there a community forum or Discord channel for Powerloom developers?
Yes, we have a Discord channel for Powerloom developers. Here’s the link, [Powerloom Discord](https://discord.com/invite/powerloom).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Whether you are developing your own application or extending our existing use ca
- `PROTOCOL_STATE_CONTRACT`: The contract address for the protocol state.
- `RELAYER_HOST`: The host address for the relayer.
- `SLACK_REPORTING_URL`: The URL for reporting to Slack.
- `POWERLOOM_REPORTING_URL`: The URL for reporting to PowerLoom.
- `POWERLOOM_REPORTING_URL`: The URL for reporting to Powerloom.
- `WEB3_STORAGE_TOKEN`: The token for Web3.Storage. You can generate or retrieve this token from your [API tokens page](https://web3.storage/tokens/?create=true) after signing up for a free plan at web3.storage.

3. **Running the Node** - Run `./build.sh` (ideally in a `screen`) to start the Snapshotter Node
Expand Down Expand Up @@ -91,7 +91,7 @@ Extending existing use cases or building your own use cases requires a slightly
- `PROTOCOL_STATE_CONTRACT`: The contract address for the protocol state.
- `RELAYER_HOST`: The host address for the relayer.
- `NAMESPACE`: The unique key used to identify your project namespace around which all consensus activity takes place.
- `POWERLOOM_REPORTING_URL`: The URL for reporting to PowerLoom.
- `POWERLOOM_REPORTING_URL`: The URL for reporting to Powerloom.
- `PROST_CHAIN_ID`: The chain ID for the PROST RPC service.
- `IPFS_URL`: The URL for the IPFS (InterPlanetary File System) service in HTTP(s) (e.g. `https://ipfs.infura.io:5001`) multiaddr format (e.g. `/dns4/ipfs.infura.io/tcp/5001/https`)
- `IPFS_API_KEY`: The API key for the IPFS service (if required).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The following output may vary depending on whether you have run snapshotter node

```
./diagnose.sh
🔍 Starting PowerLoom Node Diagnostics...
🔍 Starting Powerloom Node Diagnostics...

📦 Checking Docker installation...
✅ Docker is installed and running
Expand All @@ -29,8 +29,8 @@ The following output may vary depending on whether you have run snapshotter node
⚠️ Port 50051 is in use
✅ Next available Collector port: 50052

🔍 Checking existing PowerLoom containers...
Found existing PowerLoom containers:
🔍 Checking existing Powerloom containers...
Found existing Powerloom containers:
snapshotter-lite-v2-xxx1-mainnet-UNISWAPV2-ETH
snapshotter-lite-local-collector-xxx1-mainnet-UNISWAPV2-ETH
snapshotter-lite-v2-xxx2-mainnet-UNISWAPV2-ETH
Expand All @@ -52,7 +52,7 @@ If the diagnostic script finds any running containers tagged with `snapshotter-l
Select `y` at the following prompt and you see some logs like the following:

```
Would you like to stop and remove existing PowerLoom containers? (y/n): y
Would you like to stop and remove existing Powerloom containers? (y/n): y

Stopping running containers... (timeout: 30s per container)
Attempting to stop container snapshotter-lite-v2-xxx1-mainnet-UNISWAPV2-ETH...
Expand All @@ -73,7 +73,7 @@ Removing container snapshotter-lite-v2-xxx2-mainnet-UNISWAPV2-ETH...
Enter `y` at the following prompt and you see some logs like the following:

```
Would you like to remove existing PowerLoom networks? (y/n): y
Would you like to remove existing Powerloom networks? (y/n): y

Removing networks...
snapshotter-lite-v2-xxx1-mainnet-UNISWAPV2-ETH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Prerequisite: Ensure that the minimum requirements are met by the system on whic
- `PROST_CHAIN_ID`: The chain ID for the PROST RPC service.
- Optionally, you may also set the following variables:
around which all consensus activity takes place.
- `POWERLOOM_REPORTING_URL`: The URL for reporting to PowerLoom.
- `POWERLOOM_REPORTING_URL`: The URL for reporting to Powerloom.
- `IPFS_URL`: The URL for the IPFS (InterPlanetary File System) service in HTTP(s) (e.g. `https://ipfs.infura.io:5001`) multiaddr format (e.g. `/dns/ipfs.infura.io/tcp/5001/https`)
- `IPFS_API_KEY`: The API key for the IPFS service (if required).
- `IPFS_API_SECRET`: The API secret for the IPFS service (if required).
Expand All @@ -43,7 +43,7 @@ Prerequisite: Ensure that the minimum requirements are met by the system on whic
```

4. **Displaying the Dashboard**
- Once all of the services are up and running, the front-end can be accessed via [Pooler Frontend](https://github.com/powerloom/pooler-frontend/tree/aave) to see an Aave V3 summary data dashboard similar to the [PowerLoom Aave V3 Dasboard](https://aave-v3.powerloom.io/).
- Once all of the services are up and running, the front-end can be accessed via [Pooler Frontend](https://github.com/powerloom/pooler-frontend/tree/aave) to see an Aave V3 summary data dashboard similar to the [Powerloom Aave V3 Dasboard](https://aave-v3.powerloom.io/).
- The front-end does not come packaged as part of the Aave deploy repository and will need to be run separately. The Front-end deployment instructions can be found [here](https://github.com/powerloom/pooler-frontend/tree/aave?tab=readme-ov-file#powerloom-pooler-product).
- The dashboard's `Synced by` section displays the time of the last snapshot taken, indicating if your snapshotting is falling behind.

Expand Down
20 changes: 12 additions & 8 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ const config = {
},


codeblock: {
showGithubLink: true,
githubLinkLabel: 'View on GitHub',
showRunmeLink: false,
runmeLinkLabel: 'Checkout via Runme'
},
languageTabs: [
{
highlight: "bash",
Expand Down Expand Up @@ -180,7 +174,7 @@ const config = {
href: 'https://careers.powerloom.io/'
}
],
copyright: `Copyright © ${new Date().getFullYear()} Powerloom Inc.`,
copyright: `Copyright © ${new Date().getFullYear()} Powerloom Network (BVI) Ltd.`,
},
prism: {
theme: lightCodeTheme,
Expand All @@ -193,8 +187,18 @@ const config = {
plugins: [
],

future: {
v4: {
removeLegacyPostBuildHeadAttribute: true, // required
},
experimental_faster: {
ssgWorkerThreads: true,
rspackBundler: true,
rspackPersistentCache: true,
},
},

themes: [
'docusaurus-theme-github-codeblock',
'docusaurus-theme-search-typesense'
]
};
Expand Down
35 changes: 22 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"name": "docs",
"version": "0.0.0",
"name": "powerloom-docs",
"version": "1.0.0",
"private": true,
"license": "Apache-2.0",
"author": "Powerloom",
"homepage": "https://docs.powerloom.io",
"bugs": {
"url": "https://github.com/powerloom/docs/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/powerloom/docs.git"
},
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
Expand All @@ -18,20 +28,19 @@
"clean-api-docs:version": "docusaurus clean-api-docs:version"
},
"dependencies": {
"@docusaurus/core": "^3.7.0",
"@docusaurus/preset-classic": "^3.7.0",
"@docusaurus/core": "^3.8.1",
"@docusaurus/faster": "^3.8.1",
"@docusaurus/preset-classic": "^3.8.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.2.1",
"docusaurus": "^1.14.7",
"docusaurus-theme-github-codeblock": "^1.1.4",
"docusaurus-theme-search-typesense": "^0.15.0-0",
"clsx": "^2.0.0",
"docusaurus-theme-search-typesense": "^0.25.0",
"prism-react-renderer": "^2.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.7.0",
"@docusaurus/types": "^3.7.0"
"@docusaurus/module-type-aliases": "^3.8.1",
"@docusaurus/types": "^3.8.1"
},
"browserslist": {
"production": [
Expand All @@ -46,6 +55,6 @@
]
},
"engines": {
"node": ">=18.0"
"node": ">=20.0"
}
}
Loading