HomeVideos

How I Design Pro App UIs (Full Workflow)

Now Playing

How I Design Pro App UIs (Full Workflow)

Transcript

852 segments

0:00

Are your apps ugly because of bad

0:02

visuals or because the user flows make

0:05

no sense? Like, is it the ugly duckling

0:08

just waiting to spread its wings? Or are

0:11

you just trying to put lipstick on a

0:14

pig? Well, it doesn't matter because

0:16

today we're solving both with a tool

0:19

called pencil.dev. Now, I wish I had a

0:22

tool like this before I scaled my last

0:23

app because it would have saved a lot of

0:27

frustration,

0:28

lost users, lost time, and probably half

0:32

a million dollars worth of constant

0:34

rebuilding of things. So, we're going to

0:36

look at how the tool actually works and

0:39

what makes it unique. And then we're

0:41

going to run through two different

0:42

scenarios of how you can actually build

0:45

really nice stuff with this tool. So,

0:48

first let's look at like what the

0:49

current ecosystem of choices for this

0:52

stuff actually looks like. So, the first

0:54

category and this is where I really

0:56

started with everything is custom flows,

0:59

right? Your own homegrown prompts that

1:02

are meant to help you actually design

1:04

something from like the actual user

1:06

experience and what things are meant to

1:08

flow like and then what the actual UI

1:09

itself looks like. So in this category,

1:12

this is where you have like prompt

1:14

libraries, brand like design rules and

1:17

guidelines, and you're typically just

1:20

moving through this iterative loop of

1:23

trying to, you know, get something that

1:25

looks the part, looks the way you want

1:27

it to look, and you're doing it

1:29

manually. The second category are these

1:32

like vibe coding kind of tools with

1:35

design modes. So let's design mode now

1:38

they're called design canvas tools like

1:40

lovable and vzero and then you could

1:43

argue maybe even tools like cursor where

1:46

it's like a vibe coding style of

1:49

workflow but what you're really trying

1:51

to do is again generate like designs.

1:54

So, we've got custom flows, we've got

1:57

vibe coding flows, and then we have this

2:00

like stitch style category where

2:03

historically it was generating like

2:05

images. But traditionally with these

2:07

styles of tools, you're maybe giving

2:10

screenshots or describing what you want

2:13

and then it is going through and trying

2:15

to actually like generate you screens

2:18

and like what different approaches could

2:20

look like. But these tools aren't really

2:22

bulletproof when it comes to actually

2:24

building something that you would want

2:26

to like take forward into a production

2:29

sense. It's like kind of a pain in the

2:30

ass to do that. And then the last

2:32

category, we have more like traditional

2:35

design tools, like what an actual

2:37

product designer at like a tech company

2:39

would use. And these are going to be

2:40

tools like Figma. So you can design

2:42

inside of these tools. You can build out

2:45

like really nice wireframes, even

2:47

prototype screens. and then you can

2:49

export all of the design tokens that

2:52

you've made into a coding environment.

2:54

So the tool that we are going to be

2:56

looking at today is called pencil.dev.

3:00

And the thing that's really cool about

3:02

this is that it kind of takes the best

3:05

of a lot of those different worlds and

3:07

puts it into one application. But one of

3:11

the things that's really awesome about

3:14

this tool is it follows this paradigm of

3:17

design as code. And we're going to look

3:20

at exactly what that means later. But

3:23

the translation of it is that it is very

3:26

easy to build really great stuff and

3:28

then immediately move it into your

3:31

coding environment and build like a real

3:34

true pixel perfect representation of

3:37

that UI that you designed in the tool.

3:40

So, in a second, we're going to get in

3:41

and actually look at like building

3:43

something with this. But before we do

3:45

that, I want to give you a quick tour of

3:47

the UI so that you actually know like

3:49

what it is that we are dealing with. So,

3:52

the way that this app works is that it

3:54

is like a canvas. So, very similar to

3:58

what you would experience in something

3:59

like Figma. So on this left hand side

4:03

you can see that we have a chat and this

4:05

is going to work similar to almost any

4:07

modern chatbased agent interface that

4:10

you're used to using today. So you chat

4:12

things in and then it goes out and it

4:14

starts making screens and changing

4:16

screens and doing all of that stuff.

4:18

