Building from source
How to build the app and run a test federation on your machine.
What you need
- mise to install the tools pinned in
mise.tomlandmise.lock. - PostgreSQL: the federation server keeps everything there.
- Xcode to build for iOS and macOS, the Android SDK for Android, Visual Studio with the C++ components for Windows.
A test federation
Sources
git clone https://github.com/serezhia/chat_playground.git
cd chat_playground
mise trust
mise install --locked
mise run setupDatabase
Create an empty database and write its libpq connection string to a file, for example
host=localhost user=postgres password=postgres dbname=comon_local in .local/conninfo. Then
create the schemas:
cd backend/comon_federation_server
mise exec -- dart run bin/migrate_database.dart --postgres-conninfo-file=../../.local/conninfoServer
mise exec -- dart run bin/comon_federation_server.dart --postgres-conninfo-file=../../.local/conninfoThe server listens on https://localhost:8443 with a test certificate, keeps files in
.local/comon-federation of the current directory and lets anyone in under any name through a built-in sign-in page. It is
not for real people: they need the full stack.
The app has to be told to trust the test certificate. On Windows the
mise run run:local script does that and also starts a couple of users to try
messaging, see the runbook. On macOS and Linux it is
simpler to bring up the full stack and build the app for it.
The app for your federation
tools/mvp-stack.py up writes .local/mvp/client.json with the federation's address and, when
Caddy's internal authority issued the certificate, that certificate. Pass it to the build:
cd frontend/comon_client
mise exec -- flutter run --dart-define-from-file=../../.local/mvp/client.jsonSigned builds for stores and testers are in the runbooks for Apple, Android and Windows.
Checks
Before sending changes, run the same checks as CI:
mise run verifyHow to run them only for changed packages is in AGENTS.md.