1.7 KiB
1.7 KiB
AGENTS.md
Project
React + TypeScript + Vite landing page for a healthy-oil product. Uses Chakra UI v3 and TanStack Router. No test suite.
Commands
npm run dev— Dev server on port 3000npm run build—tsc -b && vite buildnpm run lint— ESLint only, no typecheck scriptnpm run preview— Preview production build on port 3000
Architecture
- Entry:
src/main.tsx→src/router.tsx→src/pages/* - Old UI (root
/):src/App.tsxwith components insrc/components/* - New UI (
/40plus):src/pages/main.tsxwith components insrc/components/new_ui/* - Layout wrapper:
src/components/layout.tsxswitches footer based on route - Router: Hash-based routing for FTP server compatibility
- Path alias:
@/*maps to./src/*
Style Conventions
- Component filenames: lowercase (
hero1.tsx,oil_info.tsx) - Use function declarations for components, not arrow functions
- Chakra UI props for responsive design (
base,sm,md,lg,xl) - Framer Motion for animations
colors.tsxexports color tokens;colors.cssandfonts.cssfor global styles
TypeScript
- Strict mode with
noUnusedLocalsandnoUnusedParameters— unused vars will error tsconfig.jsonuses project references (tsconfig.app.json+tsconfig.node.json)
Important Constraints
- No tests — there is no
test,vitest, orjestconfig. Do not try to run tests. - No typecheck script — run
npx tsc --noEmitif you need a standalone typecheck. - Build order matters:
buildrunstsc -bfirst, thenvite build. - Images live in
public/images/; reference them with absolute paths like/images/new/...