1.0.0 • Published 7 months ago

qwerty-0x v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

ao-starter-kit

The ao-starter-kit provides a comprehensive boilerplate for setting up an AO process, including testing, modules, and amalgamation alongside a React application. This starter kit aims to simplify the development and deployment of AO processes by providing pre-configured setups and example processes.

Directory Structure

  • Backend Processes: Located in the ./ao directory, this includes all the backend processes necessary for the applications.
  • Frontend Applications: Located in the ./apps directory, this include all the frontend applications for the project.

Prerequisites

  • Bun: Bun is a fast JavaScript all-in-one toolkit.
  • LuaRocks: A package manager for Lua modules.
  • Busted: A unit testing framework for Lua.
  • Docker: Containerization platform required for the build process.

Installing Prerequisites

  1. Bun: Follow the installation instructions on the Bun.sh website.
  2. LuaRocks: Follow the installation instructions on the LuaRocks website.
  3. Busted: Install via LuaRocks with the command:
luarocks install busted
  1. Docker: Download and install Docker from the official Docker website.

Testing Processes

To test the example process, navigate to the project root and run the following command:

bun run counter:test

This command will execute the test suite for the Counter process using Busted. For more detailed information about the testing framework, visit the ao-process-testing repository.

Building processes

Building processes requires Docker to call the lua-squish image. Ensure that Docker is installed and running on your machine.

Squishy File

The process root dir must contain a squishy file with build instructions. Here is an example squishy file for the Counter process:

Main "src/process.lua"

Module "counter_lib" "./src/counter_lib.lua"

Option "minify-level" "none"
Output 'build/counter.lua'

Build Command

To build the example process, run the following command from the project root:

bun run counter:build

The output will be written to build/counter.lua.

Deploying Processes

Deploying processes is managed through AOForm.

Aoform is a tool to deploy a set of processes to AO. These can be defined in a aoform.yaml file. It uses a statefile to keep track of deployed processes and only updates code when needed.

Managing processes.yaml file

Configuration file for the counter process is present at ./ao/counter/aoform.yaml

- name: hello-world
  file: build/process.lua
  prerun: reset-modules.lua
  scheduler: _GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA
  module: GYrbbe0VbHim_7Hi6zrOpHQXrSQz07XNtwCnfbFo2I0
  tags:
    - name: Hello World
      value: hello-world

Deploying

  1. Make sure you set your wallet in the ENV export WALLET_JSON="$(cat ~/.aos.json)"
  2. Run `con

Additional Information

  • Documentation: Detailed documentation and further examples can be found in the relevant directories.
  • Contribution: Contributions are welcome! Please fork the repository and submit pull requests.
  • Support: For any issues or questions, please open an issue on the GitHub repository.
abort-controlleracornacorn-jsxagent-baseajvansi-regexansi-stylesarconnectargparsearray-unionarweavearweave-mnemonic-keysarweave-wallet-connectorarweave-wallet-kitasn1.jsasynckitaxiosbabel-mergebabel-plugin-polyfill-corejs2babel-plugin-polyfill-corejs3babel-plugin-polyfill-regeneratorbabel-plugin-transform-react-remove-prop-typesbalanced-matchbase64-jsbase64urlbignumber.jsbindingsbip39bn.jsbrace-expansionbracesbrorandbrowserslistbufferbuffer-equal-constant-timebun-typescallsitescaniuse-litechalkcliuiclone-deepcolor-convertcolor-namecombined-streamcommanderconcat-mapconvert-source-mapcore-js-compatcosmiconfigcounter-reactcross-spawncrypto-key-composercsstypedebugdeep-for-eachdeep-isdeepmergedefine-lazy-propdelayed-streamdir-globdoctrinedotenvduplexifyecdsa-sig-formatterelectron-to-chromiumellipticemoji-regexend-of-streamerr-codeerror-exes6-erroresbuildescaladeescape-string-regexpeslinteslint-plugin-react-hookseslint-plugin-react-refresheslint-scopeeslint-visitor-keysespreeesqueryesrecurseestraverseesutilsevent-target-shimeventsextendfast-deep-equalfast-globfast-json-stable-stringifyfast-levenshteinfastqfile-entry-cachefile-uri-to-pathfill-rangefind-upflat-cacheflattedfollow-redirectsform-dataframer-motionfs.realpathfunction-bindgaxiosgcp-metadatagensyncget-caller-fileglobglob-parentglobalsglobbygoogle-auth-librarygoogle-gaxgraphemergtokenhas-flaghash.jshasownhey-listenhmac-drbghoist-non-react-staticshtml-element-attributeshttp-proxy-agenthttps-proxy-agenthuman-crypto-keyshyper-asyncieee754ignoreimport-freshimurmurhashinflightinheritsis-arrayishis-core-moduleis-dockeris-extendableis-extglobis-fullwidth-code-pointis-globis-numberis-path-insideis-plain-objectis-streamis-typedarrayis-wslisexeiso-random-streamisobjectjs-tokensjs-yamljsescjson-bigintjson-bufferjson-parse-even-better-errorsjson-schema-traversejson-stable-stringify-without-jsonifyjson5jwajwskeypairkeyvkind-oflevnlibp2p-cryptolines-and-columnslocate-pathlodashlodash.camelcaselodash.debouncelodash.isplainobjectlodash.mergelongloose-envifylru-cachematchermerge2micromatchmime-dbmime-typesminimalistic-assertminimalistic-crypto-utilsminimatchmnemonistmsmultiformatsnannanoidnatural-comparenode-addon-apinode-fetchnode-forgenode-gyp-buildnode-releasesobject-assignobject-hashobject.omitobliteratoronceopenoptionatorp-limitp-locateparent-moduleparse-jsonpath-existspath-is-absolutepath-keypath-parsepath-typepem-jwkpicocolorspicomatchpifypostcssprelude-lsprop-typesproto3-json-serializerprotobufjsproxy-from-envpunycodequeue-microtaskramdareactreact-domreact-fast-comparereact-helmetreact-html-attributesreact-isreact-refreshreact-side-effectreadable-streamregenerateregenerate-unicode-propertiesregenerator-runtimeregenerator-transformregexpu-coreregjsgenregjsparserrequire-directoryresolveresolve-fromretry-requestreusifyrimrafrolluprun-parallelsafe-buffersafer-bufferschedulersecp256k1semvershallow-cloneshebang-commandshebang-regexslashsource-mapsource-map-jsstream-eventsstream-shiftstring-widthstring_decoderstrip-ansistrip-json-commentsstubsstylissupports-colorsupports-preserve-symlinks-flagteeny-requesttext-tableto-regex-rangetr46ts-api-utilsts-invarianttslibtype-checktype-festtypescriptuint8arraysundiciundici-typesunicode-canonical-property-names-ecmascriptunicode-match-property-ecmascriptunicode-match-property-value-ecmascriptunicode-property-aliases-ecmascriptupdate-browserslist-dburi-jsursa-optionalutil-deprecateuuidvitewarp-arbundleswarp-isomorphicwebidl-conversionswhatwg-urlwhichword-wrapwrap-ansiwrappywsy18nyallistyargsyargs-parseryocto-queuezod
1.0.0

7 months ago