Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit 2d2471b

Browse files
authored
[Stellar Merge] Dapps Challenge (#781)
* redirects for dapps challenge * add migration URLs to docs * add migration URLs to Dapps section's sidebar * change top-level nav destination to new dapps home * remove dapps directory from docusaurus config (also, other commented-out sections) * remove admonition about dapps challenge on /docs page
1 parent f844666 commit 2d2471b

15 files changed

+149
-47
lines changed

dapps/README.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
---
22
sidebar_position: 1
33
title: Dapps on Soroban
4+
sidebar_custom_props:
5+
migration:
6+
href: https://developers.stellar.org/docs/learn/migrate/introduction-to-solidity-and-rust
7+
label: Introduction to Solidity, Rust, and Soroban
48
---
59

10+
:::danger These are not the droids you're looking for
11+
12+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/learn/migrate/introduction-to-solidity-and-rust) for the most up-to-date information
13+
14+
:::
15+
616
Decentralized applications, or "dapps," mark a significant shift in our digital interactions, running on a blockchain or peer-to-peer network instead of centralized servers. This shift enhances transparency, security, and user control, as data and smart contracts are stored on a public ledger, open for audit by anyone. Soroban facilitates building and deploying dapps on the Stellar blockchain, offering tools and frameworks that simplify the development process for even those with minimal coding experience. The Soroban Dapps Challenge highlights this, enabling you to create a variety of dapp use cases on a single page in just 20 minutes, with minimal coding, guiding you from smart contract deployment to user interaction through a web frontend.
717

818
The Soroban Dapps Challenge is a dynamic course designed for developers eager to explore the potential of building decentralized applications (Dapps) on the Soroban smart contracts platform. This course is part challenge, part educational journey that sets the stage for practical and creative blockchain development.

dapps/dapp-challenges/challenge-0-crowdfund.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 0
33
title: Crowdfund Dapp Challenge
44
description: Build and ship a Crowdfund Dapp! Beat the Challenge!
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund
8+
label: Crowdfund Dapp Challenge
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund) for the most up-to-date information
14+
15+
:::
16+
717
import mintToken from "../../static/img/mintToken.png";
818
import approveTokenMint from "../../static/img/approveTokenMint.png";
919
import updatedBalance from "../../static/img/updatedBalance.png";

dapps/dapp-challenges/challenge-1-payment.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 0
33
title: Payment Dapp Challenge
44
description: Take on the challenge and master the Soroban Payment Dapp!
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-1-payment
8+
label: Payment Dapp Challenge
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-1-payment) for the most up-to-date information
14+
15+
:::
16+
717
<head>
818
<title>Payment Dapp Challenge.</title>
919
<meta charSet="utf-8" />

dapps/dapp-challenges/challenge-2-liquidity-pool.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 2
33
title: Liquidity Pool Dapp Challenge
44
description: Deploy an example dapp, add liquidity! Beat the Challenge!
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-2-liquidity-pool
8+
label: Liquidity Pool Dapp Challenge
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-2-liquidity-pool) for the most up-to-date information
14+
15+
:::
16+
717
import mint_tokens from "../../static/img/mint_tokens.png";
818
import approveTokenMint from "../../static/img/approveTokenMint.png";
919
import updatedBalances from "../../static/img/updatedBalances.png";

dapps/dapp-challenges/challenge-3-oracle.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 0
33
title: Oracle Dapp Challenge
44
description: Get prices with the Oracle Dapp! Beat the Challenge!
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-3-oracle
8+
label: Oracle Dapp Challenge
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-3-oracle) for the most up-to-date information
14+
15+
:::
16+
717
import oracle_connect from "../../static/img/oracle_connect.png";
818
import oracle_home from "../../static/img/oracle_home.png";
919
import oracle_mintBal from "../../static/img/oracle_mintBal.png";

dapps/guides/docker.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 0
33
title: Docker
44
description: Explore how to use Docker to build and run Soroban Dapps.
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/smart-contracts/guides/dapps/docker
8+
label: Docker
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/smart-contracts/guides/dapps/docker) for the most up-to-date information
14+
15+
:::
16+
717
# What is Docker?
818

919
Welcome to the world of [Docker](https://www.docker.com/), an essential tool for software development. Docker packages software into units known as containers, ensuring consistency, isolation, portability, and scalability.

dapps/guides/initialization.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 3
33
title: Initialization
44
description: Learn how to initialize a Soroban Dapp using scripts
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/smart-contracts/guides/dapps/initialization
8+
label: Initialization
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/smart-contracts/guides/dapps/initialization) for the most up-to-date information
14+
15+
:::
16+
717
# Example Soroban Dapp Initialization
818

