Bloc + Clean Architecture + Appwrite delivers predictable events/states, Clean layers, and a backend you can self-host. The enterprise Flutter stack, explained.
Stack Configuration — what FlutterInit generates for this guide
Architecture
Clean Architecture
State Management
Bloc
Backend
When to choose this stack
Choose this stack when you need event/state predictability for large teams, Clean Architecture boundaries that survive feature growth, and a backend you can self-host. Bloc's explicit events make auth and domain flows auditable; Appwrite gives you Auth/DB/Storage with an open-source, self-host option when Firebase's cloud-only model is a non-starter.
Ready to build?
Generate this project in seconds
FlutterInit scaffolds the entire structure described in this guide — wired up, typed, and ready for flutter run.
Bloc + Clean Architecture + Appwrite is the enterprise Flutter stack: explicit events and states, Clean data / domain / presentation folders, and an Appwrite backend you can run on cloud or self-host. Predictable state transitions plus vendor-flexible infra. FlutterInit generates the blocs, repository boundaries, and Appwrite client (endpoint + project id) so the team starts from a shared shape.
What This Stack Generates
Select Bloc + Clean Architecture + Appwrite and you get:
go_router — auth redirects driven by session state
Compared to Firebase stacks: no Google Services files. You configure APPWRITE_ENDPOINT and APPWRITE_PROJECT_ID instead — and you can point that endpoint at Appwrite Cloud or your own server.
Project Structure
Why Bloc Fits Enterprise Teams
Bloc forces every state change through an event. That sounds ceremonial until you're debugging a login race in a six-person team.
Events — what happened (LoginRequested, SignUpRequested)
States — what the UI shows (isLoading, success/error handled via side effects)
Handlers — pure-ish async methods that emit new states
No silent notifyListeners() from a random widget. You can log every event in CI and replay flows in tests.
UI dispatches events. It doesn't call repositories. That's the boundary enterprise code reviews care about.
Clean Layers Keep Appwrite Swappable
Domain never imports package:appwrite. The repository interface is the contract; data owns the SDK.
AuthRepositoryImpl maps Appwrite responses into AppUser. Swap the service later — domain and blocs stay put.
Appwrite — Endpoint + Project ID (Self-Host Friendly)
FlutterInit initializes the Appwrite client from env:
Auth uses Account sessions:
Why enterprises care: point APPWRITE_ENDPOINT at Appwrite Cloud today, or at a self-hosted instance behind your VPC tomorrow. Same Flutter code. Firebase doesn't give you that lever.
You don't need Clean's folder tax yet — Feature-First + Bloc is enough structure for many mid-size apps
Ready to Generate?
Open the dashboard, choose Clean + Bloc + Appwrite + go_router, set APPWRITE_ENDPOINT and APPWRITE_PROJECT_ID, and ship from a stack your team can audit and self-host.