Then we have this layers tab. And so the

4:20

way to think about this is that any of

4:22

these screens that we might want to look

4:24

at. So for example, if we were looking

4:25

at this today's diary screen, we

4:28

basically have nested layers. So this

4:31

ask AI button down here for example, we

4:33

can see it down here when I select it.

4:35

These are just layers upon layers of

4:38

components and things that we're

4:40

designing that get nested and nested and

4:42

nested inside. So at its core, that is

4:44

basically what we're doing inside of

4:46

this app. We have all of these layers

4:48

that are getting placed on top of each

4:50

other. And then we have this agent chat

4:51

where we can come in here, we can choose

4:53

different models, and then we can give

4:55

it some sort of task that we wanted it

4:58

to do. So, just to show you like a

5:00

really quick example of that, if I was

5:01

to click into this screen right here

5:03

where I have this uh dense table of

5:06

recipes, if I wanted to come in here and

5:08

say add UI elements for representing

5:12

meals, which are combinations of

5:15

specific recipes or foods. So now this

5:18

thing is going to go off. It's going to

5:19

call different tools. It's going to read

5:21

variables. It's going to read our design

5:24

systems that we have in place inside of

5:26

the app and then it is going to design

5:29

us a variation of this screen based on

5:32

what we asked for. Now, in this case, I

5:34

selected the entire canvas, but I could

5:36

have selected, you know, any layer

5:38

inside of this and it to make certain

5:40

types of changes. So now a few seconds

5:42

later, we have exactly what we asked for

5:45

again in the style of our design system.

5:49

So we asked it to make this meals

5:51

dashboard and it took the style and

5:54

design of our recipe dashboard, created

5:56

the meal dashboard and added this little

5:58

icon in our sidebar. So that is

6:00

generally on a high level how that

6:02

works. Now the thing that's really cool

6:04

that I want to show you guys is this.pen

6:08

file. So this entire system when we talk

6:10

about design as code that comes together

6:12

in this thing called a pen file. So if

6:14

we were to go actually open up what this

6:17

whole thing looks like under the hood we

6:19

can see that everything is basically one

6:22

giant JSON object. So if we were to

6:25

start scrolling through I mean we can

6:26

see based on the sidebar length that

6:28

this is like a very large object and

6:32

every single thing that we see inside of

6:34

here is very specific. Right? So, it's

6:37

actually taking into context the layers,

6:41

what the different like children or sub

6:43

layers are inside of that, the actual

6:45

like sizing of the different elements,

6:48

the font families that are being used,

6:50

the icon families that are being used,

6:52

all of the colors, like everything that

6:54

we could possibly need about this file,

6:57

we can see it's it's all in here. And so

7:00

the reason this is great is that when we

7:02

go to use the MCP server later on to

7:04

actually build this thing out, there is

7:07

no ambiguity. Every single thing that we

7:10

could possibly need done is outlined in

7:13

like very explicit detail. So continuing

7:16

on this tour, if we click on this agents

7:18

button in the top right, the thing

7:20

that's really cool about this is that it

7:22

uses your actual coding agent. So in my

7:25

case, I have it connected directly to my

7:28

clawed code instance, but you could do

7:30

the same thing if you were using codeex.

7:33

And so right now, this tool is free,

7:35

which means you don't need to worry

7:37

about paying an extra fee for this. It's

7:39

actually baked in already to your clawed

7:43

code subscription. So all of the agent

7:46

chat and everything that is running here

7:47

in the sidebar, it's piggybacking off of

7:50

your actual agent subscription that you

7:52

already pay for. And so the last thing

7:54

that's really cool about this is we have

7:55

this birectional MCP server. So we can

7:59

actually do this design work from inside

8:01

of in this case the cloud code CLI and

8:04

then we can also take any work that

8:06

we're doing here and immediately access

8:08

it inside of our coding environment. So

8:11

pretty much anything that you see here

8:13

in this app from the actual layers, all

8:16

of the elements inside of the layers,

8:18

the different pre-built components that

8:20

they have, even the libraries, which

8:22

we'll look at in a second, all of this

8:24

stuff the agent can access. So the

8:26

general mental model where a lot of this

8:29

space of like vibe coding and context

8:31

engineering and agents in general,

8:33

they're moving to this world where

