1
00:00:04,120 --> 00:00:12,080
I live inside my own world of 
make believe kids screaming in 

2
00:00:12,160 --> 00:00:19,920
the cradle's profanities. 
I see all the ice covered in ink

3
00:00:20,440 --> 00:00:26,440
and Bitch Cross are the ones who
helped my cries and watched me 

4
00:00:27,640 --> 00:00:30,560
weep. 
What up perfect peeps. 

5
00:00:30,560 --> 00:00:32,840
Welcome back to Code with Coding
Cat. 

6
00:00:32,920 --> 00:00:34,600
Today on the show I have Eric 
with me. 

7
00:00:34,600 --> 00:00:37,200
What's up, Eric? 
Hey, how's it going? 

8
00:00:37,720 --> 00:00:40,200
How's it going? 
I'm doing good. 

9
00:00:40,200 --> 00:00:42,840
I'm doing good. 
Happy Wednesday. 

10
00:00:42,840 --> 00:00:44,960
I guess I've been, I've been 
like out of it. 

11
00:00:44,960 --> 00:00:48,880
My, I don't know why, but 2024, 
I feel like I've been sicker 

12
00:00:48,880 --> 00:00:52,040
than I have any other year, 
which has been awesome. 

13
00:00:52,760 --> 00:00:57,320
So I'm just kind of rolling back
in, so bear with me if my mental

14
00:00:57,320 --> 00:00:58,800
game is completely off. 
Well. 

15
00:01:00,240 --> 00:01:02,480
Thanks for having me on. 
Let me and. 

16
00:01:03,240 --> 00:01:05,120
I I think you sound fine. 
Oh good. 

17
00:01:06,520 --> 00:01:11,360
I'll throw up the old AWS 
Amplified Gen. 2 banner. 

18
00:01:12,320 --> 00:01:14,640
So that's what we're talking 
about today. 

19
00:01:14,800 --> 00:01:17,480
But I just wanted to say hi to 
to Eric for a little bit. 

20
00:01:17,480 --> 00:01:21,800
First get some people in here. 
I shared some links. 

21
00:01:21,800 --> 00:01:24,680
I don't know Eric, do you have 
any other spots to share this 

22
00:01:24,680 --> 00:01:30,840
fun live coding session with? 
No, so I didn't see which links 

23
00:01:30,840 --> 00:01:33,120
you shared. 
Was it the docs links? 

24
00:01:34,520 --> 00:01:37,840
Sorry, I I shared them out on my
own Twitter and stuff like that 

25
00:01:37,840 --> 00:01:38,320
but. 
Let me. 

26
00:01:38,360 --> 00:01:40,760
Yeah, let. 
Me send you the YouTube and that

27
00:01:40,760 --> 00:01:43,880
way you have it as well let. 
Me. 

28
00:01:43,880 --> 00:01:45,440
See. 
Oh yeah, I got it. 

29
00:01:46,080 --> 00:01:51,640
Cool. 
Sweet, get some joiners in here 

30
00:01:51,760 --> 00:01:55,000
checking out Gen. 2. 
So what have you been up to? 

31
00:01:55,000 --> 00:01:59,400
I think I saw you last at Vegas 
for Reinvent. 

32
00:01:59,400 --> 00:02:01,240
Have you been doing anything fun
since then? 

33
00:02:02,640 --> 00:02:09,360
Yeah, no, yes, it's Reinvent was
just a whirlwind event at the 

34
00:02:09,400 --> 00:02:12,080
end of November, beginning of 
December. 

35
00:02:12,480 --> 00:02:16,720
That was the first time I had 
been at a Reinvent where I was 

36
00:02:16,720 --> 00:02:20,840
speaking and I was an employee. 
I'd been there as a customer 

37
00:02:21,160 --> 00:02:24,640
before, so that was really fun 
meeting you, Alex, and, and 

38
00:02:24,640 --> 00:02:29,520
meeting so many other great 
people in the AWS community, a 

39
00:02:29,520 --> 00:02:32,920
bunch of other developer 
advocates and solution 

40
00:02:32,920 --> 00:02:35,840
architects. 
And yeah, it, it was great. 

41
00:02:35,880 --> 00:02:39,000
And what's really nice about our
my work schedule. 

42
00:02:39,000 --> 00:02:42,600
So a little bit about me. 
I'm AI used to be doing a front 

43
00:02:42,600 --> 00:02:45,320
end engineering on the UI team. 
And then recently I moved over 

44
00:02:45,320 --> 00:02:48,960
to doing developer advocacy for 
the AWS Amplify team. 

45
00:02:49,680 --> 00:02:52,760
Is that usually December like 
right after reinvent things slow

46
00:02:52,760 --> 00:02:56,360
down a whole lot. 
It's it's really great. 

47
00:02:56,360 --> 00:02:59,640
So I was able to deep dive into 
some old projects that I wanted 

48
00:02:59,640 --> 00:03:02,720
to get done, create some content
that I hadn't done in the past, 

49
00:03:03,120 --> 00:03:06,240
deep dive even further into Gen.
2, which we're going to talk 

50
00:03:06,240 --> 00:03:08,880
about today and, and and look at
a demo app. 

51
00:03:09,480 --> 00:03:14,720
So that that was mostly all of 
December and then my other 

52
00:03:14,720 --> 00:03:18,120
passion, I have quite a few 
passions life coding, teaching, 

53
00:03:18,120 --> 00:03:21,880
but is football. 
And so I was all into the post 

54
00:03:21,880 --> 00:03:24,520
season. 
I'm a big 49ers fan. 

55
00:03:25,280 --> 00:03:29,360
And then I had the heartbreak 
last Sunday when we were so 

56
00:03:29,360 --> 00:03:34,560
close and we just came up short.
But you know, I'm also me and my

57
00:03:34,560 --> 00:03:37,160
wife are big Taylor Swift fans. 
So I think during the game, 

58
00:03:37,600 --> 00:03:40,040
every time Taylor Swift came on,
we we were cheering. 

59
00:03:40,400 --> 00:03:42,680
But it was fun. 
For those who don't know who 

60
00:03:42,720 --> 00:03:45,840
that that's this is American 
football. 

61
00:03:45,840 --> 00:03:49,240
Not not the football. 
Yeah, and I'm, I'm, I'm sure 

62
00:03:49,240 --> 00:03:51,400
worldwide, you know who Taylor 
Swift is. 

63
00:03:51,400 --> 00:03:54,920
If you don't know, Taylor Swift 
has been dating Travis Kelsey 

64
00:03:54,920 --> 00:03:59,360
from the Kansas City Chiefs, 
who, who beat the 49ers. 

65
00:03:59,360 --> 00:04:05,320
Unfortunately for Eric, I had, I
had the amazing trip to be, you 

66
00:04:05,320 --> 00:04:08,040
know, a huge Detroit Lions fan. 
So you guys? 

67
00:04:08,040 --> 00:04:11,560
Got to. 
To beat me slightly earlier, I 

68
00:04:11,560 --> 00:04:15,720
was actually, I was flying back 
from Singapore, I landed in San 

69
00:04:15,720 --> 00:04:19,399
Francisco. 
I was going to, I was going to 

70
00:04:19,399 --> 00:04:22,360
think about going to the game. 
So I was going to hit up the 

71
00:04:22,360 --> 00:04:26,120
Detroit, San Francisco game. 
But I started doing math on like

72
00:04:26,440 --> 00:04:30,760
re booking a flight, a hotel 
room, $1500 for the ticket to 

73
00:04:30,800 --> 00:04:33,200
actually go. 
And I'm like, can't justify 

74
00:04:33,200 --> 00:04:37,600
this, but it was fun. 
Like I got to the trip back 

75
00:04:37,600 --> 00:04:40,920
from, so I flew from San 
Francisco to Houston. 

76
00:04:40,920 --> 00:04:44,200
And the the flight back from 
Houston, there's a big group of 

77
00:04:44,200 --> 00:04:46,880
us Lions fans. 
So we're all cheering together. 

78
00:04:46,880 --> 00:04:50,080
And then we promptly lost Wi-Fi 
so we couldn't watch the end of 

79
00:04:50,080 --> 00:04:52,160
the game, which was the worst 
part. 

80
00:04:52,920 --> 00:04:54,840
Maybe that's a good thing. 
It was. 

81
00:04:54,840 --> 00:04:56,960
It was good. 
That's so funny. 

82
00:04:56,960 --> 00:05:03,240
I saw so many like the day after
that game, which I think 49ers, 

83
00:05:03,880 --> 00:05:06,400
I think half the nation wanted 
more than half the nation wanted

84
00:05:06,400 --> 00:05:08,600
Lions win. 
It's probably like 7030. 

85
00:05:09,120 --> 00:05:11,480
And so there's all these videos 
of like people watching them, 

86
00:05:11,480 --> 00:05:13,080
like Lions fans watching the 
game. 

87
00:05:13,080 --> 00:05:14,680
And they were so happy during 
the the first half. 

88
00:05:14,680 --> 00:05:16,720
And then the second-half, it 
didn't work out. 

89
00:05:16,720 --> 00:05:18,960
And there was also a couple I 
saw where people were on an 

90
00:05:18,960 --> 00:05:22,960
airplane and just like you. 
But yeah, there was like 

91
00:05:22,960 --> 00:05:25,560
cheering on the plane. 
And then the second-half, yeah, 

92
00:05:25,760 --> 00:05:28,240
I feel bad for the Lions fans 
'cause now that's how I feel 

93
00:05:28,720 --> 00:05:31,720
now, losing us. 
So I guess what comes around 

94
00:05:31,720 --> 00:05:33,640
goes around. 
Yeah, yours was definitely a lot

95
00:05:33,640 --> 00:05:34,840
closer in the end. 
There it was. 

96
00:05:34,840 --> 00:05:36,280
It was a little more 
heartbreaking. 

97
00:05:37,160 --> 00:05:40,640
I was cheering for the 49ers. 
I wanted to see, was it Mr. 

98
00:05:40,640 --> 00:05:45,600
Irrelevant Rock Purdy make his 
way out of the stage, but Oh 

99
00:05:45,600 --> 00:05:47,240
well. 
He's got a lot of years left, 

100
00:05:47,240 --> 00:05:47,920
hopefully. 
He can, yeah. 

101
00:05:48,080 --> 00:05:50,280
He's a young guy, so. 
I'll figure it out. 

102
00:05:50,280 --> 00:05:52,400
Somebody's got to beat Mahomes 
one of these days. 

103
00:05:55,000 --> 00:05:59,520
From an AWS perspective, Gen. 
two came out. 

104
00:05:59,640 --> 00:06:03,240
I know you guys pinged me on it 
a while back when it was kind of

105
00:06:03,240 --> 00:06:07,400
in early alpha stage. 
So where are we at with Gen. 2 

106
00:06:07,400 --> 00:06:10,080
these days? 
Is it officially released? 

107
00:06:11,240 --> 00:06:16,400
Yeah. 
So Gen. 2 is our is still in 

108
00:06:16,400 --> 00:06:19,440
preview right now. 
So we're hoping to release it 

109
00:06:20,560 --> 00:06:23,440
soon, probably in the next 
quarter or two. 

110
00:06:24,280 --> 00:06:30,120
And the way we Amplify Gen. 2 is
kind of a rethinking of the way 

111
00:06:30,120 --> 00:06:34,720
we handle our creating apps 
using Amplify. 

112
00:06:34,720 --> 00:06:37,880
So if you've used Amplify in the
past, you've probably used 

113
00:06:37,960 --> 00:06:42,240
either our command line 
interface or CLI tool, or you've

114
00:06:42,240 --> 00:06:43,600
probably used something called 
Studio. 

115
00:06:43,600 --> 00:06:47,920
And I think me and a couple 
people were on the podcast, 

116
00:06:47,920 --> 00:06:52,440
Heather, a few months ago, maybe
like, gosh, maybe been a year 

117
00:06:52,440 --> 00:06:56,280
ago right now where we really 
deep, yeah, we deep dive into 

118
00:06:56,280 --> 00:06:59,760
studio, we deep dive into our UI
components framework, which we 

119
00:06:59,840 --> 00:07:02,080
we still have, by the way. 
We're still, we have all these 

120
00:07:02,080 --> 00:07:04,200
products and you can still use 
them today. 

121
00:07:04,200 --> 00:07:08,320
We're still supported. 
But we thought we've heard over 

122
00:07:08,320 --> 00:07:11,680
and over again that people just 
really like these infrastructure

123
00:07:11,680 --> 00:07:17,400
as code tools. 
They like CDK, they like other 

124
00:07:17,560 --> 00:07:20,640
cloud, they like some people 
like cloud formation, some 

125
00:07:20,640 --> 00:07:24,280
people don't like people like 
Terraform SST, like people like 

126
00:07:24,280 --> 00:07:27,960
kind of deep diving in the code.
And if you create the right 

127
00:07:28,360 --> 00:07:32,360
abstracts for it, then it makes 
a a really great experience. 

128
00:07:32,360 --> 00:07:36,360
So we rethought of like how can 
we take what we do best? 

129
00:07:36,880 --> 00:07:40,480
And you can see here from the 
screenshot and how can we create

130
00:07:40,960 --> 00:07:43,600
a really great user experience 
to create the back end. 

131
00:07:43,600 --> 00:07:46,680
But also at the same time, we 
wanted to integrate it really 

132
00:07:46,680 --> 00:07:50,400
well in with our app sync 
service, our managed graph QL 

133
00:07:50,400 --> 00:07:51,800
service. 
So then we came up with this 

134
00:07:51,800 --> 00:07:56,080
idea of of this kind of dot 
notation, this TypeScript first 

135
00:07:56,080 --> 00:08:00,840
approach and this code first 
approach, which makes it much 

136
00:08:00,840 --> 00:08:03,800
more straightforward to create 
these apps and then connect to 

137
00:08:03,800 --> 00:08:07,840
databases, things like that. 
I definitely love it from a a 

138
00:08:07,840 --> 00:08:11,520
standpoint, a lot of what you 
know, we're not all of it, but 

139
00:08:11,720 --> 00:08:14,920
many of the tooling that we used
in the past was always kind of 

140
00:08:16,040 --> 00:08:21,760
more on the server or not server
generated code, just kind of 

141
00:08:21,920 --> 00:08:25,840
being in the code itself and 
less on the the UI side. 

142
00:08:25,840 --> 00:08:28,360
I thought it was cool once we 
kind of got into the studio and 

143
00:08:28,360 --> 00:08:32,559
things like that, but I still 
know massive projects that are 

144
00:08:32,559 --> 00:08:34,559
running today and it's, it's all
code based. 

145
00:08:34,559 --> 00:08:39,720
So it was kind of cool to see 
this jump over to, to Gen. 2 and

146
00:08:39,760 --> 00:08:41,760
where it's headed to. 
I I really love it. 

147
00:08:42,440 --> 00:08:45,600
Yeah, we, we looked at and you 
like I said, Studio's still 

148
00:08:45,760 --> 00:08:48,960
going strong and and we're still
adding to it. 

149
00:08:49,360 --> 00:08:51,960
But if if you look at some of 
the features people really liked

150
00:08:51,960 --> 00:08:54,280
about Studio, which is our kind 
of drag and drop interface, 

151
00:08:54,280 --> 00:08:58,280
people really like the Figma 
plug in so that that is now 

152
00:08:58,280 --> 00:09:04,160
available as like a command line
tool that you can use to 

153
00:09:04,160 --> 00:09:09,280
generate your forms to grab 
Figma files and convert them 

154
00:09:09,280 --> 00:09:12,680
over to React code. 
So a lot of those things are 

155
00:09:12,680 --> 00:09:16,560
still there. 
They're just now just there's 

156
00:09:16,600 --> 00:09:18,600
different ways to do it. 
You don't have to log into the 

157
00:09:18,600 --> 00:09:21,960
Studio console to to get there. 
Yeah. 

158
00:09:21,960 --> 00:09:23,960
So that's like right there. 
You're showing like it's kind of

159
00:09:23,960 --> 00:09:28,400
one of our more popular ones. 
People really like the idea of 

160
00:09:28,720 --> 00:09:33,520
of creating a schema for your 
your back end database, like 

