|
1 | 1 | --- |
2 | 2 | title: Develop on Swarm |
3 | 3 | id: introduction |
| 4 | +sidebar_label: Develop on Swarm |
| 5 | +hide_table_of_contents: true |
| 6 | +pagination_prev: null |
| 7 | +pagination_next: null |
4 | 8 | --- |
5 | 9 |
|
6 | | -This page is the go-to starting point for web3 developers who want to build with Swarm. |
7 | | - |
8 | | -It provides everything you need to begin—from prerequisites, to running Bee, integrating Swarm into a dApp, and trying a ready-made template app. |
9 | | - |
10 | | -## Prerequisites |
11 | | - |
12 | | -This section is aimed at developers who want to integrate Swarm into their applications or build dApps directly on top of Swarm. |
13 | | - |
14 | | -Before you start, make sure you have: |
15 | | - |
16 | | -- Basic familiarity with JavaScript/TypeScript and web3 development |
17 | | -- A working Node.js installation |
18 | | -- Docker (recommended, for quickly running Bee and other tools) |
19 | | - |
20 | | -## Running a Bee Node |
21 | | - |
22 | | -Swarm is a p2p network composed of thousands of Bee nodes. To interact with the Swarm network you need to run a Bee node of your own: |
23 | | - |
24 | | -### Option 1: Bee Quickstart Guide |
25 | | - |
26 | | -The Bee quickstart install guide is the fastest way to get a Bee node up and running on the mainnet. This method does require a small amount of xDAI in order to initialize the node: |
27 | | -- [Bee Quick-Start Guide](https://docs.ethswarm.org/docs/bee/installation/quick-start) |
28 | | - |
29 | | -### Option 2: fdp-play (Requires Docker) |
30 | | - |
31 | | -For a zero-crypto required option, you can also consider the fdp-play tool. This tool will spin up a cluster of pre-funded Bee nodes and allow you to get started exploring development on Swarm right away. Just note that fdp-play is a sandbox environment - none of the tokens are real and none of the uploads will be stored by nodes on the Swarm mainnet. |
32 | | - |
33 | | -- [fdp-play repo](http://github.com/fairDataSociety/fdp-play) |
34 | | - |
35 | | -You can find installation and usage instructions in the fdp-play [README](https://github.com/fairDataSociety/fdp-play/blob/master/README.md). |
36 | | - |
37 | | -## Bee Node Basic Interaction |
38 | | - |
39 | | -When running your Bee node(s), you will often need to perform basic node interactions from the command line (such as checking your node's status and uploading or downloading data). There are two main options for basic command line interaction with our Bee node(s): |
40 | | - |
41 | | -### The Bee API (For power users) |
42 | | - |
43 | | -The [Bee API](/docs/bee/working-with-bee/bee-api) offers the lowest level control over your Bee node. Refer to the [API Specifications](/api/) for documentation of all the available endpoints and their usage. You can use [curl](https://en.wikipedia.org/wiki/CURL), [wget](https://en.wikipedia.org/wiki/Wget), [Postman](https://en.wikipedia.org/wiki/Postman_(software)), [Insomnia](https://insomnia.rest/), or any other tool with support for http requests to interact with the API. |
44 | | - |
45 | | -### Swarm-CLI (Recommended for most users) |
46 | | - |
47 | | -The [Swarm-CLI](/docs/bee/working-with-bee/swarm-cli) command line tool is the recommended method for basic node interaction. It's powered by the powerful `bee-js` SDK, and it covers all essential Bee use cases. Swarm-CLI is also actively maintained so that it supports all the newest features from the most recent Bee versions as they are released. It is strongly recommended as the primary tool for node interaction unless there is a specific need for using the Bee API directly. |
48 | | - |
49 | | -## How to Integrate with a dApp |
50 | | - |
51 | | -Once you've got your Bee node up and running, then you can begin integrating it into your dApp. |
52 | | - |
53 | | -- **bee-js**: [`bee-js` is the official JavaScript SDK for Swarm](https://bee-js.ethswarm.org/docs/), and is the *recommended approach* for building Swarm integrated dApps. It supports both NodeJS and browser based APIs, making it easy to integrate with both frontend and backend applications. |
54 | | - |
55 | | -:::tip |
56 | | -Refer to the next section "Template Applications." to learn about using `create-swarm-app` to generate basic project scaffolding which demonstrate specifically how to use `bee-js` to integrate Swarm into your application. |
57 | | -::: |
58 | | - |
59 | | -- **Raw API**: If required, you may also directly interact with the [Bee HTTP API](/api/). This approach is discouraged unless explicitly required for your use case. |
60 | | - |
61 | | -## Template Applications |
62 | | - |
63 | | -Once you've got your Bee node up and running and have installed all the pre-requisites and recommended tools mentioned above, now you're really ready to get started building. |
64 | | - |
65 | | -The best way get started is with a simple template application to serve as an example. The [`create-swarm-app` tool](https://www.npmjs.com/package/create-swarm-app) allows you to rapidly generate simple starter templates for several different use cases, and serve a the perfect jumping off point for further learning. |
66 | | - |
67 | | -For more details on using `create-swarm-app`, and for a step-by-step explanation of the template apps it can output, refer to the [guides in the bee-js docs](https://bee-js.ethswarm.org/docs/getting-started/#quickstart-with-create-swarm-app). |
68 | | - |
| 10 | +<div class="hub-wrap"> |
| 11 | + |
| 12 | + <div class="hub-hero"> |
| 13 | + <div class="container"> |
| 14 | + <p class="hub-sub"> |
| 15 | + This page is the go-to starting point for web3 developers who want to build with Swarm. The guides on this page will help you get started with setting up a Bee node, using that node to integrate your dApp with Swarm, and to begin exploring some example applications to better understand the possibilities of building on Swarm. |
| 16 | + </p> |
| 17 | + </div> |
| 18 | + </div> |
| 19 | + |
| 20 | + <div class="container"> |
| 21 | + <ul class="hub-grid"> |
| 22 | + |
| 23 | + <li class="hub-card"> |
| 24 | + <a class="hub-card__link" href="/docs/bee/installation/quick-start"> |
| 25 | + <h3 class="hub-card__title">Step One: Install Bee</h3> |
| 26 | + <p class="hub-card__desc"> |
| 27 | + Install and run a Bee node — the entry point to the Swarm network. |
| 28 | + </p> |
| 29 | + <span class="hub-card__cta">Get started</span> |
| 30 | + </a> |
| 31 | + </li> |
| 32 | + |
| 33 | + <li class="hub-card"> |
| 34 | + <a class="hub-card__link" href="/docs/develop/tools-and-features/bee-js"> |
| 35 | + <h3 class="hub-card__title">Step Two: Connecting your dApp with Swarm</h3> |
| 36 | + <p class="hub-card__desc"> |
| 37 | + Use the official <code>bee-js</code> SDK to integrate storage, feeds, and more into your app. |
| 38 | + </p> |
| 39 | + <span class="hub-card__cta">Connect dApp</span> |
| 40 | + </a> |
| 41 | + </li> |
| 42 | + |
| 43 | + <li class="hub-card"> |
| 44 | + <a class="hub-card__link" href="/docs/develop/access-the-swarm/host-your-website"> |
| 45 | + <h3 class="hub-card__title">Step Three: Explore Example dApps</h3> |
| 46 | + <p class="hub-card__desc"> |
| 47 | + Try ready-made templates and example projects that showcase how to build on Swarm. |
| 48 | + </p> |
| 49 | + <span class="hub-card__cta">See examples</span> |
| 50 | + </a> |
| 51 | + </li> |
| 52 | + |
| 53 | + </ul> |
| 54 | + </div> |
| 55 | + |
| 56 | +</div> |
0 commit comments