8:34

anything the human can do or touch, the

8:37

agent can also do that thing. And that's

8:39

where these tools start to become like

8:40

really super valuable. So this tool is

8:42

really powerful when you get a hang of

8:44

it. Let's go take a look at how we can

8:46

actually use this thing from scratch. So

8:49

I'm going to move in and create a

8:50

completely new project. And the first

8:53

thing that makes this really valuable is

8:55

that it has these builtin design

8:58

systems. So if we were to go up into the

9:00

top right and click on design systems,

9:03

we have a few different like starter

9:05

kits or systems that we can choose from.

9:07

So in this case, if I were to click shad

9:10

CN UI, all of my primary like system

9:13

components are now automatically

9:16

generated and built for me. So for

9:18

example, if I wanted to have like a

9:20

modal box with specific like buttons on

9:22

it, I already have that component

9:25

defined. So I don't need to worry about

9:27

going in and thinking about how the

9:29

props are going to pass between and like

9:31

all of those sorts of things. It's

9:32

already done for me for all of the main

9:34

components that I could need. So

9:36

sidebars, what different label text

9:38

might look like, what a loading bar

9:40

might look like, all of these things are

9:42

already going to be defined for me. So I

9:44

have a really strong starting point out

9:46

of the gate. Now the thing is we do want

9:48

to come in and customize these things.

9:49

Like we don't want it to just be, you

9:51

know, this very basic vanilla unstyled

9:54

Shad CN UI out of the box. And so the

9:57

next thing that I like about this tool

9:58

that's really cool, if we come down to

10:00

styles, there are a ton of pre-built

10:04

style guides inside of the app that we

10:07

can layer on top of that design system.

10:09

So let's say, for example, this inline

10:11

friendly, let's say we really liked this

10:13

one and we clicked it. That's going to

10:15

basically load the template into our

10:18

chat down here. And then we could come

10:20

through and we could actually click this

10:22

Shad CN design system components frame

10:25

or layer. So this entire thing and

10:27

everything inside of it. We can see down

10:29

here that it's now telling us this

10:30

object is selected. And we could say

10:32

something like update the design system

10:36

components based on the new style guide.

10:40

And so we can see now that this thing

10:42

this is actually an agent. We saw that

10:45

blue hovering kind of cursor. This is

10:47

actually a an agent that's going through

10:50

and it is basically doing the planning.

10:53

So, it's trying to get a sense of

10:54

everything that we have on this grid.

10:56

And so, now after this thing is done

10:58

running, we can see much different vibe

11:01

overall, right? So, the style has been

11:04

updated. It now has this warm linen

11:06

palette. The typography has been

11:07

updated. The roundness of some of these

11:09

buttons have been updated. So, we've now

11:11

basically combined like a component

11:14

system like Shad CN with our own actual

11:18

design styles on top of that system. Now

11:22

that we have this design system, we

11:24

could come in and we could select it and

11:26

we could come through here and ask it to

11:28

just build something out. So we'll do it

11:29

the easy way first, which is kind of

11:31

what you would do in a tool like Stitch

11:33

or even maybe a tool like Replet with

11:35

design mode. We're just going to say,

11:36

"Hey, go build me this kind of vague

11:38

thing." So we're going to say, "Use the

11:40

selected design system to build these

11:42

mobile app screens with multiple states

11:44

per screen." So I want to see what it

11:46

looks like with success states, with

11:48

error states, empty states, things like

11:50

that. Then we're going to explain the

11:52

app. So an agent native B TOC nutrition

11:55

tracking app. And I'm going to give some

11:57

basic features that I wanted to sort of

12:00

think about. And then I'm giving just

12:02

like one philosophical kind of direction

12:05

for the app, which is it's all about the

12:07

speed of things. So we want to minimize

12:10

the number of like taps or actions

12:11

needed to to do something. And so the

12:14

last thing I'm going to do, which is

12:16

pretty cool, is that we can select how

12:18

many parallel agents we want running. So

12:20

if I was to come down for example and

12:22

choose five, this means we're going to

12:24

have five different agents designing at

12:28

the same time. So this is like a really

12:30

nice speed upgrade that we're going to

12:32

see as soon as this thing kicks off. So

12:35

right now it's just doing the planning.

12:37

