# Chatwoot Development Guidelines ## Build / Test / Lint - **Setup**: `bundle install && pnpm install` - **Run Dev**: `pnpm dev` or `overmind start -f ./Procfile.dev` - **Lint JS/Vue**: `pnpm eslint` / `pnpm eslint:fix` - **Lint Ruby**: `bundle exec rubocop -a` - **Test JS**: `pnpm test` or `pnpm test:watch` - **Test Ruby**: `bundle exec rspec spec/path/to/file_spec.rb` - **Single Test**: `bundle exec rspec spec/path/to/file_spec.rb:LINE_NUMBER` - **Run Project**: `overmind start -f Procfile.dev` ## Code Style - **Ruby**: Follow RuboCop rules (150 character max line length) - **Vue/JS**: Use ESLint (Airbnb base + Vue 3 recommended) - **Vue Components**: Use PascalCase - **Events**: Use camelCase - **I18n**: No bare strings in templates; use i18n - **Error Handling**: Use custom exceptions (`lib/custom_exceptions/`) - **Models**: Validate presence/uniqueness, add proper indexes - **Type Safety**: Use PropTypes in Vue, strong params in Rails - **Naming**: Use clear, descriptive names with consistent casing - **Vue API**: Always use Composition API with `