A modern personal finance management application built with Ruby on Rails 8, following 37signals patterns and conventions.
π Live Site: Personal Finance Tracker
Main dashboard showing balance summary and recent transactions
Creating and editing transactions with real-time updates
Custom categories with color coding
Responsive design optimized for mobile devices
Live demonstration of key features and Turbo interactions
- Transaction Management: Create, edit, and delete income/expense transactions
- Category Organization: Organize transactions with custom categories and colors
- Real-time Updates: Instant UI updates using Turbo Frames and Turbo Streams
- Dark Mode: Toggle between light and dark themes
- Responsive Design: Mobile-first design with TailwindCSS
- Dashboard: Overview of balance, income, and expenses
- User Authentication: Secure user registration and login with Devise
- Backend: Ruby on Rails 8.0.2
- Database: PostgreSQL
- Frontend: Hotwire (Turbo + Stimulus), TailwindCSS
- Authentication: Devise
- Testing: RSpec, Factory Bot, Capybara
- Deployment: Kamal with Docker
- Code Quality: RuboCop, Brakeman
- Ruby 3.3+
- PostgreSQL 15+
- Node.js 18+
- Docker & Docker Compose (for containerized development)
-
Install dependencies:
bundle install
-
Setup database:
rails db:create rails db:migrate rails db:seed
-
Start the server:
./bin/dev
-
Visit the application:
-
Start the application:
docker compose up
-
Setup database (first time only):
docker compose exec web rails db:create docker compose exec web rails db:migrate docker compose exec web rails db:seed
-
Visit the application:
- Rails app: http://localhost:3000
- PostgreSQL: localhost:5433
For detailed Docker instructions, see README.docker.md.
# Local development
./bin/dev # Start with hot reload
rails console # Rails console
rails db:migrate # Run migrations
rails db:seed # Seed database
# Docker development
docker compose up # Start all services
docker compose exec web rails console
docker compose exec web rails db:migrate
docker compose exec web rails db:seed# Local
bundle exec rspec # Run all tests
bundle exec rspec spec/models # Run model tests
bundle exec rubocop # Code linting
# Docker
docker compose exec web rspec
docker compose exec web rubocopkamal setup # Initial setup
kamal deploy # Deploy to productionapp/
βββ controllers/
β βββ concerns/ # Authentication, shared logic
β βββ categories_controller.rb
β βββ transactions_controller.rb
β βββ home_controller.rb
βββ models/
β βββ user.rb # Devise user with balance calculations
β βββ category.rb # Transaction categories
β βββ transaction.rb # Income/expense transactions
βββ views/
β βββ categories/ # Category CRUD with Turbo
β βββ transactions/ # Transaction CRUD with Turbo
β βββ home/ # Dashboard
β βββ shared/ # Reusable partials
βββ javascript/
βββ controllers/ # Stimulus controllers
- Create income and expense transactions
- Categorize with custom categories
- Real-time balance updates
- Mobile-responsive forms
- Custom categories with color coding
- Used to organize transactions
- Cannot be deleted if transactions exist
- Turbo Frames for instant updates
- Turbo Streams for live balance updates
- No page reloads for CRUD operations
- Secure user registration/login
- User-scoped data (users only see their own data)
- Session management with Devise
- Authentication via Devise
- Has many categories and transactions
- Balance calculation methods
- Belongs to user
- Has name and color
- Has many transactions
- Belongs to user and category
- Amount, date, description
- Type: income or expense
The application includes comprehensive tests:
# Run all tests
bundle exec rspec
# Run specific test types
bundle exec rspec spec/models
bundle exec rspec spec/controllers
bundle exec rspec spec/systemTest coverage includes:
- Model validations and methods
- Controller actions and responses
- System tests for user workflows
The application is configured for deployment using Kamal:
-
Setup environment:
cp .env.example .env # Edit .env with your values -
Deploy:
kamal setup # First time kamal deploy # Subsequent deploys
- Follow the Rails conventions outlined in
CLAUDE.md - Write tests for new features
- Run the test suite and linting before submitting
- Use meaningful commit messages
- Follow 37signals patterns and conventions
- Use Turbo for real-time updates
- Write tests for all new features
- Maintain code quality with RuboCop
- Keep controllers thin, models fat
- Use Stimulus for JavaScript interactions
- Regular security audits with Brakeman
- Secure authentication with Devise
- CSRF protection enabled
- SQL injection prevention with Active Record
This project is available as open source under the terms of the MIT License.