It's understanding the design system,

12:38

but then it's going to go out and it's

12:40

going to start building those screens.

12:42

So now that this thing is kicked off, we

12:44

can see that we have these different

12:46

agents that are all operating at the

12:48

same time. So, we have this Onyx agent

12:50

over here. We have this reef agent over

12:52

here. And so, I think there's at this

12:55

point three different agents that it has

12:57

spawned that are all building different

13:00

aspects of what we asked for. And the

13:02

thing that's really cool is they are

13:04

building this thing layer by layer. Now,

13:07

the thing to like pay attention to as

13:09

this is moving is that it is doing

13:12

everything with respect to the design

13:15

system that I had laid out earlier. So,

13:17

we're getting in this case like what

13:19

does this chat series of screens

13:21

actually look like? We can look at

13:23

conversations we had. Here's what it

13:25

looks like when we're in the process of

13:26

actually logging something and like what

13:28

the generative kind of UI might actually

13:31

look like, being able to confirm and

13:33

edit, right? We're showing like

13:34

different states that the UX is going to

13:37

exist in. And it's doing that across all

13:39

of these screens. So, this other agent

13:41

while that one was off running was doing

13:43

the whole dashboard side of things where

13:44

we can see like where we sit from like a

13:46

macro perspective with our calories, our

13:49

protein, carbs, our fats, like what

13:51

meals we've had today. Being able to

13:52

quick log something, seeing overviews

13:55

and trends, being able to like pop into

13:57

specific details maybe of a macro group

14:00

if I want to see what were my protein

14:02

sources. It's building out a weekly

14:04

summary screen, right? So, all of these

14:06

things are out designing everything I

14:08

asked for at the same time. Now, you

14:10

will notice occasionally it makes little

14:11

mistakes with respect to the design

14:13

system. It will often go back and fix

14:15

this because it has a built-in review

14:18

stage after it moves through all of

14:20

these things, but it is basically off

14:22

and running designing everything that we

14:25

asked for, which was at the end of the

14:27

day a relatively vague ask, right? So,

14:30

we have these really nice views of like

14:33

kind of an inspiration look of what the

14:36

active chat conversation could look

14:38

like. The only thing about this that's

14:40

kind of uh annoying me a little bit is

14:42

that some of the rounding of these

14:45

buttons isn't exactly what we had in our

14:47

design system, right? Because it's

14:49

considering it a badge, but I mean in

14:51

reality, this is kind of like a button.

14:53

So that's maybe like a take it or leave

14:55

it type of thing. We can see what our

14:56

daily dashboard overview looks like,

14:59

which again looking like really clean

15:02

overall. Here's what our like library of

15:04

recipes that we have and we've cooked

15:06

for oursel looks like, right? And

15:08

there's like some small things that I

15:09

think don't make 100% tons and tons of

15:12

sense. Like this kind of bothers me a

15:14

little bit. This gray background with

15:16

this text that isn't really contrasting

15:17

properly. So, there's like small little

15:19

things that we would want to come in and

15:20

tweak. But overall, uh, looking really

15:23

solid. But now, this only really solves

15:25

one of those problems that I mentioned

15:27

in the beginning of the video. And

15:29

that's is your app ugly and like doesn't

15:32

feel great to you because of the

15:35

visuals? like all you really needed was

15:37

a component system that was really well-

15:39

definfined and a nice like style on top

15:42

of it. Was that really all you needed?

15:45

Or is it the case that the flow of your

15:47

app from like a user's perspective

15:50

doesn't make sense? And so when you go

15:51

to use the thing, it's like, huh, this

15:54

isn't actually like feeling the way that

15:56

I think it should feel because that is a

15:58

different problem that comes back to the

16:00

actual planning of the user experience

16:03

and the user flows. So now I'm going to

16:06

show you a more robust version of what

16:09

we can do with something like this.

16:10

Because the inherent problem in what we

16:13

just did is that we allowed in this case

16:17

claude code which is what's working

16:18

under the hood. We allowed clawed code

16:20

to decide the different features

16:22

realistically and how they are going to

16:24

shape up to be. And the problem with

16:27

that is that every time we delegate that

16:29

type of decision, we're allowing the

16:31

language model to decide the overall

16:34

direction of our app. And the real

16:37

