It meets the app: a walkthrough in one call
The stack, the gems that matter, the models and how they connect, the routed controllers, the jobs, the mailers, the frontend and how tests are set up. The context files the install writes carry a compact version of this, so the first turn of a session starts here.
# Welcome to Bulletin
## Stack
Bulletin is a Rails 7.2.2 application declaring Ruby 3.4.9p0 on PostgreSQL (3 tables).
Notable gems - auth: devise, pundit; jobs: sidekiq; frontend: turbo-rails, stimulus-rails; database: pg; testing: rspec-rails, factory_bot_rails.
## Data Model
The app has 3 models. The central ones are:
- **Article** (table: `articles`) - belongs_to :author, has_many :comments. 6 validations.
- **Comment** (table: `comments`) - belongs_to :article, belongs_to :user. 4 validations.
- **User** (table: `users`) - has_many :articles, has_many :comments. 7 validations.
## Authentication & Authorization
Authentication via Devise on User (database_authenticatable, registerable, recoverable, rememberable, validatable).
Authorization via Pundit (2 policies).
## Key Flows
- **articles** - index, create, new, edit, show, update, destroy (GET /, GET /articles, POST /articles)
- **admin/articles** - publish, index, show (POST /admin/articles/:id/publish, GET /admin/articles, GET /admin/articles/:id)
- **api/v1/articles** - index, show (GET /api/v1/articles, GET /api/v1/articles/:id)
- **comments** - create (POST /articles/:article_id/comments)
- **rails/health** - show (GET /up)
Total: 15 app routes across 5 routed controllers, 1 dynamic construct not expanded, routes Rails' engines and gems draw at boot not read without booting.
## Background Jobs & Async
1 background job: PublishArticleJob.
1 mailer.
## Frontend
Stimulus: 1 controller for interactive behavior.
Hotwire: 1 Turbo Frames, 1 Turbo Streams.
## Testing
Framework: rspec.
Data setup: FactoryBot (3 factories in 3 files).
Run tests: `bundle exec rspec`
## Getting Started
```bash
git clone <repo-url>
cd sample_app
bundle install
bundle exec rspec # verify everything works
```
## Rake Tasks
- `articles:publish_ready` - Publish every reviewed article whose author is active (`lib/tasks/articles.rake`)
---
_[STATIC] Static mode (static mode requested with --no-boot). Serving static analysis; runtime-only data is marked [UNAVAILABLE]. Run `bundle exec rails-ai-context --app-path site/sample_app doctor` for details._
---
_Something wrong, missing or failing in rails-ai-context itself, or an improvement? Ask the user whether to file it at https://github.com/crisnahine/rails-ai-context/issues_
$ rails-ai-context --app-path site/sample_app tool onboard --no-boot