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

Commit

Permalink
[Stellar Merge] Dapps Challenge (#781)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ElliotFriend authored Apr 24, 2024
1 parent f844666 commit 2d2471b
Show file tree
Hide file tree
Showing 15 changed files with 149 additions and 47 deletions.
10 changes: 10 additions & 0 deletions dapps/README.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
---
sidebar_position: 1
title: Dapps on Soroban
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/learn/migrate/introduction-to-solidity-and-rust
label: Introduction to Solidity, Rust, and Soroban
---

:::danger These are not the droids you're looking for

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

:::

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.

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.
Expand Down
10 changes: 10 additions & 0 deletions dapps/dapp-challenges/challenge-0-crowdfund.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 0
title: Crowdfund Dapp Challenge
description: Build and ship a Crowdfund Dapp! Beat the Challenge!
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund
label: Crowdfund Dapp Challenge
---

:::danger These are not the droids you're looking for

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

:::

import mintToken from "../../static/img/mintToken.png";
import approveTokenMint from "../../static/img/approveTokenMint.png";
import updatedBalance from "../../static/img/updatedBalance.png";
Expand Down
10 changes: 10 additions & 0 deletions dapps/dapp-challenges/challenge-1-payment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 0
title: Payment Dapp Challenge
description: Take on the challenge and master the Soroban Payment Dapp!
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-1-payment
label: Payment Dapp Challenge
---

:::danger These are not the droids you're looking for

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

:::

<head>
<title>Payment Dapp Challenge.</title>
<meta charSet="utf-8" />
Expand Down
10 changes: 10 additions & 0 deletions dapps/dapp-challenges/challenge-2-liquidity-pool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 2
title: Liquidity Pool Dapp Challenge
description: Deploy an example dapp, add liquidity! Beat the Challenge!
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-2-liquidity-pool
label: Liquidity Pool Dapp Challenge
---

:::danger These are not the droids you're looking for

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

:::

import mint_tokens from "../../static/img/mint_tokens.png";
import approveTokenMint from "../../static/img/approveTokenMint.png";
import updatedBalances from "../../static/img/updatedBalances.png";
Expand Down
10 changes: 10 additions & 0 deletions dapps/dapp-challenges/challenge-3-oracle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 0
title: Oracle Dapp Challenge
description: Get prices with the Oracle Dapp! Beat the Challenge!
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-3-oracle
label: Oracle Dapp Challenge
---

:::danger These are not the droids you're looking for

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

:::

import oracle_connect from "../../static/img/oracle_connect.png";
import oracle_home from "../../static/img/oracle_home.png";
import oracle_mintBal from "../../static/img/oracle_mintBal.png";
Expand Down
10 changes: 10 additions & 0 deletions dapps/guides/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 0
title: Docker
description: Explore how to use Docker to build and run Soroban Dapps.
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/smart-contracts/guides/dapps/docker
label: Docker
---

:::danger These are not the droids you're looking for

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

:::

# What is Docker?

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.
Expand Down
10 changes: 10 additions & 0 deletions dapps/guides/initialization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 3
title: Initialization
description: Learn how to initialize a Soroban Dapp using scripts
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/smart-contracts/guides/dapps/initialization
label: Initialization
---

:::danger These are not the droids you're looking for

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

:::

# Example Soroban Dapp Initialization

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.
Expand Down
10 changes: 10 additions & 0 deletions dapps/guides/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 1
title: React
description: Learn about the frontend for the example Crowdfund Dapp.
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/smart-contracts/guides/dapps/react
label: React
---

:::danger These are not the droids you're looking for

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

:::

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.

Below is a list of the libraries used throughout the frontend code and their respective imports:
Expand Down
10 changes: 10 additions & 0 deletions dapps/guides/smart-contracts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 2
title: Smart Contracts
description: Learn about the smart contracts from the Soroban Dapps Challenge.
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund
label: Smart Contracts
---

:::danger These are not the droids you're looking for

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

:::

## Crowdfund Example

The [example crowdfunding smart contract](https:/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.
Expand Down
10 changes: 10 additions & 0 deletions dapps/guides/wallets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 4
title: Wallets
description: Learn how to use wallets on Soroban
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/smart-contracts/guides/freighter/integrate-freighter-react
label: Wallets
---

:::danger These are not the droids you're looking for

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

:::

import freighter_settings from "../../static/img/freighter_settings.png";
import gear_icon from "../../static/img/gear_icon.png";
import preferences_menu from "../../static/img/preferences_menu.png";
Expand Down
10 changes: 10 additions & 0 deletions dapps/scaffold-soroban.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
sidebar_position: 2
title: Scaffold Soroban
description: Dive into the simple implementations of Soroban dapps to understand and learn the Soroban ecosystem.
sidebar_custom_props:
migration:
href: https://developers.stellar.org/docs/learn/migrate/introduction-to-solidity-and-rust
label: Introduction to Solidity, Rust, and Soroban
---

:::danger These are not the droids you're looking for

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

:::

## Demonstrative Soroban Dapps

import ReactPlayer from "react-player";
Expand Down
6 changes: 0 additions & 6 deletions docs/README.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,3 @@ title: We've Moved!
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.

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:/stellar/stellar-docs).

:::info There is one temporary exception...

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.

:::
32 changes: 1 addition & 31 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,6 @@ const config = {
},
plugins: [
"docusaurus-plugin-sass",
// [
// '@docusaurus/plugin-content-docs',
// {
// id: 'api',
// path: 'api',
// routeBasePath: 'api',
// sidebarPath: require.resolve('./sidebarsApi.js'),
// editUrl: "https:/stellar/soroban-docs/tree/main/",
// showLastUpdateTime: true,
// showLastUpdateAuthor: true,
// },
// ],
[
'@docusaurus/plugin-content-docs',
{
id: 'dapps',
path: 'dapps',
routeBasePath: 'dapps',
sidebarPath: require.resolve('./sidebarsDapps.js'),
editUrl: "https:/stellar/soroban-docs/tree/main/",
showLastUpdateTime: true,
showLastUpdateAuthor: true,
},
],
require('./src/dev-server-plugin'),
require('./src/analytics-module')
],
Expand Down Expand Up @@ -101,14 +77,8 @@ const config = {
label: 'API',
position: 'left'
},
// {
// href: 'https://fastcheapandoutofcontrol.com/',
// label: 'Play Game',
// className: 'nav-highlight',
// position: 'left',
// },
{
to: '/dapps',
href: 'https://developers.stellar.org/docs/learn/interactive/dapps',
label: 'Dapps',
position: 'left'
},
Expand Down
8 changes: 8 additions & 0 deletions nginx/includes/redirects.conf
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,11 @@ rewrite "^/docs/category/tokens$" "https://developers.stellar.org/docs/smart-con
rewrite "^/docs/tokens(.*)$" "https://developers.stellar.org/docs/smart-contracts/tokens$1" permanent;
rewrite "^/docs/reference/freighter$" "https://developers.stellar.org/docs/smart-contracts/guides/freighter" permanent;
rewrite "^/docs/faq$" "https://developers.stellar.org/docs/learn/smart-contract-internals/faq" permanent;
# dapps challenge
rewrite "^/dapps/guides/wallets(.*)$" "https://developers.stellar.org/docs/smart-contracts/guides/freighter/integrate-freighter-react" permanent;
rewrite "^/dapps/guides/smart-contracts(.*)" "https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund" permanent;
rewrite "^/dapps/guides(.*)$" "https://developers.stellar.org/docs/smart-contracts/guides/dapps$1" permanent;
rewrite "^/dapps/scaffold-soroban(.*)$" "https://developers.stellar.org/docs/learn/interactive/dapps/scaffold-soroban$1" permanent;
rewrite "^/dapps/dapp-challenges(.*)$" "https://developers.stellar.org/docs/learn/interactive/dapps/challenges$1" permanent;
rewrite "^/dapps" "https://developers.stellar.org/docs/learn/interactive/dapps" permanent;
rewrite "^/dashboard" "https://developers.stellar.org/docs/learn/interactive/dapps/dashboard" permanent;
40 changes: 30 additions & 10 deletions sidebarsDapps.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,49 @@
module.exports = {
mySidebar: [
{
type: 'doc',
id: 'README',
type: 'link',
label: 'Welcome',
href: 'https://developers.stellar.org/docs/learn/migrate/introduction-to-solidity-and-rust',
},
{
type: 'link',
label: 'Dashboard',
href: '/dashboard',
href: 'https://developers.stellar.org/docs/learn/interactive/dapps/dashboard',
},
{
type: 'doc',
id: 'scaffold-soroban',
type: 'link',
label: 'Scaffold Soroban',
href: 'https://developers.stellar.org/docs/learn/interactive/dapps/scaffold-soroban',
},
{
type: 'category',
label: 'Guides',
items: [
'guides/docker',
'guides/initialization',
'guides/react',
'guides/smart-contracts',
'guides/wallets'
{
type: 'link',
label: 'Docker',
href: 'https://developers.stellar.org/docs/smart-contracts/guides/dapps/docker'
},
{
type: 'link',
label: 'Initialization',
href: 'https://developers.stellar.org/docs/smart-contracts/guides/dapps/initialization'
},
{
type: 'link',
label: 'React',
href: 'https://developers.stellar.org/docs/smart-contracts/guides/dapps/react'
},
{
type: 'link',
label: 'Smart Contracts',
href: 'https://developers.stellar.org/docs/learn/interactive/dapps/challenges/challenge-0-crowdfund'
},
{
type: 'link',
label: 'Wallets',
href: 'https://developers.stellar.org/docs/smart-contracts/guides/freighter/integrate-freighter-react'
},
],
collapsible: true, // The category can be collapsed.
collapsed: true, // Initially, the category will be collapsed.
Expand Down

0 comments on commit 2d2471b

Please sign in to comment.