problem that is being solved and what

16:39

the solution to that is the biggest

16:42

failure in vibe coding is under

16:45

specified plans and consequentially is

16:49

that a word consequently the solution to

16:52

that problem and how it really shapes

16:54

up. So the step that you really want to

16:57

have before this is taking the time to

17:00

really hash out the user flows like that

17:03

core UX that is going to be the first

17:06

version of this thing. And a really good

17:09

example of what I mean by this if we

17:12

were to look at this series of dashboard

17:14

screens for like an MVP of this thing I

17:17

don't really care about drilling down

17:19

into protein. Like that's not really

17:21

valuable to me as the person that's

17:24

going to use this thing. Like I've

17:25

already logged those meals. I don't

17:27

really care about clicking on this

17:29

little protein card right here and then

17:31

being brought into this breakdown view

17:33

that was like, "Hey, that protein shake

17:34

had 25 grams." Like I I don't care about

17:37

that. So for me then, if I was to just

17:39

allow Cloud Code to start building from

17:41

here, like this is like a dead screen.

17:43

I'm going to build this thing and then

17:44

the functionality is there. I have to

17:45

spend all the time to make it. I have to

17:47

build the backend like API route so that

17:49

it can surface the data and I don't

17:51

care. I don't care about this actually

17:53

being there. So why did I build this

17:56

screen? Well, it's because I allowed the

17:58

language model to decide the screens. So

18:00

what do we do about that? So what we're

18:02

going to do here is we're going to pop

18:03

into my claw desktop. And what I've done

18:07

is I've pasted in a PRD. Now, I got this

18:09

PRD from one of the last videos I did on

18:11

this channel where I talked about the

18:14

GStack, like why combinator CEOs skill

18:17

that helps you really narrowly define

18:20

your wedge. So, like what is the MVP of

18:23

your product? Like what needs to be

18:25

there? I took that, made a basic PRD,

18:27

and now I have this prompt, which is my

18:30

UX design agent. And so, this thing's

18:32

about to ask me a few questions. And

18:34

then out the other side, we're going to

18:36

get a bunch of UX deliverables, which we

18:38

will talk about when we get them. Right.

18:41

So, in this case, this is going to be

18:42

like a kind of mobile onthe-go type of

18:44

thing. On the chat interface, how much

18:46

should it feel like a messaging app

18:47

versus a structured tool because this is

18:49

going to drive different UX decisions

18:51

that we choose to make. So, I I kind of

18:54

want a hybrid. Like, I don't want it to

18:55

be pure chat GPT. Like, I I want it to

18:58

feel like you're, you know, you're

18:59

having a conversation, but that you can

19:01

also like see meaningful information. I

19:03

do not want to like overweight the user

19:06

with different like logs and

19:08

confirmations and all this type of

19:09

stuff. It's like it should feel like

19:11

it's just it's there with you and it's

19:13

doing exactly what you ask and there's

19:15

not like there's not a ton of hoopla,

19:17

right? There's not a ton of going

19:18

on that you have to think about and

19:20

worry about. It's just it's doing its

19:21

thing and you have to trust that it's

19:23

doing it. So, this is like a good

19:24

example of why you want to do this type

19:27

of UX exercise. So if we were to think

19:29

of like the real world context of me

19:31

using this thing, what happens when it

19:33

tries to find a match from the food like

19:35

public food databases, but there's like

19:38

issues with the confidence in that it's

19:40

the actual food the user is asking for.

19:43

Like how do you handle that type of

19:45

situation in the context of your app? If

19:48

you don't think about this ahead of

19:49

time, like what that interaction pattern

19:51

looks like, you're going to have like

19:52

probably a really solution to it

19:54

and there's going to be a bad user

19:56

experience with your app. So, I kind of

19:58

like this idea of like a bottomup sheet

20:01

that you can kind of slide up and

20:03

address the issue. So, go with that one.

20:05

So, this question is about that insights

20:07

tab that I want to have like what should

20:08

that user experience and like

20:10

interaction with it actually look like?

20:13

So, I want to do the stacked cards and

20:15

the reason I want to do that is this

20:17

should feel like a thing that's always

20:18

working for you in the background. I

20:20

don't want it to be the case where the

20:21

user only gets insights if they ask for

20:23

