# Agent Guidelines for Helium ## Project Overview Helium is a Nuxt 3 application for effortless WebRTC screensharing with: - **Framework**: Nuxt 4 (Vue 3 + TypeScript) - **Package Manager**: pnpm - **Database**: PostgreSQL with Drizzle ORM - **Auth**: Clerk - **UI**: shadcn-vue + Tailwind CSS v4 - **State**: Pinia stores - **i18n**: @nuxtjs/i18n (English & Spanish) ## Build/Dev/Test Commands ### Development ```bash pnpm dev # Start dev server pnpm build # Build for production pnpm preview # Preview production build pnpm generate # Generate static site ``` ### Database ```bash pnpm db:migrate # Generate and run migrations ``` ### UI Components ```bash pnpm ui:add [component] # Add shadcn-vue component ``` ### Running Single Tests Currently no test framework is configured. If adding tests, recommend Vitest for unit tests and Playwright for e2e. ## Project Structure ``` app/ ├── components/ # Vue components │ ├── app/ # Application-specific components │ └── ui/ # shadcn-vue UI components ├── composables/ # Vue composables (e.g., useWebSocketUrl) ├── layouts/ # Nuxt layouts ├── lib/ # Utilities, DB schema, types │ ├── db/ # Database schema and utils │ ├── schema/ # Zod validation schemas │ ├── types/ # TypeScript type definitions │ └── utils/ # Helper functions ├── middleware/ # Route middleware (e.g., auth) ├── pages/ # File-based routing ├── plugins/ # Nuxt plugins └── state/ # Pinia stores server/ ├── api/ # API endpoints ├── cron/ # Scheduled tasks └── routes/ # Server routes (e.g., WebSocket) drizzle/ # Database migrations i18n/ # Translation files public/ # Static assets ``` ## Code Style Guidelines ### TypeScript - **Always use TypeScript**: No `.js` files. All code must be typed. - **Type imports**: Use `import type` for type-only imports ```typescript import type { PrimitiveProps } from "reka-ui"; import type { HTMLAttributes } from "vue"; ``` - **Explicit return types**: Prefer explicit return types for functions - **No `any`**: Avoid `any` type. Use `unknown` or proper typing - **Interface vs Type**: Use `interface` for object shapes, `type` for unions/intersections ### Imports - **Path aliases**: Use `@/` for app directory imports and `~/` for root imports ```typescript import { cn } from "@/lib/utils"; import { schema } from "~/lib/schema/new-preset"; ``` - **Import order**: 1. External packages 2. Vue/Nuxt imports 3. Type imports 4. Internal utilities 5. Components 6. Relative imports ### Vue Components - **Script Setup**: Always use `