919
When setting up an example Soroban Dapp, correct initialization is crucial. This process entails several steps, including deploying Docker, cloning and deploying smart contracts, and invoking functions to configure them. In this comprehensive guide, you will walk you through the necessary steps to successfully build and deploy these smart contracts, ensuring a seamless setup for your Soroban Dapp.

dapps/guides/react.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 1
33
title: React
44
description: Learn about the frontend for the example Crowdfund Dapp.
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/smart-contracts/guides/dapps/react
8+
label: React
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/smart-contracts/guides/dapps/react) for the most up-to-date information
14+
15+
:::
16+
717
This section elaborates on how the frontends from your dapp can interact with the example contracts and access chain data, and connect to a freighter wallet. This will be illustrated by utilizing libraries provided by [`@soroban-react`](https://soroban-react.gitbook.io/index/), a simple, powerful framework for building modern Soroban Dapps using React created by a member of the Soroban community.
818

919
Below is a list of the libraries used throughout the frontend code and their respective imports:

dapps/guides/smart-contracts.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 2
33
title: Smart Contracts
44
description: Learn about the smart contracts from the Soroban Dapps Challenge.
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund
8+
label: Smart Contracts
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund) for the most up-to-date information
14+
15+
:::
16+
717
## Crowdfund Example
818

919
The [example crowdfunding smart contract](https://github.com/stellar/soroban-example-dapp/blob/main/contracts/crowdfund/src/lib.rs), written in Rust and using the Soroban SDK, is a template for creating a crowdfunding dapp. Users can deposit tokens into the contract until a target amount is reached or a deadline expires. If the target is met, the recipient can withdraw the tokens. If the deadline passes without the target being met, donors can reclaim their tokens.

dapps/guides/wallets.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 4
33
title: Wallets
44
description: Learn how to use wallets on Soroban
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/smart-contracts/guides/freighter/integrate-freighter-react
8+
label: Wallets
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/smart-contracts/guides/freighter/integrate-freighter-react) for the most up-to-date information
14+
15+
:::
16+
717
import freighter_settings from "../../static/img/freighter_settings.png";
818
import gear_icon from "../../static/img/gear_icon.png";
919
import preferences_menu from "../../static/img/preferences_menu.png";

dapps/scaffold-soroban.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
sidebar_position: 2
33
title: Scaffold Soroban
44
description: Dive into the simple implementations of Soroban dapps to understand and learn the Soroban ecosystem.
5+
sidebar_custom_props:
6+
migration:
7+
href: https://developers.stellar.org/docs/learn/migrate/introduction-to-solidity-and-rust
8+
label: Introduction to Solidity, Rust, and Soroban
59
---
610

