This starter full stack project has been generated using AlgoKit. See below for default getting started instructions.
- Clone this repository to your local machine.
- Ensure Docker is installed and operational. Then, install
AlgoKit
following this guide. - Run
algokit project bootstrap all
in the project directory. This command sets up your environment by installing necessary dependencies, setting up a Python virtual environment, and preparing your.env
file. - To build your project, execute
algokit project run build
. This compiles your project and prepares it for running. - For project-specific instructions, refer to the READMEs of the child projects:
- Smart Contracts: charity-crowdfunding-python-contracts
- Frontend Application: charity-crowdfunding-python-frontend
This project is structured as a monorepo, refer to the documentation to learn more about custom command orchestration via
algokit project run
.
- If you update to the latest source code and there are new dependencies, you will need to run
algokit project bootstrap all
again. - Follow step 3 above.
This project uses GitHub Actions to define CI/CD workflows, which are located in the .github/workflows
folder. You can configure these actions to suit your project's needs, including CI checks, audits, linting, type checking, testing, and deployments to TestNet.
For pushes to main
branch, after the above checks pass, the following deployment actions are performed:
- The smart contract(s) are deployed to TestNet using AlgoNode.
- The frontend application is deployed to a provider of your choice (Netlify, Vercel, etc.). See frontend README for more information.
Please note deployment of smart contracts is done via
algokit deploy
command which can be invoked both via CI as seen on this project, or locally. For more information on how to usealgokit deploy
please see AlgoKit documentation.
This project makes use of Python and React to build Algorand smart contracts and to provide a base project configuration to develop frontends for your Algorand dApps and interactions with smart contracts. The following tools are in use:
- Algorand, AlgoKit, and AlgoKit Utils
- Python dependencies including Poetry, Black, Ruff or Flake8, mypy, pytest, and pip-audit
- React and related dependencies including AlgoKit Utils, Tailwind CSS, daisyUI, use-wallet, npm, jest, playwright, Prettier, ESLint, and Github Actions workflows for build validation
It has also been configured to have a productive dev experience out of the box in VS Code, see the backend .vscode and frontend .vscode folders for more details.
Refer to the charity-crowdfunding-python-contracts folder for overview of working with smart contracts, projects/charity-crowdfunding-python-frontend for overview of the React project and the projects/charity-crowdfunding-python-frontend/contracts folder for README on adding new smart contracts from backend as application clients on your frontend. The templates provided in these folders will help you get started.
When you compile and generate smart contract artifacts, your frontend component will automatically generate typescript application clients from smart contract artifacts and move them to frontend/src/contracts
folder, see generate:app-clients
in package.json. Afterwards, you are free to import and use them in your frontend application.
The frontend starter also provides an example of interactions with your CharityCrowdfundingClient in AppCalls.tsx
component by default.
You can take this project and customize it to build your own decentralized applications on Algorand. Make sure to understand how to use AlgoKit and how to write smart contracts for Algorand before you start.