Skip to content

Build a SaaS App

In this tutorial, you'll build TaskFlow — a multi-tenant project management application from scratch. By the end, you'll have a production-ready SaaS app that uses nearly every part of the Ereo framework working together.

What You'll Build

TaskFlow lets teams organize work into projects and tasks. Users can sign up, create teams, invite members, and track progress in real time.

Features:

  • User registration and login with session management
  • Team workspaces with role-based access (owner, admin, member)
  • Projects with task boards (to-do, in progress, done)
  • Rich task forms with validation, assignees, and due dates
  • Interactive dashboard with live-updating statistics
  • Real-time task updates via RPC subscriptions
  • Full-stack observability with tracing

Architecture Overview

┌─────────────────────────────────────────────────┐
│  Browser                                         │
│  ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│  │ Islands   │ │ Forms    │ │ RPC Client       │ │
│  │ (signals) │ │ (useForm)│ │ (WebSocket)      │ │
│  └──────────┘ └──────────┘ └──────────────────┘ │
├─────────────────────────────────────────────────┤
│  Server (Bun)                                    │
│  ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│  │ Auth     │ │ Loaders/ │ │ RPC Router       │ │
│  │ Plugin   │ │ Actions  │ │ (procedures)     │ │
│  └──────────┘ └──────────┘ └──────────────────┘ │
│  ┌──────────┐ ┌──────────┐ ┌──────────────────┐ │
│  │ Drizzle  │ │ Trace    │ │ Middleware       │ │
│  │ + SQLite │ │          │ │                  │ │
│  └──────────┘ └──────────┘ └──────────────────┘ │
└─────────────────────────────────────────────────┘

Packages Used

PackagePurpose
@ereo/coreApp creation, plugins, environment
@ereo/routerFile-based routing
@ereo/dataLoaders, actions, caching
@ereo/clientNavigation, islands, links
@ereo/serverBun HTTP server, middleware
@ereo/stateSignals and stores
@ereo/formsForm management and validation
@ereo/authAuthentication and sessions
@ereo/dbDatabase abstraction
@ereo/db-drizzleDrizzle ORM adapter
@ereo/rpcType-safe RPC with WebSockets
@ereo/traceFull-stack observability
@ereo/plugin-tailwindStyling

Prerequisites

  • Bun v1.0.0 or later
  • Completed the Blog Tutorial (recommended)
  • Familiarity with React and TypeScript
  • Basic understanding of SQL databases

Time Estimate

This is a comprehensive tutorial. Plan for 4–5 hours to complete all chapters, or work through them over multiple sessions.

ChapterTopicTime
1. SetupProject scaffolding and database schema25 min
2. AuthenticationLogin, registration, sessions, roles35 min
3. DatabaseDrizzle ORM, queries, transactions30 min
4. FormsTask creation, validation, field arrays40 min
5. Islands & StateInteractive dashboard, signals35 min
6. RPC & Real-timeLive updates via WebSockets40 min
7. Observability & DeploymentTracing, production config30 min

Ready?

Start Chapter 1: Setup →

Released under the MIT License.