The Odin Project is a Rails 8 application that provides a free, open-source coding curriculum. Users follow learning paths composed of courses and lessons, submit projects, and track their progress.
- Git commit & PR format: See .github/PULL_REQUEST_TEMPLATE.md. Commit titles must follow
keyword: brief descriptionusing one of:Feature,Chore, orFix.
- Backend: Rails 8.0, Ruby 3.4, PostgreSQL
- Frontend: Tailwind CSS 4, Stimulus, Turbo Rails, esbuild
- Components: ViewComponent (app/components/)
- Background Jobs: Sidekiq with sidekiq-cron
- Auth: Devise with OmniAuth (GitHub, Google) and two-factor support
- Testing: RSpec, Capybara with Cuprite, FactoryBot, WebMock/VCR
- Error Tracking: Sentry
- Feature Flags: Flipper
bin/setup # Initial setup (bundle, yarn, db:prepare, etc.)
bin/dev # Start dev server (Puma + Sidekiq + CSS/JS watchers)bin/test # Full suite: all linters + RSpec
bin/rspec # RSpec only (parallel execution)
bin/rspec spec/models/user_spec.rb # Single file
bin/rspec spec/models/user_spec.rb:42 # Single example by line numberbin/rubocop # Ruby linting
bin/erb_lint --lint-all # ERB template linting
yarn lint # JavaScript (Standard.js)
yarn stylelint # CSS/SCSSyarn build # JavaScript bundle (esbuild)
yarn build:css # Tailwind CSS build- Routes are split into modular files under
config/routes/(admin.rb, redirects.rb) and drawn from the mainconfig/routes.rbviadraw(:admin). - ViewComponent is used extensively for UI (40+ components in
app/components/). In development, Lookbook is mounted at/lookbookfor component previews. - Service objects in
app/services/encapsulate business logic. - Policies in
app/policies/handle authorization. - Adaptors in
app/adaptors/wrap external service integrations. - Builders in
app/builders/handle complex object creation.
- Path > Course > Lesson - the curriculum hierarchy
- User - learners with Devise authentication
- LessonCompletion - tracks user progress through lessons
- ProjectSubmission - student project submissions (likeable, flaggable, soft-deletable via Discard)
- Flag - content moderation on submissions
- AdminUser - separate admin accounts (devise_invitable)
- Tests use
rails_helper(no separatespec_helper) - FactoryBot factories in
spec/factories/ - System tests use Capybara + Cuprite (headless Chrome)
- Shared examples in
spec/support/shared_examples/ - Test order is randomized; persistence file at
spec/examples.txt - CI splits tests across 4 parallel containers via
bin/ci_spec
- JavaScript follows Standard.js
- CSS uses Tailwind with stylelint