A deliberately opinionated and minimal full-stack starter built with Spry, Flutter, and unrouter.
The template currently includes a small user management example:
GET /usersGET /users/:idPOST /users- Three Flutter pages: list, details, and create
- Backend:
spry - Frontend:
flutter - Routing:
unrouter - API calls: Spry generated client
lib/app/
api.dart
app.dart
router.dart
pages/
home.dart
details.dart
create.dart
routes/
users/
index.get.dart
index.post.dart
[id].get.dart
middleware/
01_cors.dart
This starter is intentionally simple:
- one global
api - one global
router - pages call the generated client directly
- list and details use
defineDataLoader - create calls
POST /usersdirectly
The goal is not to demonstrate a layered architecture. The goal is to give you a template you can start modifying immediately.
- Create a project from this template
- Install dependencies
- Generate the Flutter platforms you actually need
- Start the Spry backend
- Run the Flutter app
flutter pub get
dart run spry buildThis template repository intentionally ignores the following platform directories:
android/ios/linux/macos/web/windows/
That means:
- those directories may exist in your local workspace
- but they are not treated as fixed template content
- template users should generate or regenerate the platforms they need with
flutter create
For example:
flutter create . --platforms=macos,ios,android,webOr only generate the targets you need:
flutter create . --platforms=macos
flutter create . --platforms=webStart Spry first:
dart run spry serveDefault addresses:
- API:
http://127.0.0.1:4000 - OpenAPI UI:
http://127.0.0.1:4000/docs
Then run Flutter:
flutter runThe frontend currently sends requests to:
http://127.0.0.1:4000
If you change the backend address, update both:
lib/app/api.dartspry.config.dart
If you change any route under routes/, regenerate the Spry runtime and client:
dart run spry buildThis updates local generated artifacts:
.spry/lib/src/generated/api/public/openapi.json
These generated files are already ignored by the template and do not need manual maintenance.
flutter pub get
dart run spry build
dart run spry serve
flutter analyze
flutter test
flutter run