Monorepo with a React client, a Rails JSON API, and a small Node service that scrapes stream metadata for the games widget.
| Service | Directory | Port | Role |
|---|---|---|---|
| Rails API | auth-back |
3000 (use PORT=3000; Puma’s fallback in config/puma.rb is 3001) |
Posts, users, auth, etc. |
| React (dev) | auth-login |
3000 by default, or 3001 if 3000 is in use | Browser UI |
| Stream scraper | stream-scraper |
4000 | GET /stream for NBA game links |
The React app calls the API at http://localhost:3000 and the scraper at http://localhost:4000. Run Rails on 3000 so those URLs work.
- Node.js (LTS recommended) and npm
- Ruby 2.6.x and Bundler (see
auth-back/Gemfile) - SQLite (used by Rails in development)
cd auth-back
bundle install
rails db:prepare # or: rails db:create db:migrate
PORT=3000 bundle exec rails serverLeave this running. The API listens at http://localhost:3000 (with PORT=3000).
From a second terminal:
cd auth-login
npm install
npm startThis runs both:
- stream-scraper on port 4000 (
npm run start:scraper) - React dev server (
npm run start:react)
Logs are prefixed scraper and web. Stopping the process (Ctrl+C) stops both.
cd auth-login
npm run start:reactcd stream-scraper
npm install
npm start- Terminal A — Rails API:
cd auth-back, thenPORT=3000 bundle exec rails server. - Terminal B — React + scraper:
cd auth-login && npm start.
The client calls the API at http://localhost:3000, so keep Rails on 3000. Create React App also wants port 3000 by default, so start Rails first; when you run npm start, accept using another port for the dev server (for example 3001) if prompted. Open the URL that Create React App prints in the terminal.
The stream scraper listens on 4000 and is started automatically by npm start in auth-login.
Clarifying the React vs Rails port conflict in the README.
<|tool▁calls▁begin|><|tool▁call▁begin|> StrReplace