A Rails application for tracking music practice, like a practice journal.
Includes both a web UI and REST API for CRUD operations.
- Ruby 3.3.10 | Rails 8.1 | PostgreSQL
- Authentication: Devise + JWT
- Authorization: Pundit
- Asset Pipeline: Propshaft
- Styling: Tailwind CSS 2.0
- Background Jobs: Solid Queue with recurring task scheduler
- Job Monitoring: Mission Control for Jobs
- Testing: RSpec 6.0 + FactoryBot + Shoulda::Matchers
- Linting: Rubocop (100 char line length)
docker-compose upThis starts:
- PostgreSQL on port 5432
- Rails APP on port 3000
- Solid Queue job supervisor (processes background jobs)
Run tests:
docker-compose exec app bundle exec rspecTo view Rails credentials (e.g., Devise secret key, mission control jobs UI), run:
# Open a shell session in container
docker compose run --rm --service-ports app bash
bin/rails credentials:show
# For prod data, add `-e production`This app uses Solid Queue for background job processing with recurring task scheduling.
Solid Queue uses a separate PostgreSQL database to avoid cluttering the main app schema:
# Create queue databases
bin/rails db:create:queue
# Load queue schema
bin/rails db:schema:load:queueStart the job supervisor to dispatch and process jobs:
# Using bin/dev (includes web server, CSS, and job supervisor)
bin/dev
# OR using bin/jobs script (job supervisor only)
bin/jobs
# OR using Rails directly
bin/rails solid_queue:startAccess the Mission Control dashboard (requires login):
- URL:
http://localhost:3000/jobs - Features: View job status, recurring tasks, failed jobs, process monitoring
Configured in config/recurring.yml:
- Daily Practice Reminders: Scheduled daily at 9am
- Checks users who haven't practiced in 24 hours
- Sends reminder emails to those users
- Automatically retries on failure (exponential backoff)
Run the app natively on the host (fast reload, native debugging, host RuboCop/LSP)
against Postgres in Docker. Requires: PostgreSQL (Solid Queue runs on it), Ruby via
mise (mise install), and native-gem build deps
(sudo apt-get install -y libpq-dev build-essential).
bundle install # gems on the host (first time)
bin/dev-local # brings up Postgres if needed, then runs the app on localhost:3000First run, also prepare the databases:
docker compose up -d --wait db
bin/rails db:preparebin/dev-local starts the db service, runs bin/dev (web + Tailwind watch + Solid Queue),
and stops db on exit. No env needed — database.yml defaults to localhost:5432 on the host
(which the db service exposes); the container overrides POSTGRES_HOST to db. Other host
commands (rspec, bin/rails, bin/jobs) work the same, no prefix. First run:
chmod +x bin/dev-local.
Run tests on the host (no prefix — just make sure Postgres is up):
docker compose up -d db
bundle exec rspecbin/setup # Install dependencies & prepare database
bin/dev # Start dev server with hot-reload (includes job supervisor)
bundle exec rspec # Run tests
bundle exec rubocop # Lint check-
Web routes (
/web): View interface for CRUD operationsGET /web/musics→ list musicsGET /web/practice_sessions→ list practice sessions- Full CRUD available for both resources
-
API routes (
/api/v1): JSON endpoints (legacy)POST /api/v1/register→ create user (no auth required)POST /api/v1/login→ issue JWT token- CRUD resources: musics, practice_sessions (all require auth)
-
Jobs Dashboard (
/jobs): Mission Control for Jobs (requires authentication)- View all queued, processing, and failed jobs
- Monitor recurring task executions
- Track job performance and retries
- Docker
- Docker Compose
- Ruby 3.3.10
- PostgreSQL
- Bundler
bin/setup- Initialize development environmentbin/dev- Start dev server with hot-reload (includes job supervisor)bin/dev-local- Likebin/dev, but on the host against Dockerized Postgres (localhost:5432)bin/jobs- Start only the Solid Queue job supervisorbin/rails- Run Rails commandsbin/rails db:schema:load:queue- Load queue database schema