Skip to content

Commit 8cc9ae6

Browse files
authored
feat(docs): developer tools page (#605)
2 parents 62b1a3f + 5f154b7 commit 8cc9ae6

File tree

6 files changed

+771
-53
lines changed

6 files changed

+771
-53
lines changed

docs/network/0-overview.mdx

+1-53
Original file line numberDiff line numberDiff line change
@@ -272,59 +272,7 @@ Configuration for all Flare networks, along with public and private RPCs, blockc
272272
## Community tools
273273

274274
Developer tools for Flare built by the community including RPCs, bridges, indexers, account abstraction, wallet SDKs, and more.
275-
276-
<Tabs block groupId="network">
277-
<TabItem value="flare" label="Flare Mainnet" default>
278-
279-
| RPCs | [QuickNode](https://www.quicknode.com/chains/flare), [Ankr](https://www.ankr.com/rpc/flare/), [Thirdweb](https://14.rpc.thirdweb.com), [ChainList<IconExternalLink/>](https://ChainList.org/chain/14) |
280-
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
281-
| Bridging | [LayerZero V2](https://docs.layerzero.network/v2/developers/evm/technical-reference/deployed-contracts#flare), [Stargate V2](https://stargateprotocol.gitbook.io/stargate/v/v2-developer-docs/technical-reference/mainnet-contracts#flare) ([OFTs](https://stargateprotocol.gitbook.io/stargate/v/v2-developer-docs/technical-reference/v2-supported-networks-and-assets#flare)), [zkBridge](https://docs.zkbridge.com/layerzero-zklightclient-configurations/layerzero-v2-zklightclient-dvn-addresses) |
282-
| Indexers | [Goldsky](https://docs.goldsky.com/chains/flare), [SubQuery](https://github.com/subquery/flare-subql-starter/tree/main/Flare/flare-starter), [sqd](https://docs.sqd.dev/subsquid-network/reference/networks/#evm--ethereum-compatible) |
283-
| OAuth Login | [Web3Auth](https://web3auth.io/docs/connect-blockchain/evm/flare) |
284-
| Account Abstraction | [Etherspot Prime SDK](https://etherspot.fyi/prime-sdk/intro) |
285-
| Wallet SDK | [Wagmi](https://wagmi.sh/react/chains), [RainbowKit](https://www.rainbowkit.com/docs/introduction) |
286-
| Full-stack Dev Infra | [Tenderly](https://tenderly.co) |
287-
288-
</TabItem>
289-
290-
<TabItem value="coston2" label="Flare Testnet Coston2">
291-
292-
| RPCs | [QuickNode](https://www.quicknode.com/chains/flare), [Ankr](https://www.ankr.com/rpc/flare/), [Thirdweb](https://114.rpc.thirdweb.com), [ChainList<IconExternalLink/>](https://ChainList.org/chain/114) |
293-
| :------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
294-
| Bridging | [LayerZero V2](https://docs.layerzero.network/v2/developers/evm/technical-reference/deployed-contracts#flare-testnet) |
295-
| Indexers | [Goldsky](https://docs.goldsky.com/chains/flare) |
296-
| OAuth Login | [Web3Auth](https://web3auth.io/docs/connect-blockchain/evm/flare) |
297-
| Account Abstraction | [Etherspot Prime SDK](https://etherspot.fyi/prime-sdk/intro) |
298-
| Wallet SDK | [Wagmi](https://wagmi.sh/react/chains), [RainbowKit](https://www.rainbowkit.com/docs/introduction) |
299-
| Full-stack Dev Infra | [Tenderly](https://tenderly.co) |
300-
301-
</TabItem>
302-
<TabItem value="songbird" label="Songbird Canary-Network">
303-
304-
| RPCs | [Ankr](https://www.ankr.com/rpc/flare/), [Thirdweb](https://19.rpc.thirdweb.com), [ChainList<IconExternalLink/>](https://ChainList.org/chain/19) |
305-
| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
306-
| Bridging | - |
307-
| Indexers | [SubQuery](https://github.com/subquery/flare-subql-starter/tree/main/Flare/songbird-starter) |
308-
| OAuth Login | [Web3Auth](https://web3auth.io/docs/connect-blockchain/evm/songbird/) |
309-
| Account Abstraction | - |
310-
| Wallet SDK | [Wagmi](https://wagmi.sh/react/chains), [RainbowKit](https://www.rainbowkit.com/docs/introduction) |
311-
| Full-stack Dev Infra | [Tenderly](https://tenderly.co) |
312-
313-
</TabItem>
314-
<TabItem value="coston" label="Songbird Testnet Coston">
315-
316-
| RPCs | [Ankr](https://www.ankr.com/rpc/flare/), [Thirdweb](https://16.rpc.thirdweb.com), [ChainList<IconExternalLink/>](https://ChainList.org/chain/16) |
317-
| :------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
318-
| Bridging | - |
319-
| Indexers | - |
320-
| OAuth Login | [Web3Auth](https://web3auth.io/docs/connect-blockchain/evm/songbird/) |
321-
| Account Abstraction | - |
322-
| Wallet SDK | [Wagmi](https://wagmi.sh/react/chains), [RainbowKit](https://www.rainbowkit.com/docs/introduction) |
323-
| Full-stack Dev Infra | [Tenderly](https://tenderly.co) |
324-
325-
</TabItem>
326-
327-
</Tabs>
275+
This section has been moved to the [Developer Tools](/network/developer-tools) page.
328276

329277
## Supported wallets
330278

docs/network/5-developer-tools.mdx

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
id: developer-tools
3+
title: Developer Tools
4+
sidebar_label: Developer Tools
5+
description: Developer tools for Flare built by the community including RPCs, bridges, indexers, account abstraction, wallet SDKs, and more.
6+
keywords: [developer tools, rpc, bridge, indexer, sdk, wallet]
7+
toc_min_heading_level: 2
8+
toc_max_heading_level: 3
9+
---
10+
11+
import DeveloperTools from "@site/src/components/developerTools";
12+
13+
<DeveloperTools />
14+
15+
<div className="visually-hidden">
16+
17+
## RPCs
18+
19+
## Bridging
20+
21+
## Indexers
22+
23+
## OAuth Login
24+
25+
## Account Abstraction
26+
27+
## Wallet SDK
28+
29+
## Full-stack Dev Infra
30+
31+
</div>

sidebars.ts

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const sidebars: SidebarsConfig = {
2020
link: { type: "doc", id: "network/overview" },
2121
items: [
2222
"network/getting-started",
23+
"network/developer-tools",
2324
{
2425
type: "category",
2526
label: "Network Guides",

src/components/developerTools.tsx

+148
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
import React, { useState, useEffect } from "react";
2+
import Link from "@docusaurus/Link";
3+
import Heading from "@theme/Heading";
4+
import toolsDataRaw from "@site/src/data/developerTools.json";
5+
6+
// Define the type for tool items
7+
type ToolItem = {
8+
name: string;
9+
link: string;
10+
subtext?: string;
11+
};
12+
13+
// Define the type for categories
14+
type ToolCategories = {
15+
[category: string]: ToolItem[];
16+
};
17+
18+
// Define the type for network data
19+
type NetworkData = {
20+
name: string;
21+
categories: ToolCategories;
22+
};
23+
24+
// Define the type for network tools
25+
type NetworkTools = {
26+
[network: string]: NetworkData;
27+
};
28+
29+
// Define the type for the complete tools data
30+
type ToolsData = {
31+
toolDescriptions: { [key: string]: string };
32+
networkTools: NetworkTools;
33+
};
34+
35+
const DeveloperTools = () => {
36+
const [activeNetwork, setActiveNetwork] = useState("flare");
37+
const [isClient, setIsClient] = useState(false);
38+
39+
// Parse the imported JSON file
40+
const toolsData = toolsDataRaw as ToolsData;
41+
const { toolDescriptions, networkTools } = toolsData;
42+
43+
// Handle client-side only rendering and scroll to anchor if present
44+
useEffect(() => {
45+
setIsClient(true);
46+
47+
// Handle anchor scrolling
48+
if (typeof window !== "undefined") {
49+
const hash = window.location.hash;
50+
if (hash) {
51+
// Remove the '#' character
52+
const id = hash.substring(1);
53+
setTimeout(() => {
54+
const element = document.getElementById(id);
55+
if (element) {
56+
element.scrollIntoView({ behavior: "smooth" });
57+
}
58+
}, 100);
59+
}
60+
}
61+
}, []);
62+
63+
if (!isClient || !networkTools[activeNetwork]) {
64+
return null;
65+
}
66+
67+
const networkData = networkTools[activeNetwork];
68+
69+
return (
70+
<div className="developer-tools-container">
71+
<div className="developer-tools-header">
72+
<p>
73+
Developer tools for Flare built by the community including RPCs,
74+
bridges, indexers, account abstraction, wallet SDKs, and more.
75+
</p>
76+
77+
<div className="network-selector-container">
78+
<div className="network-selector">
79+
<label htmlFor="network-select">Network:</label>
80+
<select
81+
id="network-select"
82+
value={activeNetwork}
83+
onChange={(e) => setActiveNetwork(e.target.value)}
84+
className="network-select"
85+
aria-label="Select a network"
86+
>
87+
{Object.keys(networkTools).map((networkKey) => (
88+
<option key={networkKey} value={networkKey}>
89+
{networkTools[networkKey].name}
90+
</option>
91+
))}
92+
</select>
93+
</div>
94+
</div>
95+
</div>
96+
97+
<div className="tools-grid">
98+
{Object.entries(networkData.categories).map(([category, tools]) => (
99+
<div key={category} className="category-section">
100+
<Heading
101+
as="h2"
102+
className="category-title"
103+
id={`${category.toLowerCase().replace(/\s+/g, "-")}`}
104+
>
105+
{category}
106+
</Heading>
107+
<div className="tools-cards">
108+
{Array.isArray(tools) && tools.length === 0 ? (
109+
<div className="empty-category">
110+
No tools available in this category
111+
</div>
112+
) : (
113+
Array.isArray(tools) &&
114+
tools.map((tool) => (
115+
<Link
116+
key={tool.name}
117+
to={tool.link}
118+
target="_blank"
119+
rel="noopener noreferrer"
120+
className="tool-card"
121+
>
122+
<div className="tool-info">
123+
<Heading as="h3" className="tool-name">
124+
{tool.name}
125+
{tool.subtext && (
126+
<span className="tool-subtext"> {tool.subtext}</span>
127+
)}
128+
</Heading>
129+
<p className="tool-description">
130+
{toolDescriptions[tool.name] ||
131+
"A tool for Flare ecosystem development."}
132+
</p>
133+
</div>
134+
<div className="tool-arrow" aria-hidden="true">
135+
136+
</div>
137+
</Link>
138+
))
139+
)}
140+
</div>
141+
</div>
142+
))}
143+
</div>
144+
</div>
145+
);
146+
};
147+
148+
export default DeveloperTools;

0 commit comments

Comments
 (0)