AI coding assistant guidance for Canvas LMS.
docker compose up # Start services
docker compose run --rm web bash # Dev shell
yarn build:watch # Frontend dev mode| Task | Command |
|---|---|
| Build | yarn build (all), yarn build:watch (dev) |
| Test JS | yarn test, yarn test:vitest, yarn test:watch |
| Test Ruby | bin/rspec |
| Lint | yarn lint (JS), bin/rubocop (Ruby), yarn check:biome |
| Type Check | yarn check:ts |
| Webpack | yarn webpack-development (build), yarn webpack (watch) |
ui/- React components & shared packagesapp/- Rails MVC (controllers, models, views)packages/- Shared NPM packagesgems/plugins/- Canvas plugins (account_reports, analytics, etc.)lib/- Ruby business logic
- Multi-tenancy via Account hierarchies
- Database sharding with Switchman gem
- Plugin system in
gems/plugins/ - LTI integrations for external tools
- Brandable CSS theming (
yarn build:css) - Feature flags for gradual rollouts
- Any commands that use yarn, rake, bundle, or rails should be run inside the web container.
- Update packages: Edit package.json, run
docker_yarnfunction - Access Rails console:
docker compose run --rm web rails c - Database operations run inside containers
- JS testing guide:
doc/ui/testing_javascript.md - Run specific frontend tests:
yarn test path/to/test - Run specific RSpec tests:
bin/rspec path/to/test:<line_number> - Coverage:
yarn test:coverage
- Keep each line in commit messages under 60 characters
- Keep it short
- Provide the why behind the change
- ChangeId is generated by git hooks (don't change or remove it)
- The available JIRA verbs are: fixes, closes, and refs
- use
fixesfor bugs - use
closesfor tickets fully resolved by this commit - use
refsotherwise
- use
- Follow the patterns of this example:
a summary of the commit change
a more detailed description of the change, if neccesary
refs <JIRA issue key>
flag=<flag_name or none>
test plan:
- steps to set up the situation
- and test the change to make sure it's fixed
Some users may run Canvas differently, so consider these useful default suggestions for starting and interacting with Canvas if no other methods have been specified.