Quick Start
This guide introduces you to IOTA SDK’s core concepts and shows you how to build your first feature.
Core Concepts
Modules
IOTA SDK is organized into modules. Each module represents a business domain:
- Core - Users, authentication, roles
- Finance - Accounts, transactions, expenses
- Warehouse - Inventory, products, orders
- CRM - Customers, chats, relationships
- HRM - Employees, positions
Domain-Driven Design (DDD)
The SDK follows DDD principles with clear layer separation:
Layer Responsibilities:
| Layer | Purpose | Contains |
|---|---|---|
| Presentation | Handle HTTP requests | Controllers, DTOs, Templates |
| Service | Orchestrate business logic | Services, Workflows |
| Domain | Define business rules | Entities, Aggregates, Value Objects |
| Infrastructure | External concerns | Repositories, Database models |
Multi-Tenancy
Every piece of data belongs to a tenant (organization). The SDK automatically:
- Isolates data between tenants
- Applies tenant filters to all queries
- Manages tenant-specific settings
Your First Module
Module Structure
A minimal module contains:
modules/mymodule/
├── component.go # Component registration
├── links.go # Navigation items
├── domain/ # Business entities
├── services/ # Business logic
├── presentation/ # Controllers & templates
└── permissions/ # RBAC constantsModule Registration
Components register themselves with the composition engine during startup:
- Define the Component - Implement
composition.Component - Build Declaratively - Add services with
composition.Provide(...)and runtime slices withcomposition.Contribute...(...) - Compose Explicitly - Call
engine.Register(yourComponent)andengine.Compile(...)for the capabilities your process needs
Key Registration Steps
When building a module, you’ll:
- Register Services - Business logic accessible through the composition container
- Register Controllers - HTTP handlers for routes
- Register Migrations - Database schema changes
- Register Permissions - RBAC for access control
- Register Navigation - Menu items for the UI
Understanding the Flow
Request Lifecycle
Data Flow
- User interacts with UI (HTMX-enhanced forms)
- Controller receives request, validates input
- Service orchestrates business operations
- Domain entities enforce business rules
- Repository persists to database
- Response returns to user (HTML or JSON)
Next Steps
Now that you understand the basics:
- Review DBCTL Operations for policy-first DB workflows
- Explore the Project Structure to see how the codebase is organized
- Read about Architecture for deeper understanding of patterns
- Review the Core Module to see a complete implementation
The SDK is designed to be intuitive once you understand the DDD layer separation. Every feature follows the same pattern, making it easy to extend and maintain.
Last updated on