Showcase/Pizza Dough
Generated Apr 26, 2026, 5:15 PM

Project Overview

This project is a web application that functions as a calculator for pizza dough recipes. It allows users to input various parameters to determine the precise quantities of ingredients needed for their desired pizza dough, offering both yeast and sourdough options.

Tech Stack

  • Ruby on Rails
  • StimulusJS
  • Hotwired Turbo
  • SCSS
  • ViewComponent
  • Docker

High-Level Architecture

The application is built using Ruby on Rails.

  • Controllers (calculator/app/controllers/): Handle incoming requests and determine the response. StaticController is the primary controller, responsible for rendering the main calculator interface and results.
  • Views (calculator/app/views/): Render the HTML for the user interface. This includes layouts (layouts/mailer.html.erb, layouts/mailer.text.erb) and the main view for the calculator (static/dough.html.erb).
  • Components (calculator/app/components/): Reusable UI elements, such as InputComponent, which is used to render input fields for the calculator.
  • JavaScript (calculator/app/javascript/): Manages client-side interactivity, primarily using StimulusJS for controller-based JavaScript.
  • Stylesheets (calculator/app/assets/stylesheets/): Contains SCSS for styling the application.
  • Configuration (calculator/config/): Rails application configuration files, including routing (routes.rb), environment settings (environment.rb), and asset management (importmap.rb, assets.rb).
  • Docker (calculator/docker-compose.yml, calculator/Dockerfile): Defines the containerized environment for running the application.

Entry Points

  1. User Request: A user navigates to the application's URL (e.g., http://localhost:3000).
  2. Routing: The request is matched against the routes defined in calculator/config/routes.rb. The root route (/) directs to the index action of the static controller.
  3. Controller Action: The static#index action is executed. This action likely sets up any necessary instance variables and renders the static/index.html.erb view.
  4. View Rendering: The static/index.html.erb view is rendered, which likely contains the form for the pizza dough calculator.
  5. Form Submission: When the user submits the form, a GET request is made to the /dough path with query parameters representing the input values.
  6. Routing (again): The /dough route is defined in calculator/config/routes.rb and maps to the dough action of the static controller.
  7. Controller Action (calculation): The static#dough action is executed. It retrieves the parameters from the request, performs the pizza dough calculations, and likely assigns the results to instance variables.
  8. View Rendering (results): The static#dough.html.erb view is rendered, using the calculated ingredient quantities to display the results to the user.

Key Concepts

  1. Pizza Dough Calculation Logic: The core functionality of the application lies in calculating ingredient quantities based on user inputs. This logic is likely implemented within the static#dough controller action, utilizing "baker's math" as described in the README.md.
  2. Input Component (InputComponent): This reusable component (calculator/app/components/input_component.rb and calculator/app/components/input_component.html.erb) is used to render form input fields for the calculator. Understanding how this component is initialized and rendered is key to understanding the form structure.
  3. Routing (calculator/config/routes.rb): The root route and the get "dough", to: "static#dough" route define the main entry points and how user requests are mapped to controller actions. The redirect route for /result also shows how URLs are handled.
  4. StimulusJS Controllers (calculator/app/javascript/controllers/): While the provided code doesn't show specific controller implementations, the importmap.rb and index.js files indicate the use of StimulusJS for managing client-side interactivity. Understanding how Stimulus controllers are defined and attached to HTML elements is important for any dynamic behavior.
  5. Dockerization (calculator/Dockerfile, calculator/docker-compose.yml): The Dockerfile and docker-compose.yml files define how to build and run the application in a containerized environment. This is crucial for local development and deployment.

What is in this showcase?

This recipe is dedicated to helping you make the best possible pizza dough. Every page here was generated from the source repository: the overview, one page per module, and the file paths each claim is based on. Nothing was written by hand, and nothing requires an account to read.

Generated pages
3
Latest generation
Apr 26, 2026

How are these docs generated?

ShipDocs indexes the repository, plans one module per component, writes each page from the real code with cited file paths, then re-generates the pages a commit changed. The module plan and the citations you see here are the same ones the product produces for a private repository.

Can I do this for my own repository?

Yes. Import a GitHub, GitLab, or Bitbucket repository and you get the same structure for your code, plus cited chat and an MCP endpoint for coding agents. Start with the free trial (no card) and keep the Markdown either way: generate docs for your own repository.

What other repositories are documented here?

Browse every live documentation example · Run a free analysis on your own repo

By The ShipDocs team · Reviewed