Repository navigation
Description
Idea, looking for interest. Nothing is decided or built. If you would use this, react with π and tell us in a comment what you would open on your phone (a web app, a React Native/Expo app, an Android build, β¦) and from where (office Wi-Fi, the team's VPN). Decisions follow the usual review card (ADR-0070) once there is interest.
The idea
See a lane on a real phone: open the branch's web app on your phone, get told when a new build is ready, install an Android build of the branch, without cables, Android Studio or hand-made tunnels.
The user installs a small PWA on the phone, pairs it with their pool membership by scanning a QR code in the dashboard, and gets a list of their lanes with links that work on the phone.
Phone PWA ββHTTPSβββΆ devstack gateway (in the pool, a container image)
ββ / the PWA: my lanes, status, links
ββ web--feature-x--anna.dev.example.com βββΆ the lane's port on its node
Non-goals: not a preview-deployment platform
This is not Vercel or Netlify. Those answer "what does this pull request look like, for everyone"; this answers "what does the lane I am working on look like on my phone".
| Preview deployments (Vercel, Netlify) | devstack on a phone | |
|---|---|---|
| What runs | a commit that was pushed and built | the lane's working tree, unpushed changes and live reload included |
| How much | a frontend and serverless functions; the database lives elsewhere | the whole stack: native services, workers, the lane's own containers and database |
| Where | their cloud | the team's own machines and nodes; code and data stay in-house |
| For whom | anyone with the link | the developer and the devices they paired |
| How long | the URL stays | as long as the lane runs |
So devstack will not:
- host anything, run a CDN or custom domains, or come near production;
- give out public or shareable links: every request comes from a paired device of a pool member;
- deploy on a push: a lane runs because someone works on it;
- keep anything running longer than its lane;
- put a gateway on the internet: it is reachable in the office network or over the team's VPN; whoever tests on mobile data brings their VPN (Tailscale, WireGuard, β¦);
- distribute builds to testers or stores (that is TestFlight's or Firebase App Distribution's job): a lane's Android build goes to its developer's own device.
The test for every later feature: does it help the developer and their team while developing, on their own infrastructure? If it shows something to people outside the pool, it is not devstack's.
The closer neighbours are generic tunnels (ngrok, Tailscale Funnel, Expo's tunnel, the port forwarding of VS Code or Codespaces). devstack would not be one: it never opens a bare port, only a lane's services, through its profile, for a member's paired devices.
Why not the hub
The hub listens on loopback only (ADR-0019), holds the dashboard's cookie, and serves logs with development secrets and commands that run code. None of that belongs on a phone or in the Wi-Fi. A laptop also sleeps; a phone does not. The natural place is the pool: a gateway next to the nodes, which run the lanes anyway.
Sketch
- Pair. The dashboard's "Add a device" shows a QR code with a one-time code (like
devstack ui's/auth?code=). The phone opens the gateway, gets an HttpOnly cookie, and can install the PWA. - Expose. Per lane, a switch "open for my devices", off by default (like sharing a lane, ADR-0035/0053, with one's own devices as the audience).
- Open. The PWA lists the exposed lanes and their state (running, building, new build). A tap opens the service through the gateway, which checks every request before it proxies it (WebSocket included, for HMR).
What it would reuse
| Exists | Used for |
|---|---|
| Pool: CA, members, roles, admin log | a device belongs to a member |
| Lanes on nodes, port forwarding (ADR-0029) | the gateway reaches the lane where it runs |
| Sharing and connecting (ADR-0035/0053) | the per-lane switch and its semantics |
| Profiles (ADR-0041) | a mobile profile in the stack file, no built-in --mobile flag |
| One-time code pairing (ADR-0019) | QR pairing |
| Journal (ADR-0067), notifications (ADR-0045) | "device X opened Y", push on "new build ready" |
ui/ (Vue, types, components, PWA setup) |
the phone PWA as a second Vite entry |
What would be new
-
A gateway role (
devstack node gateway, or part of the node agent): TLS, a host name per lane and service, a check per request, a reverse proxy. -
Devices: pairing, revoking, last seen.
-
Placeholders
{service.<name>.public_url}and.public_host. On a phone,localhostis the phone: a SPA that calls{service.api.url}(http://127.0.0.1:5000) fails there. The stack says how it uses the public address:[profiles.mobile] env = { API_URL = "{service.api.public_url}", CORS_ORIGINS = "{service.web.public_url}" } [profiles.mobile.services.web] env = { VITE_ALLOWED_HOSTS = "{service.web.public_host}", VITE_HMR_CLIENT_PORT = "443" }
Additive: existing stack files stay valid.
-
A Devices section in the dashboard, beside Pool: pair a device, the list of devices (name, platform, last seen, what it opened, revoke), the per-lane switch. Admins see a member's devices under Members and can block them.
What a device may do
| May | May not |
|---|---|
| see the lanes its member exposes to devices, with their state | read logs (they hold development secrets) |
| open their services through the gateway | start, stop, promote, run commands |
| get a push when a new build is ready (Web Push; iOS 16.4+ for installed PWAs) | see other members' lanes, unless shared with its member and exposed by them |
| reach the hub or the coordinator |
A device is not a pool member: no certificate, no placement. Its rights are a subset of its member's, and the member or an admin can revoke it.
Native apps
| Kind | Fit | How |
|---|---|---|
| Web app, PWA, Flutter web, Capacitor live reload | β | as above |
| React Native / Expo | β | Metro runs in the lane; the PWA opens a dev-client deep link (exp+app://expo-development-client/?url=https://metro--laneβ¦), HTTP and WebSocket go through the gateway |
| Android native (Kotlin), Flutter native | π‘ as builds | a Linux lane image with the Android SDK ([lanes] dockerfile) builds the APK as an artifact (ADR-0002/0003); the PWA offers "new build, install" on the developer's own paired device, no tester groups or release history. No hot reload: that needs the tool attached to the device over adb |
| iOS native | β | needs macOS, Xcode and signing (ad hoc or TestFlight); macOS is a preview without a maintainer's Mac (ADR-0054) |
| An emulator streamed to the browser | later | possible on Linux nodes with KVM, a topic of its own |
Debugging native code stays with Android Studio or Xcode. devstack would cover "see the branch on a real phone".
Open points
- HTTPS is required (service worker, install, push). Installing the pool's CA on a phone is painful, on iOS in particular. Likely: an admin provides a wildcard certificate (ACME DNS-01) for
*.dev.example.com. - Subdomains, not path prefixes. Apps break under
/lane/x/(absolute paths, cookies, router base). - The apps are untrusted code. Lane hosts under one domain are same-site to each other (the concern in ADR-0019's amendment). So: the PWA on another domain than the lane hosts, a host-only cookie per lane host, and the gateway's cookie stripped before a request reaches the app.
- Reachability. Office Wi-Fi or the team's VPN only (see Non-goals); a gateway on the internet is out of scope.
- OAuth redirect URIs are registered up front; changing lane host names clash with that (a fixed host per member?).
- Lanes on the laptop (not on a node) would need an outbound tunnel from the hub to the gateway.
Possible phases
- Gateway, pairing,
public_urlplaceholders, the PWA with list and open. Lanes on nodes only; office network or VPN. - Push, a lane's APK as an install link on its developer's own device, Expo deep links.
- Lanes on the laptop through an outbound tunnel from the hub to the gateway.
Points a review card would have to decide
- trust: Phones never reach the hub; they reach lanes only through a pool gateway that checks every request with a device credential, and that gateway is never on the internet.
- concept: A device is a paired companion of exactly one member, not a pool member; its rights are a subset of its member's.
- trust: A device sees and opens only lanes its member exposes to devices (per lane, off by default); never logs, commands or controls.
- contract:
{service.<name>.public_url}/.public_hostplaceholders;mobileis a profile of the stack, not a built-in flag. - contract: Host names
<service>--<lane>--<member>.<gateway domain>with a wildcard certificate an admin provides; the PWA on a separate domain.
π€ Generated with Claude Code
Activity
7schmiede commentedon Oct 28, 2026
Related: #358 sketches handing lanes over to testers (a customer's pool, invited testers, a test plan from the ticket). The non-goals here are about a developer's own devices; #358 widens them to people a pool's owner invited, on the owner's infrastructure.