# Commands

## Backend

```sh
cd backend
bundle install
bundle exec rails db:migrate
bundle exec rspec
bundle exec rails routes
```

Material video thumbnail generation requires `ffmpeg` on the host. If `ffmpeg`
is missing or frame extraction fails, `MaterialThumbnailGenerator` logs the
result and stderr, then leaves the existing thumbnail unchanged.

```sh
cd backend
bundle exec rails materials:thumbnails:backfill
```

## Frontend

```sh
cd frontend
npm install
npm run dev
npm run build
npm run lint
npm run test
npm run test:run
```

### Full verification

```sh
cd backend && bundle exec rspec
cd ../frontend && npm run test:run && npm run build && npm run lint
```