161
00:09:33,520 --> 00:09:35,720
having in like that case, 
there's like an address price 

162
00:09:35,720 --> 00:09:38,160
list and then having that just 
converted over into a form. 

163
00:09:38,720 --> 00:09:40,360
And so we brought all those 
over. 

164
00:09:40,360 --> 00:09:44,880
There's now command line tools 
that you can do to generate 

165
00:09:44,880 --> 00:09:47,000
those forms. 
And then it still uses the tried

166
00:09:47,000 --> 00:09:50,320
and true UI React library that 
we created. 

167
00:09:50,320 --> 00:09:53,480
And we're still actually even 
adding in more components to 

168
00:09:53,480 --> 00:09:56,920
that. 
That's amazing that you guys are

169
00:09:56,920 --> 00:09:58,840
able to continue building this 
out too. 

170
00:09:59,920 --> 00:10:02,640
Yes, yes, looks like. 
Hi, Chat. 

171
00:10:02,840 --> 00:10:06,080
Hi, Abjit. 
Hi, Best Jerry. 

172
00:10:07,080 --> 00:10:08,360
Yeah. 
And if anybody has questions, 

173
00:10:08,360 --> 00:10:10,800
yeah, feel free to. 
Yeah, throw them, throw them in 

174
00:10:10,800 --> 00:10:12,560
the chat. 
We'll get to them as we go. 

175
00:10:14,560 --> 00:10:18,280
So I think with all of that 
said, what we're here to talk 

176
00:10:18,280 --> 00:10:23,040
about today is this fun part. 
This is probably the best page 

177
00:10:23,040 --> 00:10:26,640
to start with. 
So it's, these are the new docs,

178
00:10:27,160 --> 00:10:32,880
newish docs for Amplify AWS. 
And what we're looking to do is 

179
00:10:32,880 --> 00:10:35,600
this piece right here for Gen. 
2. 

180
00:10:36,720 --> 00:10:39,200
And we're gonna, we're gonna 
kind of deep dive. 

181
00:10:39,200 --> 00:10:43,600
I, I hope we can work on the, 
the one I want to work on. 

182
00:10:43,600 --> 00:10:46,680
We'll see if Eric agrees. 
But I'm looking looking forward 

183
00:10:46,680 --> 00:10:49,840
to either like the next JS app 
robber, server components or 

184
00:10:49,840 --> 00:10:52,880
client components if you're if 
your games are creating 

185
00:10:52,880 --> 00:10:54,360
something. 
Yeah, let's do it. 

186
00:10:54,400 --> 00:10:56,600
Yeah, I'd love to. 
Sweet. 

187
00:10:57,400 --> 00:11:02,040
I might have to let me share my 
screen and we can get started. 

188
00:11:02,040 --> 00:11:05,400
Let me open up my We can just 
start for Zachly from scratch 

189
00:11:05,400 --> 00:11:08,160
and then go form it and. 
Perfect. 

190
00:11:08,160 --> 00:11:10,240
And we'll do. 
Do you want to just coach me 

191
00:11:10,240 --> 00:11:13,280
through it like someone who 
doesn't know anything? 

192
00:11:13,280 --> 00:11:19,760
You want to go that route. 
I I was just gonna maybe I can 

193
00:11:19,760 --> 00:11:22,440
show it, but. 
I I'm totally game I I love a 

194
00:11:22,440 --> 00:11:23,800
day off. 
That sounds great. 

195
00:11:25,320 --> 00:11:28,840
Like I said, I haven't been 
feeling my best anyway, So what 

196
00:11:28,840 --> 00:11:32,040
up? 
What up Focus Adder I? 

197
00:11:32,040 --> 00:11:34,440
Like the? 
Name Focus Adder. 

198
00:11:34,960 --> 00:11:42,800
That is our Mike Holiendo. 
He is our App Sync expert DA and

199
00:11:43,320 --> 00:11:44,880
always a pleasure to talk to 
him. 

200
00:11:44,880 --> 00:11:46,600
It's good to have him in the 
chat. 

201
00:11:48,720 --> 00:11:53,160
It's always fun relating screen 
names back to to users, people 

202
00:11:53,160 --> 00:11:55,280
to people. 
Messes me up all the time. 

203
00:11:56,440 --> 00:11:58,040
All right, let me see here 
again. 

204
00:11:58,040 --> 00:11:59,680
It's gonna take me a second. 
Yeah. 

205
00:12:03,160 --> 00:12:07,960
Well, Eric's clicking around 
over there just to to show folks

206
00:12:08,720 --> 00:12:12,040
on the dock side of things. 
So you can still there. 

207
00:12:12,040 --> 00:12:15,240
There are these kind of like 
newer docks and you can flip 

208
00:12:15,240 --> 00:12:17,080
between like frameworks and 
things too. 

209
00:12:17,600 --> 00:12:20,080
So just keep that in mind. 
Like if you want to follow along

210
00:12:20,080 --> 00:12:22,680
but you're like, I'm not ready 
for Gen. 2, you can always pop 

211
00:12:22,680 --> 00:12:25,320
into next GS and just go version
six. 

212
00:12:25,760 --> 00:12:28,320
You can do the whole like 
getting started and stuff like 

213
00:12:28,320 --> 00:12:31,560
that. 
Typically what you're going to 

214
00:12:31,560 --> 00:12:37,560
see after that if I actually 
open up the console, not 

215
00:12:37,560 --> 00:12:45,800
Firebase, sorry folks, sorry. 
They're both console, so once 

216
00:12:45,800 --> 00:12:49,480
you kind of get in here you can 
start to create different apps 

217
00:12:49,480 --> 00:12:54,320
too within this so. 
Yeah, it's, it's pretty powerful

218
00:12:54,320 --> 00:12:56,200
there. 
And also, yeah, we redid our 

219
00:12:56,200 --> 00:13:02,640
whole Gen. 2 site. 
So we, we did pretty much a a 

220
00:13:02,640 --> 00:13:07,480
fresh coat of paint on our whole
dock site because we heard it 

221
00:13:07,640 --> 00:13:10,480
was time for it. 
So we're really, we're really 

222
00:13:10,480 --> 00:13:12,000
glad. 
I think it looks much more 

223
00:13:12,000 --> 00:13:13,800
nicer, cleaner, easier to 
navigate. 

224
00:13:13,800 --> 00:13:17,320
We did a whole infrastructure 
clean up on it. 

225
00:13:17,800 --> 00:13:19,040
Couldn't agree more. 
It's great. 

226
00:13:19,040 --> 00:13:22,240
Now, I know you're going to hate
this. 

227
00:13:22,240 --> 00:13:25,760
You're probably going to have to
bump up at least one, maybe two.

228
00:13:26,360 --> 00:13:29,320
It gets a little light. 
OK, yes. 

229
00:13:29,320 --> 00:13:31,960
That's good, I think. 
Let us let us know if you can't 

230
00:13:31,960 --> 00:13:34,480
see anything, folks. 
Yeah, so here's my sample 

231
00:13:34,480 --> 00:13:36,360
folder. 
I have just a bunch of sample 

232
00:13:36,600 --> 00:13:39,920
apps in here, but let's let's 
just start from scratch. 

233
00:13:40,040 --> 00:13:44,840
Let's create a next app. 
So I'm going to do NPX, create 

234
00:13:44,920 --> 00:13:52,160
next app at latest, and then 
we'll put some, we'll call it 

235
00:13:52,360 --> 00:13:57,000
Code Cat live. 
We're going to use TypeScript, 

236
00:13:57,000 --> 00:13:59,400
yeslint. 
I love tailwinds, so we'll leave

237
00:13:59,400 --> 00:14:02,160
that on. 
So last time I was here, we 

238
00:14:02,160 --> 00:14:08,440
showed everything using, using 
our UI components library, our 

239
00:14:08,440 --> 00:14:11,200
UI React library. 
I think today we'll just use 

240
00:14:11,200 --> 00:14:14,240
Tailwind just to kind of speed 
things up a little bit, but 

241
00:14:14,240 --> 00:14:18,400
certainly you can do most lot. 
We have a lot of really nice UI 

242
00:14:18,400 --> 00:14:20,520
components in as well. 
And we'll also use 

243
00:14:21,160 --> 00:14:27,600
Authenticator. 
This is a interesting question I

244
00:14:27,600 --> 00:14:31,360
think it's OK to answer. 
Trying to build a surveillance 

245
00:14:31,360 --> 00:14:33,920
app for something like a 
whistleblower within my state. 

246
00:14:33,920 --> 00:14:35,600
Is that something I can do with 
Gen. 2? 

247
00:14:36,840 --> 00:14:40,800
You can do well, 11 nice thing 
I'll show in a in a second is 

248
00:14:40,800 --> 00:14:47,640
that you can do all sorts of if 
you need to get to to drop down 

249
00:14:47,920 --> 00:14:51,640
from our Gen. 2, you can drop 
down to CD the CDK layer level 

250
00:14:51,640 --> 00:14:54,440
layer and you can create all the
services that you need. 

251
00:14:54,800 --> 00:14:58,480
So if you have some particular 
use case, I'm not sure what you 

252
00:14:58,480 --> 00:15:00,640
need for surveillance, you can 
then maybe use some A to B 

253
00:15:00,640 --> 00:15:03,240
services for that. 
So I would say that set that 

254
00:15:03,240 --> 00:15:05,560
could happen. 
Things like protecting your app 

255
00:15:05,560 --> 00:15:09,040
with off and everything are are 
already there. 

256
00:15:10,080 --> 00:15:13,280
Yeah, I'll put a link in. 
I just did a little update. 

257
00:15:13,360 --> 00:15:18,080
So we have this new thing called
community dot AWS out there. 

258
00:15:18,120 --> 00:15:21,560
So that's part of I think 
community builders and other 

259
00:15:21,560 --> 00:15:23,680
folks can write content on 
there. 

260
00:15:24,080 --> 00:15:31,360
I'll drop the the link in, but I
just did ACW or CWK compare CDK 

261
00:15:31,360 --> 00:15:34,320
comparison. 
There we go to amplify and kind 

262
00:15:34,320 --> 00:15:37,320
of when to use which and both 
and all those fun things. 

263
00:15:37,320 --> 00:15:39,640
So definitely jump in and check 
that out too. 

264
00:15:41,560 --> 00:15:42,960
Nice. 
That's awesome. 

265
00:15:43,000 --> 00:15:46,560
All right, so I'm gonna install 
a couple of libraries or UI Rack

266
00:15:46,560 --> 00:15:51,200
library and AW, Amplify library,
and there's one more. 

267
00:15:51,200 --> 00:15:56,280
Let me check while that's 
installing. 

268
00:15:57,040 --> 00:16:00,640
Yeah, that's a great point, 
folks, Otter, when when the 

269
00:16:00,640 --> 00:16:05,240
original Amplify came about, 
there's kind of like this black 

270
00:16:05,240 --> 00:16:08,360
magic that was occurring and and
no one actually understood what 

271
00:16:08,360 --> 00:16:10,880
was going on. 
And then it kind of opened up 

272
00:16:10,880 --> 00:16:13,280
further and you're able to 
extend a lot of things. 

273
00:16:13,280 --> 00:16:18,240
So great point if if AWS can do 
it, pretty much Amplify can do 

274
00:16:18,240 --> 00:16:18,760
it. 
So. 

275
00:16:20,000 --> 00:16:24,320
I'm also going to install one 
more uninstall adapter Next JS. 

276
00:16:26,440 --> 00:16:31,160
And this is this is specific 
adapter we created exactly for a

277
00:16:31,160 --> 00:16:34,560
Next JS if we're using server 
components and server rendering.

278
00:16:36,360 --> 00:16:40,840
So let's just well, before we, 
well, we'll start the server and

279
00:16:40,840 --> 00:16:42,840
before we get too far, I don't 
know. 

280
00:16:43,200 --> 00:16:46,920
Actually, before we do that, let
me reopen this in the same 

281
00:16:47,040 --> 00:16:52,160
folder. 
Dash R We were just talking 

282
00:16:52,160 --> 00:16:53,520
about this. 
I can. 

283
00:16:53,520 --> 00:16:55,200
Never remember the dash. 
What it? 

284
00:16:55,200 --> 00:17:01,560
Which one opens in the same? 
Man I I forget to sometimes so 

285
00:17:01,560 --> 00:17:04,560
it's glad. 
Britney's always like you're you

286
00:17:04,560 --> 00:17:11,920
need Dash R I'm like, oh, sorry.
And we'll just close some of 

287
00:17:11,920 --> 00:17:20,640
these things, OK? 
All right, so now we're in our 

288
00:17:20,640 --> 00:17:24,160
app and we can search files. 
Let's go. 

289
00:17:24,160 --> 00:17:27,640
So here, here's our main like 
Hello World app that comes 

290
00:17:27,640 --> 00:17:30,400
out-of-the-box with Next. 
So I don't know about you. 

291
00:17:30,400 --> 00:17:42,320
I always like just deleting all 
this and then we'll just do 

292
00:17:42,400 --> 00:17:49,040
Hello World and then I'll just 
delete some CSS as well. 

293
00:17:52,720 --> 00:17:54,040
I think that's the only one I 
want. 

294
00:17:55,480 --> 00:18:08,120
OK, and now we'll just NPM run 
devit and then let's see, I'll 

295
00:18:08,120 --> 00:18:12,520
bring it over to the other side.
You still see everything. 

296
00:18:12,800 --> 00:18:20,040
Yep, sure do. 
It's compiling. 

297
00:18:24,960 --> 00:18:27,520
It's all like you're using 
Tailwind, but you don't have any

298
00:18:27,520 --> 00:18:30,360
Tailwind utility classes. 
What are you doing? 

299
00:18:30,360 --> 00:18:35,920
That's what I just told us. 
All right, so here is very ugly,

300
00:18:37,360 --> 00:18:45,600
but very simple. 
Hello world and we'll we'll bump

301
00:18:45,600 --> 00:18:50,760
that font up in a second, but 
let's say we want to do flex 

302
00:18:51,840 --> 00:18:58,640
flex column items center. 
And then for this H1 we'll do to

303
00:18:58,640 --> 00:19:07,440
class name text. 
I don't know, three XL also add 

304
00:19:07,920 --> 00:19:12,880
heading 4. 
OK, so we got a hello world 

305
00:19:12,880 --> 00:19:15,440
here. 
So I think what we should do 

306
00:19:15,440 --> 00:19:22,440
before we jump directly into 
into setting up Gen. 2, I figure

307
00:19:22,440 --> 00:19:26,040
we want to protect this whole 
app by our authenticator. 

308
00:19:27,160 --> 00:19:28,000
Well, you know what? 
What? 

309
00:19:28,080 --> 00:19:30,920
I'll do two things. 
First, let's get the since it 

310
00:19:30,920 --> 00:19:34,600
takes a few minutes to provision
and create all the resources, 

311
00:19:35,200 --> 00:19:41,720
let's do that first, and then 
we'll jump into adding the 

312
00:19:41,760 --> 00:19:43,000
authenticator. 
How's that sound? 

313
00:19:45,200 --> 00:19:48,520
Sorry, that sounds great. 
I I'm kind of thinking, should 

314
00:19:48,520 --> 00:19:52,120
we tell people that haven't used
amplify at all, maybe what's 

315
00:19:52,120 --> 00:19:54,800
about to occur or maybe while 
it's occur? 

316
00:19:55,680 --> 00:19:59,720
Yeah, yeah, let's sure, sure, 
one second here. 

317
00:20:01,520 --> 00:20:06,640
So what I'm thinking is, so we 
have this next app, it's just a 

318
00:20:06,640 --> 00:20:08,960
basic Hello world next app using
Tailwind. 

319
00:20:09,680 --> 00:20:14,160
And the next steps here would be
to connect it to a back end. 

320
00:20:14,160 --> 00:20:19,800
So what I'm thinking is, let's 
say we create a kind of like a 

321
00:20:19,800 --> 00:20:22,280
meal planning prep app. 
So we're gonna try to see how 

322
00:20:22,280 --> 00:20:25,800
far we can get on that. 
So we're gonna have like, I'm 

323
00:20:25,800 --> 00:20:28,160
thinking like three boxes here 
on the screen. 

