Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix(cloud): route api.codync.dev and bind the production database

leepokai544e09763f11
diff --git a/cloud/wrangler.toml b/cloud/wrangler.toml
index 0d76f06d..c259d21a 100644
--- a/cloud/wrangler.toml
+++ b/cloud/wrangler.toml
@@ -3,20 +3,20 @@ main = "src/index.ts"
compatibility_date = "2026-09-01"
compatibility_flags = ["nodejs_compat"]
+# main: production at api.codync.dev (Clerk production instance)
+routes = [{ pattern = "api.codync.dev", custom_domain = true }]
+
[[migrations]]
tag = "v1"
new_sqlite_classes = ["ComputerRelay"]
-# main: production at api.codync.dev (Clerk production instance)
-routes = [{ pattern = "api.codync.dev", custom_domain = true }]
-
[vars]
CLERK_ISSUER = "<production Clerk Frontend API URL>"
[[d1_databases]]
binding = "DB"
database_name = "codync"
-database_id = "<production id>"
+database_id = "858f4ad9-d3b5-4f3b-860f-464803a00017"
migrations_dir = "migrations"
[[durable_objects.bindings]]
diff --git a/docs/guides/environments-and-deployment.md b/docs/guides/environments-and-deployment.md
index ba9ae95f..0f676ede 100644
--- a/docs/guides/environments-and-deployment.md
+++ b/docs/guides/environments-and-deployment.md
@@ -17,8 +17,7 @@ The host currently has no compiled cloud URL default. Use the Mac's **Reach from
## Checked-in readiness
- **Development:** app configuration and Worker configuration target `https://dev-api.codync.dev`; dev Clerk issuer and D1 binding are configured in source. Exercise the live path before claiming readiness.
-- **Production:** `apps/shared/Config/main.plist` has empty cloud/Clerk values. Root Worker configuration still contains production Clerk issuer and D1 ID placeholders. Release remote access is not ready from these files alone.
-- **Production route placement:** `routes` currently follows `[[migrations]]` in `cloud/wrangler.toml`, so TOML attaches it to that migration rather than the root Worker. Wrangler reports an unexpected `routes` field. Move the production route to the root table before production deployment. The dev route is explicitly under `[env.dev]`.
+- **Production:** D1 `codync` exists with migrations applied and the root Worker routes `api.codync.dev`. Still missing: the production Clerk instance (issuer in `cloud/wrangler.toml`, `CLERK_SECRET_KEY` / `CLERK_WEBHOOK_SECRET` secrets, publishable key in `apps/shared/Config/main.plist`), `cloudURL` in `main.plist`, and the first `npm run deploy:main`. Release remote access is not ready until then.
- **Local:** Wrangler's `local` environment supports the isolated integration test and its test issuer. It is not a real Google sign-in test.
## Deployment procedure