Your First Andamio App
Learn Andamio by building — create a course and enroll your first student
Your First Andamio App
Create a course, add a module, enroll as a student, and submit an assignment — all on preprod.
Time: ~30 minutes. Prerequisite: Getting Started.
Start from the template: Clone the andamio-app-template to follow along. It includes production-ready hooks for transaction handling — see the How Transactions Work section for details.
Step 1: Understand the Transaction Flow
Every action in Andamio follows the same pattern:
Your App → Gateway (build) → Wallet (sign) → Gateway (submit) → Cardano- Build: Your app requests a transaction from the Gateway
- Sign: The user signs with their wallet
- Submit: The signed transaction goes back to the Gateway
- Confirm: The Gateway submits to Cardano and tracks confirmation
Step 2: Create a Course
Open your app template at localhost:3000 and navigate to the course creation page.
If you don't see course creation options, your Access Token may not have course creator permissions. On preprod, you can grant yourself permissions — see Course Creator Setup below.
What happens on-chain
When you create a course, Andamio:
- Mints a Course Token representing your course
- Creates a Course State UTxO holding course metadata
- Links your Access Token as the course creator
This is your first real transaction. Watch the confirmation — it takes about 20 seconds on preprod.
Step 3: Add a Module
Courses contain modules. Each module can have:
- Learning content (off-chain, referenced by hash)
- Assignments (on-chain commitments)
Add a simple module to your course. The module metadata lives off-chain, but the module's existence is recorded on-chain.
Step 4: Enroll as a Student
Now switch perspectives. Using a different wallet (or the same one on a test course), enroll as a student.
What happens on-chain
Enrollment creates:
- A Student Token linking you to the course
- An Enrollment UTxO tracking your progress
You now have an on-chain relationship with the course.
Step 5: Submit an Assignment
Complete the loop by submitting an assignment. This demonstrates the full Andamio workflow:
- Student submits work (reference to off-chain content)
- Transaction records submission on-chain
- Course creator can now review and accept/reject
Summary
| Action | On-chain Result |
|---|---|
| Create course | Course Token + Course State UTxO |
| Add module | Module reference in course state |
| Enroll student | Student Token + Enrollment UTxO |
| Submit assignment | Assignment UTxO with submission reference |
Every interaction follows the same build → sign → submit pattern. The Gateway handles transaction construction; your app handles UX.
Next Steps
- Transaction Handling — Error handling, retries, and confirmation tracking
- API Integration — Deep dive into the Gateway API
- Protocol Overview — Understand the on-chain architecture
- App Template Source — Explore the hooks and patterns used in this tutorial
Appendix: Course Creator Setup
On preprod, you can grant course creator permissions to your Access Token:
- Go to preprod.app.andamio.io
- Connect your wallet
- Navigate to Admin → Permissions
- Add your Access Token as a course creator
This is a preprod convenience — on mainnet, permissions are managed by instance administrators.