Your First Andamio App
Learn Andamio by building — create a course and enroll your first student
Your First Andamio App
In this tutorial, you'll learn how Andamio works by building something real: a simple course with one module, then enrolling yourself as a student.
What you'll learn:
- How Andamio transactions work (build → sign → submit)
- The relationship between Access Tokens, courses, and enrollments
- How on-chain state changes as you interact with the protocol
Time: ~30 minutes
Prerequisites: Complete Getting Started first.
What We're Building
By the end of this tutorial, you'll have:
- Created a course on preprod
- Added a module with a simple assignment
- Enrolled yourself as a student
- Submitted an assignment
This mirrors the real workflow of Andamio — you'll understand the protocol by using it.
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
Let's see this in action.
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
What You've Learned
You've now experienced the core Andamio flow:
| 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 the complexity; your app just needs to request the right endpoints and handle wallet signing.
Next Steps
Now that you understand the basics:
- API Integration — Deep dive into the Gateway API
- Transaction Handling — Error handling, retries, and confirmation tracking
- Protocol Overview — Understand the on-chain architecture
Appendix: Course Creator Setup
On preprod, you can grant course creator permissions to your Access Token:
- Go to dev.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.