This file provides guidance to coding agents (Claude Code, Cursor, Codex, etc.) when working with code in this repository.
bin/setup- Full setup including database seeding via docker-composebin/dev- Start Rails server, SolidQueue jobs, and Vite (for CSS/JS)bin/lint- Run all formatters and linters (StandardRB, JS Standard, ERB lint, yerba)bin/rails db:seed- Seed database with conference data manuallybin/rails db:seed:all- Seed database with all conference data manually
bin/rails test- Run the full test suite (uses Minitest)bin/rails test test/system/- Run system testsbin/rails test test/models/speaker_test.rb- Run specific test file
bundle exec standardrb --fix- Fix Ruby formatting issuesyarn format- Fix JavaScript formattingbundle exec erb_lint --lint-all --autocorrect- Fix ERB templatesyarn herb:lint- Lint ERB templates with the Herb linterbundle exec yerba apply- Format YAML files in data/ (uses Yerbafile rules)bundle exec yerba check- Validate YAML files match Yerbafile rules (used in CI)
This project uses yerba to enforce consistent YAML formatting across all data files. The Yerbafile in the project root defines formatting rules as pipelines.
Key commands:
bundle exec yerba apply- Apply all Yerbafile rules and write changesbundle exec yerba check- Verify all files match rules (exits 1 if not, used in CI)bundle exec yerba get <file> <selector>- Read values from YAML filesbundle exec yerba set <file> <selector> <value>- Update values in YAML filesbundle exec yerba selectors <file>- Show all valid selectors for a filebundle exec yerba sort <file> --by <field> --order <direction>- Sort or reorder itemsbundle exec yerba insert <file> <selector> <value>- Insert new items
Yerba preserves comments, blank lines, quote styles, and formatting. It operates on the concrete syntax tree (CST), so edits are surgical. When editing YAML data files in bulk, yerba is the preferred tool — it's fast, accurate, and supports glob patterns to operate across hundreds of files at once. Prefer yerba commands over manual edits or Ruby scripts when making bulk changes to the data files.
Run yerba --help for a full overview of all commands, selectors, conditions, and the Yerbafile. Each subcommand also has detailed help with examples — for instance yerba get --help, yerba sort --help, or yerba quote-style --help.
bin/jobs- Start SolidQueue job worker- Search reindexing happens automatically in test setup
- Event: Ruby conferences/meetups (belongs_to EventSeries)
- Talk: Conference presentations (belongs_to Event, has_many SpeakerTalks)
- Speaker: Presenters (has_many SpeakerTalks, has social media fields)
- EventSeries: Conference series/organizers (has_many Events)
- Topic: AI-extracted talk topics (has_many TalkTopics)
- WatchList: User-curated lists (belongs_to User, has_many WatchListTalks)
Conference data is stored in YAML files under /data/:
data/speakers.yml- Global speaker databasedata/{series-slug}/series.yml- Event series metadata (conference organizers/series)data/{series-slug}/{event-name}/event.yml- Event metadata (dates, location, colors, etc.)data/{series-slug}/{event-name}/videos.yml- Individual talk datadata/{series-slug}/{event-name}/schedule.yml- Event schedules
- Backend: Rails 8.0, SQLite, Solid Queue, Solid Cache
- Frontend: Vite, Tailwind CSS, daisyUI, Stimulus
- Admin: Avo admin panel at
/admin - Authentication: Custom session-based auth with GitHub OAuth
- Deployment: Kamal on Hetzner VPS
- View Components: Located in
app/components/, follows ViewComponent pattern - Clients: API clients for YouTube, GitHub, BlueSky in
app/clients/ - Search: Full-text search for Talks and Speakers using Sqlite virtual tables
- Jobs: Background processing for video statistics, transcripts, AI summarization
- Analytics: Page view tracking with Ahoy
- Monitoring: AppSignal for errors/performance, Mission Control for job monitoring
- AI Prompts: Stored in
app/models/prompts/
Models:
- Shared behavior lives in concerns:
Suggestable,Sluggable,Rollupable,Searchable,Watchable - Slugs via
configure_slug(attribute: :title, auto_suffix_on_collision: true) - Associated Objects pattern using the
active_record-associated_objectgem - Model annotations via
annotaterb - Counter caches (
counter_cache: :talks_count),inverse_of, and scoped associations - Normalize data with
normalizes; encrypt sensitive fields (encrypts :email, deterministic: true) - Use Rails
enumfor status/kind fields
Controllers:
ApplicationControllerincludesAuthenticable(session auth),Metadata(SEO tags), andAnalytics(page tracking)- Use
skip_before_action :authenticate_user!for public pages - Access the current user via
Current.user - Pagination with the
pagygem - Keep controllers slim — business logic belongs in models/services
ViewComponents:
- All components inherit from
ApplicationComponent(Dry::Initializer params,attributeshandling,displayoption) - UI components live in the
Ui::namespace underapp/components/ui/ - Use the
viewcomponentsskill when creating or modifying UI components — it documents the full conventions (mapping constants,component_classes, Stimulus integration, testing)
Frontend:
- Stimulus controllers in
app/javascript/controllers/with kebab-case names - Tailwind CSS + daisyUI, utility-first, CSS variables for theming
- Images in
app/assets/images/, prefer WebP
Formatting & Linting:
- Ruby is formatted with
standardrb(never rubocop directly) - JavaScript with
yarn format(JS Standard) - ERB templates with
bundle exec erb_lint --lint-all --autocorrect, plusyarn herb:lintfor Herb linting (the project uses Herb as its ERB engine) - YAML data files with
bundle exec yerba apply— see the Yerba section above; prefer yerba commands over manual edits fordata/files bin/lintruns the whole suite (yerba, data validation, standardrb, JS, erb_lint)
- Custom
Authenticatormodule provides role-based route constraints - Admin access required for Avo admin panel and Mission Control Jobs
- GitHub OAuth integration for user registration
- Session-based authentication (not JWT)
- Uses slug-based routing for SEO-friendly URLs
- Talks support multiple video providers (YouTube, Vimeo, etc.)
- AI-powered features: transcript enhancement, topic extraction, summarization
- Responsive design with mobile-first approach
- Canonical references to deduplicate speakers/events/topics
- Uses Minitest (not RSpec)
- VCR for API mocking
- Parallel test execution
- Search indexes are reset in test setup
- System tests use Capybara with Selenium
- YAML files define conference structure
- Rake tasks process video metadata
- Background jobs fetch additional data (transcripts, statistics)
- AI services enhance content (summaries, topics)