Skip to content

Getting Started

To get started with the create-ao-dapp, you can run the following command:

Terminal
npx create-ao-dapp@latest

Project Setup

Running the above command will prompt you to complete multiple steps to set up your project. The steps include:

Enter the name of your project

This will be used as the root directory for your project, relative to the current directory. (eg: my-project)

Pick a starter template within

You can choose from the following starter templates:

  • lua: A simple Lua Counter process.
  • lua-sqlite: Lua Books Manager process using SQLite.
  • teal: Lua Counter process using the Teal language.
  • teal-sqlite: Teal Books Manager process using SQLite.

Select the features you want to include

You can choose from the following features:

Project Structure

By selecting all the options, you will have a project structure similar to the following:

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.
│       ├── src/               # Source code for the process.
│       │   ├── test/                   # Entry point for the process.
│       │   │   └── process_test.lua    # Test script for the process.
│       │   └── process.lua             # Entry point for the process.
│       └── aoform.yaml        # Configuration for ao-form deployment.
├── apps/             # The root directory of your frontend applications.
│   └── frontend/     # React Vite App connected to ao process.
├── utils             # Directory for utility functions.
│   └── inject-process.js # Script to inject process Ids from ao to frontend
├── node_modules/
├── .gitignore
├── package.json
├── README.md
└── tsconfig.json

This structure includes the following directories:

  • ao/: The root directory of your ao processes.
  • apps/: The root directory of your frontend applications.
  • utils/: Directory for utility functions.

Preconfigured Scripts

The package.json file in the root directory of your project includes the following preconfigured scripts:

  • myprocess:deploy: Deploys the process using aoform.
  • myprocess:test: Runs the test script for the process.
  • myprocess:build: Builds the process using squishy.
  • myprocess:inject: Injects the deployed processes Ids from ao to the frontend.
  • frontend:dev: Starts the development server for the frontend application.
  • frontend:build: Builds the frontend application.

Next Steps

You can now start developing your ao processes and frontend applications. For more information on how to use the create-ao-dapp, follow along with the rest of the documentation. If you have any questions or need help, feel free to reach out to us on dedicated channels.