# `mix joby_kit.bootstrap`
[🔗](https://github.com/jobycorp/joby_kit/blob/v0.2.0/lib/mix/tasks/joby_kit.bootstrap.ex#L1)

Bootstraps an existing `mix phx.new` project (run inside it) as a
JobyKit demo. Run this when you already have a Phoenix app and want
to convert it into a kit-flavored greenfield demo.

For a fresh app from scratch, use `mix joby_kit.new` (which wraps
`mix phx.new --no-html` and ships the kit's HTML layer from minute
one).

Composes `mix joby_kit.install` (manifest, previews, and the two design
LiveViews) with four additional steps appropriate for a blank greenfield
project:

  1. Generate a clean `HomeLive` welcome page that composes the
     host's existing `<Layouts.app>`, so it reuses the project's nav,
     flash group, and chrome.
  2. Overwrite the install-shipped DesignSystemLive and
     CustomDesignsLive with greenfield variants that compose
     `<Layouts.app>` rather than rendering their own chrome.
  3. Rewire `router.ex` so:
       live "/", HomeLive, :index
       live "/design", DesignSystemLive, :index
       live "/custom-designs", CustomDesignsLive, :index
     …and the JSON manifest at `/design.json`.
  4. Optionally delete the now-unused `PageController` and
     `PageHTML` modules (skip with `--keep-page-controller`).

This task is destructive — it edits `router.ex`, overwrites generated
LiveViews, and may delete files. Use `mix joby_kit.install` instead if
you have an existing project with meaningful state at `/`.

## Usage

    mix joby_kit.bootstrap
    mix joby_kit.bootstrap --force                  # overwrite all generated files
    mix joby_kit.bootstrap --keep-page-controller   # leave PageController in place
    mix joby_kit.bootstrap --web MyAppWeb           # specify web module name

After this task completes:

    mix phx.server

…and visit `http://localhost:4000/` for the Home page.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
