Client development
Everything a user sees lives in the colibri-social/colibri.social monorepo: the client, its component library, the website that hosts it, the native shell, and these docs. It’s a pnpm workspace.
Directoryapps
- website Astro app: marketing site, docs, hosted web client
Directorypackages
- app the SolidJS client
- ui the component library, with its Storybook
- wrapper the Tauri v2 desktop/mobile shell around the client
- lib shared helpers, XRPC types, events, facets, markdown
- assets fonts, sounds, logos, emoji, and their manifests
- standard-renderer renderer for standard.site documents
The website serves the client’s Vite build at /app, and the native shell bundles the same build. See the client architecture page for how the client talks to an AppView.
-
Install dependencies (
corepack enablefirst, so the pinned pnpm version is used):Terminal window git clone https://github.com/colibri-social/colibri.social.gitcd colibri.socialpnpm install -
Create a
.envfrom.env.example. Nothing in it is required for client work.PUBLIC_VAPID_KEYonly matters if you’re testing Web Push, and must match the AppView’sVAPID_PUBLIC_KEY. -
Start the client dev server:
Terminal window pnpm dev:appThen open
http://127.0.0.1:5173. Vite binds every interface on port5173, but the OAuth redirect URI is registered against127.0.0.1, solocalhostwill fail at login.
The client talks to the AppView set in VITE_COLIBRI_APPVIEW_URL, and to the production AppView when it’s unset. To work against a local AppView, set it to http://127.0.0.1:3000.
Logging in locally
Section titled “Logging in locally”Login uses a real Atmosphere account through OAuth, against whatever PDS that account lives on. On a loopback address the client id is the localhost development form, http://localhost?scope=...&redirect_uri=http://127.0.0.1:<port>/app/login, instead of a hosted client metadata document. Scopes are built from the AppView’s did:web, so they’re derived from what your local install points at.
CI runs Biome, the test suite, and Knip, all of which you can reproduce locally:
pnpm lintpnpm testpnpm knippnpm --filter @colibri-social/app typecheckTests are Vitest files configured by a vitest.config.ts in each tested package. The client defines two projects. unit covers src/**/*.test.ts and runs in Node. browser covers src/**/*.browser.test.tsx and runs in headless Chromium through Playwright.
Knip reports unused files, exports, and dependencies across the workspace. A file nothing imports fails CI, so delete code once its last caller is gone.
See Testing for what belongs where, and how the AppView is kept in sync.
Running the website
Section titled “Running the website”The website hosts the client, the marketing pages, and this documentation:
pnpm buildpnpm dev:webThe website serves the client’s built dist/ at /app, so build the workspace once before starting it. For UI work, run pnpm dev:app, which serves from source with HMR.
Its dev, build and preview scripts all run sync-assets first, which fetches shared assets out of @colibri-social/assets and copies them into place. TURSO_DATABASE_URL and TURSO_AUTH_TOKEN are declared as required server env vars, so the site won’t boot without them.
Documentation pages are Markdown/MDX under apps/website/src/content/docs/docs/, rendered by Starlight. The sidebar is assembled in apps/website/astro.config.ts: each group autogenerates from a directory, and page order inside a group comes from sidebar.order in the frontmatter.
Running the native app
Section titled “Running the native app”The shell renders the client’s built output, and its build commands build packages/app for you:
pnpm dev:tauri # desktoppnpm dev:tauri:android # Android, needs the Android SDK/NDKpnpm dev:tauri:ios # iOS, needs XcodeUseful flags, all documented in packages/wrapper/README.md: DISABLE_SENTRY strips Sentry from both the frontend bundle and the Rust binary (used for no-track distributions like F-Droid), and tauri build requires TAURI_SIGNING_PRIVATE_KEY because updater artifacts are enabled.
The native app can’t use a localhost OAuth client (the tauri://localhost origin isn’t publicly fetchable), so its client metadata is served from a fixed public origin. That means native login always goes through a hosted metadata document, even in development.
dev:tauri:android and dev:tauri:ios work for iterating on your own machine, but neither works on an Android emulator or an iOS Simulator. See Testing native builds for the build-and-install workflow those need instead.
Formatting and linting
Section titled “Formatting and linting”The workspace uses Biome for both:
pnpm lint # checkpnpm lint:fix # check and fixpnpm format # format onlyRun these before opening a PR. CI checks the same thing.
Changesets
Section titled “Changesets”Changes to anything under apps/ or packages/ need a changeset, which drives versioning and the changelog:
pnpm exec changesetChanges limited to the website’s content, the docs, or repository configuration don’t need one. More detail on the contributing page.
Announcing a change in-app
Section titled “Announcing a change in-app”The client has a “What’s New” settings page with the last five releases. Its content comes from the changesets themselves, so anything you want users to read about is written where you already write the changeset.
Use the wrapper instead of pnpm exec changeset, and it walks you through the entry after the usual prompts:
pnpm changeset:featureIt asks whether to announce the change (defaulting to yes for a minor or major bump and no for a patch), whether it is a feature or a fix, then a title, a body, an icon, and which platforms it applies to, defaulting to all of them. The icon step is a live search over the bold weight of Solar that narrows as you type, and it renders each match inline if your terminal supports the Kitty graphics protocol, as Ghostty, Kitty and WezTerm do. Set COLIBRI_NO_ICON_PREVIEW=1 to fall back to names only.
To see your entry in the running app before it ships:
pnpm whats-new:preview # writes a throwaway 0.0.0-preview releasepnpm dev:apppnpm whats-new:generate # removes it againThe preview renders through the same platform filter as a real release, so an entry limited to ios will not show up in a desktop browser.
The result is an HTML comment in the changeset body, which you can also write or edit by hand:
---"@colibri-social/wrapper": minor---
Adds voice channels with screen sharing
<!-- whatsnewtitle: Voice channelsicon: microphonebody: Hop into a voice channel and talk without leaving the app.platforms: allkind: feature-->title, icon, body and platforms are required. kind is optional and defaults to fix for a patch bump and feature otherwise. A long body can wrap onto indented continuation lines. Colons inside values are fine, so no quoting is needed.
platforms takes a comma-separated list of web, ios, android, macos, windows and linux, plus three shorthands: all for every platform, mobile for ios, android, and desktop for macos, windows, linux. Combine them freely, so mobile, macos is three platforms. all is the right answer unless the change is invisible on some platform.
The key exists because the App Store does not let the iOS app show release notes for anything other than iOS. Every place an entry is rendered filters to one platform: the settings page filters to the platform the app is running on, and the App Store and Play listings filter to the platform being published. An entry naming no matching platform is invisible there, and a release with nothing left for a store gets a generic “Bug fixes and improvements.” line instead.
Two optional release-level keys, releaseTitle and heroImage, can be set by any one changeset in a release. Setting either from two changesets in the same release is an error.
CI fails a minor or major changeset for @colibri-social/wrapper that has no block, so features never ship unannounced, and prints a ready-to-paste block in the failure. A patch without one only gets a hint, since most fixes are not worth an entry.
The generated files under packages/app/src/data/release-notes/ are written by pnpm ci:version during a release. If you edit them by hand, run pnpm whats-new:generate and commit the result, which CI also verifies.
See also
Section titled “See also”- Client Architecture: how the client talks to an AppView.
- Development Overview: the dev-mode shortcuts in full.
- Facets: how rich text is encoded and rendered.
- Testing native builds: building and testing the native shell on each platform.