This is a monorepo template for building Flutter web admin dashboards with a Serverpod backend. It’s designed for clean architecture, multi-flavor environments (local/dev/stg/prod), theming (light/dark/system), localization (EN/SV), and flexible networking (REST/GraphQL/gRPC/Firebase).
- Modern Flutter web admin dashboard
- Serverpod backend with endpoints, DB, migrations, and integrations
- Multi-flavor support: local, development, staging, production
- Flexible networking: Serverpod, REST, GraphQL, gRPC, Firebase
- Clean, feature-first architecture (domain/data/presentation)
- Theming (light/dark/system) and localization (EN/SV)
- Role-based authentication and permissions
- CI/CD ready (Cloud Build → Cloud Run)
flutter_serverpod_admin_portal/
├── flutter_admin_portal/ # Flutter web app (Puro-managed, Flutter 3.35.4)
│ └── .puro/ # Puro SDK files (created by Puro)
│
└── serverpod_admin_portal/ # Serverpod backend workspace
├── serverpod_admin_portal_client/ # Generated Dart client (consumed by Flutter)
├── serverpod_admin_portal_flutter/ # Flutter helpers for Serverpod (not a full app)
└── serverpod_admin_portal_server/ # Backend server (endpoints, DB, migrations)
- Flutter 3.35.4 (managed with Puro)
- Dart SDK (bundled with Flutter or system-wide)
- Docker (for Postgres in local dev)
- Serverpod CLI
dart pub global activate serverpod_cli
cd serverpod_admin_portal/serverpod_admin_portal_server
dart bin/main.dart --apply-migrations # Apply migrations
dart bin/main.dart # Start server➡️ Backend runs on http://localhost:8080
cd flutter_admin_portal
puro flutter pub get # Install dependencies
puro flutter run -t lib/main_local.dart # Run local flavorlocal→ Connects tohttp://localhost:8080development→ Cloud Run dev deploymentstaging→ Cloud Run staging deploymentproduction→ Cloud Run production deployment- Use
--dart-define=API_URL=...to override endpoints
- API endpoints and backend integrations are configured via
dart-defineor environment files - For Serverpod, set
API_URLto your backend endpoint - For Firebase, configure via
firebase_options.dartandgoogle-services.json/GoogleService-Info.plist - For REST/GraphQL/gRPC, update the relevant data sources in your repository
- Architecture: Clean, feature-first (domain/data/presentation)
- State Management: Riverpod + Freezed (Bloc optional for interop)
- Theming: Centralized in
core/theme/(AppColors,AppTextStyles) - Localization: ARB files (
en,sv) →flutter gen-l10n
flutter_riverpod,freezed,flutter_bloc(optional)http,dio,graphql,grpc(pluggable networking)firebase_core,firebase_auth(if using Firebase)logger(logging abstraction)
- Auth & role/scope-based permissions
- DB migrations (Postgres)
- SendGrid email integration
- GCP (Storage + Secret Manager)
- Notifications (WebSocket, streams)
- To run Flutter tests:
cd flutter_admin_portal
puro flutter test- To run Serverpod tests:
cd serverpod_admin_portal/serverpod_admin_portal_server
dart test- Ensure Docker is running for local Postgres/Redis
- Check that all environment variables are set
- For migration issues, verify your YAML model definitions
- For build issues, run
puro flutter cleanandpuro flutter pub get - For more help, see Serverpod Documentation and Flutter Documentation
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
- Add linting, theming, and logging to Flutter app (
flutter_admin_portal). - Create first endpoint in Serverpod (
auth_endpoint.dart) for login/logout. - Wire Flutter app to call
auth_endpointvia generated client. - Setup CI/CD (Cloud Build → Cloud Run) with flavors (dev/stg/prod).