Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on a board you watch fill up.

<picture>
<source media="(prefers-color-scheme: light)" srcset="site/img/board-light.png">
<img src="site/img/board-dark.png" alt="The gockup window: six screens of a hiking app on a board, arrows between them, notes beside two of them">
<img src="site/img/board-dark.png" alt="The gockup window: six screens of a hiking app on a board, the way to book a hike lit and numbered through five of them">
</picture>

</div>
Expand Down Expand Up @@ -64,17 +64,34 @@ CLI) and connects the ones you pick. Any other MCP client takes `gockup mcp` ove
The model writes the adapter for your design system, creates the project, writes the screens and renders each
one to check its own work. You watch it happen.

When a new version is out, gockup says so and updates itself in a click, or gives you the command if it came from a
package manager.

## Try it before it exists

Name what people come to do, "Book a hike", and the board lights the way there: each screen numbered, each click
marked. Then try it, as if the mockup were the app.

<picture>
<source media="(prefers-color-scheme: light)" srcset="site/img/tried-light.png">
<img src="site/img/tried-dark.png" alt="A journey that got to its end: the five screens it went through and what was clicked on each, one click that did nothing, and one screen no click opens">
</picture>

At the end it tells what you would have found out after shipping: here, a filter that does nothing, and the screen
for a declined card, which no click opens. Fixing both is one more sentence to your model.

You can [try this one in the browser](https://lichdotdev.github.io/gockup/#try).

## What you get

- **Your design system, for real.** One adapter registers your widgets and every project can draw with them.
Gio's Material is built in, so you can start before writing one.
- **A board, not a pile of files.** Every screen side by side, arrows for the flow, pages, zoom, search, and
Tidy up to lay the journey out.
Tidy up to lay it all out.
- **The model at work, in the open.** What it changes lights up on the board, and one click takes it back.
- **Notes that stay.** Pin the why to a screen. The model reads it before touching that screen again.
- **A flow you can click.** Present a screen and walk the app through its links, with live widgets.
- **A journey you can try.** Use the mockup as if it were the app, and see the clicks that did nothing and the
screens nobody can reach.
- **Screens that answer.** Widgets are live: type in a field, flip a switch. While you try a journey, a click can show
an error, open a menu or go to a form's next step, with what was typed still there.
- **An app you already have.** The `from_app` prompt reads your UI code and rebuilds its screens as a project.
- **Plain text underneath.** A project exports to one `.gockup` file you can review and version; screens
export to PNG.
Expand Down
2 changes: 2 additions & 0 deletions examples/trailhead.gockup
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,7 @@ group "Booking" {
}
}

journey "Book a hike" from="Trips" to="Booked"