324
00:20:28,160 --> 00:20:33,200
One will say breakfast, one will
have lunch, one will have 

325
00:20:33,200 --> 00:20:35,320
dinner. 
And then you should be able to 

326
00:20:35,320 --> 00:20:41,400
put in a list of food that you 
like and calories and it'll be 

327
00:20:41,400 --> 00:20:46,120
tied into the date for that. 
And then you can save it and 

328
00:20:46,120 --> 00:20:49,160
then you can also delete it. 
So I think. 

329
00:20:49,240 --> 00:20:50,320
You're making me hungry, by the 
way. 

330
00:20:50,360 --> 00:20:53,720
But yeah, it's hungry. 
So maybe it's a, excuse me, 

331
00:20:53,720 --> 00:20:58,680
maybe it's like a way to to save
some data to the back end, kind 

332
00:20:58,680 --> 00:21:02,000
of like a CRUD type app. 
But it, I think it'll just show 

333
00:21:02,000 --> 00:21:04,760
how straightforward is to get 
started with Gen. 2. 

334
00:21:04,760 --> 00:21:07,040
And then on top of that, we want
to, we want to make sure that 

335
00:21:07,040 --> 00:21:13,720
only logged in authenticated 
users are able to connect and 

336
00:21:13,720 --> 00:21:17,680
make these changes and add 
these, these these values for 

337
00:21:17,680 --> 00:21:20,760
their own user. 
So that's kind of the goal of 

338
00:21:20,760 --> 00:21:22,680
today. 
Nice, love it. 

339
00:21:23,280 --> 00:21:28,600
All right, So we we're open up 
another terminal and what we can

340
00:21:28,600 --> 00:21:33,400
do is if we it's in the docs 
here, so we can mirror what it 

341
00:21:33,400 --> 00:21:35,440
says in in the docs. 
But if you go to docs dot 

342
00:21:35,440 --> 00:21:40,880
amplified dot AWS and you click 
on the get started and you get 

343
00:21:40,880 --> 00:21:44,520
started here, you can do this 
one right here. 

344
00:21:44,520 --> 00:21:46,920
You're kind of saying you, you 
want to take a look at this next

345
00:21:46,920 --> 00:21:49,960
just app server components and 
it gives you the instructions. 

346
00:21:50,280 --> 00:21:53,120
So the first thing it tells us 
right here is to after you 

347
00:21:53,120 --> 00:21:56,880
create the app is to run this 
NPM create amplify at latest. 

348
00:21:57,240 --> 00:22:03,360
Also, by the way, I'm think I'm 
using Node 20, so make sure. 

349
00:22:03,440 --> 00:22:05,480
Well, it looks like I'm using 
18.17. 

350
00:22:05,480 --> 00:22:09,000
I think that's fine, but you 
need to have like at least 18 or

351
00:22:09,000 --> 00:22:11,080
20 to do this. 
Otherwise you might get an 

352
00:22:11,080 --> 00:22:13,720
error. 
So I'm gonna just copy and paste

353
00:22:13,720 --> 00:22:18,000
this here. 
And I just paste this in the 

354
00:22:18,000 --> 00:22:19,920
main and it's gonna ask me a few
questions. 

355
00:22:19,920 --> 00:22:26,160
I'm gonna create a project on 
the route and this is just going

356
00:22:26,160 --> 00:22:33,120
to scaffold some things out. 
So if we look at here, we have 

357
00:22:33,120 --> 00:22:35,600
our public, our source folder, 
and it's going to create a new 

358
00:22:35,600 --> 00:22:37,400
Amplify folder when it's done 
here. 

359
00:22:37,400 --> 00:22:47,640
So it's just going to install 
some required dependencies while

360
00:22:47,640 --> 00:22:50,720
this is going. 
Do we have any other questions? 

361
00:22:51,560 --> 00:22:54,400
I think we just got the the dash
R thing which we covered. 

362
00:22:54,400 --> 00:22:57,920
SO-R opens VS Code in the same 
window, so you don't have to 

363
00:22:57,920 --> 00:23:01,960
like open a whole another one. 
I didn't actually see you use 

364
00:23:01,960 --> 00:23:04,600
any vim things, but there's 
something about vim key 

365
00:23:04,600 --> 00:23:07,680
bindings, so. 
Oh yeah, I I love Vim. 

366
00:23:07,680 --> 00:23:12,880
I'm a big Vim fan, so I use. 
It my my lead, Dan Moore at 

367
00:23:13,000 --> 00:23:16,480
Fusion Auth, huge vim guy, like 
to the point where I'm like, 

368
00:23:16,480 --> 00:23:18,600
it's easier and then he's like, 
no, it's not it's. 

369
00:23:18,920 --> 00:23:22,120
Like. 
OK, I feel like I have to open 

370
00:23:22,120 --> 00:23:25,840
the VS Code for everything. 
All right, so it looks like it 

371
00:23:25,840 --> 00:23:28,720
it created it. 
So I believe, and you can 

372
00:23:28,720 --> 00:23:31,280
correct me of this at this 
point, you actually created a 

373
00:23:31,280 --> 00:23:34,600
project up in the cloud on AWS 
as well, right? 

374
00:23:34,680 --> 00:23:36,840
Not yet. 
We're not quite there yet. 

375
00:23:37,000 --> 00:23:42,480
So we have this new amplify 
folder here and inside here we 

376
00:23:42,480 --> 00:23:46,320
have this off and data. 
And so let's take a look at him.

377
00:23:46,320 --> 00:23:49,480
So if you look at off here, so 
it's scaffold all this out. 

378
00:23:49,480 --> 00:23:54,880
And what this is saying is this 
is a kind of out-of-the-box 

379
00:23:55,440 --> 00:24:01,080
Cognito which is our identity 
provider for AWS service and you

380
00:24:01,080 --> 00:24:03,120
can make some changes to it but 
I'm probably going to leave it 

381
00:24:03,120 --> 00:24:05,560
as default. 
It says users are going to login

382
00:24:05,560 --> 00:24:09,360
through e-mail. 
If I want to I can add in like 

383
00:24:09,360 --> 00:24:13,440
Federated logins like login with
Amazon or Google. 

384
00:24:14,800 --> 00:24:18,080
If I needed to. 
I can also add in multi factor 

385
00:24:18,080 --> 00:24:21,520
authentication. 
I can add user attributes. 

386
00:24:22,080 --> 00:24:26,600
So this is going to scaffold out
and create a brand new Cognito 

387
00:24:26,600 --> 00:24:31,400
back end for us, with some very 
sane defaults that we can use. 

388
00:24:32,280 --> 00:24:35,160
This, this is reminding me I 
have an e-mail out to Renee. 

389
00:24:35,160 --> 00:24:38,200
I haven't heard back. 
So if you if you see him poking 

390
00:24:38,200 --> 00:24:41,200
around, send him over my way 
'cause we're supposed to chat 

391
00:24:41,200 --> 00:24:43,960
about Auth 0, fusion auth kind 
of stuff. 

392
00:24:44,480 --> 00:24:45,440
Oh nice. 
Yes. 

393
00:24:45,520 --> 00:24:48,360
And we are working with Auth 
Zero. 

394
00:24:48,360 --> 00:24:51,680
You can add external providers 
like for example a use case and 

395
00:24:51,680 --> 00:24:54,000
Michael Lindo probably know 
something about this like you 

396
00:24:54,000 --> 00:24:57,360
can use graph or manage app sync
service, but then have an an 

397
00:24:57,840 --> 00:25:01,160
external authorization provider 
through Okta or Auth 0. 

398
00:25:02,040 --> 00:25:04,840
So you can do things like that. 
So we we do work with those 

399
00:25:04,840 --> 00:25:07,440
other providers. 
I'm just gonna leave it all 

400
00:25:07,440 --> 00:25:09,880
default for now. 
And then in the resource, this 

401
00:25:09,880 --> 00:25:14,440
is the resource one. 
And this is where we create our 

402
00:25:14,440 --> 00:25:18,320
schema and we give a bunch of 
steps to for people who've never

403
00:25:18,320 --> 00:25:20,640
used it before or you can look 
through the documentation. 

404
00:25:21,120 --> 00:25:25,760
So you can think of this as 
creating this like like a 

405
00:25:25,760 --> 00:25:28,640
database. 
But really we're creating app 

406
00:25:28,640 --> 00:25:32,800
sync or Graph QL service. 
And when we use this dot model, 

407
00:25:33,480 --> 00:25:39,320
it is creating not just this 
model, but it's creating all the

408
00:25:39,760 --> 00:25:41,800
resolvers. 
So usually in Graph QL you have 

409
00:25:41,800 --> 00:25:45,360
to have create these resolvers 
that connect to your database to

410
00:25:45,360 --> 00:25:46,680
like the queries you're putting 
in. 

411
00:25:46,680 --> 00:25:47,960
And this does everything for 
you. 

412
00:25:47,960 --> 00:25:51,960
So with these few lines, it 
creates the create, read, update

413
00:25:51,960 --> 00:25:58,240
and delete in this case like 
list get all those ones create, 

414
00:25:58,240 --> 00:26:01,400
delete for you and just with a 
few lines of code. 

415
00:26:01,440 --> 00:26:05,400
So and it also has this dot 
notation so you can add in 

416
00:26:05,720 --> 00:26:08,360
validation rules. 
So maybe this content has to be 

417
00:26:08,360 --> 00:26:11,840
a string and if you try to push 
up a number into this content, 

418
00:26:11,840 --> 00:26:13,800
it's not going to work. 
You can also make it required. 

419
00:26:13,800 --> 00:26:17,400
So when you're doing a create, 
you have to have this available.

420
00:26:17,720 --> 00:26:21,560
And we have all the all these 
other types too, like enums, 

421
00:26:22,040 --> 00:26:24,080
dates, things like that and I'll
show you. 

422
00:26:24,440 --> 00:26:27,720
Is there a choice to go API 
Gateway anymore or is that kind 

423
00:26:27,720 --> 00:26:31,960
of fall into the wayside? 
So if you want the API gateway 

424
00:26:31,960 --> 00:26:35,680
now, then which? 
Which to your point, like a 

425
00:26:35,680 --> 00:26:40,880
Restful service, you can drop 
down to the CDK layer and then 

426
00:26:40,880 --> 00:26:44,360
create that manually. 
So you can still create a REST 

427
00:26:44,360 --> 00:26:48,800
service if you want. 
You can also drop down to create

428
00:26:48,800 --> 00:26:51,000
functions. 
So we're in developer preview 

429
00:26:51,000 --> 00:26:52,880
right now. 
We really focused on two use 

430
00:26:52,880 --> 00:26:57,120
cases, that is auth, 
authentication and data. 

431
00:26:57,760 --> 00:27:02,080
However, we're adding in like 
storage and functions, which are

432
00:27:02,080 --> 00:27:05,160
going to be like these other 
high level kind of constructs. 

433
00:27:05,160 --> 00:27:07,360
You can add them now with CDK, 
but it's a little bit more of 

434
00:27:07,360 --> 00:27:08,480
work. 
Makes sense? 

435
00:27:08,960 --> 00:27:12,560
And then we're also looking at 
adding in like that Restful API 

436
00:27:12,560 --> 00:27:15,440
if you weren't, if you didn't 
want to use Graph QL. 

437
00:27:16,400 --> 00:27:21,320
Nice. 
And and so this also had these 

438
00:27:21,320 --> 00:27:24,480
authorization rules too. 
So like in this this case, this 

439
00:27:24,480 --> 00:27:28,000
is only the owner of it. 
Whoever creates it can update, 

440
00:27:28,160 --> 00:27:29,320
create, read and update and 
delete. 

441
00:27:29,320 --> 00:27:33,560
But public users can read. 
And then we can also set 

442
00:27:33,760 --> 00:27:36,880
authorization modes like we can 
default it to API key if we 

443
00:27:36,880 --> 00:27:40,160
wanted to. 
And then in this one file, the 

444
00:27:40,160 --> 00:27:45,280
back end file, this is where we 
define the back end. 

445
00:27:45,280 --> 00:27:47,280
So we take those two files, we 
put it in here. 

446
00:27:47,280 --> 00:27:50,880
And this is also where you can 
do additional things to get down

447
00:27:50,880 --> 00:27:53,280
to the CDK layer, but we 
probably won't do that in this 

448
00:27:53,280 --> 00:27:57,240
video today. 
All right, so I think what the 

449
00:27:57,240 --> 00:28:01,680
next step is, let's create a 
schema for our new meal prep 

450
00:28:01,680 --> 00:28:07,080
app. 
And I think we need a few things

451
00:28:07,080 --> 00:28:08,720
here. 
So first, I'm not going to call 

452
00:28:08,720 --> 00:28:10,760
it to do, but I'm going to call 
it meal. 

453
00:28:12,800 --> 00:28:15,120
And then first name, I'm going 
to have a meal name. 

454
00:28:16,160 --> 00:28:18,680
And then I'm going to use this A
and this is, by the way, 

455
00:28:18,680 --> 00:28:21,600
imported in from this a divis 
amplified back end. 

456
00:28:21,760 --> 00:28:24,360
And if you've used Zod, have you
used the Zod? 

457
00:28:26,560 --> 00:28:29,320
So this might seem kind of 
familiar with you kind of might 

458
00:28:29,520 --> 00:28:32,280
sounds a little bit familiar. 
But if you hit dot, I have all 

459
00:28:32,280 --> 00:28:36,240
these different types I can use 
and I'm going to use enum for 

460
00:28:36,240 --> 00:28:39,040
this one. 
And then I'm going to add in a 

461
00:28:39,040 --> 00:28:48,360
few in here, breakfast, lunch, 
dinner and let's say a snack. 

462
00:28:51,600 --> 00:28:54,160
So we'll assume that you know 
everyone, you have to choose 

463
00:28:54,160 --> 00:28:56,960
what what it is. 
We'll add in a food which is 

464
00:28:57,280 --> 00:29:01,240
just going to be a string or 
make it required. 

465
00:29:01,240 --> 00:29:04,120
And actually, I think I'm gonna 
make this required too. 

466
00:29:06,160 --> 00:29:09,120
Actually with an enum, I'm just 
gonna leave it like this. 

467
00:29:09,640 --> 00:29:11,800
But this, this string's gonna be
required something called food. 

468
00:29:11,800 --> 00:29:13,000
I'm gonna have something called 
calories. 

469
00:29:13,000 --> 00:29:15,440
And we wanna kinda every single 
meal, we wanna track how many 

470
00:29:15,440 --> 00:29:20,920
calories it is. 
And you see Amazon Q trying to 

471
00:29:20,920 --> 00:29:26,040
give me some suggestions here, 
which I don't need. 

472
00:29:26,800 --> 00:29:32,880
And then I'll have a date, so 8 
date, and then we'll make that 

473
00:29:32,880 --> 00:29:39,400
required as well. 
And for authorization, I'm just 

474
00:29:39,400 --> 00:29:41,480
gonna leave it the owner and 
read. 

475
00:29:41,800 --> 00:29:45,640
I'm gonna change this API key. 
Nice thing too. 

476
00:29:45,640 --> 00:29:47,840
This is all has intellisense 
behind it. 

477
00:29:47,960 --> 00:29:50,640
So I can just say, oh, here are 
the options I can choose. 

478
00:29:50,640 --> 00:29:54,640
I'm gonna make sure it's user 
pool expires in 30 days. 

479
00:29:54,640 --> 00:29:58,560
That's fine. 
I think that's it. 

480
00:29:58,560 --> 00:30:00,440
So I'm just going to keep this 
changed. 

481
00:30:00,440 --> 00:30:06,560
Now I have this new model and 
it's also has this this we just 

482
00:30:06,560 --> 00:30:08,920
saw this data for this or not 
this resource. 

483
00:30:08,920 --> 00:30:12,840
It's the off. 
So we also have this off here, 

484
00:30:14,200 --> 00:30:16,520
which I'm just going to leave 
default and now I want to deploy

485
00:30:16,520 --> 00:30:18,480
it. 
Now, if you don't have an AWS 

486
00:30:18,480 --> 00:30:23,720
account, there is instructions 
in this Amplified documentation 

487
00:30:23,720 --> 00:30:29,320
which it says right here, 
configure your aatabase account 

