Skip to content

Commit 9808f2e

Browse files
authored
Merge pull request #70 from powerloom/chore/update-docusaurus
chore: update Docusaurus, cleanup dependencies and enable performance optimizations
2 parents 9e1d071 + 6bdedca commit 9808f2e

File tree

10 files changed

+2509
-7911
lines changed

10 files changed

+2509
-7911
lines changed

.github/workflows/node.js.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616

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

2222
steps:
23-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
2424
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v3
25+
uses: actions/setup-node@v4
2626
with:
2727
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
28+
cache: 'yarn'
2929
- run: yarn install
3030
- run: yarn build

README.md

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,141 @@
1-
# Powerloom Docs
1+
# Powerloom Documentation
22

3-
This is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
3+
Official documentation for Powerloom - The Decentralized Data Protocol
4+
5+
[View Documentation](https://docs.powerloom.io) | [Discord](https://discord.com/invite/powerloom) | [Twitter](https://twitter.com/PowerLoomHQ)
6+
7+
## About
8+
9+
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.
10+
11+
## Quick Start
12+
13+
### Prerequisites
14+
15+
- Node.js ≥ 20.0.0
16+
- Yarn package manager
417

518
### Installation
619

7-
```
8-
$ yarn
20+
```bash
21+
# Clone the repository
22+
git clone https://github.com/Powerloom/docs.git
23+
cd docs
24+
25+
# Install dependencies
26+
yarn install --frozen-lockfile
927
```
1028

11-
### Local Development
29+
### Development
1230

13-
```
14-
$ yarn start
31+
```bash
32+
# Start the development server
33+
yarn start
34+
35+
# The site will be available at http://localhost:3000
1536
```
1637

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

1940
### Build
2041

42+
```bash
43+
# Create production build
44+
yarn build
45+
46+
# Test the production build locally
47+
yarn serve
48+
```
49+
50+
## Project Structure
51+
2152
```
22-
$ yarn build
53+
docs/
54+
├── docs/ # Documentation content
55+
│ ├── Protocol/ # Protocol specifications
56+
│ ├── build-with-powerloom/ # Developer guides
57+
│ ├── chain-migration/ # V1 to V2 migration guides
58+
│ └── participate/ # Network participation guides
59+
├── src/ # Custom React components
60+
├── static/ # Static assets (images, files)
61+
├── docusaurus.config.js # Site configuration
62+
└── sidebars.js # Navigation structure
2363
```
2464

25-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
65+
## Key Features
66+
67+
- **Fast Builds**: Powered by Docusaurus 3.8.1 with experimental Rspack bundler
68+
- **Full-Text Search**: Integrated Typesense search for instant results
69+
- **Dark Mode**: Automatic theme switching based on system preferences
70+
- **MDX Support**: Enhanced Markdown with React components
71+
72+
## Contributing
2673

27-
### Deployment
74+
We welcome contributions to improve our documentation!
2875

29-
Using SSH:
76+
### Documentation Guidelines
3077

78+
- Use clear, concise language
79+
- Include code examples where applicable
80+
- Add screenshots for UI-related content
81+
- Cross-reference related topics with links
82+
- Follow the existing file structure
83+
84+
### Commit Convention
85+
86+
We use conventional commits:
87+
- `feat:` New documentation or features
88+
- `fix:` Corrections to existing docs
89+
- `chore:` Maintenance tasks
90+
- `docs:` Documentation-only changes
91+
92+
## Configuration
93+
94+
### Environment Variables
95+
96+
Create a `.env` file for local configuration:
97+
98+
```bash
99+
# Typesense Search (optional)
100+
TYPESENSE_API_KEY=your_api_key
101+
TYPESENSE_HOST=your_host
31102
```
32-
$ USE_SSH=true yarn deploy
103+
104+
## Deployment
105+
106+
The documentation is automatically deployed via GitHub Actions on merges to `main`.
107+
108+
### Manual Deployment
109+
110+
For GitHub Pages deployment:
111+
112+
```bash
113+
# Using SSH
114+
USE_SSH=true yarn deploy
115+
116+
# Using HTTPS
117+
GIT_USER=<Your GitHub username> yarn deploy
33118
```
34119

35-
Not using SSH:
120+
## Troubleshooting
36121

122+
**Build fails with memory error**
123+
```bash
124+
NODE_OPTIONS="--max-old-space-size=4096" yarn build
37125
```
38-
$ GIT_USER=<Your GitHub username> yarn deploy
126+
127+
**Port 3000 already in use**
128+
```bash
129+
yarn start --port 3001
39130
```
40131

41-
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.
132+
## Resources
133+
134+
- **Live Documentation**: https://docs.powerloom.io
135+
- **Powerloom Website**: https://powerloom.io
136+
- **GitHub**: https://github.com/Powerloom
137+
- **Discord Community**: https://discord.com/invite/powerloom
138+
139+
## License
140+
141+
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.

docs/Protocol/Specifications/Epoch.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ The Force Consensus service is an optional mechanism that can be run by anyone i
6363

6464
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.
6565

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

6868
- [Epoch Generator Source Code on Github](https://github.com/powerloom/onchain-consensus/blob/63d09aa9ab1d98a2fed55e05b7760c12692fea83/epoch_generator.py)

docs/build-with-powerloom/devnet/FAQs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ This ensures they do not have to spend gas fees to submit snapshots on the Power
9090
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.
9191

9292
### Where can I seek help if I encounter issues not covered in the troubleshooting section?
93-
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.
93+
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.
9494

9595
### Is there a community forum or Discord channel for Powerloom developers?
9696
Yes, we have a Discord channel for Powerloom developers. Here’s the link, [Powerloom Discord](https://discord.com/invite/powerloom).

docs/build-with-powerloom/snapshotter-node/full-node/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Whether you are developing your own application or extending our existing use ca
5252
- `PROTOCOL_STATE_CONTRACT`: The contract address for the protocol state.
5353
- `RELAYER_HOST`: The host address for the relayer.
5454
- `SLACK_REPORTING_URL`: The URL for reporting to Slack.
55-
- `POWERLOOM_REPORTING_URL`: The URL for reporting to PowerLoom.
55+
- `POWERLOOM_REPORTING_URL`: The URL for reporting to Powerloom.
5656
- `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.
5757

5858
3. **Running the Node** - Run `./build.sh` (ideally in a `screen`) to start the Snapshotter Node
@@ -91,7 +91,7 @@ Extending existing use cases or building your own use cases requires a slightly
9191
- `PROTOCOL_STATE_CONTRACT`: The contract address for the protocol state.
9292
- `RELAYER_HOST`: The host address for the relayer.
9393
- `NAMESPACE`: The unique key used to identify your project namespace around which all consensus activity takes place.
94-
- `POWERLOOM_REPORTING_URL`: The URL for reporting to PowerLoom.
94+
- `POWERLOOM_REPORTING_URL`: The URL for reporting to Powerloom.
9595
- `PROST_CHAIN_ID`: The chain ID for the PROST RPC service.
9696
- `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`)
9797
- `IPFS_API_KEY`: The API key for the IPFS service (if required).

docs/build-with-powerloom/snapshotter-node/lite-node-v2/diagnostics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The following output may vary depending on whether you have run snapshotter node
1515

1616
```
1717
./diagnose.sh
18-
🔍 Starting PowerLoom Node Diagnostics...
18+
🔍 Starting Powerloom Node Diagnostics...
1919
2020
📦 Checking Docker installation...
2121
✅ Docker is installed and running
@@ -29,8 +29,8 @@ The following output may vary depending on whether you have run snapshotter node
2929
⚠️ Port 50051 is in use
3030
✅ Next available Collector port: 50052
3131
32-
🔍 Checking existing PowerLoom containers...
33-
Found existing PowerLoom containers:
32+
🔍 Checking existing Powerloom containers...
33+
Found existing Powerloom containers:
3434
snapshotter-lite-v2-xxx1-mainnet-UNISWAPV2-ETH
3535
snapshotter-lite-local-collector-xxx1-mainnet-UNISWAPV2-ETH
3636
snapshotter-lite-v2-xxx2-mainnet-UNISWAPV2-ETH
@@ -52,7 +52,7 @@ If the diagnostic script finds any running containers tagged with `snapshotter-l
5252
Select `y` at the following prompt and you see some logs like the following:
5353

5454
```
55-
Would you like to stop and remove existing PowerLoom containers? (y/n): y
55+
Would you like to stop and remove existing Powerloom containers? (y/n): y
5656
5757
Stopping running containers... (timeout: 30s per container)
5858
Attempting to stop container snapshotter-lite-v2-xxx1-mainnet-UNISWAPV2-ETH...
@@ -73,7 +73,7 @@ Removing container snapshotter-lite-v2-xxx2-mainnet-UNISWAPV2-ETH...
7373
Enter `y` at the following prompt and you see some logs like the following:
7474

7575
```
76-
Would you like to remove existing PowerLoom networks? (y/n): y
76+
Would you like to remove existing Powerloom networks? (y/n): y
7777
7878
Removing networks...
7979
snapshotter-lite-v2-xxx1-mainnet-UNISWAPV2-ETH

docs/build-with-powerloom/use-cases/existing-implementations/aavev3-dashboard/setup-and-extension.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Prerequisite: Ensure that the minimum requirements are met by the system on whic
2929
- `PROST_CHAIN_ID`: The chain ID for the PROST RPC service.
3030
- Optionally, you may also set the following variables:
3131
around which all consensus activity takes place.
32-
- `POWERLOOM_REPORTING_URL`: The URL for reporting to PowerLoom.
32+
- `POWERLOOM_REPORTING_URL`: The URL for reporting to Powerloom.
3333
- `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`)
3434
- `IPFS_API_KEY`: The API key for the IPFS service (if required).
3535
- `IPFS_API_SECRET`: The API secret for the IPFS service (if required).
@@ -43,7 +43,7 @@ Prerequisite: Ensure that the minimum requirements are met by the system on whic
4343
```
4444

4545
4. **Displaying the Dashboard**
46-
- 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/).
46+
- 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/).
4747
- 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).
4848
- The dashboard's `Synced by` section displays the time of the last snapshot taken, indicating if your snapshotting is falling behind.
4949