them. If you were to think of a tool

20:24

like Open Claw, the reason people found

20:27

that so mindblowing beyond the hypeness

20:31

of it, it was that it was very

20:33

proactive. Like it would offer things to

20:35

you without you having to ask for them.

20:37

And so I think that type of paradigm

20:39

really makes people feel like they're

20:41

working with some sort of AI system when

20:43

it gets to this level of being like

20:45

proactive. That's something that's very

20:47

impressive to people. And so it would be

20:48

cool if we can start integrating those

20:50

types of patterns into what we are

20:52

building. Now, if you want to see these

20:54

prompts, by the way, and the prds and

20:56

everything and how I make them, there is

20:58

a free course in the description below

21:00

inside of my school group that you can

21:02

go check out where you can actually get

21:03

all the prompts and see how I use them

21:05

in detail. So, we're going to let this

21:06

thing finish doing its processing and

21:09

then we will look at the output and talk

21:11

about it. Okay, so out the other side,

21:13

what we got from this is a very detailed

21:16

UX design specification. And the reason

21:19

that I really like to do it this way is

21:21

that before we get to the point of

21:22

actually like saying like, okay, well,

21:24

what are the screens? We're thinking

21:26

about everything important that goes on

21:29

around those screens and how they

21:31

actually connect together and how it's

21:33

all one cohesive system of doing things.

21:37

So an example of that would be something

21:38

like what is your information

21:40

architecture? So for all the different

21:42

features like that we actually have how

21:44

are all of these things actually

21:46

organized around each other so that they

21:49

make sense. Then we move through like

21:51

what is the actual like the flows that a

21:53

user takes when they want to accomplish

21:55

something. So if a user wants to log

21:58

food via the chat like what does that

22:00

actually look like in practice? So they

22:02

open the app, they type in a message,

22:04

the back end of the system is going to

22:07

classify the intent, right? Then all of

22:09

these other things are going to happen

22:11

and the end of this is that the user

22:12

gets a message. So we're outlining all

22:15

of this in detail. What are the errors

22:16

that could crop up in that flow? What

22:19

are the different edge cases we need to

22:20

consider? And then it repeats for every

22:23

feature. So for the insights querying,

22:25

what does that look like? For exporting

22:27

from other tools and uploading them into

22:29

our tool, what does that look like? And

22:30

then we get down to the screen

22:32

specifications. And so even if you don't

22:34

want to do all the other stuff above,

22:36

you at least want to get to the level of

22:39

defining like what's going to actually

22:41

go into each of these screens and how

22:44

does that fit with what the problem I'm

22:46

solving is. Is it in scope of the MVP?

22:49

Does it make sense? Am I using the same

22:51

like conventions and ways of doing

22:53

things on screen one as I am on screen

22:56

three? We want to make sure that's all

22:57

super locked in. So in this case, this

23:00

is how I've structured those specs. So

23:03

we have the the screen, the purpose of

23:05

the screen, the entry and exit points

23:07

from the screen. So in the chat, like

23:09

how can I get to the chat? Like what are

23:10

the means by which I actually get there

23:12

as a user? What's like a lowfidelity

23:15

wireframe of this thing? So we have, you

23:18

know, a ambient macro bar that's like

23:20

pinned to the top of chats. And then we

23:23

have our kind of back and forth, you

23:25

know, conversation going on. And then

23:28

this is what the bottom of this could

23:29

look like. So we go through the content

23:31

hierarchy for any of those like

23:32

important things like that ambient macro

23:34

bar. Like what does that actually look

23:36

like? How does it function? What are the

23:37

different modes? What does the like

23:39

styling of the system messages coming

23:41

through actually? Uh like what is that

23:43

going to actually look like? How's it

23:44

going to function? Uh interactive

23:46

elements, which is valuable if we want

23:47

to mock up what different versions of

23:49

this screen look like. And then it

23:52

repeats, right? So then it's going to go

23:53

through to meals. So, as an example, we

23:55

can copy just this first screen, and we

23:58

can now hop back over into our pencil

24:01

system, create a new chat, and I'm going

24:03

to select this design component system,

24:06

and then I'm going to do the same thing

24:07

I did before, just with more detail. So,

24:08

based on the design system, which is

24:10

selected, I want you to build this

24:12

