Developing AO Processes
This section provides an overview of the architecture of AO processes and how they are developed.
In order to develop AO processes and start using Create Ao dApp, you need to have a basic understanding of the following:
- Lua programming language - AO processes are written in Lua. If you are not familiar with Lua, you can learn the basics from the official Lua documentation.
- ao + aos - AO processes are executed by the AO. You need to have a basic understanding of how to use the
ao
. You can learn more aboutao
from the official documentation
Process Directory Structure
A recommended project structure for developing AO processes is as follows:
project-name/ # Your project's root directory.
├── ao/ # The root directory of your ao processes.
│ └── process-name/ # Process Directory.
│ ├── scripts/ # Utility scripts for the process.
| | ├── build.sh # Build script for the process.
│ │ ├── deploy.sh # Deploy script for the process.
| | └── test.sh # Test script for the process.
│ ├── src/ # Source code for the process.
│ │ ├── test/ # Entry point for the process.
│ │ │ ├── mocked-env # Mocked env files to test the process.
| | | ├── setup.lua # AO Testing Suite setup file.
│ │ │ └── process_test.lua # Test script for the process.
│ | ├── process_lib.lua # Library for the process.
│ | ├── process.lua # Entry point for the process.
│ │ └── reset_modules.lua # Reset preloaded modules
│ ├── aoform.yaml # Configuration for ao-form deployment.
│ └── squishy # Squishy configuration for build.
├── apps/ # The root directory of your frontend applications.
│ └── frontend/ # React Vite App connected to ao process.
├── utils # Directory for utility functions.
│ └── inject-process.ts # Script to inject process Ids from ao to frontend
├── node_modules/
├── .gitignore
├── package.json
├── README.md
└── tsconfig.json
Don't be overwhelmed by the structure. We will go through each of the directories and files in detail in the following sections.