mirror of
https://github.com/davila7/claude-code-templates.git
synced 2026-09-19 01:30:23 +08:00
9e711c9320
Path-scoped rules that lazy-load context only when working on the relevant part of the codebase, complementing the global CLAUDE.md.
1.3 KiB
1.3 KiB
paths
| paths | |
|---|---|
|
Dashboard — www.aitmpl.com & app.aitmpl.com
Astro 5 + React islands + Tailwind v4 application. Single Vercel project serving both domains.
Stack
- Framework: Astro 5,
output: 'server' - UI: React islands for interactivity, Tailwind v4
- Auth: Clerk (via
window.Clerkglobal, no ClerkProvider per island) - Data:
components.jsonandtrending-data.jsonfromdashboard/public/ - APIs: Astro API routes in
dashboard/src/pages/api/
API Routes
- Export named HTTP methods:
export const GET: APIRoute,export const POST: APIRoute - Use shared libs from
dashboard/src/lib/api/(cors, neon, auth) - CORS via
corsResponse()/jsonResponse()fromdashboard/src/lib/api/cors.ts
React Islands
- Keep islands small and self-contained
- Auth: use
window.Clerkglobal, never wrap in ClerkProvider - Data fetching: load from same-origin JSON or API routes
Featured Pages
Two files to edit:
dashboard/src/lib/constants.ts—FEATURED_ITEMSarray (metadata, install command, links)dashboard/src/pages/featured/[slug].astro— HTML content per slug
Local Dev
cd dashboard && npm install && npx astro dev --port 4321
Deployment
Always use the deployer agent. Never deploy manually. Node pinned to 22.x (v24 breaks Vercel builds).