Rails API backend and landing page for the YouTube Description Reader Chrome extension. The extension extracts Amazon product links from YouTube video descriptions and saves them for later.
- Ruby 3.4.8
- PostgreSQL
- Rails 8.1
bin/setup
bin/rails db:create db:migratebin/rails serverbin/rails testRun a single test file or specific test by line number:
bin/rails test test/models/video_test.rb
bin/rails test test/models/video_test.rb:10bin/rubocop
bin/brakemanThis is a Rails 8.1 API backend deployed on Heroku. It serves both a JSON API (consumed by the Chrome extension) and minimal web UI pages (landing page, privacy policy, saved videos).
ApplicationController(inheritsActionController::Base) — web UI with full Rails featuresApi::ApplicationController(inheritsActionController::API) — JSON API endpoints- Both use the
Authenticationconcern for token-based auth via Bearer tokens
User/Session— authentication and session managementVideo— YouTube videos identified byyoutube_idSummary— user-generated summaries of videos, scoped to userAmazonLink— product links extracted from video descriptions; resolvesamzn.toshort URLs on saveVideoAmazonLink— join table connecting videos to Amazon links
| Method | Path | Description |
|---|---|---|
| POST | /session |
Login |
| DELETE | /session |
Logout |
| POST | /registration |
Register a new account |
| GET | /summaries |
List saved summaries |
| POST | /summaries |
Save a video with links |
| GET | /amazon_links |
List saved Amazon links |
| Path | Description |
|---|---|
/ |
Landing page |
/privacy |
Privacy policy |
/videos |
Saved videos (auth required) |
The companion Chrome extension source code lives in a separate repository. It communicates with this backend via the JSON API using Bearer token authentication.