Skip to content

Commit beb1be3

Browse files
committed
develop on swarm new page format
1 parent db86f1e commit beb1be3

File tree

3 files changed

+168
-65
lines changed

3 files changed

+168
-65
lines changed

docs/bee/installation/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,5 +256,5 @@ Total xBZZ: 0.0000000000000000
256256
257257
## Next Steps
258258
259-
With your node now fully synced, you're ready start [uploading and downloading](/docs/develop/access-the-swarm/upload-and-download) or start learning how to [develop on Swarm](/docs/develop/introduction).
259+
With your node now fully synced, you're ready start start learning how to [develop on Swarm](/docs/develop/introduction).
260260

docs/develop/introduction.md

Lines changed: 51 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,56 @@
11
---
22
title: Develop on Swarm
33
id: introduction
4+
sidebar_label: Develop on Swarm
5+
hide_table_of_contents: true
6+
pagination_prev: null
7+
pagination_next: null
48
---
59

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>

src/css/custom.css

Lines changed: 116 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,4 +311,119 @@ body[data-rh] .redocusaurus {
311311
.responsive-image {
312312
width: 60%;
313313
}
314-
}
314+
}
315+
316+
/* --- Hub hero: minimal header, no heavy background --- */
317+
.hub-hero {
318+
padding: 2.5rem 0 1rem;
319+
background: transparent;
320+
}
321+
.hub-title {
322+
font-family: "InterSemiBold", Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
323+
font-size: 2.2rem;
324+
letter-spacing: .2px;
325+
margin: 0 0 .25rem;
326+
}
327+
.hub-sub {
328+
margin: 0 0 .75rem;
329+
opacity: .8;
330+
}
331+
332+
/* --- Responsive grid --- */
333+
.hub-grid {
334+
list-style: none;
335+
padding: 0;
336+
margin: 0;
337+
display: grid;
338+
grid-template-columns: repeat(3, minmax(0, 1fr));
339+
gap: 1rem;
340+
}
341+
@media (max-width: 1200px) {
342+
.hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
343+
}
344+
@media (max-width: 700px) {
345+
.hub-grid { grid-template-columns: 1fr; }
346+
}
347+
348+
/* --- Card container --- */
349+
.hub-card {
350+
border-radius: 14px;
351+
overflow: hidden; /* makes hover effects respect rounded corners */
352+
transition: transform .15s ease, box-shadow .15s ease;
353+
border: 1px solid rgba(0,0,0,.12);
354+
}
355+
356+
/* --- Card link fills the card --- */
357+
.hub-card__link {
358+
display: block;
359+
padding: 20px 22px;
360+
height: 100%;
361+
border-radius: inherit;
362+
363+
/* background with contrast */
364+
background-color: var(--ifm-background-surface);
365+
color: inherit;
366+
text-decoration: none;
367+
368+
transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
369+
}
370+
371+
[data-theme='dark'] .hub-card__link {
372+
background-color: rgba(255,255,255,0.04);
373+
border-color: rgba(255,255,255,0.12);
374+
}
375+
376+
/* --- Hover/focus states for clickability --- */
377+
.hub-card__link:hover,
378+
.hub-card__link:focus {
379+
background-color: var(--ifm-color-emphasis-100);
380+
border-color: var(--ifm-color-primary);
381+
box-shadow: 0 4px 16px rgba(0,0,0,0.12);
382+
transform: translateY(-2px);
383+
cursor: pointer;
384+
}
385+
386+
[data-theme='dark'] .hub-card__link:hover,
387+
[data-theme='dark'] .hub-card__link:focus {
388+
background-color: rgba(255,255,255,0.08);
389+
border-color: var(--ifm-color-primary);
390+
box-shadow: 0 4px 16px rgba(0,0,0,0.4);
391+
}
392+
393+
/* --- Card title --- */
394+
.hub-card__title {
395+
margin: 0 0 10px;
396+
font-size: 1.3rem;
397+
font-weight: 700;
398+
line-height: 1.35;
399+
}
400+
401+
/* --- Card description --- */
402+
.hub-card__desc {
403+
margin: 0 0 12px;
404+
font-size: 1rem;
405+
opacity: .85;
406+
}
407+
408+
/* --- CTA hint inside card --- */
409+
.hub-card__cta {
410+
display: inline-flex;
411+
align-items: center;
412+
gap: .4rem;
413+
font-weight: 600;
414+
color: var(--ifm-color-primary);
415+
border-bottom: 1px solid transparent;
416+
}
417+
.hub-card__cta::after {
418+
content: "→";
419+
transition: transform .15s ease;
420+
}
421+
.hub-card__link:hover .hub-card__cta::after {
422+
transform: translateX(3px);
423+
}
424+
425+
/* Optional: tighten doc hero spacing */
426+
.docs-doc-page .hero {
427+
padding: 2rem 0 !important;
428+
background: transparent !important;
429+
}

0 commit comments

Comments
 (0)