BTRC Hub / タグ広場 is a split Rails API and React frontend repository.
backend/.frontend/.docs/.3.2.2 from backend/.ruby-version, Rails ~> 8.0.2.mysql2, sqlite3, rspec-rails, factory_bot_rails, rack-cors, jwt, discard, gollum, whenever, aws-sdk-s3, brakeman, and rubocop-rails-omakase.^19.1.0, TypeScript ~5.8.3, Vite ^6.3.5.backend/app/controllers: Rails API controllers.backend/app/models: Active Record models.backend/app/representations: API response representation classes.backend/app/services: domain services such as version recording, wiki commit, YouTube sync, and similarity calculation.backend/config/routes.rb: API routes.backend/db/migrate: migrations.backend/db/schema.rb: current schema snapshot.backend/lib/tasks: custom Rake tasks.backend/spec: RSpec tests.backend/test: Rails minitest files that still exist in the tree.frontend/src/App.tsx: frontend route definitions and initial user setup.frontend/src/pages: page-level React components.frontend/src/components: shared and feature components.frontend/src/lib: API client helpers, query keys, prefetchers, and domain helpers.frontend/src/stores: Zustand stores.docs/commands.md: command notes.Only list commands that are backed by files inspected in this repository.
The following binstubs exist under backend/bin:
cd backend
bin/setup
bin/dev
bin/rails
bin/rake
bin/rubocop
bin/brakeman
bin/kamal
bin/thrust
Common Rails/Rake usage through existing binstubs:
cd backend
bin/rails db:prepare
bin/rails db:migrate
bin/rails routes
bin/rails server
bin/rake
bin/rubocop
bin/brakeman
RSpec is present in Gemfile and .rspec exists:
cd backend
bundle exec rspec
The following npm scripts exist in frontend/package.json:
cd frontend
npm run dev
npm run build
npm run lint
npm run preview
npm run build runs tsc -b && vite build, then postbuild runs node scripts/generate-sitemap.js.
Do not write or report npm test as a repository command unless a test script is added to frontend/package.json.
%w or %i.backend/spec/requests.backend/test do not make minitest the default for new coverage.X-Transfer-Code user identification flow unless the task explicitly changes authentication.version_no, optimistic concurrency, wiki revisions, and restore/diff behavior.backend/db/schema.rb consistent when changing schema.frontend/src/lib/api.ts for API calls so headers and camelCase conversion stay consistent.frontend/src/lib/queryKeys.ts; avoid ad hoc query key arrays.encodeURIComponent.frontend/src/pages and shared UI/feature code under frontend/src/components unless existing patterns point elsewhere.node_modules, dist, tmp, log, and storage unless explicitly needed.npm run build and npm run lint.bundle exec rspec.A task is complete only when: