diff --git a/README.md b/README.md index 01c6f45..d3599de 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # charity-crowdfunding-tealscript -This starter full stack project has been generated using AlgoKit. See below for default getting started instructions. +This is a fullstack charity crowdfunding application built with AlgoKit, the fullstack template, and TEALScript for the smart contract. See below for getting started instructions. ## Setup @@ -20,20 +20,36 @@ This starter full stack project has been generated using AlgoKit. See below for # Demo -Make sure you are in workspace mode for vscode. You can do this by going to the `charity-crowdfunding-algokit.code-workspace` file and clicking on the `workspace` button on the bottom right of the screen. This will open up the workspace in vscode. +Make sure you are in workspace mode for vscode. You can do this by going to the `charity-crowdfunding-tealscript.code-workspace` file and clicking on the `workspace` button on the bottom right of the screen. This will open up the workspace in vscode. + +Before you continue make sure you have Docker Desktop running in the background. We use Docker to launch a local Algorand blockchain on your computer. ## Backend +Make sure you are in the `Backend` folder in your terminal. The `deploy-config.ts` file in `backend/smart_contracts/charity_crowdfunding` folder contains a test script that goes through the entire lifecycle of a charity crowdfunding app. You can run this script by running the following command in the terminal: ``` -cd backend -hit F5 +cd smart_contracts/charity_crowdfunding +npx tealscript contract.algo.ts ../artifacts/charity_crowdfunding_app +algokit generate client ../artifacts/charity_crowdfunding_app -o ../artifacts/charity_crowdfunding_app/client.ts -l typescript ``` +Then go to "RUN AND DEBUG" in VSCode and Run `Deploy Built TEALScript application` + + ## Frontend +Make sure you are in the `frontend` folder in your terminal. + +To launch a local server to play around with the frontend: + +``` +npm run build +npm run preview +``` + +Running these two commands will launch a local server with the frontend running on it. -TODO ### Subsequently diff --git a/backend/.vscode/launch.json b/backend/.vscode/launch.json index 4ccd8e1..38bbc67 100644 --- a/backend/.vscode/launch.json +++ b/backend/.vscode/launch.json @@ -14,7 +14,7 @@ "envFile": "${workspaceFolder}/.env.localnet" }, { - "name": "Deploy Built Beaker application", + "name": "Deploy Built TEALScript application", "type": "node", "request": "launch", "runtimeExecutable": "npm", diff --git a/charity-crowdfunding-tealscript.code-workspace b/charity-crowdfunding-tealscript.code-workspace index ae638cc..07af970 100644 --- a/charity-crowdfunding-tealscript.code-workspace +++ b/charity-crowdfunding-tealscript.code-workspace @@ -58,7 +58,7 @@ "name": "Run Frontend (+ LocalNet and Smart Contract)", "configurations": [ { - "name": "Deploy Built Beaker application", + "name": "Deploy Built TEALScript application", "folder": "backend" }, { "name": "Run dApp", "folder": "frontend" } diff --git a/frontend/README.md b/frontend/README.md index 5b124b4..5efa864 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,6 +1,6 @@ # frontend -This starter React project has been generated using AlgoKit. See below for default getting started instructions. +This React project has been generated using AlgoKit. See below for default getting started instructions. # Setup diff --git a/frontend/src/components/CreateCharity.tsx b/frontend/src/components/CreateCharity.tsx index c58868b..5f0c01b 100644 --- a/frontend/src/components/CreateCharity.tsx +++ b/frontend/src/components/CreateCharity.tsx @@ -320,7 +320,7 @@ export function StartCreate({ onFormSubmit }: StartCreateComponentProps) { onClick={handleSubmit} disabled={loading} > - {loading ? :
'Create Fundraiser'
} + {loading ? :Create Fundraiser
}