488
00:30:29,320 --> 00:30:32,480
to use Amplify. 
So if you use the AWSCLI or if 

489
00:30:32,480 --> 00:30:35,880
you've done this in the past, 
you may not need to use this 

490
00:30:35,880 --> 00:30:37,760
part, but this kind of tells you
what you need to do. 

491
00:30:37,760 --> 00:30:39,520
You have to run this configure 
command. 

492
00:30:40,440 --> 00:30:44,160
I've already done that and so I 
should be able to just do it. 

493
00:30:44,160 --> 00:30:48,120
Now I'm going to stop sharing my
screen for one SEC because I 

494
00:30:48,120 --> 00:30:51,400
need to run a command kind of 
locally for my environment. 

495
00:30:53,840 --> 00:31:02,000
So give me one SEC. 
I'm basically telling my since 

496
00:31:02,000 --> 00:31:05,560
we have a lot of AWS accounts, I
have to do these commands to say

497
00:31:05,560 --> 00:31:08,400
hey use this one. 
Yeah, it's always fun. 

498
00:31:13,040 --> 00:31:28,080
OK, let me show my screen again.
Present keep hitting slides. 

499
00:31:28,080 --> 00:31:30,200
That's not an entire screen 
show. 

500
00:31:30,240 --> 00:31:33,320
Some slides, I'll be all right. 
Cool. 

501
00:31:33,880 --> 00:31:36,080
All right, so I'm back here. 
So I'm going to run this command

502
00:31:36,560 --> 00:31:45,160
MPX Amplify sandbox. 
And what this does is it will it

503
00:31:45,160 --> 00:31:48,120
will start provisioning and 
creating the app. 

504
00:31:48,440 --> 00:31:51,320
What it does in the background, 
it uses cloud formation scripts 

505
00:31:52,040 --> 00:31:54,720
and it creates the cloud 
formation scripts and it's also 

506
00:31:54,840 --> 00:31:59,560
an ephemeral environment. 
So what I mean by that is this 

507
00:31:59,560 --> 00:32:02,600
is really meant to only be used 
for testing locally. 

508
00:32:03,240 --> 00:32:10,160
And it's, you can do this for 
any project that you want and it

509
00:32:10,160 --> 00:32:13,440
takes probably a few minutes to 
get it all up and running, but 

510
00:32:13,440 --> 00:32:17,080
it will go ahead to my AWS 
account and provision everything

511
00:32:17,080 --> 00:32:21,200
in the back end for it. 
Hopefully if we don't have to 

512
00:32:21,200 --> 00:32:22,720
see any errors. 
A lot of people say this red 

513
00:32:22,720 --> 00:32:24,960
text and they get worried. 
Don't worry, that's normal. 

514
00:32:24,960 --> 00:32:26,880
It's just saying that we're 
creating this for the first 

515
00:32:26,880 --> 00:32:31,880
time. 
All right, So it's now on its 

516
00:32:31,880 --> 00:32:34,080
merry way. 
It's going to start provisioning

517
00:32:34,080 --> 00:32:36,320
the back end. 
And what'll happen is it'll 

518
00:32:36,320 --> 00:32:40,840
create this new, well, it's 
going to create this new Amplify

519
00:32:40,840 --> 00:32:44,200
configuration file, which if 
you've used Amplify in the past,

520
00:32:44,200 --> 00:32:46,480
used to be called AWS exports. 
Now it's called Amplify 

521
00:32:46,480 --> 00:32:51,000
configuration, Jason, and we'll 
be able to import that in and 

522
00:32:51,000 --> 00:32:54,240
that'll have all the settings 
and URLs and everything that we 

523
00:32:54,240 --> 00:32:57,000
need, all the keys to be able to
talk to the back end. 

524
00:32:57,320 --> 00:32:59,640
So since this is going to take a
few minutes, I figure we should 

525
00:32:59,640 --> 00:33:02,160
like start building the front 
end a little bit. 

526
00:33:04,120 --> 00:33:07,280
Well, we get to the point where 
we talk about kind of the drift 

527
00:33:07,280 --> 00:33:09,680
and things like that, 'cause 
that's one of the features I 

528
00:33:09,680 --> 00:33:13,480
love now, if that makes sense. 
Now, what do you mean by? 

529
00:33:14,480 --> 00:33:18,240
So in the in the past, and maybe
this is just my experience, when

530
00:33:18,240 --> 00:33:21,480
when we push up a sandbox like 
that, other developers could 

531
00:33:21,480 --> 00:33:23,520
also work off our same code 
base. 

532
00:33:23,520 --> 00:33:26,160
So they would bring this in and 
they would have an amplify 

533
00:33:26,160 --> 00:33:28,880
environment within it. 
But in order to make like 

534
00:33:28,880 --> 00:33:33,360
database changes, you would have
to re push and make sure cloud 

535
00:33:33,360 --> 00:33:36,160
formation does its thing. 
And like the database gets set 

536
00:33:36,160 --> 00:33:39,120
and, and app sync gets set and 
like all those things finished 

537
00:33:39,120 --> 00:33:40,760
and they're all nice and happy 
together. 

538
00:33:41,280 --> 00:33:44,320
With Gen. 2, from what I've 
noticed so far is it actually 

539
00:33:44,320 --> 00:33:48,080
lets you just update like the 
modeling side of it and it 

540
00:33:48,080 --> 00:33:50,320
doesn't require some other 
pieces. 

541
00:33:50,320 --> 00:33:53,760
So those are not directly In 
Sync. 

542
00:33:53,760 --> 00:33:57,040
And later on you can make them 
kind of come back In Sync so 

543
00:33:57,040 --> 00:34:01,520
that they're guaranteed. 
Is that Maybe I'm far off on 

544
00:34:01,520 --> 00:34:05,200
this, but. 
Well, we have hot swapping, so 

545
00:34:05,200 --> 00:34:09,719
you can make individual changes 
to let's say the schema that we 

546
00:34:09,719 --> 00:34:13,320
just looked at, and then it will
automatically detect those 

547
00:34:13,320 --> 00:34:17,000
changes cause the IT, the 
sandbox is running in the 

548
00:34:17,000 --> 00:34:20,199
background at all times looking 
for file changes and it'll only 

549
00:34:20,199 --> 00:34:23,360
make certain changes. 
So once you get the sandbox up 

550
00:34:23,360 --> 00:34:25,280
and running, it's much quicker 
to make changes. 

551
00:34:26,280 --> 00:34:29,280
You have ephemeral environments 
usually for each individual 

552
00:34:29,280 --> 00:34:31,719
developer on your team. 
But though you can share 

553
00:34:31,719 --> 00:34:34,400
sandboxes. 
So I've seen that. 

554
00:34:34,400 --> 00:34:37,320
I haven't seen what you're 
talking about with drift though,

555
00:34:37,320 --> 00:34:41,639
but I'll I'll look into that it.
It might be the hot swap I'm I'm

556
00:34:41,639 --> 00:34:45,360
thinking of, I just know in the 
past it was always very slow to 

557
00:34:45,360 --> 00:34:48,320
like make model changes and it 
seems much faster now. 

558
00:34:49,239 --> 00:34:53,840
Yes, yeah, we, we, we have made 
some updates so it it can do 

559
00:34:53,840 --> 00:34:57,280
that kind of fancy CDK hot swap 
stuff that makes it easier. 

560
00:34:57,600 --> 00:34:59,160
Nice. 
Nice. 

561
00:34:59,280 --> 00:35:04,640
OK, well, let's continue on. 
So we have kind of an ugly app, 

562
00:35:04,640 --> 00:35:08,400
but what I want to do is I want 
to surround it all by Cognito or

563
00:35:08,400 --> 00:35:12,600
authentication provider. 
And since we're using Next 14, 

564
00:35:13,400 --> 00:35:16,280
we have to do, we have to, and 
this is kind of a new paradigm 

565
00:35:16,280 --> 00:35:18,280
with Next. 
If you've used the old 13 with 

566
00:35:18,280 --> 00:35:20,040
Pages router, server, router's a
little different. 

567
00:35:20,360 --> 00:35:22,600
We need to kind of make sure 
that we're dealing with server 

568
00:35:22,600 --> 00:35:25,600
components and kind of client 
components a little bit 

569
00:35:25,600 --> 00:35:28,240
differently. 
So what I like to do is I'm 

570
00:35:28,240 --> 00:35:31,440
going to create a new folder. 
I'm going to call it components 

571
00:35:32,240 --> 00:35:37,120
and I'm gonna create a new one. 
We're gonna call auth dot TSX. 

572
00:35:37,320 --> 00:35:39,920
So we're gonna I'm gonna do some
live coding here. 

573
00:35:39,920 --> 00:35:47,600
So we're gonna export default 
function auth and it's gonna 

574
00:35:48,160 --> 00:35:57,560
provide children and then 
children trin type React, React 

575
00:35:58,800 --> 00:36:08,360
node, React node, Yep. 
And then we're going to import a

576
00:36:08,360 --> 00:36:10,200
few things in. 
First, this needs to be a client

577
00:36:10,200 --> 00:36:14,640
component, use client. 
And then we're going to import 

578
00:36:14,640 --> 00:36:25,200
in the authenticator. 
And then we have to import these

579
00:36:25,200 --> 00:36:36,400
in for the styles. 
And we're we haven't quite yet. 

580
00:36:36,400 --> 00:36:40,880
We're importing an Amplify here,
but we we don't have the Amplify

581
00:36:40,880 --> 00:36:43,560
configuration file, but we'll 
imagine that we'll have it. 

582
00:36:45,120 --> 00:36:51,360
So it'll be import config from, 
I think it'll be dot dot slash 

583
00:36:51,360 --> 00:36:56,960
dot slash amplify configuration 
dot Jason. 

584
00:36:57,960 --> 00:37:04,880
And then we have to run and 
amplify dot configure. 

585
00:37:06,240 --> 00:37:10,880
There it is. 
And then also, since we're using

586
00:37:10,960 --> 00:37:14,000
server components, we need to do
this SSR, true. 

587
00:37:14,600 --> 00:37:18,880
And what this does is it makes 
so that we also have we're 

588
00:37:18,880 --> 00:37:25,760
saving the authentication and 
job tokens inside our cookies 

589
00:37:26,480 --> 00:37:30,400
and that way the back end can 
retrieve those if it needs to do

590
00:37:30,400 --> 00:37:34,080
some authentication check UPS. 
So even though this is because 

591
00:37:34,080 --> 00:37:36,960
we used use client, this is 
client side component. 

592
00:37:36,960 --> 00:37:40,600
We're actually using SSR as well
for the the cookie set. 

593
00:37:41,280 --> 00:37:44,080
Yes, yeah. 
So when you configure the 

594
00:37:44,080 --> 00:37:48,080
authenticator, which is kind of 
a, for those who don't know, 

595
00:37:48,080 --> 00:37:54,320
it's a drop in login system that
you can add to your apps with a 

596
00:37:54,320 --> 00:37:58,040
few lines of boilerplate. 
We have to do it on the client 

597
00:37:58,040 --> 00:37:59,720
side. 
It doesn't work on the server 

598
00:37:59,720 --> 00:38:04,040
side yet. 
And by the way, oh, looks like 

599
00:38:04,040 --> 00:38:06,880
our server, our ephemeral 
environment's up and running. 

600
00:38:08,040 --> 00:38:10,960
And if we look back here now, we
do have the Amplify 

601
00:38:10,960 --> 00:38:14,040
configuration file. 
So now I don't have any errors 

602
00:38:16,240 --> 00:38:20,560
and I can do this. 
I'll return return the 

603
00:38:20,600 --> 00:38:24,600
authenticator if I spelt that 
wrong. 

604
00:38:24,880 --> 00:38:29,160
Oops, authenticator. 
Yep, there it is. 

605
00:38:30,000 --> 00:38:38,760
And then inside here we're going
to put in our children and then 

606
00:38:38,760 --> 00:38:43,800
we'll surround this whole thing.
OK, that looks right. 

607
00:38:43,800 --> 00:38:51,320
And now I'm going to put in my 
layout or import in that. 

608
00:38:52,600 --> 00:38:59,240
It's the default export from at 
slash components slash off. 

609
00:39:00,480 --> 00:39:04,080
And now where it says children 
here, I'm going to surround the 

610
00:39:04,080 --> 00:39:06,200
whole app by it. 
So this is a different way to do

611
00:39:06,200 --> 00:39:07,120
it. 
If you've used the old 

612
00:39:07,120 --> 00:39:08,920
authenticator, you may have used
something called with 

613
00:39:08,920 --> 00:39:13,120
authenticator you. 
This is the way you do it with 

614
00:39:15,040 --> 00:39:18,520
with here. 
All right, so I still have my 

615
00:39:18,520 --> 00:39:23,560
app running, I believe, so now 
we should be able to log in. 

616
00:39:23,560 --> 00:39:24,920
So let's just see if we can do 
that. 

617
00:39:24,960 --> 00:39:29,960
I'm back to my app here, 
refresh. 

618
00:39:29,960 --> 00:39:35,440
It might have to stop and 
restart the server. 

619
00:39:35,440 --> 00:39:44,240
We'll see. 
And this, my computer's a little

620
00:39:44,240 --> 00:39:47,760
slow too, I think, because I'm 
live streaming and but here it 

621
00:39:47,760 --> 00:39:53,080
is all right. 
And we have our create account 

622
00:39:53,160 --> 00:39:56,520
and let's, I'll just create 
account with an old e-mail 

623
00:39:56,520 --> 00:40:06,400
address. 
I have, let's see here, put some

624
00:40:07,600 --> 00:40:10,040
fake password in there. 
And now I have a confirmation 

625
00:40:10,040 --> 00:40:15,120
code and look on my phone for 
it. 

626
00:40:16,160 --> 00:40:19,240
I think I'm going to send 
everything to icy storms test. 

627
00:40:20,920 --> 00:40:21,760
Please don't. 
No, no. 

628
00:40:22,200 --> 00:40:24,000
And then I'll I am you. 
Please send me code. 

629
00:40:27,640 --> 00:40:30,040
OK, cool. 
So I'm I'm logged in here. 

630
00:40:31,120 --> 00:40:35,040
We can add in logout buttons and
things like that. 

631
00:40:35,040 --> 00:40:41,280
But for now we're logged in and 
if we can kind of prove that too

632
00:40:41,280 --> 00:40:47,400
if we look inside or inspect and
then go into our application. 

633
00:40:47,600 --> 00:40:50,400
This is really small, probably 
can't see it. 

634
00:40:51,760 --> 00:40:56,760
I'll make it so now we have all 
these tokens down here that's 

635
00:40:56,760 --> 00:40:59,360
being saved. 
That's. 

636
00:40:59,400 --> 00:41:02,120
Cookies. 
Just a word from someone that's 

637
00:41:02,120 --> 00:41:04,360
done this. 
If you wrap your full app in 

638
00:41:04,360 --> 00:41:08,240
auth, you could run into issues 
where you're getting data from 

639
00:41:08,240 --> 00:41:10,320
like the server. 
So that's where the server side 

640
00:41:10,320 --> 00:41:12,720
pieces come from. 
So if you're like, let's say 

641
00:41:12,720 --> 00:41:15,280
putting A blog out and you need 
an OG image or something like 

642
00:41:15,280 --> 00:41:18,280
that, make sure that's not 
inside of your off pieces 

643
00:41:18,280 --> 00:41:21,120
because that won't appear right 
away and so it'll blow things 

644
00:41:21,120 --> 00:41:23,200
up. 
Just just keep that in mind as 

645
00:41:23,200 --> 00:41:24,560
we're going through this 
example. 

646
00:41:25,400 --> 00:41:26,800
No, that's a good point. 
Yep. 

647
00:41:28,640 --> 00:41:34,400
OK, so we've least proved now 
that we are able to log in and 

648
00:41:34,400 --> 00:41:36,800
we're connecting to this 
ephemeral environment. 

649
00:41:37,480 --> 00:41:41,480
But let's say we want to use 
this this resource we created 

650
00:41:42,200 --> 00:41:46,880
for data to to start entering 
information in. 

651
00:41:47,560 --> 00:41:49,000
How are we? 
How are we on time, by the way? 

