A modern, full-featured personal finance and budget management application built with Ruby on Rails 8. Track your income, expenses, set budgets, manage savings goals, and monitor recurring bills - all in one place.
- Dashboard: Comprehensive financial overview with current balance, monthly income/expenses
- Transaction Tracking: Record and categorize all income and expenses
- Visual Analytics: Charts and graphs for spending patterns and budget progress
- Category-based Budgets: Set spending limits for different expense categories
- Budget Progress Tracking: Visual indicators showing spent vs. budgeted amounts
- Spending Alerts: Monitor budget utilization with color-coded progress bars
- Savings Pots: Create and track multiple savings goals
- Progress Visualization: See how close you are to reaching your savings targets
- Flexible Contributions: Add money to pots through deposits
- Bill Tracking: Monitor upcoming and past-due recurring expenses
- Due Date Alerts: Get notified about bills coming due soon
- Payment History: Track when bills were paid
- Secure Authentication: Password-based login with session management
- Responsive Design: Works seamlessly on desktop and mobile devices
- Modern UI: Clean, intuitive interface built with Tailwind CSS
- Progressive Web App: Installable on mobile devices for offline access
- Real-time Updates: Hotwire-powered dynamic updates without page refreshes
- Ruby: 3.4.2
- Rails: 8.0.2
- Database: SQLite 3 (with Solid Queue, Solid Cache, Solid Cable)
- Authentication: Custom session-based auth with
bcryptpassword hashing
- Hotwire: Turbo + Stimulus for modern, reactive web applications
- Tailwind CSS: Utility-first CSS framework for responsive design
- Import Maps: Modern ES modules without build tools
- Chartkick: Simple Ruby gem for creating charts
- Docker: Containerized deployment
- Kamal: Zero-downtime deployments
- Solid Suite: Modern Rails background job processing, caching, and websockets
- Puma: High-performance web server
- Thruster: HTTP asset caching and compression
- Testing: System tests with Capybara + Selenium
- Code Quality: RuboCop, Standard Ruby linting
- Security: Brakeman vulnerability scanner
- Debugging: Ruby LSP, Web Console
Before running this application, make sure you have the following installed:
- Ruby: 3.4.2 (use a Ruby version manager like
rbenv,asdf, ormise) - SQLite3: Database for development and testing
- Node.js: For JavaScript dependencies (comes with import maps)
- Docker: For containerized deployment (optional)
-
Clone the repository
git clone <repository-url> cd finance-rails
-
Install dependencies
bundle install
-
Setup the database
bin/rails db:setup
-
Start the development server
bin/dev
-
Open your browser Visit
http://localhost:3000and create your account!
bin/dev- Start development server with CSS watchingbin/rails server- Start Rails server onlybin/rails tailwindcss:watch- Watch and compile Tailwind CSSbin/rails test- Run test suitebin/rails test:system- Run system tests onlybin/rubocop- Check code stylebin/brakeman- Security vulnerability scan
This project uses several tools to maintain code quality:
# Run all quality checks
bundle exec standardrb
bundle exec rubocop
bundle exec brakeman
# Auto-fix style issues
bundle exec standardrb --fix
bundle exec rubocop --autocorrectThe application uses the following main data models:
- Users: Account information and authentication
- Transactions: Income and expense records
- Categories: Transaction categorization
- Budgets: Spending limits by category
- Pots: Savings goals and tracking
- Sessions: User authentication sessions
- Users have many transactions, budgets, pots, and categories
- Transactions belong to users and optionally to categories
- Budgets belong to users and optionally to categories
- Pots belong to users
GET /- Dashboard overview (requires auth)GET /new- New session (login)POST /session- Create sessionDELETE /session- Destroy session
GET /transactions- List transactionsGET /budgets- List budgetsGET /pots- List savings potsGET /bills- List recurring billsGET /categories- List categories
The application includes comprehensive test coverage:
# Run all tests
bin/rails test
# Run system tests (end-to-end)
bin/rails test:system
# Run specific test file
bin/rails test test/controllers/dashboard_controller_test.rb-
Build the Docker image
docker build -t finance . -
Run the container
docker run -d -p 80:80 -e RAILS_MASTER_KEY=<your-key> --name finance finance
-
Configure deployment (edit
config/deploy.yml)# Update server IPs, domain, and registry credentials -
Deploy
kamal setup # First time setup kamal deploy # Subsequent deployments
Create a .env file or set these environment variables:
RAILS_MASTER_KEY- Required for production (found inconfig/master.key)RAILS_ENV- Environment (development/test/production)DATABASE_URL- Database connection string (optional, defaults to SQLite)
app/
βββ assets/ # Static assets (CSS, images, fonts)
βββ channels/ # Action Cable channels
βββ components/ # View components
βββ controllers/ # Rails controllers
βββ helpers/ # View helpers
βββ jobs/ # Background jobs
βββ mailers/ # Email delivery
βββ models/ # Data models
βββ views/ # ERB templates
βββ javascript/ # Stimulus controllers
config/ # Rails configuration
db/ # Database schema and migrations
lib/ # Custom libraries
test/ # Test suite
# Additional files in root:
bin/ # Executable scripts
config.ru # Rack configuration
Dockerfile # Docker image definition
Gemfile # Ruby dependencies
Procfile.dev # Development process configuration- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Ruby on Rails conventions
- Write tests for new features
- Use RuboCop and Standard Ruby for code style
- Keep commits focused and descriptive
- Update documentation as needed
This project is open source and available under the MIT License.
If you have questions or need help:
- Check the Rails Guides for general Rails questions
- Review the Hotwire documentation for frontend concerns
- Open an issue for bugs or feature requests
Built with β€οΈ using Ruby on Rails 8
