Showcase/Pizza Dough
Generated Oct 17, 2026, 1:47 AM

What this project actually is

A small Ruby‑on‑Rails web app that lets users calculate the ingredients needed for Neapolitan‑style pizza dough. The user submits parameters (number of pizzas, weight per pizza, hydration, yeast/sourdough percentages, etc.) via a form rendered by StaticController#index. The controller builds a Dough object (Dough.from_params) and displays the calculated recipe on /dough.

Sources

  • README.md (project description)
  • config/routes.rb (root and /dough routes)
  • app/controllers/static_controller.rb (uses Dough.from_params)

Sources:

  • README.md
  • calculator/app/controllers/static_controller.rb
  • calculator/app/javascript/controllers/index.js
  • calculator/config/routes.rb

Tech stack

LayerLibraries / GemsFiles
BackendRuby 3.x, Rails 8 (edge), PumaGemfile, config/application.rb, config/environments/*.rb
Web frameworkActionController, ActionView, ActionCableapp/controllers/*, app/views/*, app/channels/*
Front‑endTurbo (turbo-rails), Stimulus (stimulus-rails, stimulus-loading)app/javascript/application.js, app/javascript/controllers/index.js, config/importmap.rb
StylingSass via Dartsass (dartsass-rails)app/assets/stylesheets/application.scss, app/assets/stylesheets/styles.scss
ComponentsViewComponent (view_component)app/components/input_component.rb, .html.erb
DeploymentCapistrano (capistrano, capistrano-rails, etc.)Capfile, config/deploy.rb, config/deploy/production.rb
TestingMinitest + Capybara + Seleniumtest/* files

Sources

  • Gemfile
  • config/importmap.rb
  • app/javascript/application.js
  • app/javascript/controllers/index.js
  • app/components/input_component.rb

Sources:

  • calculator/app/assets/stylesheets/application.scss
  • calculator/app/assets/stylesheets/styles.scss
  • calculator/app/javascript/controllers/application.js
  • calculator/app/javascript/controllers/index.js

High‑level architecture

client ──► Turbo (SPA navigation) ──► Stimulus controllers (dynamic UI) ──►
 Rails MVC
 ├─ StaticController
 │ ├─ index → renders form (InputComponent)
 │ └─ dough → shows calculated recipe
 ├─ Dough model (logic in app/models/dough.rb – not shown)
 └─ Views (ERB + ViewComponent)
  • Routes – defined in config/routes.rb. The root path maps to StaticController#index; /dough renders the result.
  • Controllers – only one real controller (StaticController) handles all user interactions.
  • Models – the core calculation lives in a separate model (Dough). It is instantiated from request parameters.
  • Views & Components – ERB templates use the reusable <%= render InputComponent.new(...) %> component for numeric inputs.
  • Stimulus – all controllers are eagerly loaded via eagerLoadControllersFrom("controllers", application) in calculator/app/javascript/controllers/index.js. They provide client‑side interactivity (e.g., live updates of calculated values).
  • Assets – SCSS compiled by Dartsass; images served from /public/images.

Sources

  • config/routes.rb
  • app/controllers/static_controller.rb
  • app/components/input_component.rb
  • calculator/app/javascript/controllers/index.js
  • calculator/app/javascript/application.js

Sources:

  • calculator/app/javascript/controllers/index.js
  • calculator/app/javascript/application.js
  • calculator/app/javascript/controllers/application.js
  • calculator/app/assets/stylesheets/application.scss

Entry points

  1. Docker – run with make up. This starts a container that executes:
./bin/dev

which launches the Rails server on port 3000. 2. Rails server – entry point is the standard Rails boot sequence:

  • /opt/app/config/environment.rb loads the application.
  • Puma starts listening on port 3000 (config/puma.rb).
  1. HTTP request flow – e.g., GET /
  • Router dispatches to StaticController#index.
  • Controller builds a default or pre‑filled Dough.
  • View renders the form; Stimulus controllers are attached via importmap.
  • User submits → POST to /dough; controller recalculates and renders result page.

Sources

  • Makefile (calculator/Makefile)
  • Dockerfile (calculator/Dockerfile)
  • /opt/app/config/environment.rb (boot)
  • /opt/app/config/puma.rb

Sources:

  • calculator/Dockerfile
  • calculator/Makefile
  • calculator/app/javascript/controllers/application.js
  • calculator/app/javascript/controllers/index.js

Key concepts

ConceptWhat it isWhere it lives
Dough calculationEncapsulated in the missing but referenced class Dough. It parses request params and produces ingredient amounts and descriptive text (build_title, build_description).Expected at app/models/dough.rb.
InputComponentA reusable ViewComponent that renders a labeled numeric input with min/max/step constraints. Used throughout the form.app/components/input_component.rb / .html.erb.
Stimulus eager loadingAll Stimulus controllers are automatically registered at boot via importmap and eager loading helper. This allows dynamic updates without page reloads.calculator/app/javascript/controllers/index.js.
Routes mappingSimple REST‑like mapping: root → index; /dough → show result; /result redirects to /dough.config/routes.rb.
Asset pipelineSCSS compiled by Dartsass; images referenced in README are generated by a separate Flowchart submodule..scss, Flowchart Dockerfile & Makefile.

Sources

  • Reference to missing model: comment in controller (# @dough = Dough.from_params(...)).
  • Component files (input_component.*).
  • Importmap config (controllers/index.js).
  • Routes file (config/routes.rb).

Sources:

  • calculator/app/javascript/controllers/index.js
  • calculator/app/components/input_component.rb
  • calculator/config/boot.rb
  • calculator/config/importmap.rb

Where to start reading

  1. config/routes.rb – understand which URLs map to which actions.
  2. app/controllers/static_controller.rb – core request handling and how it builds the dough object.
  3. Missing model stub (app/models/dough.rb) – locate or create this file to see calculation logic (the rest of the app depends on it).
  4. app/components/input_component.* – see how form inputs are rendered and styled.
  5. calculator/app/javascript/controllers/index.js + importmap – learn how Stimulus controllers are wired into the page.

These files give you the full request–response cycle from URL to rendered HTML and client‑side behavior.

Sources

  • config/routes.rb
  • app/controllers/static_controller.rb
  • (implied) missing model path
  • app/components/input_component.*
  • calculator/app/javascript/controllers/index.js

Sources:

  • calculator/app/javascript/controllers/index.js
  • calculator/app/components/input_component.rb
  • calculator/app/controllers/static_controller.rb
  • calculator/config/importmap.rb

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
4
Latest generation
Oct 17, 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