652
00:41:49,360 --> 00:41:52,360
We're good. 
I think we have about 45 minutes

653
00:41:52,360 --> 00:41:55,520
left. 
OK, so I can do some more coding

654
00:41:55,520 --> 00:41:57,200
here. 
So I think what I'm going to do 

655
00:41:57,760 --> 00:41:59,960
in this components folder. 
So I'm going to create a new 

656
00:41:59,960 --> 00:42:06,440
file and I'm going to call it 
meal dot TSX and this file will 

657
00:42:06,440 --> 00:42:16,360
be our meal file and this one 
will be used client and we'll 

658
00:42:16,360 --> 00:42:25,760
export default function meal and
I think I'll have some props 

659
00:42:26,320 --> 00:42:30,000
passed in. 
But before we do that, I suppose

660
00:42:30,000 --> 00:42:39,600
we'll just leave it empty and 
let's just create kind of the 

661
00:42:39,600 --> 00:42:41,560
scaffolding here. 
I'm probably just to save some 

662
00:42:41,560 --> 00:42:44,200
time I might some copy and paste
some stuff from my other screen 

663
00:42:45,280 --> 00:42:48,600
because I have a feeling it's 
gonna take a while to type 

664
00:42:48,600 --> 00:42:52,520
everything. 
Old Whisper is in full effect. 

665
00:42:52,560 --> 00:42:56,400
I like. 
It yeah, Yep, we'll have a 

666
00:42:56,400 --> 00:43:06,280
section here, last name width 
1/4 and then we'll have a form 

667
00:43:07,480 --> 00:43:13,920
and we'll use server actions in 
a second, but I'll just delete 

668
00:43:13,920 --> 00:43:17,360
this for now. 
Try to delete it. 

669
00:43:18,000 --> 00:43:24,920
There we go. 
And for this form, we'll have 

670
00:43:26,400 --> 00:43:38,280
I'll have the class name flex, 
flex column order 2P 5 rounded 

671
00:43:38,280 --> 00:43:46,680
gap 4. 
And then we'll have an input 

672
00:43:48,600 --> 00:44:01,000
type equals text, we'll call it 
meal name and we'll make it read

673
00:44:01,000 --> 00:44:03,680
only. 
So what I'm going to try to do 

674
00:44:03,680 --> 00:44:08,280
is, is, well, we don't have read
only, I'm just having this type 

675
00:44:08,280 --> 00:44:09,520
here. 
This is actually gonna be 

676
00:44:09,520 --> 00:44:13,760
hidden. 
I'm going to try to reuse this 

677
00:44:13,760 --> 00:44:16,080
between lunch, breakfast and 
dinner. 

678
00:44:17,120 --> 00:44:21,240
So I think what I'm gonna have 
to have is a value here. 

679
00:44:22,360 --> 00:44:31,320
And we're going to import in 
from here something called. 

680
00:44:31,840 --> 00:44:40,480
Yeah, we'll use meal name, and 
that will be a middle name, will

681
00:44:40,480 --> 00:44:48,160
be type string, OK. 
And then I can do meal name to 

682
00:44:48,320 --> 00:44:54,160
uppercase. 
All right, So that's just a 

683
00:44:54,160 --> 00:44:56,840
hidden input that we're going to
use later when we use our server

684
00:44:56,840 --> 00:44:59,880
actions. 
But I think what we really want 

685
00:44:59,920 --> 00:45:06,840
is a couple labels for where to 
enter your food in and then also

686
00:45:06,960 --> 00:45:10,560
where to enter the calories in. 
So this is where I'm do a little

687
00:45:10,800 --> 00:45:15,640
copy and paste action. 
You're probably going to answer 

688
00:45:15,640 --> 00:45:20,120
this question, but is there any 
way of reading in your schema so

689
00:45:20,120 --> 00:45:24,800
that you can use like TypeScript
and pull that E NUM in off of 

690
00:45:24,800 --> 00:45:29,480
them? 
Oh, that's a good point. 

691
00:45:30,400 --> 00:45:35,400
Probably there is inside the 
schema itself in this resource 

692
00:45:35,400 --> 00:45:38,400
file, in this resource file 
right here. 

693
00:45:39,200 --> 00:45:41,760
I think what I probably want to 
do if I had more time, is maybe 

694
00:45:41,760 --> 00:45:46,760
refactor this into like its own 
constant and then have that in 

695
00:45:46,760 --> 00:45:48,520
here and then export the 
constant out. 

696
00:45:48,560 --> 00:45:49,960
Is that what kind of what you're
thinking? 

697
00:45:50,440 --> 00:45:52,040
Yeah, I was kind of thinking 
like this. 

698
00:45:52,040 --> 00:45:56,280
You could export this schema as 
a whole and possibly like go 

699
00:45:56,400 --> 00:46:01,400
schema dot meal dot whatever and
like actually pull those out, 

700
00:46:01,400 --> 00:46:02,960
but I don't know, I'm just 
thinking that alone. 

701
00:46:03,320 --> 00:46:06,040
Yeah, yeah. 
Well, later on we're going to be

702
00:46:06,080 --> 00:46:11,160
doing that in a similar way to 
something similar. 

703
00:46:11,160 --> 00:46:14,040
I'll, I'll show you. 
All right, so we have now this 

704
00:46:14,040 --> 00:46:18,640
label for our meal name. 
We're going to enter meal name 

705
00:46:18,640 --> 00:46:20,360
info. 
We have this input here. 

706
00:46:21,720 --> 00:46:28,160
And then we need a button, and 
I'm going to just say delete 

707
00:46:28,160 --> 00:46:29,880
some of these since we're not 
quite there. 

708
00:46:30,200 --> 00:46:35,120
So we have this class name, this
button, and I think let's just 

709
00:46:35,720 --> 00:46:37,320
add this in and see what it 
looks like. 

710
00:46:39,080 --> 00:46:49,000
So we're going to go back to our
page TSX file and in here we'll 

711
00:46:49,000 --> 00:46:52,480
probably want to do a few more 
changes. 

712
00:46:53,600 --> 00:46:56,200
And once again, I'm just going 
to copy and paste a few things 

713
00:46:56,200 --> 00:47:00,000
from my other screen so you 
don't have to see me typing. 

714
00:47:00,000 --> 00:47:03,680
So I'm going to have my super 
amazing fitness, I guess be a 

715
00:47:03,680 --> 00:47:08,720
meal plan app, maybe better 
description meal plan app. 

716
00:47:08,720 --> 00:47:13,600
I'm going to have the date at 
the top and now I should be able

717
00:47:13,600 --> 00:47:22,320
to import in those meals. 
So it's not going to find it. 

718
00:47:23,760 --> 00:47:27,200
There it is. 
I found it and we need to pass 

719
00:47:27,200 --> 00:47:31,040
in the meal name. 
So meal name, first one we'll 

720
00:47:31,040 --> 00:47:36,560
call breakfast. 
We can probably auto close this.

721
00:47:36,560 --> 00:47:41,360
We don't need to. 
OK. 

722
00:47:41,480 --> 00:47:45,920
And then the other one would be 
lunch and we won't worry about a

723
00:47:45,920 --> 00:47:47,360
snacks right now, but we can 
have that. 

724
00:47:47,480 --> 00:47:52,400
All right, come back to here, 
refresh it. 

725
00:47:54,360 --> 00:48:00,080
So let's see if we have a little
bit of HTMLCSS. 

726
00:48:00,240 --> 00:48:06,960
OK, we have it here. 
Looks a little weird wonder I do

727
00:48:06,960 --> 00:48:14,200
have it zoomed in, but maybe we 
can add a few more things in 

728
00:48:14,200 --> 00:48:18,760
here so. 
Maybe like a gap two up there 

729
00:48:18,760 --> 00:48:21,880
would be good? 
Yeah, let's do a gap 6 right 

730
00:48:21,880 --> 00:48:27,600
here, width full. 
Let's see what it looks like if 

731
00:48:27,600 --> 00:48:36,520
we do width full here. 
And OK, I got the gap going. 

732
00:48:36,520 --> 00:48:40,120
Wonder what the width is set on 
this. 

733
00:48:40,120 --> 00:48:43,000
Do a little live 
troubleshooting. 

734
00:48:43,000 --> 00:48:54,600
So we have the gap that's full 
H1, H2 section. 

735
00:48:54,840 --> 00:49:04,600
Oh, because this is width 1/4, I
wonder if I do with 100%. 

736
00:49:05,080 --> 00:49:14,320
OK, so I could change it here. 
Let's go back to the code and 

737
00:49:14,320 --> 00:49:20,880
let's do 1/2. 
There we go. 

738
00:49:20,880 --> 00:49:22,160
I think that looks a little 
nicer. 

739
00:49:22,480 --> 00:49:25,120
That's cool. 
OK, so we have breakfast 

740
00:49:25,320 --> 00:49:29,480
estimated calories. 
Yeah, breakfast estimated 

741
00:49:29,480 --> 00:49:30,920
calories. 
Lunch has to be in dinners. 

742
00:49:30,920 --> 00:49:35,200
OK, so the idea now is that we 
want to be able to enter your 

743
00:49:35,200 --> 00:49:40,600
breakfast, like I had pizza, 
toast and whatever, and then 

744
00:49:40,600 --> 00:49:42,280
300. 
And then we want to kind of send

745
00:49:42,280 --> 00:49:46,840
it to our back end and then lock
this up so that way users can't 

746
00:49:46,880 --> 00:49:50,180
do anything to make changes or 
they can delete it and then re 

747
00:49:50,180 --> 00:49:51,920
enter it in and it's being saved
in the back end. 

748
00:49:54,360 --> 00:49:59,040
So I think what we want to do is
we need to start thinking about 

749
00:49:59,200 --> 00:50:03,240
like creating and deleting on 
it. 

750
00:50:03,240 --> 00:50:06,320
And then I think what we'll have
is since we're using forms here 

751
00:50:06,320 --> 00:50:11,840
in our Meal TSX, we'll add a a 
server action, but we'll pass 

752
00:50:11,840 --> 00:50:14,560
the server action from the 
parent to the child component. 

753
00:50:14,560 --> 00:50:17,480
Does that make sense? 
Yeah, totally. 

754
00:50:17,960 --> 00:50:20,840
Yep. 
And by the way, we're not using 

755
00:50:20,840 --> 00:50:27,160
next. 
So in this case you can put this

756
00:50:27,160 --> 00:50:29,240
in a separate file, but I'm just
going to leave it on this one. 

757
00:50:29,400 --> 00:50:33,360
So we'll do an on submit and 
remember server actions and next

758
00:50:33,360 --> 00:50:34,680
always have async in front of 
them. 

759
00:50:35,120 --> 00:50:38,760
So and they have this form data,
form data. 

760
00:50:43,080 --> 00:50:46,880
And then oh, one thing I forgot 
is we need some way to talk. 

761
00:50:46,880 --> 00:50:49,640
Since we're on the server here, 
we have ways, we have our new 

762
00:50:49,640 --> 00:50:55,040
JavaScript V6 library that can 
do client side and server side, 

763
00:50:55,320 --> 00:50:59,360
but we need to kind of set up 
the server side to to do it. 

764
00:50:59,360 --> 00:51:02,680
So what the way I like to do 
that is I create a new file, a 

765
00:51:02,680 --> 00:51:05,720
utils folder. 
So a new file in the utils 

766
00:51:05,720 --> 00:51:08,760
folder. 
So my app have components 

767
00:51:09,560 --> 00:51:12,240
actually in the source should 
say I'll create a new folder 

768
00:51:12,240 --> 00:51:17,120
here, we'll call it utils and 
then new, new inside new Tils, 

769
00:51:17,560 --> 00:51:25,360
I'll have amplify utils dot TS. 
And the purpose of this is to be

770
00:51:25,360 --> 00:51:29,960
able to work with our server 
components and be able to talk 

771
00:51:29,960 --> 00:51:31,760
back to the server. 
And we have to do a little set 

772
00:51:31,760 --> 00:51:32,920
up. 
This is actually all in the 

773
00:51:32,920 --> 00:51:37,120
documentation too. 
So this is nothing crazy. 

774
00:51:39,480 --> 00:51:46,440
So we're going to export 
construction cookie based client

775
00:51:46,440 --> 00:51:50,440
and then we're going to do 
something called generate server

776
00:51:50,560 --> 00:51:55,960
client using cookies. 
And you mentioned before about 

777
00:51:55,960 --> 00:51:57,720
using the schema. 
We're going to have the schema 

778
00:51:57,720 --> 00:52:06,240
right here and the schema is 
going to be imported directly in

779
00:52:08,240 --> 00:52:13,440
find it from our resource file. 
So from that resource file 

780
00:52:13,440 --> 00:52:15,120
before. 
So this is how we can get this 

781
00:52:15,120 --> 00:52:19,200
kind of end to end type safety 
because now we're using this the

782
00:52:19,200 --> 00:52:22,160
schema that we generated and 
this is going to be used with 

783
00:52:22,160 --> 00:52:24,040
our server components. 
You can also use this with 

784
00:52:24,320 --> 00:52:28,480
client components as well. 
And then we need a, we need 

785
00:52:28,480 --> 00:52:32,960
three things here. 
First we need a config which I'm

786
00:52:33,400 --> 00:52:38,040
going to have to import in this.
Is that the the amplified 

787
00:52:38,040 --> 00:52:43,560
configuration file? 
Let's see here, I guess put 

788
00:52:43,720 --> 00:52:53,280
from, is it going to load it? 
Yeah, here it is Amplify 

789
00:52:53,280 --> 00:52:56,520
configuration. 
Then we need cookies and this is

790
00:52:56,520 --> 00:52:59,640
directly from next. 
And by the way, you can do this 

791
00:52:59,640 --> 00:53:04,000
with Knucks too if you're a 
Knucks fan from next headers. 

792
00:53:05,040 --> 00:53:08,400
Oh, it's spelled. 
Yeah, we, we're, we're looking 

793
00:53:08,400 --> 00:53:11,920
at svelte kit right now, but I 
don't think we have official 

794
00:53:11,920 --> 00:53:14,360
documentation on that put. 
On the whole list. 

795
00:53:14,480 --> 00:53:22,360
I'm just so cookies and then off
mode and then we'll have it user

796
00:53:22,360 --> 00:53:31,120
pool. 
So now we have a a way to run on

797
00:53:31,120 --> 00:53:33,360
the server using this cookie 
based client. 

798
00:53:33,680 --> 00:53:36,280
It has the schema so it knows 
what it should run. 

799
00:53:36,280 --> 00:53:39,320
And so if you want to talk to 
our, our Graph QL, our manage 

800
00:53:39,320 --> 00:53:42,680
Graph QL service, we can now use
this new cookies based client to

801
00:53:42,680 --> 00:53:45,880
do it. 
And it's going to know because 

802
00:53:45,880 --> 00:53:47,640
it's going to look through the 
cookies to see if someone's 

803
00:53:47,640 --> 00:53:50,600
logged in or not. 
So I think the next thing to do 

804
00:53:50,600 --> 00:53:53,680
then is to go back to the page 
TSX file and use it. 

805
00:53:55,920 --> 00:54:00,120
So we have this on submit here. 
We're going to do construction, 

806
00:54:02,840 --> 00:54:05,880
just open bracket here. 
And now we're going to use await

807
00:54:06,360 --> 00:54:10,680
our cookie base client. 
Yep, there it is. 

808
00:54:11,440 --> 00:54:13,280
We're and you can see here, 
which is nice. 

809
00:54:13,280 --> 00:54:16,200
We have this auto completion. 
So we know we have meal here. 

810
00:54:17,240 --> 00:54:19,960
And then we can do all those 
create, read, update and delete 

811
00:54:19,960 --> 00:54:21,960
functions. 
So we can do create, delete, get

812
00:54:21,960 --> 00:54:23,840
list, update. 
It's all here for us. 

813
00:54:23,880 --> 00:54:26,680
And since we're doing a, we want
to create something, we'll do 

814
00:54:26,680 --> 00:54:30,800
create. 
And now it's going to tell us 

815
00:54:30,800 --> 00:54:32,520
what we need. 
We have to add in the calories, 

816
00:54:32,520 --> 00:54:36,800
the data, the food, the ID, meal
name and owner. 

