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
- Testing: RSpec 6.0 + FactoryBot + Shoulda::Matchers
- Linting: Rubocop (100 char line length)
docker-compose upThis starts:
- PostgreSQL on port 5433
- Rails APP on port 3000
Run tests:
docker-compose exec app bundle exec rspecbin/setup # Install dependencies & prepare database
bin/dev # Start development server with Foreman
bin/rails s # Start Rails server on port 3000
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)
- Docker
- Docker Compose
- Ruby 3.3.10
- PostgreSQL
- Bundler
bin/setup- Initialize development environmentbin/dev- Start dev server with hot-reloadbin/rails- Run Rails commands