A minimal Hello World example showing a Flutter mobile app communicating with a Bun backend via SkirRPC.
skir-src/ # Skir schema definitions
backend/ # Bun + TypeScript HTTP server
frontend/ # Flutter mobile app
bunx skir genThis reads skir.yml and generates TypeScript into backend/skirout/ and Dart
into frontend/lib/skirout/. Re-run whenever you change a .skir file.
cd backend
bun install
bun run startThe server listens on http://localhost:8080. Open http://localhost:8080/api?studio in your browser to explore the API interactively with the Skir Studio.
cd frontend
flutter pub get
flutter runAndroid emulator: the app connects to
http://localhost:8080/apiby default, which works for iOS simulators. For Android emulators, replacelocalhostwith10.0.2.2infrontend/lib/main.dart.
To install a Git pre-commit hook that runs codegen, linting, and type-checking automatically before every commit:
bash pre_commit_setup.shTo run the checks manually:
bash pre_commit.sh| Path | Description |
|---|---|
skir-src/greet.skir |
Skir schema — defines the Greet RPC method |
skir.yml |
Skir codegen configuration |
backend/src/server.ts |
Bun HTTP server exposing the Greet method |
frontend/lib/main.dart |
Flutter UI that calls Greet and displays the response |
pre_commit.sh |
Linting / type-checking script |
pre_commit_setup.sh |
Installs pre_commit.sh as a Git pre-commit hook |