First Project
Let's create your first AO-powered application step by step.
Prerequisites
Before you begin, make sure you have:
- Node.js 18+ installed
- AOS CLI installed (
npm i -g https://get_ao.g8way.io
) - ao-forge CLI installed (
npm install -g ao-forge
)
Step 1: Create a New Project
# Create a new project
ao-forge init my-first-ao-app
# Or specify the framework explicitly
ao-forge init my-first-ao-app --framework nextjs
This will create a new directory with the following structure:
my-first-ao-app/
├── README.md
├── package.json
├── ao.config.yml
├── tsconfig.json
├── ao/ # AO processes (for Nuxt)
│ └── counter.lua
└── src/ # Source files (for Next.js)
├── app/
└── ao/
└── counter.lua
Step 2: Explore the Project Structure
The generated project includes:
- ao.config.yml - Configuration file for AO processes
- ao/ or src/ao/ - Directory containing your Lua files
- counter.lua - A sample AO process
Step 3: Start Development
cd my-first-ao-app
# Start the development server
ao-forge dev
# Or start with AO processes
ao-forge dev:ao
Step 4: View Your Application
Open your browser and navigate to http://localhost:3000
. You should see your AO-powered application running!
Next Steps
- Learn about Project Structure
- Explore AI Code Generation
- Check out Examples