{"id":20980857,"url":"https://github.com/cap-go/capgo","last_synced_at":"2026-06-10T01:01:52.647Z","repository":{"id":39517519,"uuid":"442321089","full_name":"Cap-go/capgo","owner":"Cap-go","description":"Console, Backend and CLI to manage Capgo Instant update and Native build for Capacitor apps ","archived":false,"fork":false,"pushed_at":"2026-05-31T10:42:41.000Z","size":204205,"stargazers_count":196,"open_issues_count":35,"forks_count":128,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-05-31T12:20:46.713Z","etag":null,"topics":["android","capacitor","cordova","ios"],"latest_commit_sha":null,"homepage":"https://capgo.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cap-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"Cap-go","patreon":null,"open_collective":"capgo","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-12-28T01:55:37.000Z","updated_at":"2026-05-31T10:42:44.000Z","dependencies_parsed_at":"2026-04-09T15:06:05.370Z","dependency_job_id":null,"html_url":"https://github.com/Cap-go/capgo","commit_stats":{"total_commits":7051,"total_committers":27,"mean_commits":"261.14814814814815","dds":0.5409161821018296,"last_synced_commit":"e2d0b269941dafb8fb96a5b608269bdd2eddd81e"},"previous_names":[],"tags_count":4875,"template":false,"template_full_name":null,"purl":"pkg:github/Cap-go/capgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap-go","download_url":"https://codeload.github.com/Cap-go/capgo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33854119,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","capacitor","cordova","ios"],"created_at":"2024-11-19T05:30:55.038Z","updated_at":"2026-06-03T08:00:55.465Z","avatar_url":"https://github.com/Cap-go.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":[],"sub_categories":[],"readme":"# Console to manage and distribute your live update\n\n\u003cp align='center'\u003e\n  \u003cimg src='https://capgo.app/readme-banner.svg?repo=Cap-go/capgo' alt='Capgo - Instant updates for capacitor'/\u003e\n\u003c/p\u003e\n\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=bugs)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=security_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=code_smells)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=ncloc)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=Cap-go_capgo\u0026metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=Cap-go_capgo)\n[![CodSpeed](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/Cap-go/capgo?utm_source=badge)\n[![Known Vulnerabilities](https://snyk.io/test/github/Cap-go/capgo/badge.svg)](https://snyk.io/test/github/Cap-go/capgo)\n![GitHub license](https://img.shields.io/github/license/Cap-go/capgo)\n[![Bump version](https://github.com/Cap-go/capgo/actions/workflows/bump_version.yml/badge.svg)](https://github.com/Cap-go/capgo/actions/workflows/bump_version.yml)\n[![Build source code and send to Capgo](https://github.com/Cap-go/capgo/actions/workflows/build_and_deploy.yml/badge.svg)](https://github.com/Cap-go/capgo/actions/workflows/build_and_deploy.yml)\n\u003ca href=\"#badge\"\u003e\n\u003cimg alt=\"semantic-release\" src=\"https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://commitizen.github.io/cz-cli/\"\u003e\u003cimg alt=\"Commitizen friendly\" src=\"https://img.shields.io/badge/commitizen-friendly-brightgreen.svg\"\u003e\u003c/a\u003e\n\n\u003cbr\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/?ref=plugin\"\u003e ➡️ Get Instant updates for your App with Capgo \u003c/a\u003e\u003c/h2\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/consulting/?ref=plugin\"\u003e Missing a feature? We’ll build the plugin for you 💪\u003c/a\u003e\u003c/h2\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n## Features\n\n- ☁️ Cloud / Self hosted Support: Use our [Cloud](https://capgo.app/) to manage\n  your app updates or yours.\n- 📦 Bundle Management: Download, assign to channel, rollback.\n- 📺 Channel Support: Use channels to manage different environments.\n- 🎯 Set Channel to specific device to do QA or debug one user.\n- 🔄 Auto Update: Automatically download and set the latest bundle for the app.\n- ✅ Official Appflow alternative: our Capacitor updater plugin is the official alternative to Ionic Appflow.\n- 🛟 Rollback: Reset the app to last working bundle if an incompatible bundle\n  has been set.\n- 🔁 **Delta Updates**: Make instant updates by only downloading changed files.\n- 🔒 **Security**: Encrypt and sign each updates with best in class security\n  standards.\n- ⚔️ **Battle-Tested**: Used in more than 3000 projects.\n- 📊 View your deployment statistics\n- 🔋 Supports Android and iOS\n- ⚡️ Capacitor 8/7/6/5 support\n- 🌐 **Open Source**: Licensed under GNU AFFERO GENERAL PUBLIC LICENSE\n- 🌐 **Open Source Backend**: Self install\n  [our backend](https://github.com/Cap-go/capgo) in your infra\n\n\u003cbr\u003e\n\n## Usage\n\nCapgo is deployed to production on Cloudflare workers and Supabase.\n\nCloudflare workers take 99% of the traffic. Supabase is used for internal calls,\nfor internal tasks such as CRON jobs that call functions.\n\nWhen self-hosted, installing only Supabase is sufficient.\n\n## Why Cloudflare Workers + Supabase\n\nWe support both deployments for practical reasons:\n\n- **Supabase** is the legacy backend and the only required piece for\n  self-hosting.\n- **Cloudflare Workers** runs the same backend code (via the Hono adapter) but is\n  much cheaper at Capgo scale. With ~50M devices, Supabase Edge Functions are\n  cost-prohibitive because they follow AWS pricing. Cloudflare is ~10x cheaper\n  for our traffic profile.\n\nIn production, we route most traffic through Cloudflare Workers for cost and\nscale, while Supabase remains the reference backend and the default for\nself-hosted deployments. Private endpoints and trigger/CRON workloads still run\non Supabase in production.\n\n## Project structure (self-hosting map)\n\nIf you're self-hosting, the key pieces live in a few top-level directories:\n\n- `supabase/` - **Primary backend for self-hosting**\n  - `supabase/functions/` - Edge functions (Deno) that power the API\n    - `_backend/` - Core implementation used by both Supabase and Cloudflare\n    - `public/` - Public API routes used by customers and apps\n    - `private/` - Internal API routes for the console and ops tooling\n    - `plugins/` - Plugin endpoints (updates, stats, channel_self, etc.)\n    - `triggers/` - Database triggers and CRON functions\n  - `supabase/migrations/` - Database schema and RLS policies\n  - `supabase/seed.sql` - Local seed data for tests/dev\n- `supabase/schemas/prod.sql` - Production schema dump (reference only)\n- `cloudflare_workers/` - **Optional** Cloudflare Workers deployment (prod traffic)\n  - `cloudflare_workers/snippet/` - Geo routing for replicas\n  - Worker entry points and deploy config live here\n- `src/` - Frontend Vue 3 web console (Vite + Tailwind + DaisyUI)\n  - `src/pages/` - File-based routes\n  - `src/components/` - Reusable UI components\n  - `src/services/` - API clients and integrations\n  - `src/stores/` - Pinia stores\n- `sql/` - Raw SQL helpers and maintenance scripts\n- `scripts/` - Dev/build scripts used by CI and local tooling\n- `tests/` - Backend Vitest tests (run in parallel)\n- `playwright/` - Frontend E2E tests\n- `docs/` - Extra documentation and guides\n- `android/`, `ios/` - Capacitor native projects (mobile builds)\n\nQuick self-hosting path:\n\n1. `supabase/` is enough to run the backend locally.\n2. `src/` is the web console you point to your own backend.\n3. `cloudflare_workers/` is only needed if you want to run the Workers layer\n   instead of (or in front of) Supabase.\n\n## Backend endpoints (what lives where)\n\nThe backend is split by responsibility to keep routes clear and access scoped:\n\n- `supabase/functions/_backend/public/` - **Public API** exposed to customers.\n  This is the documented API on the website for customers that want to interact\n  with Capgo programmatically (apps, channels, bundles, devices, etc.).\n- `supabase/functions/_backend/private/` - **Private API** used internally.\n  The console (web UI) uses this heavily for admin/ops workflows. It is not\n  publicly accessible. Some UI flows still use the public API where appropriate.\n- `supabase/functions/_backend/plugins/` - **Plugin API** used by the\n  `@capgo/capacitor-updater` plugin running inside apps:\n  - `updates` - device update checks and bundle download flow\n  - `stats` - upload usage stats from devices\n  - `channel_self` - allow a device to opt into a channel (QA/debug)\n- `supabase/functions/_backend/triggers/` - **Triggers \u0026 CRON** for automated\n  backend jobs (queue consumers, scheduled tasks, DB-triggered flows).\n\nWhen self-hosting, you generally expose `public` + `plugins`. `private` should\nstay internal and locked down. `triggers` runs automatically.\n\n## Production schema (prod.sql)\n\n`supabase/schemas/prod.sql` is a schema dump of the production database. It is\ngenerated via `bun run schemas` (or `bun run schemas:local`) and is meant for\nreference/diffing, not as a source of truth. All actual schema changes live in\n`supabase/migrations/`.\n\n## Documentation\n\nhttps://github.com/Cap-go/capacitor-updater/wiki/Capgo-Sandbox-App\n\n- [Changing Supabase](supabase/migration_guide.md)\n\n## Plugins\n\nAll the following official plugins are already installed and pre-configured:\n\n- [Action Sheet](https://github.com/ionic-team/capacitor-plugins/tree/main/action-sheet) -\n  Provides access to native Action Sheets.\n- [App](https://github.com/ionic-team/capacitor-plugins/tree/main/app) - Handles\n  high level App state and events.\n- [App Launcher](https://github.com/ionic-team/capacitor-plugins/tree/main/app-launcher) -\n  Allows to check if an app can be opened and open it.\n- [Browser](https://github.com/ionic-team/capacitor-plugins/tree/main/browser) -\n  Provides the ability to open an in-app browser and subscribe to browser\n  events.\n- [Camera](https://github.com/ionic-team/capacitor-plugins/tree/main/camera) -\n  Provides the ability to take a photo with the camera or choose an existing one\n  from the photo album.\n- [Clipboard](https://github.com/ionic-team/capacitor-plugins/tree/main/clipboard) -\n  Enables copy and pasting to/from the system clipboard.\n- [Device](https://github.com/ionic-team/capacitor-plugins/tree/main/device) -\n  Exposes internal information about the device, such as the model and operating\n  system version, along with user information such as unique ids.\n- [Dialog](https://github.com/ionic-team/capacitor-plugins/tree/main/dialog) -\n  Provides methods for triggering native dialog windows for alerts,\n  confirmations, and input prompts.\n- [Filesystem](https://github.com/ionic-team/capacitor-plugins/tree/main/filesystem) -\n  Provides a NodeJS-like API for working with files on the device.\n- [Geolocation](https://github.com/ionic-team/capacitor-plugins/tree/main/geolocation) -\n  Provides simple methods for getting and tracking the current position of the\n  device using GPS, along with altitude, heading, and speed information if\n  available.\n- [Haptics](https://github.com/ionic-team/capacitor-plugins/tree/main/haptics) -\n  Provides physical feedback to the user through touch or vibration.\n- [Keyboard](https://github.com/ionic-team/capacitor-plugins/tree/main/keyboard) -\n  Provides keyboard display and visibility control, along with event tracking\n  when the keyboard shows and hides.\n- [Local Notifications](https://github.com/ionic-team/capacitor-plugins/tree/main/local-notifications) -\n  Provides a way to schedule device notifications locally (i.e. without a server\n  sending push notifications).\n- [Motion](https://github.com/ionic-team/capacitor-plugins/tree/main/motion) -\n  Tracks accelerometer and device orientation (compass heading, etc.).\n- [Network](https://github.com/ionic-team/capacitor-plugins/tree/main/network) -\n  Provides network and connectivity information.\n- [Push Notifications](https://github.com/ionic-team/capacitor-plugins/tree/main/push-notifications) -\n  Provides access to native push notifications.\n- [Screen Reader](https://github.com/ionic-team/capacitor-plugins/tree/main/screen-reader) -\n  Provides access to TalkBack/VoiceOver/etc. and Provides simple text-to-speech\n  capabilities for visual accessibility.\n- [Share](https://github.com/ionic-team/capacitor-plugins/tree/main/share) -\n  Provides methods for sharing content in any sharing-enabled apps the user may\n  have installed.\n- [Splash Screen](https://github.com/ionic-team/capacitor-plugins/tree/main/splash-screen) -\n  Provides methods for showing or hiding a Splash image.\n- [Status Bar](https://github.com/ionic-team/capacitor-plugins/tree/main/status-bar) -\n  Provides methods for configuring the style of the Status Bar, along with\n  showing or hiding it.\n- [Storage](https://github.com/ionic-team/capacitor-plugins/tree/main/storage) -\n  Provides a simple key/value persistent store for lightweight data.\n- [Text Zoom](https://github.com/ionic-team/capacitor-plugins/tree/main/text-zoom) -\n  Provides the ability to change Web View text size for visual accessibility.\n- [Toast](https://github.com/ionic-team/capacitor-plugins/tree/main/toast) -\n  Provides a notification pop up for displaying important information to a user.\n  Just like real toast!\n\n## Tests\n\nTests are split by backend (API/plugin), CLI, database SQL, and frontend:\n\n- `tests/` - Backend Vitest tests (API + plugin + CLI)\n- `playwright/e2e/` - Frontend Playwright tests\n- `supabase/tests/` - SQL tests for functions, RLS, and DB logic\n\nBackend test groups (Vitest):\n\n- API tests: public/private endpoints and general backend behavior\n- Plugin tests: `tests/updates*.test.ts`, `tests/stats*.test.ts`,\n  `tests/channel_self*.test.ts`\n- CLI tests: `tests/cli*.test.ts` (CLI auth, upload, metadata, etc.)\n\nRun tests:\n\n```bash\n# Supabase Edge Functions (default)\nbun test:all\nbun test:backend\nbun test:cli\nbun test:front\n\n# CLI workspace\nbun run cli:build\nbun run cli:test\nbun run cli:check\n\n# Legacy aliases kept for compatibility\nbun test:local\nbun test:all:local\nbun test:cli:local\n\n# Database SQL tests (Supabase CLI)\nsupabase test db\n\n# Cloudflare Workers\nbun test:cloudflare:all\nbun test:cloudflare:backend\nbun test:cloudflare:updates\n\n# Local Cloudflare Workers (required for cloudflare tests)\n./scripts/start-cloudflare-workers.sh\n```\n\nNotes:\n\n- Tests run in parallel across files. If a test mutates shared data, add\n  dedicated seed data in `supabase/seed.sql`.\n- The repository is a Bun workspace monorepo. The Capgo app lives at the root\n  and the CLI lives in `cli/`.\n- Capgo's Vitest CLI coverage now resolves the local `cli/` workspace by\n  default, so monorepo changes are exercised together.\n- SQL tests in `supabase/tests/` are run by the Supabase CLI test runner.\n- Run `bun run supabase:start` first so the local DB is available (worktree-isolated).\n\n## Dev contribution\n\n### Coding Style\n\n- Use Composition API with\n  [`\u003cscript setup\u003e` SFC syntax](https://github.com/vuejs/rfcs/pull/227)\n- [ESLint](https://eslint.org/) with\n  [@antfu/eslint-config](https://github.com/antfu/eslint-config), single quotes,\n  no semi.\n\n### Dev tools\n\n- [TypeScript](https://www.typescriptlang.org/)\n- [bun](https://bun.sh/) - fast javascript runtime, package manager, bundler,\n  test runner an all-in-one toolkit\n- [critters](https://github.com/GoogleChromeLabs/critters) - Critical CSS\n- [Cloudflare](https://www.cloudflare.com/) - zero-config deployment\n- [VS Code Extensions](./.vscode/extensions.json)\n  - [Vite](https://marketplace.visualstudio.com/items?itemName=antfu.vite) -\n    Fire up Vite server automatically\n  - [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) -\n    Vue 3 `\u003cscript setup\u003e` IDE support\n  - [Iconify IntelliSense](https://marketplace.visualstudio.com/items?itemName=antfu.iconify) -\n    Icon inline display and autocomplete\n  - [i18n Ally](https://marketplace.visualstudio.com/items?itemName=lokalise.i18n-ally) -\n    All in one i18n support\n  - [Windi CSS Intellisense](https://marketplace.visualstudio.com/items?itemName=voorjaar.windicss-intellisense) -\n    IDE support for Windi CSS\n  - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)\n\n\n### Deploy on Cloudflare Pages\n\nUse the CLI to deploy to preprod\n\n```bash\nbun run dev-build\n# then deploy\nbun run deploy:cloudflare:console:preprod\n```\n\nor Prod\n\n```bash\nbun run build\n# then deploy\nbun run deploy:cloudflare:console:prod\n```\n\n### Development\n\nYou will need to start each local server in separate terminals.\n\nBefore continuing, ensure you have the following installed:\n\n- [Docker](https://www.docker.com/)\n- [bun](https://bun.sh/)\n- [Supabase CLI](https://supabase.com/docs/guides/cli)\n\nYou can install the `supabase` CLI globally with `bun install supabase -g` and\nyou'll be able to invoke `supabase` from anywhere.\n\nAlternatively, you can install the `supabase` CLI locally with\n`bun install supabase --save-dev` but, to invoke it, you have to use:\n`./node_modules/supabase/bin/supabase`.\n\nIn the following guideline, we will assume that you have installed the\n`supabase` CLI globally.\n\n#### Start Supabase DB Locally\n\nStart the Supabase DB:\n\n```bash\nbun run supabase:start\n```\n\nPorts may differ per git worktree. To see the exact URLs/keys for the current worktree run:\n\n```bash\nbun run supabase:status\n```\n\n#### Seed Supabase DB locally\n\n[!WARNING] ⚠️ Ensure Docker is running.\n\n```bash\nbun run supabase:db:reset\n```\n\n#### Start Frontend locally\n\n```bash\nbun install\nbun serve:local\n```\n\n#### Login\n\nVisit http://localhost:5173\n\nThere are two login credentials you can use:\n\n| Account    | Username        | Password   |\n| ---------- | --------------- | ---------- |\n| Demo User  | test@capgo.app  | testtest   |\n| Admin User | admin@capgo.app | adminadmin |\n\nThe _demo user_ account has some demo data in it. If the data is not fresh, just\nreset the db with `supabase db reset`. The seed has been made in a way that\nensures the data is always fresh.\n\nThe _admin user_ account has administration rights so the user can impersonate\nother users. You can find the interface for that in the \"Account\" section.\n\n#### Supabase DB Reset\n\n[!WARNING] ⚠️ Ensure Docker is running.\n\nThis will seed the DB with demo data.\n\n```bash\nsupabase db reset\n```\n\n### Deploy Supabase self hosted\n\nTo deploy the supabase instance in self-hosted, use the\n[Supabase official guide](https://supabase.com/docs/guides/self-hosting).\n\nBefore deploying, duplicate `supabase/functions/.env.example` to\n`supabase/functions/.env`, replace the placeholder values with your\nself-hosted credentials, and keep the file local (it is gitignored). Use that\nfile for commands such as\n`supabase secrets set --env-file supabase/functions/.env`.\n\nOrganization invitation emails depend on Bento. If `BENTO_PUBLISHABLE_KEY`,\n`BENTO_SECRET_KEY`, and `BENTO_SITE_UUID` are not configured in\n`supabase/functions/.env` and synced to Supabase secrets, invite-org emails\nwill not be sent.\n\n### Deploy Supabase cloud\n\nTo deploy the Supabase instance on cloud, you need a paid account, which costs\n$25/month.\n\nLink the project to the cloud with the following command:\n\n```bash\nsupabase link\n```\n\nhttps://supabase.com/docs/reference/cli/supabase-link\n\nThen you need to push the migrations to the cloud with the following command:\n\n```bash\nsupabase db push --linked\n```\n\nhttps://supabase.com/docs/reference/cli/supabase-migration-up\n\nAnd seed the DB with demo data:\n\n```bash\nsupabase seed buckets\n```\n\nhttps://supabase.com/docs/reference/cli/supabase-seed-buckets\n\nSeed the secret for functions:\n\n```bash\nsupabase secrets set --env-file supabase/functions/.env\n```\n\nPush the functions to the cloud:\n\n```bash\nsupabase functions deploy\n```\n\n### Environment Variables for Self-Hosted Deployments\n\nBy default, the configuration uses Capgo production values from [configs.json](configs.json). For self-hosted deployments, you **must override** all configuration values using environment variables.\n\n#### Required Environment Variables\n\nAll configuration keys from `configs.json` can be overridden by setting their uppercase equivalent as environment variables:\n\n| Environment Variable | Description | Default (Prod) | Required for Self-Hosted |\n|---------------------|-------------|----------------|--------------------------|\n| `BASE_DOMAIN` | Console domain | `console.capgo.app` | ✅ Yes |\n| `SUPA_ANON` | Supabase anonymous key | Capgo production key | ✅ Yes |\n| `SUPA_URL` | Supabase URL | `https://sb.capgo.app` | ✅ Yes |\n| `API_DOMAIN` | API domain | `api.capgo.app` | ✅ Yes |\n| `CAPTCHA_KEY` | Turnstile captcha key | Capgo production key | ⚠️ Optional |\n\n#### Example Self-Hosted Configuration\n\n```bash\n# .env file for self-hosted deployment\nBASE_DOMAIN=console.yourdomain.com\nSUPA_ANON=your-supabase-anon-key\nSUPA_URL=https://your-supabase-url.supabase.co\nAPI_DOMAIN=api.yourdomain.com\nCAPTCHA_KEY=your-turnstile-key\n```\n\n#### Bento Email Variables\n\nIf you want organization invitation emails to work, you also need to configure\nthese Bento environment variables:\n\n```bash\nBENTO_PUBLISHABLE_KEY=your-bento-publishable-key\nBENTO_SECRET_KEY=your-bento-secret-key\nBENTO_SITE_UUID=your-bento-site-uuid\n```\n\n#### How It Works\n\nThe configuration system (`scripts/utils.mjs`) checks for environment variables first:\n1. If an uppercase environment variable exists (e.g., `SUPA_URL`), it uses that value\n2. Otherwise, it falls back to the appropriate value from `configs.json` based on the branch (`prod`, `preprod`, `development`, or `local`)\n\n**Important:** Without setting these environment variables, your self-hosted instance will attempt to connect to Capgo's production infrastructure, which will fail.\n\n### Build\n\nTo build the web app in mobile, in order to push to mobile stores, run:\n\n```bash\nbun install\nbun mobile\n```\n\nAnd you will see the generated files in the `dist` directory, ready to be served\non stores.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcap-go%2Fcapgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapgo/lists"}