Files
aethera/frontend/AGENTS.md
2026-01-17 10:09:11 -05:00

1.1 KiB

Frontend Agent Instructions

Stack

  • Tailwind CSS 4 (no config file, just style.css)
  • Bun only (no npm commands)
  • TypeScript strict mode
  • Alpine.js (bundled in main.js, not via CDN)

Commands

bun run build
bun run lint

Non-Negotiables

  • No any type - use unknown and narrow it
  • No as type assertions
  • No @ts-ignore or @ts-expect-error
  • Fix all TypeScript and ESLint errors - don't ignore them
  • No Alpine.js via CDN (it's bundled)

Code Style

  • 2 spaces, single quotes, semicolons required
  • camelCase for variables/functions
  • PascalCase for types/interfaces
  • UPPER_SNAKE_CASE for constants
  • Explicit error handling with try/catch
  • User-friendly error messages in UI

Key Patterns

  • DRY: Extract repeated code into shared functions
  • API calls: Centralize in src/client.ts
  • State: Use Alpine.js reactivity + localStorage for persistence
  • Errors: Show in UI, don't just console.log

What Goes Where

  • Code: src/
  • Styles: Tailwind classes in HTML + style.css
  • Build output: public/dist/ (don't commit this)