- Introduce Party model with lifecycle states (draft, published, canceled, sold_out) - Add RESTful API endpoints under /api/v1/parties for CRUD operations - Create ApiController base with API key authentication - Implement comprehensive code comments across models and controllers - Add database migration for parties table with proper indexes - Configure API routes with namespaced versioning
1.8 KiB
1.8 KiB
Aperonight - CRUSH Development Guidelines
Build Commands
bin/rails server- Start development serverbin/rails assets:precompile- Compile assetsnpm 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 testsbin/rails test test/models/user_test.rb- Run specific test filebin/rails test test/models/user_test.rb:15- Run specific test methodbin/rails test:system- Run system tests
Lint Commands
bin/rubocop- Run Ruby linterbin/rubocop -a- Run Ruby linter with auto-fix- Check JS/JSX files manually (no configured linter)
Development Workflow
- Branch naming:
type/descriptive-name(e.g.,feature/user-profile) - Follow Git Flow with
mainanddevelopbranches - Run tests and linters before committing
- 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