817
00:54:37,280 --> 00:54:39,920
I guess these are aren't 
required. 

818
00:54:40,120 --> 00:54:41,640
We could make them required, but
they're not. 

819
00:54:43,120 --> 00:54:47,480
So I I suppose we can start with
calories and then this is 

820
00:54:47,480 --> 00:54:53,320
supposed to be a number. 
So if you're familiar with oh 

821
00:54:53,320 --> 00:54:55,200
looks like it, it actually 
detects some of them. 

822
00:54:55,200 --> 00:54:59,240
So this is saying form data dot 
git is the way inside next when 

823
00:54:59,240 --> 00:55:03,520
you're using server actions that
you can grab the data. 

824
00:55:03,520 --> 00:55:06,760
This is basically the same thing
if like you do a a normal 

825
00:55:06,760 --> 00:55:11,120
submit, like an on submit and 
then you have to get the form 

826
00:55:11,120 --> 00:55:14,200
element out of it. 
You can do something similar by 

827
00:55:14,320 --> 00:55:16,680
grabbing the form data. 
Yeah, that's part of the new Web

828
00:55:16,680 --> 00:55:19,400
API. 
I think it couple years ago, old

829
00:55:19,400 --> 00:55:21,000
now. 
Yeah. 

830
00:55:22,720 --> 00:55:27,760
And then we have didn't quite 
get all this right. 

831
00:55:27,760 --> 00:55:30,040
So let's do this. 
We got food. 

832
00:55:30,320 --> 00:55:34,920
This is gonna be the form data 
dot git and we're gonna call 

833
00:55:34,920 --> 00:55:38,680
this meal info. 
If you don't know well I'll come

834
00:55:38,680 --> 00:55:42,480
back to it. 
So but this dot git, these are 

835
00:55:42,480 --> 00:55:47,720
lately the names that you have 
on the inputs 2 string as 

836
00:55:47,720 --> 00:55:53,040
string. 
And then we have the date, which

837
00:55:53,040 --> 00:55:56,640
we kind of could whisper kind of
got a little bit of it here, but

838
00:55:56,640 --> 00:56:02,600
we're in the two ISO string and 
this date actually doesn't it 

839
00:56:02,600 --> 00:56:05,600
only takes it in the year, year,
month to month date, date 

840
00:56:05,600 --> 00:56:07,800
format. 
If you kind of look at it here 

841
00:56:08,320 --> 00:56:10,400
or if you go back to the 
resource world, it tells you it 

842
00:56:10,400 --> 00:56:15,240
doesn't accept the, the time. 
So you have to, to remove that 

843
00:56:15,240 --> 00:56:19,040
from it. 
It's a little bit of a, a hack 

844
00:56:19,040 --> 00:56:23,480
here, but works. 
And then the then the last one 

845
00:56:23,480 --> 00:56:26,680
is the Neil Neil name. 
I'm just going to copy and paste

846
00:56:26,680 --> 00:56:28,600
this from my other screen 
because it's a lot to type. 

847
00:56:37,480 --> 00:56:40,640
So this right here, you're 
probably thinking like this is 

848
00:56:40,640 --> 00:56:45,040
already inside this resource 
data file. 

849
00:56:45,360 --> 00:56:47,960
So this is where I say I'm 
thinking you can't. 

850
00:56:48,080 --> 00:56:49,560
I wasn't. 
When I was doing this demo 

851
00:56:49,560 --> 00:56:52,320
earlier, I couldn't grab it 
directly from the schema file 

852
00:56:52,320 --> 00:56:57,880
'cause I do have the schema 
which was exported out and you 

853
00:56:57,880 --> 00:57:02,200
can like grab like meal data 
from it. 

854
00:57:02,200 --> 00:57:04,960
But I couldn't quite grab this 
enum out of here. 

855
00:57:04,960 --> 00:57:08,000
So I just, I'm just typing it in
like this for now. 

856
00:57:11,560 --> 00:57:16,600
OK, so if I did that right. 
So now I have this new on submit

857
00:57:18,080 --> 00:57:22,200
and this will return back a data
errors and extension. 

858
00:57:22,200 --> 00:57:23,920
So if there's an errors, it'll 
return errors. 

859
00:57:23,920 --> 00:57:27,080
But I'm just going to console 
log the data. 

860
00:57:31,120 --> 00:57:36,000
So now we have our on submit. 
What we need to do though is we 

861
00:57:36,000 --> 00:57:38,360
need to pass it on to this meal.
So I'm just going to create 

862
00:57:38,360 --> 00:57:41,760
something called on submit 
equals on submit. 

863
00:57:44,400 --> 00:57:47,320
But we don't have an on submit 
in here. 

864
00:57:47,320 --> 00:57:52,360
So go back to meals. 
And right now we only have a 

865
00:57:52,360 --> 00:57:54,800
meal name. 
So we'll add in on submit, 

866
00:57:55,080 --> 00:57:56,840
probably kept doing think of a 
better name. 

867
00:57:56,840 --> 00:58:02,560
And we have to type it, which is
on submit, which is going to 

868
00:58:02,560 --> 00:58:05,600
take a form data of type form 
data. 

869
00:58:08,000 --> 00:58:13,680
And then it's going to return 
void, voidy void. 

870
00:58:15,880 --> 00:58:16,920
All right, I don't see any 
errors. 

871
00:58:17,360 --> 00:58:19,200
And now I can add an action on 
here. 

872
00:58:20,400 --> 00:58:25,640
So if you're normal in React you
do on submit, but with next 14 

873
00:58:25,640 --> 00:58:34,560
we can just do action equals and
then we just pass in the on 

874
00:58:34,560 --> 00:58:37,600
submit. 
That's so weird. 

875
00:58:38,760 --> 00:58:40,320
Have you used server actions 
before? 

876
00:58:40,520 --> 00:58:44,280
I have, I don't think I've used 
it where you pass the function 

877
00:58:44,280 --> 00:58:47,120
through to the component like 
this. 

878
00:58:47,120 --> 00:58:48,960
So that's that's interesting to 
me. 

879
00:58:50,360 --> 00:58:54,240
Yeah, let's see. 
Oh one thing I missed if we go 

880
00:58:54,240 --> 00:59:02,960
back to page. 
I think mainly I was using it 

881
00:59:02,960 --> 00:59:05,240
for like log in, log out type 
stuff. 

882
00:59:06,320 --> 00:59:09,360
I don't know if I had well, I 
used it in any form so well, no,

883
00:59:09,360 --> 00:59:11,160
I must have cause e-mail 
password would have come 

884
00:59:11,160 --> 00:59:12,440
through. 
Yeah, interesting. 

885
00:59:12,720 --> 00:59:14,480
Yeah. 
Yeah, I kind of like this. 

886
00:59:14,480 --> 00:59:17,280
So we can have client components
talk directly over to our server

887
00:59:17,280 --> 00:59:18,920
components. 
But one thing you have to do, a 

888
00:59:19,120 --> 00:59:21,560
lot of times people refactor 
this into their own actions 

889
00:59:21,560 --> 00:59:24,080
file, but yeah, you can just put
it in here. 

890
00:59:24,080 --> 00:59:27,480
You just have to put U server at
the top though, otherwise it 

891
00:59:27,480 --> 00:59:29,520
like. 
I think I was doing an actions 

892
00:59:29,520 --> 00:59:32,040
file as well. 
It's been a minute since it 

893
00:59:32,080 --> 00:59:35,000
first came out, I think. 
Yeah, and it wasn't beta for a 

894
00:59:35,000 --> 00:59:36,240
while. 
Next 13. 

895
00:59:39,360 --> 00:59:42,480
Yeah, I should clarify, I 
haven't used it in 14, only 13, 

896
00:59:42,680 --> 00:59:49,440
so. 
OK, and while it's kind of 

897
00:59:49,440 --> 00:59:52,720
thinking there, another thing I 
want to do is soon as it loads, 

898
00:59:54,040 --> 00:59:57,200
I want to. 
Since this is on the server, I 

899
00:59:57,200 --> 00:59:58,800
don't need to like run a 
function or anything, and I 

900
00:59:58,800 --> 01:00:01,280
could just have it do something 
as soon as the app loads, so I'm

901
01:00:01,280 --> 01:00:05,880
gonna have it. 1st I need to go 
up here and make sure this is 

902
01:00:05,880 --> 01:00:10,880
async, which this is a dead 
giveaway. 

903
01:00:10,880 --> 01:00:13,680
This is a server component if 
you have async as the component 

904
01:00:13,680 --> 01:00:15,840
name. 
So I'm going to create a 

905
01:00:15,840 --> 01:00:17,840
response here. 
I'm going to do a wait. 

906
01:00:17,840 --> 01:00:24,240
I'm going to use that cookie 
based client again, client dot 

907
01:00:25,000 --> 01:00:30,240
models dot meal dot. 
This time I'm going to do a 

908
01:00:30,240 --> 01:00:33,880
list. 
And what I want to try to do is 

909
01:00:33,880 --> 01:00:36,800
make sure I only get values from
today. 

910
01:00:37,880 --> 01:00:43,920
So I'm going to filter on data, 
excuse me, date not date to 

911
01:00:44,120 --> 01:00:47,880
date. 
And now I can do make sure it 

912
01:00:47,880 --> 01:00:51,400
equals and it already sent it 
for me. 

913
01:00:51,400 --> 01:00:54,560
So this is saying make sure that
the date equals today's date. 

914
01:00:57,040 --> 01:01:01,800
And then I guess I could just 
call this current meal. 

915
01:01:02,000 --> 01:01:05,040
I can do this a couple ways. 
I'm going to call this current 

916
01:01:05,920 --> 01:01:10,880
meal. 
Actually, let's do this. 

917
01:01:10,960 --> 01:01:15,560
I'll leave this response. 
Is there any like advantage 

918
01:01:15,560 --> 01:01:18,400
disadvantage for storing dates 
like? 

919
01:01:18,520 --> 01:01:21,240
I think this is going to end up 
as a string type I. 

920
01:01:22,760 --> 01:01:26,680
Think yes, you're right. 
Instead of doing that like just 

921
01:01:26,680 --> 01:01:32,120
saving the normal like numeric 
version of that date represented

922
01:01:32,120 --> 01:01:37,600
from like calendar days. 
Like saving it as like just 

923
01:01:37,600 --> 01:01:40,080
doing. 
Yeah, exactly. 

924
01:01:40,080 --> 01:01:42,280
Yeah. 
Yeah, I'm sure there is. 

925
01:01:42,280 --> 01:01:46,680
I, I kind of the date object 
requires this very specific 

926
01:01:46,680 --> 01:01:47,800
format. 
OK. 

927
01:01:48,520 --> 01:01:53,480
So it has to be this year, year,
year, month, month, day, day 

928
01:01:53,480 --> 01:01:56,880
format to save and everything? 
Gotcha. 

929
01:01:57,080 --> 01:01:58,880
All right. 
So that's kind of why I was 

930
01:01:58,880 --> 01:02:01,160
doing it that way. 
So I can do here have this equal

931
01:02:01,760 --> 01:02:03,920
date. 
You know what, it's actually 

932
01:02:03,920 --> 01:02:05,040
easier. 
You're probably thinking the 

933
01:02:05,040 --> 01:02:07,840
same thing I am. 
If you have data, I can rename 

934
01:02:07,840 --> 01:02:12,640
it to current meal. 
There's a little ES6 trick now 

935
01:02:12,640 --> 01:02:21,120
in current meal. 
I can now I can maybe just 

936
01:02:22,960 --> 01:02:28,000
console logging out for now, but
we can use that in our app to 

937
01:02:28,000 --> 01:02:31,680
check to see if there actually 
is data in there. 

938
01:02:33,920 --> 01:02:36,360
All right, so if we. 
OK, so we're back up and running

939
01:02:36,360 --> 01:02:38,720
again and I'm gonna open up 
here. 

940
01:02:38,800 --> 01:02:41,480
So current meal says it's empty.
There's no current meals right 

941
01:02:41,480 --> 01:02:44,880
now on the server. 
Well, let's see if we can add 1.

942
01:02:45,200 --> 01:02:52,160
So we'll add breakfast. 
OK, so let's say I eat toast and

943
01:02:52,400 --> 01:02:58,840
Peaches and grapefruit, 
grapefruit and let's say that's 

944
01:02:58,840 --> 01:03:02,320
three hundred 400 calories. 
I'll hit submit. 

945
01:03:05,000 --> 01:03:09,240
OK, cool. 
So now you see my data changed. 

946
01:03:09,880 --> 01:03:13,920
I have now in my database I have
my data and I have my current 

947
01:03:13,920 --> 01:03:16,520
meal, so I know it's saving 
right now. 

948
01:03:16,520 --> 01:03:20,480
I didn't see any errors. 
Looks like it's working, but the

949
01:03:20,480 --> 01:03:25,000
next step would be to we want to
kind of maybe after you enter 

950
01:03:25,000 --> 01:03:27,840
this in and you click submit, I 
want to disable this whole 

951
01:03:28,120 --> 01:03:30,920
screen here and then have a 
button to delete this in case I 

952
01:03:30,920 --> 01:03:33,600
accidentally messed up like or 
like oops, I would actually need

953
01:03:33,600 --> 01:03:36,200
to add something else. 
So that's the next step. 

954
01:03:39,240 --> 01:03:48,520
All right, so if I go back to my
meal TSX file, oh, first, I 

955
01:03:48,520 --> 01:03:52,760
think since we know this current
meal has the data that we want, 

956
01:03:53,840 --> 01:03:57,320
let's add, let's pass in a 
couple things. 

957
01:03:57,520 --> 01:04:01,320
So we have this on submit, which
we already did, but let's pass 

958
01:04:01,320 --> 01:04:07,120
in current meal and we're going 
to use a schema and it's going 

959
01:04:07,120 --> 01:04:09,560
to be meal. 
So this is imported directly in 

960
01:04:09,560 --> 01:04:13,400
from the oops. 
This is not how you do this. 

961
01:04:13,400 --> 01:04:17,840
This is right down here, 
TypeScript faux pas. 

962
01:04:18,040 --> 01:04:22,640
This should be current meal. 
And then this needs to be 

963
01:04:22,640 --> 01:04:25,880
imported in and make sure and 
some people accidentally 

964
01:04:26,040 --> 01:04:27,680
imported from datastore don't do
that. 

965
01:04:27,680 --> 01:04:30,080
That's the wrong one. 
Always imported in from that new

966
01:04:30,080 --> 01:04:31,920
Amplify folder that was created 
in the resource. 

967
01:04:34,080 --> 01:04:35,920
All right, so now we have this 
new current meal. 

968
01:04:35,920 --> 01:04:39,200
And now we can do all sorts of 
things because current meal if 

969
01:04:39,480 --> 01:04:41,640
once it does that filter and 
everything, if there's no meal 

970
01:04:41,640 --> 01:04:43,160
for that day, it'll be 
undefined. 

971
01:04:43,160 --> 01:04:45,680
So we can check right away and 
do some things. 

972
01:04:47,040 --> 01:04:51,600
So right behind, right 
underneath here, I'm gonna do a 

973
01:04:51,600 --> 01:04:54,200
current meal. 
So I'm gonna check to see if 

974
01:04:54,200 --> 01:05:00,720
it's not undefined. 
I'm going to put some 

975
01:05:01,120 --> 01:05:04,600
information in here and I'm just
gonna copy and paste it. 

976
01:05:05,840 --> 01:05:09,080
And by the way, if it is, if it 
is undefined, it should just 

977
01:05:09,080 --> 01:05:21,600
return null, OK. 
And we're going to add a delete 

978
01:05:21,600 --> 01:05:23,360
button. 
We haven't done add delete yet, 

979
01:05:23,360 --> 01:05:25,400
but we're going to add it here 
soon. 

980
01:05:25,400 --> 01:05:26,760
But we'll just have a delete 
button. 

981
01:05:26,760 --> 01:05:30,440
But most important thing is, is 
that we'll have some that says 

982
01:05:30,440 --> 01:05:37,840
submitted at the top and it 
should be submitted. 

983
01:05:37,840 --> 01:05:40,400
So if I come back here and 
refresh it. 

