From 160fb0d36f07834797e2cb4643830fcb76b6339f Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Fri, 16 Jan 2026 19:36:54 +0100 Subject: [PATCH] feat: agentsmd and change source --- AGENTS.md | 223 +++++++++++++++++++++++++++++++++++++++++++ app/pages/stream.vue | 60 ++++++++++-- i18n/locales/en.json | 5 +- i18n/locales/es.json | 5 +- 4 files changed, 279 insertions(+), 14 deletions(-) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..0fbc1ab --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,223 @@ +# 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 `