How henrich-m/rinha-backend-2024-q1 works
Project type and purpose
• This is a Ruby on Rails full-stack web application (primarily a backend API) that processes financial transactions for customers.
• Key functionality lives in app/controllers (HTTP endpoints), app/models (domain objects Customer and Transaction), and app/services/process_transaction (business-logic classes for different transaction types).
File structure
• Top-level “app” directory follows the MVC pattern:
• controllers: HTTP entry points (TransactionsController)
• models: ActiveRecord objects (Customer, Transaction)
• services: orchestrates business logic (ProcessTransaction classes)
• “config” holds framework config, routes, and environment settings.
• “db” contains migrations and seeds for the PostgreSQL database.
• Dockerfile, docker-compose.yml, and bin/docker-entrypoint support containerized deployment.
• “spec” contains RSpec tests for controllers and services.
README for additional insights
• The README is boilerplate, but hints at using a specific Ruby version, system dependencies, and standard Rails setup tasks (db:create, db:migrate, running tests, etc.).
• No external services (cache, queue) are explicitly declared—focus remains on Rails + database.