growthx-club/build-sprint-skills

convex-dev-static-hosting

A Convex component that enables hosting static React/Vite apps using Convex HTTP actions and file storage.

소스 보기

사용 방법

  1. 설치 명령을 복사하고 자신의 에이전트 환경에 설치하기 전에 소스 패키지를 확인하세요.
  2. 필요한 도구, 인증 정보, 지원 환경은 원본 문서에서 확인하세요.
  3. 입력과 원하는 산출물을 설명하고 출처와 결과를 대조하세요.
npx skills add https://github.com/growthx-club/build-sprint-skills --skill convex-dev-static-hosting

시작 전 확인

  • 설치에는 모델 구독, API 한도, 파일 접근 권한이 포함되지 않습니다.
  • 별점 수와 설치 수는 활동 지표이며 독립적인 품질·보안 검증이 아닙니다.
원본 Skill 문서

원본 저장소의 제목, 예시, 코드, 표, 링크, 이미지를 유지해 표시합니다.

Agents: read this skill fully before writing code that uses Static-Hosting. Follow the installation and configuration steps exactly.

Static-Hosting

Instructions

Static-Hosting enables developers to serve React/Vite apps directly from Convex without external hosting providers. It uses Convex HTTP actions to serve files from Convex storage, with automatic SPA fallback for client-side routing, smart caching for hashed assets, and garbage collection of old deployments. The upload API uses internal functions for security, ensuring only authenticated CLI users can deploy files.

Installation

bash
npm install @convex-dev/static-hosting

Current npm version: @convex-dev/static-hosting@0.2.1

Use cases

  • Deploy full-stack apps with single backend: Host your React frontend and Convex backend functions in one deployment, eliminating the need for separate hosting services like Vercel or Netlify
  • Prototype and demo apps quickly: Skip external hosting setup during development and share working demos directly from your Convex deployment URL
  • Build internal tools and admin dashboards: Serve company-internal React apps from Convex with built-in authentication integration and no external dependencies
  • Create self-contained SaaS applications: Package your entire application stack into Convex components that include both backend logic and frontend assets
  • Implement live deployment notifications: Use the deployment query hooks to show users when new versions are available and prompt for page refreshes

How it works

The component integrates into your Convex app configuration and HTTP router using registerStaticRoutes() to serve files from Convex storage. During deployment, the CLI uploads your built assets to Convex storage via internal functions like generateUploadUrl() and recordAsset(), which are only accessible through authenticated npx convex run commands for security.

The HTTP actions serve files with intelligent caching - hashed assets from bundlers like Vite get long-term cache headers while HTML files use ETags for freshness. The spaFallback option automatically serves index.html for unmatched routes, enabling client-side routing in single-page applications.

Deployment uses either a one-shot deploy command that builds your frontend with the correct production VITE_CONVEX_URL, deploys the Convex backend, then uploads static files, or separate upload commands for more control. The component automatically garbage collects old deployment files to prevent storage bloat.

When NOT to use

  • When a simpler built-in solution exists for your specific use case
  • If you are not using Convex as your backend
  • When the functionality provided by Static-Hosting is not needed

Resources

관련 작업

같은 저장소의 Skills

더 많은 Skills

모든 Skills
growthx-club
커뮤니티

agentation

Add Agentation visual feedback toolbar to a Next.js project

1시간 설치 수
4
GitHub Stars
0
업데이트
9월 25일
growthx-club
커뮤니티

art-direction

Give the project one visual point of view, then generate images against it. Use before generating, editing or replacing any image asset — hero image, og:image, illustration, empty state, avatar, background, card art, favicon source. Also use when generated images look generic, "AI", off-brand, or when a set of images do not look like they belong to the same product. Skip for UI layout, CSS and component work, which belong to frontend-design and impeccable.

1시간 설치 수
4
GitHub Stars
0
업데이트
9월 25일
growthx-club
커뮤니티

checkpoint

Save the builder's work to git at every point the app works, and get them back to a working version when something breaks. Use the moment a feature works end to end, before any risky change, before a long build step, at the end of a session, and whenever they say something broke, "it worked before", "undo that", or "start over". Also use when they have been building a while with nothing committed.

1시간 설치 수
4
GitHub Stars
0
업데이트
9월 25일
growthx-club
커뮤니티

clearshot

Structured screenshot analysis for UI implementation and critique. Analyzes every UI screenshot with a 5×5 spatial grid, full element inventory, and design system extraction — facts and taste together, every time. Escalates to full implementation blueprint when building. Trigger on any digital interface image file (png, jpg, gif, webp — websites, apps, dashboards, mockups, wireframes) or commands like 'analyse this screenshot,' 'rebuild this,' 'match this design,' 'clone this.' Skip for non-UI i

1시간 설치 수
4
GitHub Stars
0
업데이트
9월 25일