spa-subdomain-root-render
OfficialRender subdomain root pages without redirects.
Software Engineering#spa#react-router#subdomain routing#edge injection#useparams fallback#client hydration
Authordivinevideo
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill solves the problem of subdomain-based SPAs redirecting away from the subdomain root and rendering blank content when a React Router component expects route parameters that do not exist at "/".
Core Features & Use Cases
- Redirect-free router rendering at subdomain root: Render the target page at "/" (instead of using Navigate) so
username.domain.com/stays clean and feels like a personal website. - Fallback identifier logic for missing params: Use injected subdomain user data when
useParams()has no matching values at the root route. - Edge-injected global user context: Inject user data into the SPA HTML before hydration so the client can reliably read it during initial render.
- Use Case: When
thecomedianriley.divine.video/should show the profile page at "/" rather than redirecting to something like "/profile/npub1...", this pattern keeps the URL stable and ensures the component still loads.
Quick Start
Follow the steps in the SKILL.md to render the profile component directly at the "/" route, add a fallback that uses edge-injected subdomain data when useParams() is empty, and inject the user JSON in the edge worker before SPA hydration.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: spa-subdomain-root-render Download link: https://github.com/divinevideo/divine-web/archive/main.zip#spa-subdomain-root-render Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.