11+
:::danger These are not the droids you're looking for
12+
13+
This page has been migrated to the Stellar Developers documentation. Please [click here](https://developers.stellar.org/docs/learn/migrate/introduction-to-solidity-and-rust) for the most up-to-date information
14+
15+
:::
16+
717
## Demonstrative Soroban Dapps
818

919
import ReactPlayer from "react-player";

docs/README.mdx

-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,3 @@ title: We've Moved!
66
All of our documentation content previously available at `soroban.stellar.org` has now been merged into one, consolidated collection available in the [Stellar Developers Documentation](https://developers.stellar.org). Redirects from this site are in-place, and links have been updated everywhere we've found them.
77

88
If you have any issues finding the content you're looking for, please give our [docs search](https://developers.stellar.org/search) a try. If you still have trouble, we welcome all feedback, issues, and pull requests in the [stellar-docs GitHub repo](https://github.com/stellar/stellar-docs).
9-
10-
:::info There is one temporary exception...
11-
12-
The [Soroban Dapps Challenge](/dapps) remains here, for a brief time. There are some version mismatches we're working through, and that section will also be folded into the collection at `developers.stellar.org` soon.
13-
14-
:::

docusaurus.config.js

+1-31
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,6 @@ const config = {
2222
},
2323
plugins: [
2424
"docusaurus-plugin-sass",
25-
// [
26-
// '@docusaurus/plugin-content-docs',
27-
// {
28-
// id: 'api',
29-
// path: 'api',
30-
// routeBasePath: 'api',
31-
// sidebarPath: require.resolve('./sidebarsApi.js'),
32-
// editUrl: "https://github.com/stellar/soroban-docs/tree/main/",
33-
// showLastUpdateTime: true,
34-
// showLastUpdateAuthor: true,
35-
// },
36-
// ],
37-
[
38-
'@docusaurus/plugin-content-docs',
39-
{
40-
id: 'dapps',
41-
path: 'dapps',
42-
routeBasePath: 'dapps',
43-
sidebarPath: require.resolve('./sidebarsDapps.js'),
44-
editUrl: "https://github.com/stellar/soroban-docs/tree/main/",
45-
showLastUpdateTime: true,
46-
showLastUpdateAuthor: true,
47-
},
48-
],
4925
require('./src/dev-server-plugin'),
5026
require('./src/analytics-module')
5127
],
@@ -101,14 +77,8 @@ const config = {
10177
label: 'API',
10278
position: 'left'
10379
},
104-
// {
105-
// href: 'https://fastcheapandoutofcontrol.com/',
106-
// label: 'Play Game',
107-
// className: 'nav-highlight',
108-
// position: 'left',
109-
// },
11080
{
111-
to: '/dapps',
81+
href: 'https://developers.stellar.org/docs/learn/interactive/dapps',
11282
label: 'Dapps',
11383
position: 'left'
11484
},

nginx/includes/redirects.conf

+8
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,11 @@ rewrite "^/docs/category/tokens$" "https://developers.stellar.org/docs/smart-con
7272
rewrite "^/docs/tokens(.*)$" "https://developers.stellar.org/docs/smart-contracts/tokens$1" permanent;
7373
rewrite "^/docs/reference/freighter$" "https://developers.stellar.org/docs/smart-contracts/guides/freighter" permanent;
7474
rewrite "^/docs/faq$" "https://developers.stellar.org/docs/learn/smart-contract-internals/faq" permanent;
75+
# dapps challenge
76+
rewrite "^/dapps/guides/wallets(.*)$" "https://developers.stellar.org/docs/smart-contracts/guides/freighter/integrate-freighter-react" permanent;
77+
rewrite "^/dapps/guides/smart-contracts(.*)" "https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund" permanent;
78+
rewrite "^/dapps/guides(.*)$" "https://developers.stellar.org/docs/smart-contracts/guides/dapps$1" permanent;
79+
rewrite "^/dapps/scaffold-soroban(.*)$" "https://developers.stellar.org/docs/learn/interactive/dapps/scaffold-soroban$1" permanent;
80+
rewrite "^/dapps/dapp-challenges(.*)$" "https://developers.stellar.org/docs/learn/interactive/dapps/challenges$1" permanent;
81+
rewrite "^/dapps" "https://developers.stellar.org/docs/learn/interactive/dapps" permanent;
82+
rewrite "^/dashboard" "https://developers.stellar.org/docs/learn/interactive/dapps/dashboard" permanent;

sidebarsDapps.js

+30-10
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,49 @@
11
module.exports = {
22
mySidebar: [
33
{
4-
type: 'doc',
5-
id: 'README',
4+
type: 'link',
65
label: 'Welcome',
6+
href: 'https://developers.stellar.org/docs/learn/migrate/introduction-to-solidity-and-rust',
77
},
88
{
99
type: 'link',
1010
label: 'Dashboard',
11-
href: '/dashboard',
11+
href: 'https://developers.stellar.org/docs/learn/interactive/dapps/dashboard',
1212
},
1313
{
14-
type: 'doc',
15-
id: 'scaffold-soroban',
14+
type: 'link',
1615
label: 'Scaffold Soroban',
16+
href: 'https://developers.stellar.org/docs/learn/interactive/dapps/scaffold-soroban',
1717
},
1818
{
1919
type: 'category',
2020
label: 'Guides',
2121
items: [
22-
'guides/docker',
23-
'guides/initialization',
24-
'guides/react',
25-
'guides/smart-contracts',
26-
'guides/wallets'
22+
{
23+
type: 'link',
24+
label: 'Docker',
25+
href: 'https://developers.stellar.org/docs/smart-contracts/guides/dapps/docker'
26+
},
27+
{
28+
type: 'link',
29+
label: 'Initialization',
30+
href: 'https://developers.stellar.org/docs/smart-contracts/guides/dapps/initialization'
31+
},
32+
{
33+
type: 'link',
34+
label: 'React',
35+
href: 'https://developers.stellar.org/docs/smart-contracts/guides/dapps/react'
36+
},
37+
{
38+
type: 'link',
39+
label: 'Smart Contracts',
40+
href: 'https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund'
41+
},
42+
{
43+
type: 'link',
44+
label: 'Wallets',
45+
href: 'https://developers.stellar.org/docs/smart-contracts/guides/freighter/integrate-freighter-react'
46+
},
2747
],
2848
collapsible: true, // The category can be collapsed.
2949
collapsed: true, // Initially, the category will be collapsed.

0 commit comments

Comments
 (0)