defmodule <%= @web_module %>.HomeLive do
@moduledoc """
Welcome page generated by `mix joby_kit.new`. The nav comes from
`Layouts.app` — pages just render content.
Edit freely — this file lives in your app, not in the kit.
"""
use <%= @web_module %>, :live_view
@impl true
def mount(_params, _session, socket) do
{:ok, assign(socket, page_title: "Home")}
end
@impl true
def handle_event(_event, _params, socket), do: {:noreply, socket}
@impl true
def render(assigns) do
~H"""
<Layouts.app flash={@flash} active_nav="home">
<main class="mx-auto max-w-4xl space-y-10 px-6 py-12">
<header class="space-y-3">
<p class="text-xs font-semibold uppercase tracking-[0.2em] text-base-content/50">
<%= @app %>
</p>
<h1 class="text-4xl font-semibold leading-tight">
Welcome to <%= @app_camel %>.
</h1>
<p class="max-w-2xl text-base text-base-content/75">
This app is generated with
<a href="https://github.com/jobycorp/joby_kit" class="link link-primary" target="_blank" rel="noopener">
JobyKit
</a>, an opinionated, agentic-first design system on top of Phoenix and daisyUI.
The two pages below are the discoverability surface for human and AI contributors.
</p>
</header>
<section class="grid gap-4 md:grid-cols-2">
<.card variant="bordered">
<:title>Design system</:title>
Kit-curated wrapper inventory, the wrapper contract, and the daisyUI catalogue.
Same shape across every JobyKit consumer.
<:actions>
<.button navigate={~p"/design"} variant="primary">Open /design</.button>
</:actions>
</.card>
<.card variant="bordered">
<:title>Custom designs</:title>
This app's generic composites and domain components — your team's
additions to the catalogue.
<:actions>
<.button navigate={~p"/custom-designs"}>Open /custom-designs</.button>
</:actions>
</.card>
</section>
<section class="space-y-3 rounded-2xl border border-base-300 bg-base-200/40 p-6">
<h2 class="text-lg font-semibold">Manifest API for AI agents</h2>
<p class="text-sm text-base-content/70">
The combined manifest (kit core + composites + domain) is served as JSON. Your
coding agent can fetch it without parsing rendered HEEx.
</p>
<pre class="overflow-x-auto rounded-lg bg-base-300/40 p-4 text-xs" phx-no-curly-interpolation><code>curl http://localhost:4000/design.json | jq</code></pre>
</section>
</main>
</Layouts.app>
"""
end
end