Tutorial: Build a Todo App¶
Goal¶
Create a multiplatform todo flow with auth, database, and realtime updates.
Steps¶
- Sign in user and save session
- Load initial todo list from
database.selectTyped<Todo>("todos") - Subscribe to
INSERTandUPDATEevents ontodos - Upload attachment files (optional) to Storage
- Invoke Edge Function for batch actions
Data model¶
@Serializable
data class Todo(
val id: String,
val title: String,
val done: Boolean,
)
Success criteria¶
- New todos appear across clients in realtime
- Session survives app restart
- Error states are surfaced from
SupabaseResult.Failure