984
01:05:43,840 --> 01:05:46,440
OK, we'll check that in a 
second. 

985
01:05:46,440 --> 01:05:48,800
I don't see anything, but I 
think the current meal. 

986
01:05:49,120 --> 01:05:50,200
Oh, I probably had to pass it 
in. 

987
01:05:50,200 --> 01:05:52,720
That's probably why. 
Yeah, I've got a big error right

988
01:05:52,720 --> 01:05:55,320
here. 
So now I have to pass in current

989
01:05:55,320 --> 01:06:15,850
meal equals current meal. 
OK, Oh, and it's also giving me 

990
01:06:15,970 --> 01:06:19,080
another error here. 
See. 

991
01:06:19,080 --> 01:06:23,320
What does it say? 
Did we not extend oatmeal? 

992
01:06:24,040 --> 01:06:28,240
Oh, oh, you know what? 
We have to get the correct 

993
01:06:28,240 --> 01:06:32,440
current meal because this this 
current meal is for everything 

994
01:06:33,240 --> 01:06:35,560
that has this date. 
But we're gonna have one for 

995
01:06:35,560 --> 01:06:39,320
breakfast and and a few others. 
So we'll need to do this. 

996
01:06:39,960 --> 01:06:52,080
We'll do a find meal, meal dot 
meal name equal, equal equals 

997
01:06:52,800 --> 01:06:58,160
breakfast. 
And so we'll have to do 

998
01:06:58,160 --> 01:06:59,720
something similar for all of 
them. 

999
01:07:02,040 --> 01:07:05,360
And then, oh, and then it could 
be undefined. 

1000
01:07:05,360 --> 01:07:06,840
So we have to do something like 
this. 

1001
01:07:09,640 --> 01:07:12,080
There it is. 
I never think about. 

1002
01:07:12,200 --> 01:07:14,160
I never think about the 
explanation like that. 

1003
01:07:14,160 --> 01:07:17,080
That's that's good. 
Yeah, this is just a a quick 

1004
01:07:17,080 --> 01:07:20,040
trick 'cause this could be 
undefined and then that's an 

1005
01:07:20,040 --> 01:07:22,520
issue, yeah. 
I I've never would have thought 

1006
01:07:22,520 --> 01:07:27,520
about that hacking the 
TypeScript. 

1007
01:07:27,520 --> 01:07:31,440
Yeah, so people who are 
TypeScript experts that are 

1008
01:07:31,440 --> 01:07:34,480
watching this now live or on 
replay, are probably cringing. 

1009
01:07:35,800 --> 01:07:38,080
Put just put in the comments 
what it really should be and 

1010
01:07:38,960 --> 01:07:46,600
pretend we did that. 
And so we have this one should 

1011
01:07:46,600 --> 01:07:59,560
be lunch, which one should be 
dinner, And oh, I accidentally 

1012
01:07:59,560 --> 01:08:02,840
did the on submit, so on submit,
on submit. 

1013
01:08:04,520 --> 01:08:06,920
All right, so everything's happy
in the TypeScript world. 

1014
01:08:08,000 --> 01:08:14,440
You should find the correct one.
OK so now I have this button but

1015
01:08:14,440 --> 01:08:16,520
I also kind of want to Gray 
these things out and make them 

1016
01:08:16,520 --> 01:08:19,319
disabled so someone can't hit it
again. 

1017
01:08:20,439 --> 01:08:24,000
So go back to meal and also want
to add a delete delete info. 

1018
01:08:25,720 --> 01:08:31,880
So I'm going to go back to my 
meal and I think what we want to

1019
01:08:31,880 --> 01:08:34,960
do is just add a disabled 
button. 

1020
01:08:40,720 --> 01:08:45,439
So this would be this one. 
I think we can add it into this 

1021
01:08:46,319 --> 01:08:49,560
input here. 
I think we might have just 

1022
01:08:49,680 --> 01:08:51,960
broken down our TypeScript issue
here, right? 

1023
01:08:52,160 --> 01:08:55,640
Because technically, we'll never
get a empty current meal. 

1024
01:08:56,240 --> 01:09:04,279
Well, we definitely will. 
Within the the meal itself we 

1025
01:09:04,279 --> 01:09:06,840
might want to allow undefined, I
don't know. 

1026
01:09:07,680 --> 01:09:09,920
Yeah, I think I yeah, that's a 
good point. 

1027
01:09:09,920 --> 01:09:13,479
I think we're definitely maybe 
the types need to be changed a 

1028
01:09:13,479 --> 01:09:20,399
little bit for that undefined 
case, because we're right here. 

1029
01:09:20,920 --> 01:09:24,479
This, it only accepts meal. 
But maybe we should do and or 

1030
01:09:24,479 --> 01:09:27,920
undefined because it does, it is
sometimes undefined. 

1031
01:09:27,920 --> 01:09:31,279
Let's see what it looks like 
here. 

1032
01:09:31,279 --> 01:09:36,800
I refresh it. 
Oops. 

1033
01:09:38,520 --> 01:09:41,399
OK, so now it's all kind of 
grayed out and so you can't hit 

1034
01:09:41,399 --> 01:09:42,800
the submit button again. 
Yep. 

1035
01:09:43,399 --> 01:09:44,920
So it's doing what you want. 
That's good. 

1036
01:09:45,359 --> 01:09:49,040
Yeah. 
And the other two are still 

1037
01:09:49,040 --> 01:09:52,080
open, correct? 
Like breakfast or lunch and 

1038
01:09:52,080 --> 01:09:53,200
dinner. 
Yeah, let's see. 

1039
01:09:53,200 --> 01:09:56,960
Let's let's add some lunch. 
We'll have pizza 200. 

1040
01:09:58,040 --> 01:10:00,240
I'll submit it. 
Yep. 

1041
01:10:00,240 --> 01:10:02,720
Now it added it in there. 
We can do dinner. 

1042
01:10:04,160 --> 01:10:10,280
We had pork chops, 800 calories 
and it takes a second. 

1043
01:10:10,400 --> 01:10:11,840
We can add a loading spinner 
too, if you want. 

1044
01:10:11,840 --> 01:10:14,640
OK, so now they're all set. 
So now let's say we want to 

1045
01:10:14,640 --> 01:10:19,200
there's two things. 
One is we want it to delete it 

1046
01:10:19,280 --> 01:10:21,280
and then clear this data from 
here. 

1047
01:10:22,640 --> 01:10:25,800
So first, maybe let's let's just
try to see if we can delete it 

1048
01:10:25,800 --> 01:10:27,880
and it's not clearing the text 
first. 

1049
01:10:30,360 --> 01:10:35,760
So I need to go back into my 
pages file and then I have my on

1050
01:10:35,760 --> 01:10:39,920
submit. 
But now I need to create a 

1051
01:10:39,920 --> 01:10:48,080
delete and this is also going to
be a server action that should 

1052
01:10:48,080 --> 01:10:54,040
work for us. 
And to construction on delete, 

1053
01:10:57,240 --> 01:11:00,000
click async. 
And this time you don't have to 

1054
01:11:00,000 --> 01:11:01,960
do a form data, it doesn't have 
to be connected to a form. 

1055
01:11:01,960 --> 01:11:04,080
It could just be a function that
you just call. 

1056
01:11:05,280 --> 01:11:10,120
Just really neat but you just 
have to make sure you put in use

1057
01:11:10,120 --> 01:11:15,360
server and make it async. 
And now I can say, let's grab 

1058
01:11:15,360 --> 01:11:23,000
the data out of here and await 
that cookie based client models 

1059
01:11:23,760 --> 01:11:29,240
dot meal capital N And now we 
can do delete. 

1060
01:11:32,240 --> 01:11:37,840
And all this needs is an ID and 
we're passing that ID directly 

1061
01:11:37,840 --> 01:11:41,600
from here. 
And then I'll console log data. 

1062
01:11:42,240 --> 01:11:45,000
I just always like to see it 
working. 

1063
01:11:48,760 --> 01:11:51,000
If this was production, you'd 
probably want to like check for 

1064
01:11:51,000 --> 01:11:52,760
errors and do something if ever 
happened. 

1065
01:11:53,920 --> 01:12:01,200
This is demo and we'll do 
revalidate, validate path and 

1066
01:12:01,200 --> 01:12:06,360
that'll like just refresh this 
path, this root path here we'll 

1067
01:12:06,360 --> 01:12:16,640
go back to meal and let's see 
here we'll add in on delete and 

1068
01:12:16,640 --> 01:12:21,240
this will be on delete. 
Instead of adding this, it'll be

1069
01:12:21,320 --> 01:12:27,280
ID string. 
And it's complaining, I think 

1070
01:12:27,280 --> 01:12:29,800
because there it is. 
I didn't have the type. 

1071
01:12:29,800 --> 01:12:34,080
And then we'll this button right
here, this type button. 

1072
01:12:34,440 --> 01:12:37,120
So even though it's in this 
form, since I did a type button,

1073
01:12:37,120 --> 01:12:39,200
it won't do a submission on the 
form. 

1074
01:12:41,040 --> 01:12:45,200
We can do onclick and then we'll
pass in this current meal dot 

1075
01:12:45,200 --> 01:12:49,760
ID. 
So that should delete it if I 

1076
01:12:49,760 --> 01:12:54,600
did this, right? 
OK, Oh, it's complaining. 

1077
01:12:54,600 --> 01:12:57,120
Cannot find. 
Oh, that's a weird error. 

1078
01:12:57,120 --> 01:13:01,400
I think it's just kind of slow. 
Let's see if I get an error 

1079
01:13:01,400 --> 01:13:11,920
here. 
Is there something on the end of

1080
01:13:11,920 --> 01:13:14,240
that class name like not double 
coded? 

1081
01:13:15,120 --> 01:13:16,600
Well, that's a good .0. 
There it goes. 

1082
01:13:16,760 --> 01:13:20,160
I think it's just resolved. 
Yeah, sometimes I have to I 

1083
01:13:20,160 --> 01:13:22,280
don't know if anybody's done 
this in in when you're in BS 

1084
01:13:22,280 --> 01:13:23,840
code. 
Sometimes I just had to like 

1085
01:13:23,840 --> 01:13:26,120
reload the window, reload 
TypeScript, things just don't 

1086
01:13:26,120 --> 01:13:26,520
work. 
Query. 

1087
01:13:26,520 --> 01:13:29,880
All right, so all these are 
here. 

1088
01:13:29,880 --> 01:13:38,200
So if I just do delete entry, I 
get an error undelete. 

1089
01:13:38,240 --> 01:13:40,520
Oh you know what? 
Because I didn't pass it in. 

1090
01:13:41,200 --> 01:13:45,600
So I come back here. 
Now these are all complaining. 

1091
01:13:47,680 --> 01:14:01,000
So on delete equals on delete, 
pass it in, pass it in. 

1092
01:14:02,600 --> 01:14:10,800
Those are all happy. 
Now refresh, you still see these

1093
01:14:10,800 --> 01:14:13,640
are all grayed out and click 
Delete entry. 

1094
01:14:15,880 --> 01:14:18,480
All right, so now it's back, but
it does have still has the text 

1095
01:14:18,480 --> 01:14:20,520
here. 
No, no it doesn't. 

1096
01:14:20,880 --> 01:14:23,600
I thought it did for a second. 
I don't know that I don't know 

1097
01:14:23,600 --> 01:14:26,000
that are other two that have 
this submitted. 

1098
01:14:26,440 --> 01:14:28,040
I don't think they have our 
text. 

1099
01:14:28,080 --> 01:14:30,400
Oh, you're right. 
So it never saves the text. 

1100
01:14:30,400 --> 01:14:32,640
So that's the next thing we need
to do to make sure it saves the 

1101
01:14:32,640 --> 01:14:37,120
text so we can delete the entry.
I believe this one not deleted. 

1102
01:14:37,120 --> 01:14:38,720
Let's see if we can get the text
showing up here. 

1103
01:14:38,720 --> 01:14:42,080
So we are passing this whole 
meal current meal which should 

1104
01:14:42,080 --> 01:14:46,480
have the name in it. 
So we have to just set some form

1105
01:14:46,480 --> 01:14:50,600
values in there. 
Exactly, you are 100% correct. 

1106
01:14:50,600 --> 01:14:58,840
So we have these inputs like 
where this text area and what I 

1107
01:14:58,840 --> 01:15:04,200
think what I want to do is have 
AU state for both calories and 

1108
01:15:04,200 --> 01:15:06,800
food. 
Since this is a client 

1109
01:15:06,800 --> 01:15:08,320
component, we can use use 
states. 

1110
01:15:10,000 --> 01:15:14,920
This is a way we can keep track 
of of our app. 

1111
01:15:14,920 --> 01:15:20,440
So we're going to have these two
calories set calories and I'm 

1112
01:15:20,440 --> 01:15:26,120
going to import this from React.
And what this is saying is that 

1113
01:15:26,400 --> 01:15:30,200
soon as these the this component
loads, it's going to look at the

1114
01:15:30,200 --> 01:15:32,480
calories, the current meal dot 
calories and it's going to set 

1115
01:15:32,480 --> 01:15:35,120
to 0 if it's undefined. 
And we're going to have the food

1116
01:15:35,160 --> 01:15:37,520
set to empty if it's undefined. 
Otherwise we're setting the food

1117
01:15:37,520 --> 01:15:41,680
and calories here. 
I'm not I'm not a React expert, 

1118
01:15:41,680 --> 01:15:45,240
but is there any advantage of 
just passing the full object in 

1119
01:15:45,240 --> 01:15:47,800
instead of like the individual 
value? 

1120
01:15:50,320 --> 01:15:53,680
What do you mean? 
So I I think your current meal 

1121
01:15:53,680 --> 01:15:56,480
has the entire data that you're 
looking for. 

1122
01:15:56,480 --> 01:16:01,600
So instead of just having that 
like like why, why do we use the

1123
01:16:01,760 --> 01:16:08,720
the state here? 
Well, Oh yeah, that's because we

1124
01:16:09,280 --> 01:16:14,000
what I'm thinking of is when we 
hit this delete button, we want 

1125
01:16:14,040 --> 01:16:19,000
to set the forms to empty. 
OK, So we want to show and to do

1126
01:16:19,000 --> 01:16:21,280
that you have to kind of use use
state because it's going to 

1127
01:16:21,360 --> 01:16:23,320
update the forms and change the 
input. 

1128
01:16:23,320 --> 01:16:25,480
So we're going to add a value 
and an on change to it. 

1129
01:16:25,960 --> 01:16:27,680
So I'll show you what I mean by 
that. 

1130
01:16:29,600 --> 01:16:35,520
So in this text area here at the
bottom, I'm going to create an 

1131
01:16:35,520 --> 01:16:42,520
on change, and this is going to 
be this. 

1132
01:16:42,680 --> 01:16:46,840
So what this says is soon as 
anytime you press something on 

1133
01:16:46,840 --> 01:16:49,840
the keyboard it's going to set 
the food to this, but in the 

1134
01:16:49,840 --> 01:16:52,520
same one we want it to default 
to food. 

1135
01:16:54,000 --> 01:16:57,160
I like view better in this 
respect 'cause you can use 

1136
01:16:57,160 --> 01:17:00,280
something called V model, but 
inside react you always have to 

1137
01:17:00,280 --> 01:17:03,120
do this on change in value, 
which I don't think is so. 

1138
01:17:03,200 --> 01:17:05,240
Is how Angular was too. 
It's like a 2. 

1139
01:17:05,240 --> 01:17:08,360
Way binding, Yeah, the Ng model 
exactly with the two way data 

1140
01:17:08,360 --> 01:17:10,120
binding. 
But you have to do it all 

1141
01:17:10,120 --> 01:17:13,760
manually here in your ACT. 
So we can do the same thing 

1142
01:17:13,760 --> 01:17:20,320
here, set calories. 
It's parsing the int there and 

1143
01:17:20,320 --> 01:17:26,480
then value equals calories. 
So now it should default with 

1144
01:17:26,480 --> 01:17:30,200
the name. 
So let's OK, if I refresh it 

1145
01:17:30,200 --> 01:17:35,520
here, I think I just saw it. 
Oh, I have pork chops. 

