PropMgmt-Agent is an AI-powered property management assistant built with Astro 6, React 19, TypeScript 5, Supabase, and deployed on Cloudflare Workers.
- SSR only —
output: "server"in@astro.config.mjs. Every API route must exportconst prerender = false. - Server secrets use
astro:env/server— never import secrets client-side or hardcode them. - Auth uses
@supabase/ssrwith cookie-based sessions — do not use@supabase/auth-helpersor client-side token storage. - Use
cn()from@src/lib/utilsfor conditional classes — never concatenate Tailwind classes manually. - React is only for interactive islands — static content uses Astro components.
- No Next.js directives (
"use client","use server").
src/components/— Astro and React components; UI primitives inui/(shadcn/ui, "new-york" style)src/components/hooks/— extracted React hookssrc/lib/andsrc/lib/services/— shared helpers and service logicsrc/pages/— file-based routing (Astro pages and API routes)src/types.ts— shared TypeScript typessupabase/migrations/— SQL migrations (YYYYMMDDHHmmss_short_description.sql), each with granular RLS policiessupabase/config.toml— local Supabase stack config- Path alias:
@/*maps to./src/*
npm run dev— start Astro dev servernpm run build— production build (runsastro syncfirst in CI)npm run lint— ESLint check;npm run lint:fixto auto-fixnpm run format— Prettier (120 char width, Astro + Tailwind plugins)
Node version: 22.14.0 (see @.nvmrc). Copy @.env.example to .env for local dev, .dev.vars for Cloudflare.
- TypeScript strict mode (
@tsconfig.jsonextendsastro/tsconfigs/strict) - ESLint 9 with
typescript-eslintstrict + stylistic rules; React Compiler plugin enforced as error - Husky + lint-staged run lint on pre-commit for TS, Astro, JSON, CSS files
- API routes export uppercase handlers (
GET,POST) with zod request validation
GitHub Actions (@.github/workflows/ci.yml): lint, astro sync, build. No test suite configured yet.
Use imperative mood with descriptive scope (e.g. Add property dashboard layout).
For deeper conventions and architectural details, see @CLAUDE.md.