Problem
Share links currently use the app’s current origin, so teams do not get a branded share URL.
Relevant places:
src/components/ShareDialog.tsx
app/routes/dashboard/-project.tsx
convex/schema.ts
convex/shareLinks.ts
If the intended product direction is to keep shared links on lawn.video, then teams should still be able to get team-specific
share URLs without needing full custom domain setup.
Goal
Add per-team share subdomains on lawn.video, for example:
https://acme.lawn.video/share/<token>
https://acme.lawn.video/watch/<publicId>
This should preserve the repo’s priorities:
- performance above all else
- good defaults
- convenience
- security
Why This Approach
Compared to full custom domains, team subdomains on lawn.video are:
- simpler to configure
- faster to ship
- easier to make the default
- less likely to create auth/cookie/domain edge cases
- more consistent with a low-friction share workflow
This fits the project better than making users manage DNS in v1.
Scope
In scope:
- assign each team a share subdomain on
lawn.video
- use that subdomain automatically for public watch links and restricted share links
- generate/copy/open links using that team subdomain by default
- add any necessary host resolution for incoming share traffic
Out of scope unless straightforward:
- user-provided custom domains
- moving the dashboard app to team subdomains
- advanced brand customization beyond the hostname
Requirements
- Each team gets a unique, stable subdomain on
lawn.video
- Subdomains should be generated with good defaults from the team slug or another stable team identifier
- Collisions must be handled safely
- Copied share links should use the team’s subdomain automatically
- Existing share protections must keep working:
- expiration
- password protection
- download flags
- The implementation must not weaken auth or expose the wrong team’s content on the wrong host
Suggested Implementation
Data model
Add a team-level share hostname/subdomain field or derived hostname strategy.
At minimum:
- a unique team share slug/subdomain
- validation and collision handling
- ability to resolve incoming hostnames to the correct team
URL generation
Replace window.location.origin-based share URL generation with:
https://<team-subdomain>.lawn.video for eligible share/watch links
- fallback to the default app origin where necessary
This should require no extra setup for normal users.
Routing
Add host-based resolution for share pages so the incoming *.lawn.video hostname maps to the correct team context.
Defaults
Prefer automatic defaults:
- generate the share subdomain from the team slug if possible
- avoid adding a settings flow unless needed
- keep the common path instant and simple
Security Requirements
- Subdomains must be unique and tied to exactly one team
- A team’s subdomain must not expose another team’s share links
- Existing share-link auth rules must continue to apply
- Public endpoints should be reviewed carefully for host-based isolation issues
Performance Requirements
- Share-link creation and copying should remain immediate
- Avoid unnecessary client-side waterfalls
- Avoid per-link configuration
- Keep the default share workflow as fast as it is now
Acceptance Criteria
- A team has a stable share subdomain on
lawn.video
- Public watch and restricted share links use that subdomain by default
- Visiting the subdomain link loads the correct shared video page
- Existing share protections still work
- The implementation keeps the share flow fast and low-friction
- Team isolation remains intact
Problem
Share links currently use the app’s current origin, so teams do not get a branded share URL.
Relevant places:
src/components/ShareDialog.tsxapp/routes/dashboard/-project.tsxconvex/schema.tsconvex/shareLinks.tsIf the intended product direction is to keep shared links on
lawn.video, then teams should still be able to get team-specificshare URLs without needing full custom domain setup.
Goal
Add per-team share subdomains on
lawn.video, for example:https://acme.lawn.video/share/<token>https://acme.lawn.video/watch/<publicId>This should preserve the repo’s priorities:
Why This Approach
Compared to full custom domains, team subdomains on
lawn.videoare:This fits the project better than making users manage DNS in v1.
Scope
In scope:
lawn.videoOut of scope unless straightforward:
Requirements
lawn.videoSuggested Implementation
Data model
Add a team-level share hostname/subdomain field or derived hostname strategy.
At minimum:
URL generation
Replace
window.location.origin-based share URL generation with:https://<team-subdomain>.lawn.videofor eligible share/watch linksThis should require no extra setup for normal users.
Routing
Add host-based resolution for share pages so the incoming
*.lawn.videohostname maps to the correct team context.Defaults
Prefer automatic defaults:
Security Requirements
Performance Requirements
Acceptance Criteria
lawn.video