screen and its variations. I'm going to

24:15

hit go, and then this thing is going to

24:16

pop off, and it is going to create that

24:18

thing. Now, one of the things that's

24:20

really cool about this app is we don't

24:23

really have to wait, right? So, if I was

24:25

to go back up and just like copy this

24:28

top part, pop back into my chat, paste

24:30

that in there, and now if I came down

24:32

into our cloud conversation that we were

24:35

in, I could do the same thing for the

24:36

meals now. So, I could come through

24:38

here, the layout structure, right?

24:39

Content hierarchy is all there, the

24:41

different states, copy it, pop back

24:43

over, paste it in, let it go, and so now

24:45

these are going to be all working at the

24:47

same time. So we don't need to do these

24:51

things like synchronously in order and

24:53

wait and wait and wait and wait. We can

24:55

just kick these things all off in

24:56

parallel and basically build out all of

24:59

these screens simultaneously. Now the

25:01

thing that's really cool, like I said

25:03

earlier, there's a birectional MCP

25:06

server. And what that means is I'm doing

25:09

this in cloud code or sorry in cloud

25:11

desktop because it's very visual and

25:14

easier for you guys to look at on

25:16

YouTube. But if I was inside of like my

25:18

actual claw code environment and I had

25:21

these screens built out and they were

25:22

inside of some sort of like series of

25:24

folders, I could just use the MCP server

25:28

and tell it, hey, for each of these

25:30

screens inside of this folder, go build

25:33

them out in parallel. And all of these

25:35

screens, I think we have one, two,

25:37

three, four, five, however many there

25:39

are, all of those will be built out at

25:42

the same time inside of this tool. And

25:45

we can see probably spawned off too many

25:46

agents, but we've got a bunch of

25:48

different agents working across the two

25:50

different screens. And again, they're

25:51

building things out exactly to my spec.

25:54

So now that those first two screens and

25:55

the different states are done, we can

25:57

look at what they look like. I have

25:58

other ones now building out the rest in

26:00

the background. So every single one of

26:02

these from the the default to the, you

26:04

know, empty first time someone's ever

26:06

even using this thing through to the

26:08

hey, it's processing in the background.

26:10

Hey, there was an error. you know,

26:12

you're offline and this stuff can't

26:13

process. All of this stuff was

26:15

determined ahead of time. Same thing

26:17

with the meals. Like all of these

26:19

specifications were things that we built

26:21

out in this lowfi kind of way so that we

26:23

could make sure like does this actually

26:25

fit with the vibe and the flow that I'm

26:28

envisioning for this app. And we can

26:30

kind of see this ahead of time. Now, the

26:32

other step that I skipped here that you

26:34

would do in real time is to go back

26:36

through this thing and have an

26:37

adversarial back and forth with the

26:40

system. And again, I have prompts for

26:41

that inside of the free course where we

26:43

could say like, hey, this specific

26:46

screen isn't exactly what I need it to

26:47

be. And you have this kind of back and

26:50

forth with the the model to make sure

26:52

that they're actually building it in the

26:54

direction you want it done. And so this

26:56

is the process that again that results

26:58

in here's what it looks like in the

26:59

default kind of way. Here's what it

27:00

looks like when it's empty. Here's what

27:02

it looks like when it's loading and it

27:04

has this kind of skeleton in the

27:05

background. Here's what it looks like

27:07

when you search something and it can't

27:08

find it. Here's what it looks like when

27:10

you're trying to log something. Like all

27:11

of these screens are thought of ahead of

27:13

time so that we can make sure it's it's

27:16

what we actually want it to be. So now

27:18

one other thing that we can do is we can

27:21

create variations on these designs. So

27:22

if I was to open a new chat and select

27:24

this screen for example, I could come

27:26

through here and I could say show me

27:28

three variants of this type of design

27:32

and hit enter. And now it's going to go

27:34

out. It's going to take the context of

27:35

that screen and again it's using claw

27:37

code in the background in this case opus

27:39

4.6 and it's now going to just generate

27:42

me different variations of this specific

27:44

screen. And so now we can see like what

27:46

some different variations of this

27:48

insights tab might look like. I

27:50

personally like this one uh variant one

27:53

um the best. It's kind of like this but

27:54

a little bit more expanded and has a

