This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
bundle install- Install Ruby dependenciesbun install- Install JavaScript dependenciesbin/dev- Start development server (runs Rails server, JS build watcher, CSS build watcher)bin/rails server- Start Rails server onlybun run build- Build JavaScript assetsbun run build:css- Build CSS assets
bundle exec rake test- Run all testsbin/rails test test/system/player_page_test.rb- Run a specific test filebundle exec rubocop- Run lintingbundle exec brakeman- Run security analysis
This project requires a PostgreSQL database with specific schema from the rating-db repository. Use that repository to download a recent backup and run it with Docker for development.
This Rails application displays team and player rankings for multiple rating models (e.g., model "b"). Each model uses separate database schemas/tables, requiring raw SQL queries for model-specific data while using standard ActiveRecord for shared tables like BaseRoster.
- Models: Different ranking calculation models stored in separate database schemas
- Current Model: Determined by URL parameter (
:model) or defaults to "b" (InModel::DEFAULT_MODEL) - Model Switching: Routes use
:modelparameter to switch between different rating schemas - Raw SQL Usage: Model-specific queries use raw SQL due to dynamic table names
- Data imported from rating.chgk.info via rating-importer
- Rankings calculated in rating-b project
- This app displays the calculated rankings with model switching capability
- Rails with Turbo and Stimulus.js
- Tailwind CSS for styling
- Bun for JavaScript bundling
- View Components for reusable UI elements
- Uses SolidQueue for job processing
- Notable jobs: TrueDL difficulty calculation, tournament results processing
- Mission Control Jobs UI available at
/jobs
- REST API under
/api/v1/namespace - All endpoints require
:modelparameter - Provides data for teams, players, tournaments, and releases