Skip to content

Commit f0a5a07

Browse files
committed
prebuild script to eliminate client side fetching
1 parent 9ccb877 commit f0a5a07

File tree

3 files changed

+184
-68
lines changed

3 files changed

+184
-68
lines changed

docs/references/awesome-list.mdx

Lines changed: 152 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,158 @@
11
---
22
title: Awesome Swarm
3-
id: awesome-list
3+
sidebar_label: Awesome Swarm
4+
# Do NOT set 'id' here; we want the doc id to be 'references/awesome-list' from the path
45
---
56

6-
import AwesomeList from '@site/src/components/AwesomeList';
7-
87
*Contribute to the Awesome Swarm list on [GitHub](https://github.com/ethersphere/awesome-swarm).*
98

10-
<AwesomeList />
9+
[Swarm](https://www.ethswarm.org/) is an incentivized peer-to-peer storage and communication system. [Join the decentralized network with a Bee node](https://docs.ethswarm.org/docs/installation/quick-start), the basic building block of Swarm.
10+
11+
This is a list of free and open source projects related to Swarm and its growing ecosystem.
12+
13+
See [CONTRIBUTING.md](https://github.com/ethersphere/awesome-swarm/blob/master/CONTRIBUTING.md) to learn how to create your submission.
14+
15+
## Table of contents
16+
17+
Click on the menu icon next to [README.md](#readme) for a list of sections
18+
19+
## Projects
20+
21+
### Services
22+
23+
**[`^ back to top ^`](#)**
24+
25+
[Bee](https://github.com/ethersphere/bee) - Also referred to as the _node_ or the _client_, this service allows you to join the Swarm network
26+
27+
28+
### Libraries
29+
30+
**[`^ back to top ^`](#)**
31+
32+
[Bee-JS](https://github.com/ethersphere/bee-js) - A high-level Javascript library to interact with Bee through its REST API
33+
34+
[Mantaray-js](https://github.com/ethersphere/mantaray-js) - A low-level Swarm manifest manipulation library
35+
36+
[Mantaray-py](https://github.com/Ankvik-Tech-Labs/mantaray-py/) - Allows you to manipulate and interpret mantaray data via MantarayNode and MantarayFork abstractions.
37+
38+
### CI/CD
39+
40+
**[`^ back to top ^`](#)**
41+
42+
[Beekeeper](https://github.com/ethersphere/beekeeper) - Orchestrate and test Bee clusters through Kubernetes
43+
44+
[Swarm Actions](https://github.com/ethersphere/swarm-actions) - GitHub Actions workflow for uploading data to the Swarm network.
45+
46+
### UI
47+
48+
**[`^ back to top ^`](#)**
49+
50+
[Bee Dashboard](https://github.com/ethersphere/bee-dashboard) - React project to troubleshoot and interact with your Bee node
51+
52+
[Gateway](https://github.com/ethersphere/gateway) - Gateway to the Swarm project, for uploading, downloading and sharing assets on the network
53+
54+
[Swarmy](https://swarmy.cloud/) - Swarm as a service, makes it simple to store and retrieve data on Swarm.
55+
56+
[Swarm Desktop App](https://www.ethswarm.org/build/desktop) - By running a lightweight Swarm node on your computer, you get direct access to the Swarm peer-to-peer network, without the need for centralized gateways.
57+
58+
[Etherjot](https://github.com/ethersphere/etherjot) - Bring your web3 blog live in minutes with Etherjot, a graphical blogging application natively supporting Swarm.
59+
60+
[buzzMint](https://github.com/ethersphere/awesome-swarm/blob/master/buzz-mint.eth.limo) - A decentralised NFT creator.
61+
62+
[Bchan](https://bchan.bzz.limo/) - A private message board allowing users to post images, text, and links across various threads.
63+
64+
### Tools
65+
66+
**[`^ back to top ^`](#)**
67+
68+
[Swarm CLI](https://github.com/ethersphere/swarm-cli) - Do everything on Swarm with the power of the terminal
69+
70+
[Swarm Extension](https://github.com/ethersphere/swarm-extension) - Official extension that adds Swarm support and injects Bee library to the browser
71+
72+
[Swarm CID Converter](https://github.com/agazso/swarm-cid-converter) - Convert Swarm hashes or links to CID and vice versa.
73+
74+
[Bee-AFS](https://github.com/aloknerurkar/bee-afs) - FUSE filesystem for Bee
75+
76+
[Nextcloud Swarm Plugin](https://github.com/MetaProvide/nextcloud-swarm-plugin) - Plugin for bridging Nextcloud and Swarm.
77+
78+
[Beest](https://github.com/w3rkspacelabs/beest) - An interactive CLI toolkit that simplifies the management of multiple Bee nodes
79+
80+
[Doctor Bee](https://github.com/w3rkspacelabs/doctor-bee) - A simple python script to check up a Bee node's health status.
81+
82+
[IPFS to Swarm](https://github.com/Solar-Punk-Ltd/ipfs-to-swarm) - Migrate data from IPFS to Swarm.
83+
84+
### Smart Contracts
85+
86+
**[`^ back to top ^`](#)**
87+
88+
[Swap, Swear and Swindle](https://github.com/ethersphere/swap-swear-and-swindle) - Protocols for peer-to-peer accounting
89+
90+
[Storage Incentives](https://github.com/ethersphere/storage-incentives) - Smart contracts providing the basis for Swarm's storage incentivization model
91+
92+
### Documentation
93+
94+
**[`^ back to top ^`](#)**
95+
96+
[The Book of Swarm](https://docs.ethswarm.org/the-book-of-swarm.pdf) - Storage and communication infrastructure for self-sovereign digital society back-end stack for the decentralised web
97+
98+
[Bee Docs](https://github.com/ethersphere/bee-docs) - Documentation for the Swarm Bee Client. View at [docs.ethswarm.org](https://docs.ethswarm.org/docs/).
99+
100+
[Bee-JS Docs](https://github.com/ethersphere/bee-js-docs) - Documentation for the Swarm Bee-js javascript library. View at [bee-js.ethswarm.org](https://bee-js.ethswarm.org/docs/).
101+
102+
[Swarm Specification](https://papers.ethswarm.org/p/swarm-specification/) - The Swarm specification document is an essential resource for developers and software engineers seeking to build their own Swarm client or integrate Swarm's functionalities into their applications.
103+
104+
[Swarm Erasure Coding paper](https://papers.ethswarm.org/p/erasure/) - The erasure coding paper provides a technical exploration of erasure coding in the Swarm network, focusing on ensuring data integrity and resilience.
105+
106+
[Swarm Papers](https://papers.ethswarm.org/) - Swarm’s documentation includes a variety of papers from technical specifications to in-depth explorations of the network's architecture and functionalities.
107+
108+
[Bee API Reference](https://docs.ethswarm.org/api/) - Bee API Documentation.
109+
110+
111+
### Community / Ecosystem
112+
113+
**[`^ back to top ^`](#)**
114+
115+
[Fair data society](https://fairdatasociety.org/) - Ecosystem initiative for ethical Web3
116+
117+
[FairOS](https://github.com/fairDataSociety/fairOS-dfs) - Distributed file system, key-value store and nosql store on Swarm (for developers)
118+
119+
[The Fair Data Protocol (FDP)](https://fdp.fairdatasociety.org/) - A data interoperability protocol for dApps that use personal data.
120+
121+
[FDP play](https://github.com/fairDataSociety/fdp-play) - CLI tool to spin up local development FDP environment and Bee cluster with Docker
122+
123+
[Fairdrive](https://fairdrive.fairdatasociety.org/) - Decentralised and unstoppable "Dropbox" for end-users and developers using Fair Data Protocol
124+
125+
[Fairdrive code](https://github.com/fairDataSociety/fairdrive-theapp) - Code for decentralised and unstoppable "Dropbox" for end-users and developers using Fair Data Protocol
126+
127+
[Galileo](https://app.galileo.fairdatasociety.org/) - Open Street Maps on Swarm
128+
129+
[SwarmScan](https://swarmscan.resenje.org/) - Get network insights
130+
131+
[Etherna.io](https://etherna.io/) - Decentralised media platform on Swarm
132+
133+
[SwarmNFT library](https://github.com/igar1991/SwarmNFT) - JavaScript library for creating NFTs on Ethereum-compatible blockchains and storing content on Swarm
134+
135+
[videoNFT](https://github.com/pabloVoorvaart/videoNFT/) - NFT live streaming with Swarm (winner of EthBerlin3 2022 Freedom to Transact Track)
136+
137+
[DeBoot](https://github.com/awmacpherson/deboot) - DeBoot is a project to research and implement approaches to bootloading OS images from a decentralized storage network such as Swarm or IPFS.
138+
139+
[Swarm DAppNode Package](https://github.com/rndlabs/dappnodepackage-swarm) - Swarm DAppNode package for Swarm Mainnet with multi-platform (x86_64 and arm64) support. Testnet DAppNode packages can be found [here](https://github.com/rndlabs/dappnodepackage-swarm-testnet).
140+
141+
[Mipasa Swarm Connector](https://github.com/MiPasa/mipasa-swarm-connector/) - MiPasa connector for Swarm (BZZ) distributed storage network.
142+
143+
[Export Webpage on Swarm](https://github.com/ethersphere/devcon-swarm-exporter) - CLI tool to build an optimized static export of devcon app frontend.
144+
145+
[Blob Storage on Swarm](https://github.com/Blobscan/blobscan) - The pioneer blockchain explorer dedicated to navigate and visualize shard blob transactions.
146+
147+
[SWIPs](https://github.com/ethersphere/SWIPs) - The Swarm Improvement Proposal repository.
148+
149+
### Miscellaneous
150+
151+
**[`^ back to top ^`](#)**
152+
153+
[Swarm Bot](https://github.com/ethersphere/swarm-bot) - Discord bot handling commands related to Swarm and its community
154+
155+
[ethersphere/bee DeepWiki](https://deepwiki.com/ethersphere/bee) - The DeepWiki for the Bee client GitHub repository. DeepWiki is a tool which provides autogenerated documentation (using LLM ai agents such as ChatGPT or Google Gemini) based directly on code from a GitHub repository. It also has a question box where any question can be asked about the Bee codebase.
156+
157+
158+
*As with all LLMs, DeepWiki may sometimes be confidently wrong. Make sure to always double check (either by inspecting the code yourself, or confirming with a Bee team core developer) before assuming its answers are correct.*

scripts/fetch-awesome-swarm.mjs

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,57 @@
1+
// Fetch Awesome Swarm README and emit a doc under docs/references.
2+
// Result: docs/references/awesome-list.mdx (visible to Docs plugin + sidebars)
3+
14
import { mkdir, writeFile } from 'node:fs/promises';
25
import { resolve, dirname } from 'node:path';
36

47
const SOURCE_URL =
58
'https://raw.githubusercontent.com/ethersphere/awesome-swarm/refs/heads/master/README.md';
69

7-
// We will generate the actual page file (single route, no imports)
8-
const OUT_PATH = resolve(process.cwd(), 'src/pages/awesome-swarm.mdx');
10+
const OUT_PATH = resolve(process.cwd(), 'docs/references/awesome-list.mdx');
11+
12+
const REPO_HTTP_BASE = 'https://github.com/ethersphere/awesome-swarm/blob/master/';
13+
const RAW_HTTP_BASE = 'https://raw.githubusercontent.com/ethersphere/awesome-swarm/master/';
914

10-
// Matches the line like: [.. DeepWiki ..](...) - ...
11-
const deepWikiLine = /^\[[^\]]*DeepWiki[^\]]*\]\([^)]+\)\s*-\s*.*$/im;
15+
function normalizeNewlines(str) {
16+
return str.replace(/\r\n/g, '\n');
17+
}
18+
19+
function rewriteRelativeLinks(md) {
20+
// Images: ![alt](path) where path is relative
21+
md = md.replace(
22+
/!\[([^\]]*)\]\((?!https?:|#|mailto:)([^)]+)\)/g,
23+
(_m, alt, path) => `![${alt}](${RAW_HTTP_BASE}${path})`
24+
);
25+
// Links: [text](path) where path is relative
26+
md = md.replace(
27+
/\[([^\]]+)\]\((?!https?:|#|mailto:)([^)]+)\)/g,
28+
(_m, text, path) => `[${text}](${REPO_HTTP_BASE}${path})`
29+
);
30+
return md;
31+
}
1232

1333
async function main() {
1434
const res = await fetch(SOURCE_URL);
1535
if (!res.ok) throw new Error(`Fetch failed: ${res.status} ${res.statusText}`);
1636

17-
let md = (await res.text()).replace(/\r\n/g, '\n');
37+
let md = normalizeNewlines(await res.text());
1838

19-
// Optionally strip upstream H1 to avoid duplicate title
20-
// md = md.replace(/^# .*\n+/, '');
39+
// Optional: strip upstream H1 to avoid a second big title under our frontmatter title
40+
md = md.replace(/^# .*\n+/, '');
41+
42+
md = rewriteRelativeLinks(md);
2143

22-
// Build the full MDX page. We’ll inject the JSX admonition after the DeepWiki entry if found.
2344
const header = `---
2445
title: Awesome Swarm
25-
id: awesome-list
46+
sidebar_label: Awesome Swarm
47+
# Do NOT set 'id' here; we want the doc id to be 'references/awesome-list' from the path
2648
---
2749
2850
*Contribute to the Awesome Swarm list on [GitHub](https://github.com/ethersphere/awesome-swarm).*
2951
30-
import Admonition from '@theme/Admonition';
31-
`;
32-
33-
const admonition = `
34-
<Admonition type="caution">
35-
As with all LLMs, DeepWiki may sometimes be confidently wrong. Make sure to always double check (either by inspecting the code yourself, or confirming with a Bee team core developer) before assuming its answers are correct.
36-
</Admonition>
3752
`;
3853

39-
let body;
40-
if (deepWikiLine.test(md)) {
41-
body = md.replace(deepWikiLine, (match) => `${match}\n\n${admonition}`);
42-
} else {
43-
// Fallback: put admonition near top (after the header)
44-
body = `${admonition}\n${md}`;
45-
}
46-
47-
const page = `${header}\n${body}\n`;
54+
const page = `${header}${md}\n`;
4855

4956
await mkdir(dirname(OUT_PATH), { recursive: true });
5057
await writeFile(OUT_PATH, page, 'utf8');

src/components/AwesomeList.js

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)