# AI Translator for Polylang - Development Guide

## Build Commands
- `npm install` - Install dependencies
- `npx tailwindcss -i ./admin/css/style.css -o ./admin/css/polylai-translator-admin.css --watch` - Build and watch CSS

## Code Style Guidelines

### PHP
- Class names use snake_case with prefix `polylai_` (e.g., `polylai_ChatGPT`)
- Constants are UPPERCASE with prefix `POLYLAI_` (e.g., `POLYLAI_VERSION`)
- Methods/functions use camelCase
- Use WordPress coding standards (indentation: tabs)
- Error handling: Use `polylai_Utils::db_log()` for logging errors
- File security: Add `<?php if (!defined('ABSPATH')) exit; ?>` at the top

### JavaScript
- Use `wp_localize_script()` for passing data from PHP to JS
- Follow WordPress AJAX conventions for admin actions

### Structure
- Core plugin functionality in `includes/`
- Admin UI in `admin/`
- Premium features in `premium-files/`
- Data Transfer Objects (DTO) in `includes/dto/`

### Integration
- Use WordPress hooks API (actions/filters) via the loader pattern
- Follow WordPress security practices (nonces, capability checks, sanitization)