feat(domains): add organization domain management tab
Adds an organisation-level Domains tab where administrators can find, create, edit and delete custom domains across every project and environment of the organisation.
Feature flag: the tab is behind the PostHog flag organization-domains. When it is off, the tab is hidden from the organisation navigation and /organization/:organizationId/domains redirects to the organisation overview. The page waits for PostHog flags to load before redirecting, so a cold load of the URL works for users who have the flag. Create and enable the flag in PostHog before rolling it out.
Access: organisation admins and owners, plus Qovery administrators. Other members see an "Administrator access required" state.
👁️ Preview
Here is the preview URL
Domains list
- Search, project and environment filtering, and pagination are server-side, using the new organisation custom domains endpoint. The page and page size are kept in the URL. The search waits for typing to pause (300 ms), since each search runs a list request and a DNS check. The Project and Environment filters list their options by name.
- The table uses TanStack headers and the shared TableFilter, TableFilterSearch, Checkbox and table primitives. Skeleton rows replace the rows while a page loads, while the search waits for typing to pause, and while a new search, page or filter loads, so the previous results are never shown as the new ones. A background refresh of the same results, for example after an edit, keeps the rows; if it fails, they stay with a red callout offering a retry. A page, search or filter that never loaded shows the error in the table instead.
- Rows follow the Figma reference: 48px cells, bounded single-line labels, neutral project/environment links, a single circular domain link, compact service/path chips and the shared service icons. Environment-mode badges reuse the existing component and the project-environments query, which rows of the same project share.
- DNS status: one
GET /organization/{organizationId}/customDomain/checkrequest, with the same filters and page as the list, checks every domain on the page; results are cached for 5 minutes and matched to rows by environment and domain name. A domain is valid only when the check of every service that serves it passes. It is failing when one check fails, and unknown when a check could not run (status: null), when it has no check, or when the request fails. Failing and unknown statuses explain why in a multi-line tooltip, which the keyboard can open too. The API has no check for a single domain, so the Check DNS records button on the right of the table header re-checks the page; every status cell shows a skeleton until the results are back, and the button is disabled meanwhile and on an empty page. Edits and deletes invalidate the page check, including those made from a service's settings. - Per-status counts and the single-choice Status column filter apply to the current page only, because statuses are only known for the domains on screen. While the checks of a new page or search load, a status filter shows skeleton rows rather than an empty result.
Creating a domain
- The New domain modal has the domain name, CDN and certificate toggles, the CNAME records to configure, and a list of routes.
- Domain names are validated client-side with the same rule as the API, and the error says what is wrong (for example a scheme, spaces, slashes or uppercase letters).
- Each route picks a project, an environment and a service, and shows which port will receive the traffic. Every route must be in the same environment, because the domain is created with the environment custom domain endpoint. Adding more routes is blocked when the environment can't share a domain between services. A service without a public port is rejected; if its ports can't be loaded, the form says so and offers a retry. Conflicts are checked with the validation endpoint before the route is added, and the route form can't be changed, cancelled or submitted again during that check. Create can't be submitted twice either.
- The CNAME records show the environment's target, or explain that it isn't available until the environment is deployed.
- Conflicts returned when the domain is created are shown next to the routes they concern. The API doesn't deploy anything, so the success toast offers to redeploy the impacted services.
- The route dropdowns are portalled out of the modal so they aren't clipped, and they scroll.
- The New domain and edit modals can't be dismissed while they save, so the result or error of the request is never lost.
Editing and deleting a domain
- The edit modal shows the domain, CNAME records, CDN and certificate toggles, and the domain's routes. The CNAME target comes from the same single environment request as in the New domain modal. If it can't be loaded, the records say so and offer a retry. Removing a route removes every route of that service. It can save with or without redeploying the services.
- Saving sends one
PUT /environment/{environmentId}/customDomain/{domainName}with the services that keep the domain, so every copy changes or none does. Renaming is allowed. Removing every route sendsDELETEinstead, with a warning in the modal; a domain already deleted elsewhere counts as deleted. Edit is disabled, like Delete, on a domain with no application, container or Helm route, so saving can never delete it by accident. Conflicts are shown next to the routes they concern, as in the New domain modal, and the modal stays open. - Deleting a domain from its row asks for confirmation (naming the domain and asking to type "delete"), then sends one
DELETE /environment/{environmentId}/customDomain/{domainName}. A domain that is already gone counts as deleted. - The API deploys nothing: the toasts offer to redeploy the
impacted_servicesit returns. A failed redeploy shows an error toast that retries only the failed services, and is never dropped silently. "Save and redeploy" redeploys after a successful edit, so a redeploy failure never re-runs the edit.
Bulk actions
Bulk actions follow the Figma selection screen:
- Select individual domains, or all selectable domains on the visible page, with an indeterminate header checkbox for a partial selection.
- Selection is keyed by environment and domain. Changing the page, page size, search or filters clears it, including through browser history, so returning to a page never brings back its selection.
- A floating bar offers Unselect and Delete. The DNS check is not a selection action, since it always covers the page: it is in the table header.
- Delete asks for confirmation, then sends one
POST /organization/{organizationId}/customDomain/bulkDeletefor the selection: all the domains are deleted, or none. On success the selection is cleared; on failure it is kept and the confirmation stays open to retry.
Shared changes
TableFilter: typed column generic, afacetedValuescolumn meta for server-filtered tables whose page may be empty (listed in the order given, since keys may be ids), a single-choice mode (multiple={false}), adisabledprop, and an accessible label on the clear button.InputSelect: a portalled menu can now scroll inside a modal, whose scroll lock used to swallow its wheel and touch events.qovery-typescript-axiosgoes from 1.1.1053 to 1.1.1054, which addscheckOrganizationCustomDomains(qovery-openapi-spec#1274).
Backend follow-ups
- The organisation listing endpoint takes about 25 seconds for a page of 30 domains, so every load, page change, filter change and post-edit refresh waits that long.
- A DNS status in the listing endpoint itself would let the status counts and filter work across all pages; today they cover the current page only.
- Project-name matching in free-text search. No frontend filtering or all-page fetching is used in the meantime.
- An exact-domain filter (or a single-domain endpoint) for the DNS check, so one row could be re-checked without checking the page.
- The environment
modein the listing items. Each row loads its project's environments (one request per distinct project on the page) only to show the mode badge.
Validation
domains/service-settings/feature: 45 suites, 296 tests and 2 snapshots pass.domains/custom-domains/feature(8 tests) anddomains/custom-domains/data-access(4 tests) pass.- Shared UI
table-filterandinput-selectspecs (3 suites, 21 tests) pass. - The console TypeScript check and production build (
nx build console) pass. - API errors are read in the
{ message, response }shape the console's HTTP interceptor produces, as well as AxiosErrors. Creation conflicts and the CNAME-target 404 fallback were missing that shape before. - Checked in the browser on a sandbox organisation (screenshots below).
Screenshots
1. Domains list
The organization Domains tab lists every custom domain with its DNS status, project, environment, routes and Edit/Delete actions. The table header shows the per-status counts for the page, the search and the Check DNS records button.
2. Loading state
While a page loads, skeleton rows keep the table layout in place instead of a spinner.
3. Checking DNS records
Check DNS records in the table header re-checks every domain on the page: the status cells show a skeleton and the button waits until the results are back.
4. Status details
Hovering a failing status shows the DNS check details in a tooltip that wraps long API errors.
5. Status filter
The Status column header filters the current page by DNS status, using plain-text options like the other column filters.
6. Filtered by status
With a status selected (from the column filter or the count badges), only matching domains on the page are shown.
7. Bulk selection
Selecting domains opens a floating action bar to unselect or delete them.
8. Bulk delete
Deleting selected domains asks for confirmation and removes them from every service they are configured on.
9. Edit domain
The edit modal shows the domain, its CNAME records, CDN and certificate toggles and its routes, and can save with or without redeploying.
10. Delete one domain
Deleting a single domain from its row names the domain, says how many service configurations it removes it from, and asks to type "delete".
11. New domain
The New domain modal starts with the domain field, the CNAME records to configure and an empty route list.
12. Domain validation
The domain field rejects values the API would refuse, such as a URL with http:// or https://, with a specific message.
13. Add route
Adding a route picks the project, environment and service that will serve the domain.
14. Route dropdowns
The route dropdowns open outside the modal and scroll, so every option stays reachable.
15. Route preview
Once a service is picked, the form explains which port of that service will receive the traffic.
16. Domain with a route
Added routes are listed in the modal, and the CNAME records show the environment's target, or explain when it is not available yet.
17. Pagination
Pagination is server-side, and the page and page size are kept in the URL (here ?page=2&pageSize=10).
18. Restricted access
Users who are not organization administrators (or Qovery admins) see a locked state instead of the domains.
References: Figma design, API specification.
🤖 Generated with Claude Code