note "Held spot" on="Payment – declined" status=decided x=390 y=60 text="The spot stays held while they fix the card: losing it on a typo was the top complaint."
note "One action" on="Trip" status=todo x=40 y=740 text="Show the next dates under the button?"
Binary file modified site/img/board-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/board-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified site/img/og.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/tried-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added site/img/tried-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
119 changes: 93 additions & 26 deletions site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@
.install { display: flex; margin-top: 34px; max-width: 800px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.install code { flex: 1; min-width: 0; padding: 15px 18px; overflow-x: auto; white-space: nowrap; font-size: 14px; }
.install button { margin: 6px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.fine code { font-size: 13px; color: var(--soft); }
.fine code:last-child { white-space: nowrap; }
.fine { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* a section is a frame of the board: its title over it, an arrow to the next */
Expand Down Expand Up @@ -104,6 +106,20 @@
.phone button.next { animation: here 2.4s ease-in-out infinite; }
@keyframes here { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 45%, transparent); } }

.trial { gap: 0 56px; grid-template-rows: auto 1fr; align-items: start; }
.trial .phone { grid-area: 1 / 2 / span 2; }
.path { margin-top: 28px; max-width: 34em; font-size: 15px; line-height: 1.4; }
.path ol { list-style: none; padding: 0; }
.path li { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 8px; }
.path li > b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--line); font-size: 12px; font-weight: 400; }
.path li[aria-current] { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.path li[aria-current] > b { background: var(--accent); color: var(--on-accent); }
.path small { color: var(--muted); font-size: 13px; }
.path .found { margin-top: 12px; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.path .found div { margin-bottom: 10px; padding-left: 14px; border-left: 3px solid var(--mark); }
.path .found small { display: block; }
.path button { margin: 4px 10px 0; padding: 7px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--raised); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; }

.split.even { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.now img { border: 2px solid var(--accent); }
Expand All @@ -126,6 +142,8 @@
@media (max-width: 820px) {
.split, .split.even, .versus { grid-template-columns: minmax(0, 1fr); }
.split { gap: 32px; }
.trial .phone { grid-area: auto; }
.path { margin-top: 0; }
.phone { width: min(300px, 100%); margin-inline: auto; }
.strip { grid-template-columns: repeat(6, 190px); overflow-x: auto; scroll-snap-type: x proximity; margin-inline: calc(clamp(24px, 4.6vw, 56px) * -1); padding-inline: clamp(24px, 4.6vw, 56px); padding-bottom: 12px; }
.strip figure { scroll-snap-align: center; }
Expand Down Expand Up @@ -165,14 +183,14 @@ <h1>Mockups drawn with your real components</h1>
<code>curl -fsSL https://raw.githubusercontent.com/lichdotdev/gockup/main/install.sh | sh</code>
<button type="button">Copy</button>
</div>
<p class="fine">Free and open source, for Linux, macOS and <a href="https://github.com/lichdotdev/gockup/releases/latest/download/gockup_windows_amd64_setup.exe">Windows</a>.</p>
<p class="fine">Free and open source, for Linux, macOS and <a href="https://github.com/lichdotdev/gockup/releases/latest/download/gockup_windows_amd64_setup.exe">Windows</a>.<br>Also <code>brew install --cask lichdotdev/tap/gockup</code> and <code>yay -S gockup-bin</code>.</p>
</section>

<span class="title">The board</span>
<div class="frame picked">
<picture>
<source media="(prefers-color-scheme: light)" srcset="img/board-light.png">
<img src="img/board-dark.png" width="2880" height="1800" alt="The gockup window: six screens of a hiking app on a board, arrows showing the flow between them, and notes beside two of them">
<img src="img/board-dark.png" width="2880" height="1800" alt="The gockup window: six screens of a hiking app on a board, the way to book a hike lit and numbered through five of them, and notes beside two">
</picture>
</div>
<svg class="arrow lit" width="20" height="76" aria-hidden="true"><circle cx="10" cy="5" r="4"/><path d="M10 5V72M4 65l6 7l6-7"/></svg>
Expand All @@ -193,17 +211,18 @@ <h2>Ask for a flow, get every screen of it</h2>
</section>
<svg class="arrow" width="20" height="76" aria-hidden="true"><circle cx="10" cy="5" r="4"/><path d="M10 5V72M4 65l6 7l6-7"/></svg>

<span class="title" id="try">The flow, live</span>
<section class="frame pad split">
<span class="title" id="try">A journey, live</span>
<section class="frame pad split trial">
<div>
<h2>Click through it before it exists</h2>
<p>Every mockup is something you can walk through. Put it in front of someone, see where they get stuck, and fix it while a fix still costs one sentence.</p>
<p class="nudge">Go on, book the hike.</p>
<h2>Try it before it exists</h2>
<p>Use the mockup as if it were the app. gockup keeps the way you took and, at the end, tells you what you would have found out after shipping: the clicks that did nothing and the screens nobody can reach.</p>
<p class="nudge">Go on, book the hike. Try a filter on the way.</p>
</div>
<div class="phone">
<img src="img/screen-trips.png" width="540" height="1080" alt="Trips: pick a hike">
<span class="spots"></span>
</div>
<div class="path" aria-live="polite"></div>
</section>
<svg class="arrow" width="20" height="76" aria-hidden="true"><circle cx="10" cy="5" r="4"/><path d="M10 5V72M4 65l6 7l6-7"/></svg>

Expand Down Expand Up @@ -249,9 +268,12 @@ <h3>In gockup</h3>
<section class="frame pad">
<h2>It keeps up when the project grows</h2>
<div class="grid">
<div><h3>Everything on one board</h3><p>See the whole product at a glance, with arrows showing how people move through it.</p></div>
<div><h3>With the agent you already use</h3><p>Claude Code, Codex, Cursor, Gemini CLI, opencode or Copilot CLI: gockup finds yours and connects it.</p></div>
<div><h3>Every way through, lit</h3><p>Name what people come to do, and the board numbers the screens and the clicks that take them there.</p></div>
<div><h3>Screens that answer</h3><p>A field shows its error, a menu opens, a form goes to its next step, with what was typed still there.</p></div>
<div><h3>The why stays with the screen</h3><p>Pin a note to a decision. Your AI reads it before it touches that screen again.</p></div>
<div><h3>Start from the app you have</h3><p>Point it at your code and it redraws the screens you already ship, ready to improve.</p></div>
<div><h3>Yours, all of it</h3><p>Your mockups are one file on your computer, and export as text you can review. No account, no cloud.</p></div>
</div>
</section>

Expand Down Expand Up @@ -291,33 +313,78 @@ <h2>Your next screen is one sentence away</h2>
try { localStorage.setItem("theme", button.value) } catch {}
})

// the flow to click through: each screen's image and where its links are, in the screen's 360 × 720
// the journey to try: each screen's image, where its links are and what looks like one and is not,
// in the screen's 360 × 720
const next = [24, 656, 312, 44], back = [20, 24, 42, 42]
const flow = {
trips: ["Trips: pick a hike", [[24, 147, 312, 218], "trip", "Copper Ridge"], [[24, 382, 312, 218], "trip", "Mirror Lake"]],
trip: ["Trip: Copper Ridge", [next, "booking", "Book for $48"], [back, "trips", "Back"]],
booking: ["Booking: who is coming", [next, "payment", "Continue to payment"], [back, "trip", "Back"]],
payment: ["Payment: the card and the total", [next, "declined", "Pay $57"], [back, "booking", "Back"]],
declined: ["Payment: the card was declined, the spot is held", [next, "booked", "Try again"], [back, "booking", "Back"]],
booked: ["Booked: you're going!", [[10, 650, 100, 62], "trips", "Trips"]],
trips: ["Trips", "pick a hike", [
[[24, 147, 312, 218], "Copper Ridge", "trip"], [[24, 382, 312, 218], "Mirror Lake", "trip"],
[[74, 99, 54, 31], "Easy"], [[135, 99, 85, 31], "Overnight"], [[228, 99, 60, 31], "Lakes"],
[[120, 652, 120, 68], "Booked"], [[240, 652, 120, 68], "Profile"],
]],
trip: ["Trip", "Copper Ridge", [[next, "Book for $48", "booking"], [back, "Back", "trips"]]],
booking: ["Booking", "who is coming", [[next, "Continue to payment", "payment"], [back, "Back", "trip"]]],
payment: ["Payment", "the card and the total", [[next, "Pay $57", "booked"], [back, "Back", "booking"]]],
booked: ["Booked", "you're going!", []],
}
const shownSteps = 6
const phone = document.querySelector(".phone"), path = document.querySelector(".path")
let steps, idle

function el(tag, props, ...children) {
const e = Object.assign(document.createElement(tag), props)
e.append(...children)
return e
}
const phone = document.querySelector(".phone")
const plural = (n, what) => `${n} ${what}${n === 1 ? "" : "s"}`

function finding(color, text, where) {
const e = el("div", {}, text, el("small", {}, where))
e.style.setProperty("--mark", color)
return e
}

function showPath() {
const arrived = steps.at(-1).screen === "booked"
const first = Math.max(0, steps.length - shownSteps)
const list = el("ol", {}, ...steps.slice(first).map(({ screen, did }, i) => {
const row = el("li", {}, el("b", {}, first + i + 1), el("span", {}, flow[screen][0], el("br"),
el("small", {}, did ? `Clicked ${did}` : arrived ? "The end" : "You are here")))
if (!did) row.ariaCurrent = "step"
return row
}))
path.replaceChildren(list)
if (!arrived) return
const found = el("div", { className: "found" })
if (idle.size) found.append(finding("light-dark(#9a7400, #ffcf4a)", `${plural(idle.size, "click")} did nothing`, [...idle].join(", ") + " on Trips"))
found.append(finding("light-dark(#1583d8, #4db5ff)", "1 screen no click opens", "Payment – declined"))
path.append(found, el("button", { type: "button", textContent: "Start over", onclick: () => start(true) }))
}

function walk(screen, focus) {
const [alt, ...links] = flow[screen]
const [name, about, spots] = flow[screen]
steps.push({ screen })
phone.querySelector("img").src = `img/screen-${screen}.png`
phone.querySelector("img").alt = alt
phone.querySelector(".spots").replaceChildren(...links.map(([[x, y, w, h], to, label], i) => {
const b = document.createElement("button")
b.type = "button"
b.ariaLabel = label
b.className = i ? "" : "next"
phone.querySelector("img").alt = `${name}: ${about}`
phone.querySelector(".spots").replaceChildren(...spots.map(([[x, y, w, h], label, to], i) => {
const b = el("button", { type: "button", ariaLabel: label, className: i ? "" : "next" })
b.style.cssText = `left:${x / 3.6}%;top:${y / 7.2}%;width:${w / 3.6}%;height:${h / 7.2}%`
b.onclick = () => walk(to, true)
b.onclick = () => {
if (!to) return idle.add(label)
steps.at(-1).did = label
walk(to, true)
}
return b
}))
if (focus) phone.querySelector("button").focus({ preventScroll: true })
showPath()
if (focus) (phone.querySelector("button") ?? path.querySelector("button")).focus({ preventScroll: true })
}
function start(focus) {
steps = []
idle = new Set()
walk("trips", focus)
}
walk("trips")
start()

const board = document.body
const scrolled = () => board.style.setProperty("--scrolled", scrollY)
Expand Down
Loading