Where Goals Meet AI-Powered Accountability
A sophisticated Ruby on Rails 8 application that combines modern web development with AI to help users achieve their goals through intelligent accountability systems.
Portfolio Showcase: This demonstrates using an array of Rails features with best practices to create a neat little application.
- Rails 8.0 with latest conventions and solid stack
- Comprehensive test suite with 90%+ coverage across unit, integration, and system tests
- Background job processing with intelligent AI title generation
- Email integration using Action Mailbox for two-way communication
- Responsive design with well organisation, modern CSS
- Stimulus controllers for interactive features, nice clean controllers
- Mobile-first approach ensuring good UX across devices
- Multi-model AI support (OpenAI + local LLM via ruby-llm)
- Smart goal title generation from descriptions
- Intelligent response processing for user interactions
- Kamal deployment for easy containerized deploys
- Terraform infrastructure to bootstrap an CoreOS server to deploy on to
- Docker containerization for consistent, portable environments
- MVC Pattern - Clean separation of concerns with organized controllers, models, and views
- Service Objects - Business logic encapsulation for complex operations
- Job Processing - Asynchronous background processing to off-load what we can
- Email Handling - Two-way email communication with Action Mailbox
- System Tests - Full user journey testing with Capybara. Top of the testing Pyramid
- Integration Tests - Goal LLM interactions are covered using VCR to mock API calls
- Job Tests - Background job processing verification
- Mailer Tests - Email delivery and content testing
- Model Tests - Comprehensive validation, data and behaviour testing
- CSS Architecture - Organized, maintainable stylesheets
- JavaScript Integration - Stimulus controllers for enhanced UX
- CI Pipeline - Automated testing and deployment
- Database Migrations - Well-structured schema evolution
- Configuration Management - Environment-specific configs
- Ruby 3.3+
- Bundler
- SQLite3
# Clone and install dependencies
git clone git@gitlab.com:bugthing/accountable-to.git
cd accountable-to
bundle install
# Set up access to secrets
export RAILS_MASTER_KEY=your_key_here
# Database setup
bin/rails db:setup
# Start the development server
bin/devVisit http://localhost:3000 to see the application in action!
# Run tests
bin/rails test
# Run system tests
bin/rails test:system # System tests
# Code quality checks
bin/standardrb # Ruby linting
bin/brakeman # Security analysisDeploy to production with a single command using Kamal:
# Deploy to production
kamal deploy
# Check logs
kamal logsConfiguration: config/deploy.yml
VPS provisioning on Vultr using Terraform:
cd config/provision/
# Configure your SSH key in server.yml
vi server.yml
# Generate Fedora CoreOS ignition file
docker run -it --rm -v $PWD/:/bld -v ~/.ssh:/bld/tmp/ssh \
quay.io/coreos/butane:release --pretty --strict \
/bld/server.yml --files-dir /bld > server.ign
# Provision infrastructure
terraform init
terraform applyFiles:
- main.tf - Infrastructure definition
- server.yml - CoreOS configuration
- variables.tf - Terraform variables
- User Model - Authentication with magic links and email confirmation
- Goal Model - Goal management with AI integration
- Goal Messages - Conversation tracking
- Goal Title Generation - AI-powered title creation
- Assistant Responses - Intelligent reply generation
- Check-in Processing - User interaction handling
- Action Mailbox - Inbound email processing
- Goal Mailer - Automated check-in emails
- User Mailer - Authentication emails
This project is available as open source under the terms of the MIT License.
❤️ Built to showcase a good understanding of all aspects of modern web application development ❤️