Files
aperonight/CRUSH.md
2025-08-28 15:11:42 +02:00

1.8 KiB
Executable File

Aperonight - CRUSH Development Guidelines

Build Commands

  • bin/rails server - Start development server
  • bin/rails assets:precompile - Compile assets
  • npm run build - Build JavaScript bundle (production)
  • npm run build:dev - Build JavaScript bundle (development)
  • npm run build:css - Compile CSS with PostCSS/Tailwind

Test Commands

  • bin/rails test - Run all tests
  • bin/rails test test/models/user_test.rb - Run specific test file
  • bin/rails test test/models/user_test.rb:15 - Run specific test method
  • bin/rails test:system - Run system tests

Lint Commands

  • bin/rubocop - Run Ruby linter
  • bin/rubocop -a - Run Ruby linter with auto-fix
  • Check JS/JSX files manually (no configured linter)

Development Workflow

  1. Branch naming: type/descriptive-name (e.g., feature/user-profile)
  2. Follow Git Flow with main and develop branches
  3. Run tests and linters before committing
  4. Keep PRs focused on single features/fixes

Code Style Guidelines

Ruby

  • Follow Rubocop Rails Omakase defaults
  • Standard Rails MVC conventions
  • Use descriptive method and variable names
  • Prefer single quotes for strings without interpolation

JavaScript/React

  • Use Stimulus controllers for DOM interactions
  • React components in PascalCase (UserProfile.jsx)
  • Shadcn components in kebab-case (button.jsx) but exported as PascalCase
  • Functional components with hooks over class components

CSS/Tailwind

  • Mobile-first responsive design
  • Use Tailwind utility classes over custom CSS
  • Primary color palette: indigo → purple → pink gradients
  • Consistent spacing with Tailwind's spacing scale

General

  • Keep functions small and focused
  • Comment complex logic
  • Use descriptive commit messages
  • Maintain consistency with existing code patterns