docusaurus.config.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,6 @@ const config = {
9898
},
9999

100100

101-
codeblock: {
102-
showGithubLink: true,
103-
githubLinkLabel: 'View on GitHub',
104-
showRunmeLink: false,
105-
runmeLinkLabel: 'Checkout via Runme'
106-
},
107101
languageTabs: [
108102
{
109103
highlight: "bash",
@@ -180,7 +174,7 @@ const config = {
180174
href: 'https://careers.powerloom.io/'
181175
}
182176
],
183-
copyright: `Copyright © ${new Date().getFullYear()} Powerloom Inc.`,
177+
copyright: `Copyright © ${new Date().getFullYear()} Powerloom Network (BVI) Ltd.`,
184178
},
185179
prism: {
186180
theme: lightCodeTheme,
@@ -193,8 +187,18 @@ const config = {
193187
plugins: [
194188
],
195189

190+
future: {
191+
v4: {
192+
removeLegacyPostBuildHeadAttribute: true, // required
193+
},
194+
experimental_faster: {
195+
ssgWorkerThreads: true,
196+
rspackBundler: true,
197+
rspackPersistentCache: true,
198+
},
199+
},
200+
196201
themes: [
197-
'docusaurus-theme-github-codeblock',
198202
'docusaurus-theme-search-typesense'
199203
]
200204
};

package.json

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
{
2-
"name": "docs",
3-
"version": "0.0.0",
2+
"name": "powerloom-docs",
3+
"version": "1.0.0",
44
"private": true,
5+
"license": "Apache-2.0",
6+
"author": "Powerloom",
7+
"homepage": "https://docs.powerloom.io",
8+
"bugs": {
9+
"url": "https://github.com/powerloom/docs/issues"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "https://github.com/powerloom/docs.git"
14+
},
515
"scripts": {
616
"docusaurus": "docusaurus",
717
"start": "docusaurus start",
@@ -18,20 +28,19 @@
1828
"clean-api-docs:version": "docusaurus clean-api-docs:version"
1929
},
2030
"dependencies": {
21-
"@docusaurus/core": "^3.7.0",
22-
"@docusaurus/preset-classic": "^3.7.0",
31+
"@docusaurus/core": "^3.8.1",
32+
"@docusaurus/faster": "^3.8.1",
33+
"@docusaurus/preset-classic": "^3.8.1",
2334
"@mdx-js/react": "^3.0.0",
24-
"clsx": "^1.2.1",
25-
"docusaurus": "^1.14.7",
26-
"docusaurus-theme-github-codeblock": "^1.1.4",
27-
"docusaurus-theme-search-typesense": "^0.15.0-0",
35+
"clsx": "^2.0.0",
36+
"docusaurus-theme-search-typesense": "^0.25.0",
2837
"prism-react-renderer": "^2.4.1",
29-
"react": "^18.2.0",
30-
"react-dom": "^18.2.0"
38+
"react": "^19.0.0",
39+
"react-dom": "^19.0.0"
3140
},
3241
"devDependencies": {
33-
"@docusaurus/module-type-aliases": "^3.7.0",
34-
"@docusaurus/types": "^3.7.0"
42+
"@docusaurus/module-type-aliases": "^3.8.1",
43+
"@docusaurus/types": "^3.8.1"
3544
},
3645
"browserslist": {
3746
"production": [
@@ -46,6 +55,6 @@
4655
]
4756
},
4857
"engines": {
49-
"node": ">=18.0"
58+
"node": ">=20.0"
5059
}
5160
}

0 commit comments

Comments
 (0)