Skip to content

Self-hosted prep + domain unification#234

Open
rakshith-ravi wants to merge 6 commits into
developfrom
feature/stronger-self-hosted
Open

Self-hosted prep + domain unification#234
rakshith-ravi wants to merge 6 commits into
developfrom
feature/stronger-self-hosted

Conversation

@rakshith-ravi

Copy link
Copy Markdown
Contributor
  • Adds a cloud Cargo feature and a VITE_CLOUD_MODE flag, with Cloudflare, Turnstile and GitHub OAuth all cfg-gated behind them
  • Makes the base / deployment / registry domains configurable instead of hardcoding patr.cloud and onpatr.cloud
  • Unifies domain handling — DNS-record models and routes are gone, folded into add/delete/list/get domain
  • Drops the unused declare_app_route macro
  • Regenerates the sqlx offline cache

@rakshith-ravi rakshith-ravi force-pushed the feature/stronger-self-hosted branch 2 times, most recently from a87f2ab to c925394 Compare May 22, 2026 09:08
@rakshith-ravi rakshith-ravi force-pushed the feature/stronger-self-hosted branch from c925394 to 6a96036 Compare June 26, 2026 18:16
- add cloud Cargo feature and VITE_CLOUD_MODE flag; cfg-gate Cloudflare, Turnstile and GitHub OAuth behind them
- configurable BASE_DOMAIN / DEPLOYMENT_DOMAIN / REGISTRY_DOMAIN replacing hardcoded patr.cloud / onpatr.cloud
- unify domain handling: drop DNS-record models and routes, fold into add/delete/list/get domain
- drop unused declare_app_route macro
- regen sqlx offline cache
- registry path uses literal "registry" on self-hosted: cfg-gated path
  field type (Uuid on cloud, RegistryNamespace ZST elsewhere) and the
  handlers resolve it to the singleton workspace via inline query
- create_workspace returns FeatureNotSupported on self-hosted
- frontend: sidebar workspace switcher is lazy + cloudOnly so it tree-shakes
  out, /workspace/new and /onboard 404 on self-hosted, deployment image
  names use the literal "registry" namespace
- new m004_unify_domains migration drops patr_domain_dns_record,
  patr_controlled_domain, user_controlled_domain, the nameserver_type
  column, and the DNS_RECORD_TYPE / DOMAIN_NAMESERVER_TYPE enums
- sqlx prepare moved into a Justfile recipe that merges cloud and
  no-default-features query sets into one .sqlx/ cache
- preprocess bumped to 0.5.11 to keep cfg attrs on macro fields
- onboarding: onboard.tsx invalidates the workspaces query before
  navigating away, _workspaced gates its redirect on isFetching too and
  clears the stored workspace id when it no longer matches anything
- new GetApiEnvironment endpoint at /api/info: version + deploymentType,
  plus baseDomain on self-hosted; cloud bundle ignores it
- frontend pulls baseDomain from /api/info via useApiEnvironmentQuery, shows
  it as the CNAME ingress hint on self-hosted ("Loading..." until fetched);
  cloud still uses ingress.{DEPLOYMENT_DOMAIN}
- new RegistryConfig {service, realm} replaces the hardcoded Bearer
  challenge; RegistryRequestParserLayer now takes state
- docker_login returns 200 OK instead of 202 so docker/crane clients accept
  the token (was breaking the whole push flow)
- 4 registry handlers (upload_chunk, complete_upload, get_upload_status,
  manifest/put) now echo the client's original namespace in the Location
  header instead of leaking the resolved workspace UUID on self-hosted
- bindings: drop the orphaned DnsRecord / NameserverType types after the
  domain unification, add DeploymentType + GetApiEnvironmentResponse, drop
  the nameserverType column from the domains list
- test Justfile augments api.sample.json with cloud-only fields via jq so
  the cloud-default `cargo run --bin api -- --migrate` step finds them
- gate create_account/complete_sign_up behind the cloud feature, and 404 the
  sign-up + confirm-signup routes and hide the sign-up link on self-hosted
- gate forgot/reset password turnstile for non-cloud and match the new IpAddr
  validate_turnstile_token signature
- drop nameserver_type from the api + e2e domain tests after domain unification
- build the e2e frontend in cloud mode and add the base_domain + registry config
  the cloud suite now requires
- regenerate the bindings barrel
@rakshith-ravi rakshith-ravi force-pushed the feature/stronger-self-hosted branch from 6a96036 to aaa552f Compare June 26, 2026 18:17
…orkspace name index

- drop dead DNS-record test TODOs, nameserver_type doc-comments, unused DNS_RECORD_NAME_REGEX
- validate is-name-available against RESOURCE_NAME_REGEX and filter soft-deleted names
- add search_for_user min-length + LIMIT 5 tests and an /api/info test
- simplify workspace_uq_name from LOWER(name) to (name) (CITEXT already folds case) + migration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant