Giter Club home page Giter Club logo

cadenza-editor's Introduction

๐ŸŽผ cadenza ๐ŸŽถ

code style: prettier Code style: black

what is it?

cadenza is a browser based pyteal editor & compiler, built for algorand's 2022 Q1 internal hackathon.

it can currently deploy stateful apps as well, but there is no UI feature to interact with them (yet!).

live demo here: but it is probably better to run it locally and consider it as a UI to your sandbox for now.

installation

Make sure you have sandbox running.

  • clone this repo
  • cd src/server
  • python -m venv .venv
  • source .venv/bin/activate
  • pip install -r requirements.txt
  • Start the server with python app.py or flask run --host=0.0.0.0

Now you should see the editor at http://localhost:5000.

how do i use it?

  • you can use the editor to input your own pyteal code.
  • there is some default boilerplate code available for you, and you can find more useful utils at the pyteal-utils repo.
  • pyteal written in cadenza must have the router object as the entry point for stateful apps, and the approval and clear state program will automatically be generated from this.
  • the compiler always compiles to the latest pyteal version available.
  • compile button tries to compile the pyteal and upon success, returns the base64 encoding of the program.
  • deploy button tries to compile and deploy the program on a private network on sandbox (on dev mode, so consensus and block finality is immediate!), and upon success, returns the application creation response.
  • double clicking the console will clear all the logs.

how was it built?

  • frontend: mostly vanilla javascript with the ace editor integration
  • backend: python & flask, with help from pyteal, py-algorand-sdk, and sandbox

cadenza architecture

tests

there aren't that many tests right now, but you can run them by booting up a default sandbox instance and running: python -m pytest

bugs ๐Ÿž

use at your own risk!

report them to me on github or open up an issue in the repo ๐ŸŽถ.

pr's are always welcomed ๐ŸŽผ

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.