feat: show resource estimates in larakube new wizard #30

Open
inv3ntor01 wants to merge 1 commit from feature/larakube-new into main
inv3ntor01 commented 2026-07-07 04:56:26 +00:00 (Migrated from github.com)

Summary

Adds a resource-usage summary table at the end of larakube new, so
users see estimated download sizes, on-disk footprints, and allocated
volume storage for their chosen stack before scaffolding begins.

Changes

larakube new resource estimates

  • New showResourceEstimates() method displays a table after the
    wizard with per-service estimates (download, on-disk, allocated PVC)
    and a total row
  • Services covered: PHP (Alpine vs Ubuntu), database, cache, scout,
    object storage

HasDockerImage contract extended

  • Added getDownloadSize(), getOnDiskSize(), getAllocatedStorage()
    to the interface — implemented across all service enums with
    realistic sizes based on published image metadata

Wizard labels enriched

  • New getSelectOptionsWithSizes() on ProvidesSelectOptions trait
    appends download size and volume info to select labels, e.g.
    PostgreSQL (dl: 160 MB, vol: 1Gi)
  • Scout and storage prompts now use the enriched labels

Motivation

Users provisioning a new project had no visibility into the resource
footprint of their choices until deployment. The table helps them make
informed decisions, especially on resource-constrained machines.

## Summary Adds a resource-usage summary table at the end of `larakube new`, so users see estimated download sizes, on-disk footprints, and allocated volume storage for their chosen stack before scaffolding begins. ## Changes ### `larakube new` resource estimates - New `showResourceEstimates()` method displays a table after the wizard with per-service estimates (download, on-disk, allocated PVC) and a total row - Services covered: PHP (Alpine vs Ubuntu), database, cache, scout, object storage ### `HasDockerImage` contract extended - Added `getDownloadSize()`, `getOnDiskSize()`, `getAllocatedStorage()` to the interface — implemented across all service enums with realistic sizes based on published image metadata ### Wizard labels enriched - New `getSelectOptionsWithSizes()` on `ProvidesSelectOptions` trait appends download size and volume info to select labels, e.g. `PostgreSQL (dl: 160 MB, vol: 1Gi)` - Scout and storage prompts now use the enriched labels ## Motivation Users provisioning a new project had no visibility into the resource footprint of their choices until deployment. The table helps them make informed decisions, especially on resource-constrained machines.
This pull request has changes conflicting with the target branch.
  • app/Commands/NewCommand.php
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/larakube-new:feature/larakube-new
git switch feature/larakube-new

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff feature/larakube-new
git switch feature/larakube-new
git rebase main
git switch main
git merge --ff-only feature/larakube-new
git switch feature/larakube-new
git rebase main
git switch main
git merge --no-ff feature/larakube-new
git switch main
git merge --squash feature/larakube-new
git switch main
git merge --ff-only feature/larakube-new
git switch main
git merge feature/larakube-new
git push origin main
Sign in to join this conversation.
No description provided.