Code Monkey home page Code Monkey logo

algokit-test's Introduction

boardname

This starter full stack project has been generated using AlgoKit. See below for default getting started instructions.

Setup

Initial setup

  1. Clone this repository locally.
  2. Install pre-requisites:
    • Make sure to have Docker installed and running on your machine.
    • Install AlgoKit - Link: The minimum required version is 1.3.0. Ensure you can execute algokit --version and get 1.3.0 or later.
    • Bootstrap your local environment; run algokit bootstrap all within this folder, which will install Poetry, run npm install and poetry install in the root directory to install NPM and Python packages respectively, set up a .venv folder with a Python virtual environment and also install all Python dependencies.
      • For TypeScript projects, it will also run npm install to install NPM packages.
      • For all projects, it will copy .env.template to .env.
    • Run algokit localnet start to start a local Algorand network in Docker. If you are using VS Code launch configurations provided by the template, this will be done automatically for you.
  3. Open the project and start debugging / developing on:
    • Backend - Refer to the README for more information on how to work with smart contracts.
    • Frontend - Refer to the README for more information on how to work with the frontend application.

Subsequently

  1. If you update to the latest source code and there are new dependencies, you will need to run algokit bootstrap all again.
  2. Follow step 3 above.

Continuous Integration / Continuous Deployment (CI/CD)

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 use algokit deploy please see AlgoKit documentation.

Tools

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.

Integrating with smart contracts and application clients

Refer to the backend folder for overview of working with smart contracts, frontend for overview of the React project and the 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 BoardNameClient in AppCalls.tsx component by default.

Next Steps

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.

algokit-test's People

Contributors

hongthaipham avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.