27:56

little bit more data in it. But there we

27:58

go. We have some different options. So,

27:59

generally speaking, I think that first

28:01

approach, the kind of easier way where

28:03

we just prompted something in um this

28:05

made like a nice looking sequence of

28:08

screens and this can be useful for like

28:10

brainstorming like maybe you just want

28:12

to see it visually. You don't want to go

28:14

in and create a PRD and the UX

28:16

definitions. You just kind of want to

28:17

see some inspiration like I like what a

28:20

lot of these screens ended up looking

28:22

like. But if you have a very clear idea

28:24

or want to have a clear idea before you

28:27

step in and start building things, you

28:29

can use this other approach where we

28:31

generate an actual like UX system and

28:35

generate those screen definitions ahead

28:36

of time. But let's say we really like

28:38

something that we built and we want to

28:40

move it over now into our actual app.

28:44

Like we want to now build this thing

28:46

inside of Claude Code or Codeex or

28:49

whatever. If we go down into a project.

28:52

So in this case, I have a very basic

28:53

starter app. This is an expo app. It

28:55

doesn't have anything done in it yet.

28:57

This is completely fresh. I can come

28:59

down here now and I can ask it to help

29:01

build the plan to start making these

29:03

screens. All I'm going to tell it to do

29:04

is use the pencil MCP and build out

29:07

basically all of the screens. In this

29:09

case, I'll just have it build out four

29:11

of these. And we're going to kick it off

29:13

in plan mode and let it run. And so we

29:16

can see here that the MCP server for

29:18

pencil is being used. And so it is

29:21

gathering basically all of the different

29:23

elements. And again, these are like

29:24

nested um JSON objects. And so it's

29:28

going through and it's pulling all of

29:30

the different screens and their

29:32

definitions out of this active editor

29:34

state. So one of the things that's

29:36

really cool is Pencil actually generated

29:39

this like system prompt to use for all

29:42

of the design. And so it's specifying

29:46

essentially like the different

29:47

components that we have inside of the

29:50

app and how it's really all meant to be

29:52

used. So like what are the rules, what

29:54

is the ordering of certain things, what

29:57

are the dos and don'ts. And so it's

29:59

moving through for everything that we

30:01

have and it's telling it exactly how to

30:03

build this thing to spec. So there's a

30:06

lot of MCP tool calls here, but it's a

30:08

JSON object, so it it shouldn't be

30:10

taking up some like ridiculous amount of

30:12

tokens. We were to pop back real quick

30:14

into pencil. As this thing is running,

30:16

it is reading these screens in real

30:18

time. So, as it's moving through and

30:19

trying to build stuff, it's constantly

30:21

like hopping back and forth and making

30:23

sure that it's building things the way

30:26

we have asked it to. And so, now that

30:28

this process has run through, we can see

30:30

that we have these screens um that are

30:32

pretty closely designed based on what we

30:35

had inside of the pencil file. So, we

30:37

have this nice little like pill

30:39

navigation at the bottom. We have a

30:40

recipe view. some issues with like stuff

30:42

being, you know, cut off that we'll have

30:44

to go through and fix, but on the whole,

30:47

you know, little spacing issues and

30:48

things like that, but this is something

30:49

that we can actually uh work with. So,

30:52

this is just a basic example of building

30:54

out the navbar and a few screens, but

30:56

I'm going to be doing a full video here

30:58

on YouTube where we go from app concept

31:01

through to fully building the app out

31:04

completely. That's probably going to be

31:05

a 2, three, 4h hour video, but this

31:08

design stage will be part of that

31:09

process. So, make sure to subscribe or

31:12

be ready to go check for that if you're

31:15

interested in seeing how we can

31:16

integrate something like this into like

31:18

a full process that actually makes

31:20

sense. But that is it for this video. I

31:22

will see you in the next

Interactive Summary

This video introduces pencil.dev, a design-as-code tool that helps developers bridge the gap between UI design and implementation. The speaker demonstrates how to build and iterate on app designs using built-in design systems and AI agents, explaining both a quick, intuitive approach for prototyping and a more robust methodology involving PRDs and UX specifications. Finally, the video showcases how to use a bidirectional MCP server to export these designs directly into a coding environment for production.

Suggested questions

3 ready-made prompts