# [Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

## Project Context
[Brief description ]
- [more description]
- [more description]
- [more description]

## Code Style and Structure
- Write concise, technical TypeScript code with accurate examples
- Use functional and declarative programming patterns; avoid classes
- Prefer iteration and modularization over code duplication
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError)
- Structure repository files as follows:

server/ ├── src/ ├── components/ # Shared React components ├── hooks/ # Custom React hooks ├── utils/ # Helper functions ├── types/ # TypeScript types └── lib/ # Shared libraries extension/ ├── src/ ├── background/ # Service worker scripts ├── content/ # Content scripts ├── popup/ # Extension popup UI ├── options/ # Extension options page ├── components/ # Shared React components ├── hooks/ # Custom React hooks ├── utils/ # Helper functions ├── lib/ # Shared libraries ├── types/ # TypeScript types └── storage/ # Chrome storage utilities shared/ ├── src/ ├── types/ # TypeScript types, only used for shared types between server and extension └── utils/ # Helper functions, only used for shared functions between server and extension


## Tech Stack
- React
- TypeScript
- Tailwind CSS
- Shadcn UI
- Chrome Extension
- Express.js

## Naming Conventions
- Use lowercase with dashes for directories (e.g., components/form-wizard)
- Favor named exports for components and utilities
- Use PascalCase for component files (e.g., VisaForm.tsx)
- Use camelCase for utility files (e.g., formValidator.ts)

## TypeScript Usage
- Use TypeScript for all code; prefer interfaces over types
- Avoid enums; use const objects with 'as const' assertion
- Use functional components with TypeScript interfaces
- Define strict types for message passing between different parts of the extension
- Use absolute imports for all files @/...
- Avoid try/catch blocks unless there's good reason to translate or handle error in that abstraction
- Use explicit return types for all functions

## Chrome Extension Specific
- Use Manifest V3 standards
- Implement proper message passing between components:
  ```typescript
  interface MessagePayload {
    type: string;
    data: unknown;
  }

State Management

Syntax and Formatting

UI and Styling

Error Handling

Testing

Security

Git Usage

Commit Message Prefixes:

Rules:

Documentation

Development Workflow