src/pages/: Astro routes (e.g.,index.astro,events.astro); API routes insrc/pages/api/*.ts.src/components/: UI islands (React.tsx, Svelte.svelte, Astro.astro).src/layouts/: Shared page layouts.src/content/: Content collections (projects/,ideas/) with Zod schemas inconfig.ts.src/store/: Clients and data utilities (e.g., Notion client).src/styles/: Tailwind entry (base.css).public/: Static assets. Build output goes todist/.
pnpm install: Install dependencies.pnpm dev(aliaspnpm start): Run Astro dev server athttp://localhost:4321.pnpm build: Build static site todist/.pnpm preview: Preview the production build locally.pnpm dlx astro check(orpnpm astro -- check): Type checking and diagnostics for Astro/TS.
- Languages: Astro, TypeScript, React, Svelte, Tailwind.
- Indentation: 2 spaces. Quotes: double quotes. Semicolons: required.
- Components: PascalCase for React/Svelte files (e.g.,
Events.tsx,NavBar.svelte). - Routes: Kebab-case for pages (e.g.,
get-involved.astro). API filenames are camelCase or kebab-case. - Tailwind: Prefer utility-first; keep class lists readable and grouped by layout → spacing → color.
- Avoid verbose
console.login production paths.
- No test framework configured yet. When adding tests, prefer Vitest + @testing-library.
- Suggested structure: colocate tests as
*.test.ts(x)or usesrc/__tests__/. - Keep tests deterministic; mock network calls to Notion/ProjectHub.
- Commits: Small, scoped, imperative mood (e.g.,
fix: handle expired Notion URLs). - PRs: Include a clear description, linked issues, and screenshots for UI changes. Note any schema/content updates.
- Checks: Run
pnpm buildandnpx astro checklocally before opening a PR. - Secrets: Never commit
.envor keys. Use platform secrets (Cloudflare Pages/GitHub Actions).
- Required env vars:
NOTION_SECRET,NOTION_DB_ID,PROJECTHUB_API_KEY. - Do not expose secrets to the client; only
PUBLIC_*env vars are browser-visible. For client utilities, preferimport.meta.env.PUBLIC_….