1146
01:17:35,520 --> 01:17:41,280
The estimate calories show 0. 
Oh, which we'll check in a 

1147
01:17:41,280 --> 01:17:45,320
second. 
There might be a bug there with 

1148
01:17:45,320 --> 01:17:49,880
the with that. 
I'm not sure why it's doing 

1149
01:17:49,880 --> 01:17:51,400
that, but we'll look in a 
second. 

1150
01:17:53,160 --> 01:17:59,560
So now, but when I click delete 
here, it still says pork chops, 

1151
01:17:59,560 --> 01:18:06,880
which I guess could be OK, but 
if we wanted to delete it, we 

1152
01:18:06,880 --> 01:18:09,720
can do is. 
And I, I did this, I created a 

1153
01:18:09,720 --> 01:18:12,760
new function. 
I'll copy and paste it. 

1154
01:18:12,760 --> 01:18:19,680
It's called on deleting and then
it just sets everything back to 

1155
01:18:19,680 --> 01:18:21,080
zero. 
And then it calls that server 

1156
01:18:21,080 --> 01:18:26,240
action on delete. 
So instead of doing on delete 

1157
01:18:26,240 --> 01:18:36,000
here, we can do on delete ING. 
So we'll delete this and we'll 

1158
01:18:36,000 --> 01:18:44,320
do on delete ING. 
OK, And if we did that right, 

1159
01:18:44,360 --> 01:18:49,800
let's see what it looks like 
just refreshing it. 

1160
01:18:52,280 --> 01:18:54,960
OK, so these are all deleted. 
So if I'll put in here, I'll do 

1161
01:18:54,960 --> 01:19:05,320
food will be cereal 300. 
If you submit it now, it's kind 

1162
01:19:05,320 --> 01:19:07,480
of set in stone. 
It's saved in our database. 

1163
01:19:07,920 --> 01:19:14,280
If we refresh it, refresh the 
page, it's still saved. 

1164
01:19:14,320 --> 01:19:16,080
Looks like the calories. 
There's a bug there. 

1165
01:19:16,080 --> 01:19:20,240
I need to fix that. 
But if I click delete entry, it 

1166
01:19:20,240 --> 01:19:23,000
deletes both of them and now 
they're fine there. 

1167
01:19:25,520 --> 01:19:29,120
And same thing with lunch. 
So lunch will be like pizza 400 

1168
01:19:33,880 --> 01:19:38,680
and then delete, delete entry 
works just if you refresh the 

1169
01:19:38,680 --> 01:19:42,200
page, it doesn't seem to work. 
All right. 

1170
01:19:42,200 --> 01:19:43,680
Yeah. 
So that's that's pretty much my 

1171
01:19:43,680 --> 01:19:44,920
demo. 
I guess we could troubleshoot 

1172
01:19:44,920 --> 01:19:47,640
the bug. 
I, I think that's actually like 

1173
01:19:47,840 --> 01:19:51,800
a, a really good stabbing point 
'cause I feel like there's maybe

1174
01:19:51,800 --> 01:19:56,720
some more amplify ish things, 
I'll call them instead of next 

1175
01:19:56,720 --> 01:20:00,800
JS things like we'll, we'll get 
this repo out to you folks and 

1176
01:20:00,800 --> 01:20:04,040
and get that updated just like 
we normally do out in coding cat

1177
01:20:04,040 --> 01:20:08,160
dot devs GitHub space. 
And we'll show that. 

1178
01:20:08,480 --> 01:20:13,120
I am kind of curious when people
think of like Gen. 2 and how 

1179
01:20:13,120 --> 01:20:15,640
we've been like hot reloading 
and like creating things. 

1180
01:20:16,640 --> 01:20:20,480
Can we also show do you have the
console handy where we could 

1181
01:20:20,480 --> 01:20:23,120
like look at what this created 
out in AWS? 

1182
01:20:24,800 --> 01:20:27,320
And I think sure. 
Probably wrap it up after that. 

1183
01:20:28,800 --> 01:20:31,440
Yeah. 
So what typically happens, we've

1184
01:20:31,440 --> 01:20:34,320
kind of spent a lot of time on 
the app part of it, but the the 

1185
01:20:34,320 --> 01:20:37,040
next part of this is like, let's
say this is the app with that we

1186
01:20:37,040 --> 01:20:39,640
want to deploy and we've been 
using this kind of Infirmary 

1187
01:20:39,640 --> 01:20:42,880
environment the whole time. 
And once we hit Control C here, 

1188
01:20:43,280 --> 01:20:45,240
it'll ask us, do we want to 
delete all the resources or 

1189
01:20:45,240 --> 01:20:47,000
we're not going to delete them 
right now. 

1190
01:20:47,000 --> 01:20:50,200
So I'll do no. 
So by the way, they're still 

1191
01:20:50,200 --> 01:20:51,280
there. 
I haven't deleted them. 

1192
01:20:51,440 --> 01:20:55,960
I can run MPX sandbox again and 
it's it's just going to restart 

1193
01:20:55,960 --> 01:20:57,760
everything. 
But everything's still running 

1194
01:20:57,760 --> 01:20:59,160
in the cloud. 
It hasn't deleted anything. 

1195
01:20:59,400 --> 01:21:01,760
But the next step if you want to
do a deploy and like you want to

1196
01:21:01,760 --> 01:21:04,640
get this up, is we have this new
console experience. 

1197
01:21:05,360 --> 01:21:10,360
So what I'd have to do is I'd 
have to add this repo to GitHub 

1198
01:21:11,520 --> 01:21:17,120
and then inside GitHub I can 
then connect it up to our 

1199
01:21:17,120 --> 01:21:19,480
console experience and deploy 
it. 

1200
01:21:21,680 --> 01:21:25,880
And I think like even right now 
you can show off your sandbox 

1201
01:21:25,880 --> 01:21:29,000
and like the the actual files 
and stuff, right? 

1202
01:21:29,680 --> 01:21:33,800
The database I should say. 
Yeah, let's, yeah, we so, but we

1203
01:21:33,800 --> 01:21:36,080
can also just look at what's in 
the ephemeral environment. 

1204
01:21:36,240 --> 01:21:37,280
That's true. 
Yeah. 

1205
01:21:37,280 --> 01:21:42,000
Let me on the other screen here.
Let me see if I can bring that 

1206
01:21:42,000 --> 01:21:46,120
up. 
Yeah. 

1207
01:21:46,120 --> 01:21:49,400
And while Eric's doing that, I 
will just reshare. 

1208
01:21:51,240 --> 01:22:01,600
I had my screens right here. 
There you go. 

1209
01:22:02,960 --> 01:22:04,760
So I'll just share mine in a 
minute here. 

1210
01:22:04,960 --> 01:22:08,240
So everything that we covered 
here just again, if you are out 

1211
01:22:08,240 --> 01:22:11,640
in Amplify, so let me remove the
Gen. 2. 

1212
01:22:12,720 --> 01:22:17,400
So if you come up to Amplify 
docs, Amplified AWS currently 

1213
01:22:17,400 --> 01:22:19,640
Gen. 2 is still in its previous 
state. 

1214
01:22:19,640 --> 01:22:23,080
So you can click the get started
and it'll drive over to slash 

1215
01:22:23,080 --> 01:22:26,280
Gen. 2, which has all of this 
information that we're talking 

1216
01:22:26,280 --> 01:22:29,320
about right now. 
We actually are working through 

1217
01:22:29,320 --> 01:22:32,520
the next GS version of this on 
server components and that's the

1218
01:22:32,520 --> 01:22:36,440
app that Eric build out. 
So a lot of resources in here 

1219
01:22:36,440 --> 01:22:39,160
that you can dig through and 
check this whole thing out. 

1220
01:22:39,160 --> 01:22:43,640
So go ahead and go over there. 
I think Eric's ready for us. 

1221
01:22:44,800 --> 01:22:47,520
Yeah. 
So here's here's the AWS console

1222
01:22:49,480 --> 01:22:53,640
on my account and then I can 
always go to like if I want to 

1223
01:22:53,640 --> 01:22:56,480
look at one of those resources, 
it created a Cognito resource. 

1224
01:22:56,520 --> 01:23:00,320
I could I can look at the 
amplify configuration Jason file

1225
01:23:00,320 --> 01:23:02,400
and get more details about it. 
But if I wanted to bring up the 

1226
01:23:02,400 --> 01:23:05,600
console, like I'll come here. 
I have some like sample ones. 

1227
01:23:05,600 --> 01:23:08,760
So if I just do created time, 
this one I created about 51 

1228
01:23:08,760 --> 01:23:10,360
minutes ago. 
This is the one I just created 

1229
01:23:11,480 --> 01:23:14,120
and here's all the data on it. 
And I'll delete it after this 

1230
01:23:14,120 --> 01:23:16,680
live stream. 
But here's the users that I 

1231
01:23:16,680 --> 01:23:19,720
created and I can go in here in 
the console and check it out. 

1232
01:23:20,720 --> 01:23:23,200
If I want to do the same thing 
with app sync, I can just go in 

1233
01:23:23,200 --> 01:23:28,280
the app sync here I. 
Think you can go all the way 

1234
01:23:28,280 --> 01:23:32,360
back to If you do like amplify, 
you can jump into the amplify. 

1235
01:23:32,480 --> 01:23:35,520
Oh yeah, that's a good point. 
Yeah, so I could. 

1236
01:23:35,520 --> 01:23:37,240
You can see all the different 
ones too. 

1237
01:23:37,560 --> 01:23:38,960
Yeah. 
So I can come in here and try to

1238
01:23:38,960 --> 01:23:44,280
find it if I know the key and 
everything, or I can go into 

1239
01:23:44,280 --> 01:23:52,200
amplify. 
I think it was in US E one. 

1240
01:23:53,200 --> 01:23:54,840
That's always a a fun challenge,
right? 

1241
01:23:56,320 --> 01:23:58,400
Let's see here. 
This was. 

1242
01:23:59,520 --> 01:24:01,520
I think we call it codcat 
something maybe? 

1243
01:24:01,760 --> 01:24:04,160
Yeah, it was Codcat. 
Oh, you know what you have to do

1244
01:24:04,160 --> 01:24:07,120
is it doesn't show up here 
because I haven't added it to 

1245
01:24:07,120 --> 01:24:10,200
the console yet, but it's under 
managed sandboxes. 

1246
01:24:10,760 --> 01:24:12,920
Yes. 
If we go to managed sandboxes 

1247
01:24:12,920 --> 01:24:14,960
and left, these are the 
ephemeral environments that we 

1248
01:24:14,960 --> 01:24:18,000
have. 
And then I can look at. 

1249
01:24:18,000 --> 01:24:21,160
Here's the Codcat live one that 
I deployed and from here I can 

1250
01:24:21,160 --> 01:24:25,720
actually delete it manually 
inside here if I wanted to. 

1251
01:24:26,480 --> 01:24:29,720
I was thinking and maybe this is
just the old way and Gen. 2's 

1252
01:24:29,720 --> 01:24:32,520
now like this you can look at 
all the resources surrounding 

1253
01:24:32,520 --> 01:24:35,440
but that's probably more on the 
command line now. 

1254
01:24:35,760 --> 01:24:38,280
Well, yeah, so you can look it 
in the command line or really 

1255
01:24:38,280 --> 01:24:41,880
the way to do this is the 
ephemeral environment is just 

1256
01:24:41,880 --> 01:24:44,400
kind of meant to to be deleted 
and used. 

1257
01:24:44,400 --> 01:24:47,080
And if you want to, you can look
at it, you can try to search for

1258
01:24:47,080 --> 01:24:50,240
the app sync or Cognito. 
But what you really want to do 

1259
01:24:50,240 --> 01:24:55,280
is you click the try, it doesn't
just try Amplify Gen. 2 and this

1260
01:24:55,280 --> 01:24:57,160
will bring you to this screen 
here. 

1261
01:24:58,080 --> 01:25:00,080
And this is where you would want
to connect it up. 

1262
01:25:00,080 --> 01:25:02,680
And once you do this, it'll 
create a production environment 

1263
01:25:03,320 --> 01:25:06,840
that or development environment,
whatever you want based on the 

1264
01:25:06,880 --> 01:25:08,800
branches. 
So that's another big thing with

1265
01:25:08,800 --> 01:25:12,200
Gen. 2 is now you have branch 
based deployments. 

1266
01:25:12,800 --> 01:25:15,960
So everything you you do is 
based on the branch. 

1267
01:25:17,000 --> 01:25:19,000
Cool. 
So you can. 

1268
01:25:19,440 --> 01:25:23,840
It has full stack branch 
deployments and I'll show you 

1269
01:25:23,840 --> 01:25:25,200
here. 
So like for example, you would 

1270
01:25:25,560 --> 01:25:30,600
click repository settings, you 
can add a new branch, you can 

1271
01:25:30,600 --> 01:25:32,680
add a new, you can do whatever 
you want there. 

1272
01:25:32,800 --> 01:25:35,440
We could try taking this app and
deploying it but. 

1273
01:25:36,000 --> 01:25:38,960
Yeah, I'm thinking we're we're 
kind of up on time. 

1274
01:25:38,960 --> 01:25:42,360
So what I'll what I'll do is 
I'll grab this repo from Eric 

1275
01:25:42,360 --> 01:25:45,680
and I'll actually host it under 
coding CAD and host it up on 

1276
01:25:45,680 --> 01:25:48,400
Amplify too. 
And we'll add some, you know, 

1277
01:25:48,400 --> 01:25:51,200
screenshots and stuff to the 
actual post out on coding CAD 

1278
01:25:51,200 --> 01:25:53,360
dot dev. 
So you can access all the 

1279
01:25:53,360 --> 01:25:57,280
resources too. 
So I think that was great. 

1280
01:25:57,400 --> 01:26:01,080
I mean, we kicked that apps 
behind. 

1281
01:26:02,160 --> 01:26:04,240
I got to take a day off. 
This was such a pleasure. 

1282
01:26:06,120 --> 01:26:09,400
No, thank you. 
Any other last minute thoughts? 

1283
01:26:09,400 --> 01:26:12,640
Jen 2 Where's it headed? 
Out of preview soon? 

1284
01:26:12,640 --> 01:26:14,560
Question mark. 
Exactly. 

1285
01:26:14,560 --> 01:26:16,120
Yeah, we're, we're really 
excited. 

1286
01:26:16,600 --> 01:26:21,880
Hopefully soon it'll be out of 
preview, so keep an eye out for 

1287
01:26:21,880 --> 01:26:24,880
that. 
We're adding in more these. 

1288
01:26:25,520 --> 01:26:27,960
You saw in the demo today we had
auth and data, but we're looking

1289
01:26:27,960 --> 01:26:30,880
forward to like adding storage 
and functions and other things, 

1290
01:26:30,880 --> 01:26:33,520
more high level constructs to 
make it even more simpler. 

1291
01:26:33,800 --> 01:26:36,640
The console experience right now
that you kind of briefly saw, 

1292
01:26:37,040 --> 01:26:40,080
that's where you connect up your
GitHub repo right now it doesn't

1293
01:26:40,080 --> 01:26:43,640
it it, it has a lot of features,
but it doesn't support all the 

1294
01:26:43,640 --> 01:26:46,200
features like custom domains. 
So we're like adding that very 

1295
01:26:46,360 --> 01:26:52,200
shortly and that that'll really 
superpower people and be able to

1296
01:26:52,200 --> 01:26:54,840
host your whole website and just
have it every time you have a 

1297
01:26:54,840 --> 01:26:56,880
new branch to create your back 
end. 

1298
01:26:57,200 --> 01:26:59,680
So it'll be pretty powerful. 
Love it. 

1299
01:26:59,680 --> 01:27:01,400
I can't wait for the the full 
release. 

1300
01:27:01,640 --> 01:27:03,520
I'm excited. 
Awesome, Eric. 

1301
01:27:03,520 --> 01:27:05,200
Well, thank you again for 
joining me today. 

1302
01:27:05,200 --> 01:27:07,280
I really appreciate it and we'll
talk to you next time. 

1303
01:27:07,600 --> 01:27:09,120
Yeah, thanks. 
Take care. 

1304
01:27:09,480 --> 01:27:10,440
See you. 
Thanks, Alex.

