Skip to content

Commit

Permalink
Update Soroban Dapps Challenge copy (stellar#631)
Browse files Browse the repository at this point in the history
* update redeployment section

* add description for deployment

* update links

* add note about building `target`

* Update challenge-0-crowdfund.mdx

* Update challenge-2-liquidity-pool.mdx
  • Loading branch information
Julian-dev28 authored Nov 1, 2023
1 parent 6d1a95c commit f12a08c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 51 deletions.
34 changes: 9 additions & 25 deletions dapps/dapp-challenges/challenge-0-crowdfund.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -203,43 +203,27 @@ You should see an updated balance reflecting the amount you have pledged in the

## Checkpoint 4: 🚢 Ship it! 🚁

Now that your dapp is fully functional, next prepare it for a new deployment on Futurenet, this time with a hosted frontend.
Now that your dapp is fully functional, its time to deploy it to a production environment. In this step, you will learn how to deploy your dapp to Vercel, a cloud platform for static sites that offers a quick and effective way to deploy the frontend of your dapp. This section requires that you have a [Vercel account] and the Vercel cli installed.

Then, run the following commands to initialize the contracts on Futurenet:
If you don't have the Vercel cli installed, run the following command to install it globally:

```sh
npm run reset
```

Then run the dev server again:

```sh
npm run dev
npm i --global vercel
```

Now, open your browser and visit [http://localhost:3000](http://localhost:3000).

Ensure that you are connected to Futurenet and you should be able to see the frontend of your dapp!
[Vercel account]: https://vercel.com/login

Next, you will need to remove unneccessary files for the the deployment. Run the following command to remove the `target` directory:
Next, you will need to remove the `target` directory to save space for the the deployment. Run the following command to remove the `target` directory:

```sh
rm -rf target
```

Next, you will use the Vercel cli to complete our deployment.
>Note: You can build this directory again by running `soroban contract build` in the `contracts/abundance` directory.
> Note: If you don’t already have a [Vercel account], you will need to create one and link it to your GitHub account.
[Vercel account]: https://vercel.com/login

First install the Vercel cli:

```sh
npm i --global vercel
```
Next, you will use the Vercel cli to complete your deployment.

Then, run the following command to deploy your dapp:
Run the following command to deploy your dapp:

```sh
npx vercel --prod
Expand Down Expand Up @@ -283,7 +267,7 @@ Join [our Community in Discord](https://discord.gg/stellardev) in case you have

In order to successfully complete this challenge, your work needs to be checked. Please, follow this steps:

1. Fork [the challenge repository](https://github.com/stellar/soroban-dapps-challenge).
1. Fork [the challenge repository](https://github.com/stellar/soroban-dapps-challenge/fork).
2. Fill `crowdfund/challenge/output.txt` file with your wallet address. Filled file should look like:

```sh
Expand Down
33 changes: 7 additions & 26 deletions dapps/dapp-challenges/challenge-2-liquidity-pool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -280,35 +280,16 @@ Once the transaction is confirmed, you should see updated balances on the fronte
</CompleteStepButton>

## Checkpoint 4: 🚢 Ship It! 🚁
Now that your dapp is fully functional, its time to deploy it to a production environment. In this step, you will learn how to deploy your dapp to Vercel, a cloud platform for static sites that offers a quick and effective way to deploy the frontend of your dapp.

Now that your dapp is fully functional , it's time to prepare it for new deployment on Futurenet using Vercel.

First, run the following commands to initialize the contracts on Futurenet:

```bash
rm -rf .soroban
./initialize.sh futurenet
```

> Note: This will remove the existing contracts and initialize new ones on Futurenet.
Then, navigate to the `frontend` directory and run the development server:

```bash
cd frontend
make setup && make start_dev
```

Now, open your browser and visit [http://localhost:5173](http://localhost:5173/).

Ensure that Freighter is connected to Futurenet, and you should be able to see the frontend of your dapp!

Next, you will remove the target directory, as it is not used by Vercel to deploy your site. To do this, navigate to the `liquidity-pool` directory and run the following:
First, you will remove the target directory, as it is not used by Vercel to deploy your site. To do this, navigate to the `liquidity-pool` directory and run the following:

```
rm -rf target
```

>Note: You can build this directory again by running `soroban contract build` in the `contracts/abundance` directory.
Next, you must move your `.soroban` directory to the frontend directory.

From a terminal in the `liquidity-pool` directory, run the following command:
Expand All @@ -333,7 +314,7 @@ Then, you need to update the `package.json` file in the frontend directory to po

Next, you will use the Vercel CLI to complete your deployment.

> Note: If you don’t already have a [Vercel account], you should create one and link it to your GitHub account.
> Note: If you don’t already have a [Vercel account], you will need to create one and link it to your GitHub account.
[Vercel account]: https://vercel.com/login

Expand Down Expand Up @@ -401,14 +382,14 @@ Submit your public URL to the challenge form.

## Checkpoint 6: 💪 Flex!

🍴 [Fork the liquidity pool repo] and make your own changes to the dapp.
🍴 [Fork the Soroban Dapps Challenge repo] and make your own changes to the Liquidity Pool branch.

Customize the code and submit a pull request for the Liquidity Pool Dapp Challenge. You can experiment with new fee strategies, improve the user interface, or integrate additional token pair options.

Take this opportunity to showcase your skills and make your mark on the Liquidity Pool Dapp. Good luck!

[Stellar Laboratory]: https://laboratory.stellar.org/#explorer?network=futurenet
[Fork the liquidity pool repo]: https://github.com/stellar/soroban-dapps-challenge/fork
[Fork the Soroban Dapps Challenge repo]: https://github.com/stellar/soroban-dapps-challenge/fork

## 📚 User Workflows Checklist

Expand Down

0 comments on commit f12a08c

Please sign in to comment.