A starter project to help you quickly set up and run a local environment with Flutter, PowerSync, and Supabase.
You will need the following tools installed on your local machine:
The ./supabase/config.toml file defines the configuration for your local Supabase instance.
The following settings have already been added and are required for this project:
enable_anonymous_sign_ins = true- Allows clients to generate JWT tokens without signing in using an email/password or OAuth provider. The./flutter_counterproject is configured to sign users in anonymously.signing_keys_path = "./signing_keys.json"- Enables asymmetric JWTs for your local Supabase instance.
Copy the environment template file:
cp .env.local.template .env.local1. Install the Supabase CLI (See the documentation for more installation options)
brew install supabase/tap/supabasescoop bucket add supabase https://github.com/supabase/scoop-bucket.git
scoop install supabaseRun the following command to generate the ./supabase/signing_keys.json file.
supabase gen signing-keyThere is already a migration in supabase/migrations/20250819090132_counters.sql that creates the counters table, creates the powersync publication and seeds one counter record
supabase startThe sync rules are already configured in docker/powersync.yaml to sync all data from counters to all clients.
docker compose --file ./docker/compose.yaml --env-file .env.local up -dcd flutter_counter
cp lib/app_config_template.dart lib/app_config.dart
flutter run