1
00:00:28,640 --> 00:00:31,520
This episode of Code with Coding
Cat is brought to you by our 

2
00:00:31,520 --> 00:00:34,520
good friends at Algolia. 
Check out their search today. 

3
00:00:35,040 --> 00:00:37,560
Algolia helps you create a 
search and discovery engine in 

4
00:00:37,560 --> 00:00:39,880
three steps. 
Step one, import your data, 

5
00:00:40,160 --> 00:00:43,600
import the API client, 
initialize the client and index,

6
00:00:43,840 --> 00:00:46,920
load the local Jason file and 
then push to Algolia. 

7
00:00:47,280 --> 00:00:49,760
Step 2. 
Configure relevance, define 

8
00:00:49,760 --> 00:00:54,440
searchable attributes, add 
business metric, specify facets 

9
00:00:54,440 --> 00:00:56,200
and filtering. 
And Step 3. 

10
00:00:56,200 --> 00:00:59,480
Build your search UI, import 
widgets from the library, add 

11
00:00:59,480 --> 00:01:02,520
instant search component, add 
search input refined by 

12
00:01:02,520 --> 00:01:06,640
attribute, display results, add 
pagination and just like that 

13
00:01:06,640 --> 00:01:08,920
you're done. 
Build search effortlessly with 

14
00:01:08,920 --> 00:01:13,040
Algolia. 
Welcome back beeps to code with 

15
00:01:13,080 --> 00:01:16,000
Coding Cats today on the show at
Tim Medics. 

16
00:01:16,000 --> 00:01:19,920
What's up, Tim? 
Hello, that was one fancy intro 

17
00:01:19,920 --> 00:01:23,040
for Algolia, and we're going to 
do exactly that today, which is 

18
00:01:23,040 --> 00:01:24,560
cool. 
That is really cool. 

19
00:01:24,560 --> 00:01:28,360
I I'm super, super stoked the 
folks over at El Golio are able 

20
00:01:28,360 --> 00:01:30,960
to sponsor this episode, so 
shout out to them. 

21
00:01:31,320 --> 00:01:34,960
If I remember and do a good job,
I will occasionally show 

22
00:01:35,120 --> 00:01:37,880
sponsored by El Golia. 
There we go. 

23
00:01:38,120 --> 00:01:41,880
So fun. 
So yeah, today we're going to do

24
00:01:41,880 --> 00:01:45,800
some coding with Super Bass Knox
Del Golia. 

25
00:01:46,600 --> 00:01:50,160
So try to kind of do a little 
bit upfront and then break into 

26
00:01:50,160 --> 00:01:54,760
the coding for the last, I keep 
saying 60 minutes, but we tend 

27
00:01:54,760 --> 00:01:56,320
to start early and do 80 
minutes. 

28
00:01:56,360 --> 00:01:59,520
So yeah, exactly. 
We're gonna, we're gonna 

29
00:01:59,520 --> 00:02:02,720
definitely see how far we get. 
But first, the important part 

30
00:02:02,720 --> 00:02:06,320
for me is how are you, Tim? 
I am great. 

31
00:02:06,680 --> 00:02:08,800
So I think it's already dark 
here though. 

32
00:02:08,800 --> 00:02:08,960
You. 
You. 

33
00:02:09,360 --> 00:02:11,200
Switch scrolls, right? 
Like you. 

34
00:02:11,200 --> 00:02:12,560
You're at a different company 
now. 

35
00:02:12,680 --> 00:02:15,600
I think I am Fancy Hatta, yeah. 
Yeah, exactly. 

36
00:02:15,600 --> 00:02:18,880
I basically just did a hat 
change and I was just wearing 

37
00:02:18,880 --> 00:02:20,720
the the hoodie from the other 
company. 

38
00:02:20,720 --> 00:02:23,800
So I just took it off because 
that was a bit weird now like 

39
00:02:24,240 --> 00:02:28,760
the last time I was here, I was 
still like uniform and now it's 

40
00:02:28,840 --> 00:02:31,960
probably been a year already 
that I was on this stream. 

41
00:02:32,400 --> 00:02:36,920
And now I'm at Highgraph, which 
is a hatless CMS that's native 

42
00:02:36,920 --> 00:02:39,600
with graph QL. 
And we have a whole bunch of 

43
00:02:39,600 --> 00:02:43,040
like extra fun bits with like 
content federation. 

44
00:02:43,040 --> 00:02:46,560
So you can add natively other AP
is into the system and then 

45
00:02:46,560 --> 00:02:48,840
content that us can use them 
without understanding those 

46
00:02:48,840 --> 00:02:51,840
things. 
And like a lot of fun stuff as 

47
00:02:51,840 --> 00:02:55,120
Acms plus an extra few fancy 
features for if you need to 

48
00:02:55,120 --> 00:02:58,400
scale things like that. 
And so yeah, I'm really excited 

49
00:02:58,400 --> 00:03:02,520
to be there. 
It's quite different, but you 

50
00:03:02,520 --> 00:03:04,680
know, change is the spice of 
life, I guess. 

51
00:03:04,680 --> 00:03:07,080
So there we go. 
For sure. 

52
00:03:07,080 --> 00:03:11,960
And so I know like we talked 
during COVID times and you kind 

53
00:03:11,960 --> 00:03:14,480
of went from do I call you a 
Parisian? 

54
00:03:14,480 --> 00:03:17,560
Is that correct? 
You could have because I lived 

55
00:03:17,560 --> 00:03:21,040
there like 910 years but now I'm
so different. 

56
00:03:21,040 --> 00:03:25,920
Like I I live in the southwest 
of France now in complete 

57
00:03:25,920 --> 00:03:27,760
nature. 
Like right now it just turned 

58
00:03:27,760 --> 00:03:30,040
dark in the time we prepared for
this dream. 

59
00:03:30,040 --> 00:03:33,280
But before I could see the 
forest in the hills and like 

60
00:03:33,280 --> 00:03:36,800
there's no paved Rd. close to my
house like it's that far off. 

61
00:03:37,080 --> 00:03:40,440
So I'm ready to wear dickies and
be slightly more farmer than 

62
00:03:40,440 --> 00:03:43,280
Parisian. 
I would not work there anymore 

63
00:03:43,280 --> 00:03:45,960
now. 
So it's quite different but I'm 

64
00:03:45,960 --> 00:03:48,800
very happy here. 
Like it's super like lots of 

65
00:03:48,800 --> 00:03:53,400
nature, fresh air, less stress. 
It's just lots of travel when I 

66
00:03:53,400 --> 00:03:57,200
want to go anywhere. 
You just said Dickies and I was 

67
00:03:57,200 --> 00:04:00,520
like, Dickies jeans, right? 
Remember that stuff? 

68
00:04:00,520 --> 00:04:02,600
It's kind of hip now, I think. 
Like. 

69
00:04:02,640 --> 00:04:05,360
The shops here are full of it. 
I always have to do like the 

70
00:04:05,360 --> 00:04:08,400
translations on things. 
I'm like, Oh yeah, the tube, 

71
00:04:08,400 --> 00:04:13,080
the, you know, crisps. 
Do you guys use the word crisps?

72
00:04:13,280 --> 00:04:14,920
Yeah. 
So do you have you have Dickies 

73
00:04:14,920 --> 00:04:17,000
in the US with that name also 
right? 

74
00:04:17,680 --> 00:04:22,400
So yes, we do. 
I don't my my wife would correct

75
00:04:22,400 --> 00:04:25,280
me 'cause I'm horrible about 
fashion and clothes and all that

76
00:04:25,280 --> 00:04:28,080
stuff. 
So like I either have jeans on 

77
00:04:28,280 --> 00:04:33,640
or I have on like dress pants, 
which I would call, I don't 

78
00:04:33,640 --> 00:04:36,520
know, maybe that this is this is
going down. 

79
00:04:37,280 --> 00:04:40,320
We're going fairly deep into, 
into a rabbit hole that's not 

80
00:04:40,320 --> 00:04:44,320
building a sass, right? 
Actually, I, I really enjoy 

81
00:04:44,520 --> 00:04:46,320
being on here with you as 
always. 

82
00:04:46,320 --> 00:04:49,400
And so this one is quite 
different than I expected 

83
00:04:49,400 --> 00:04:52,720
initially because I'm literally 
a weekend warrior building a 

84
00:04:52,720 --> 00:04:56,160
sass to solve a problem I see in
our neighborhood. 

85
00:04:56,600 --> 00:04:59,240
Because here in the in the 
countryside, there's lots of 

86
00:04:59,240 --> 00:05:02,320
cats all around. 
They're just being dumped by 

87
00:05:02,320 --> 00:05:04,720
people that didn't want them or 
they're born in farms. 

88
00:05:04,720 --> 00:05:08,480
And people here, like if you're 
a farmer, you have animals to 

89
00:05:08,480 --> 00:05:13,320
help you on the farm. 
So cats are to just get rodents 

90
00:05:13,320 --> 00:05:15,240
and find mice and things like 
that. 

91
00:05:15,240 --> 00:05:18,160
Dogs are just to hurt the cows. 
Oh wow. 

92
00:05:18,320 --> 00:05:22,200
And so they sleep outside like 
this is not something we're used

93
00:05:22,200 --> 00:05:23,680
to in the city or in other 
places. 

94
00:05:24,280 --> 00:05:27,240
And so with that in mind, you 
see so many cats just being 

95
00:05:27,240 --> 00:05:31,000
dumped on the side of the road 
or there's too many, let's drown

96
00:05:31,000 --> 00:05:34,400
them, like horrible things. 
And so, of course, these cats 

97
00:05:34,400 --> 00:05:36,680
are living in the wild and they 
go to people's houses. 

98
00:05:36,680 --> 00:05:38,720
They're not neutered, they're 
not spayed, none of that. 

99
00:05:38,720 --> 00:05:41,760
They don't have, you know, all 
the health care that they need 

100
00:05:41,760 --> 00:05:46,040
to become a happy, healthy cat 
without producing 20 other cats 

101
00:05:46,040 --> 00:05:48,280
that are also unhealthy, 
essentially. 

102
00:05:49,080 --> 00:05:53,280
And so you have a bunch of 
associations here around of 

103
00:05:53,280 --> 00:05:55,840
people that just take care of 
these cats, you know, and they 

104
00:05:55,840 --> 00:05:59,760
have all the deals with like a 
veterinarians to get free 

105
00:05:59,960 --> 00:06:02,680
vaccinations and stuff like that
or good prices. 

106
00:06:03,000 --> 00:06:05,000
But they have to somehow 
organize themselves. 

107
00:06:05,000 --> 00:06:08,520
And that's where it turns really
messy because what they have to 

108
00:06:08,520 --> 00:06:11,760
do is have a database of these 
cats and then say you're the 

109
00:06:11,760 --> 00:06:14,880
adoption family that fits this 
cat that has an amputated leg 

110
00:06:14,880 --> 00:06:18,880
because your house is super 
clean or you are adoption family

111
00:06:18,880 --> 00:06:21,720
in town because this cat is 
super scared to be with other 

112
00:06:21,720 --> 00:06:22,800
animals. 
So you have to be in an 

113
00:06:22,800 --> 00:06:24,440
apartment. 
Like there's all these kind of 

114
00:06:24,440 --> 00:06:28,560
things and it is a mess. 
Like looking at the Excel sheets

115
00:06:28,560 --> 00:06:30,480
that these people make. 
Holy moly. 

116
00:06:30,800 --> 00:06:33,720
Like us tech folks, we kind of 
structure these things. 

117
00:06:33,720 --> 00:06:36,200
But for them, that structure 
their brains is very different, 

118
00:06:36,200 --> 00:06:39,520
right? 
And but what they also want is 

119
00:06:39,520 --> 00:06:42,840
like having a little website 
where they can present all the 

120
00:06:42,840 --> 00:06:47,080
cats to, to, to say, Hey, do you
want to adopt this cat and then 

121
00:06:47,120 --> 00:06:49,240
post it to Facebook or who they 
have all, they have Facebook 

122
00:06:49,240 --> 00:06:53,160
groups and stuff. 
And so I thought, why not make a

123
00:06:53,160 --> 00:06:56,000
little sauce where all these 
associations can just make a 

124
00:06:56,000 --> 00:06:59,200
free account or they pay like 4 
bucks a month, something like 

125
00:06:59,200 --> 00:07:02,560
that where they can put all 
their cat data historically 

126
00:07:02,560 --> 00:07:06,280
sorted and stuff. 
And then also make a little 

127
00:07:06,280 --> 00:07:10,600
website and then get like people
that might want to give some 

128
00:07:10,600 --> 00:07:15,400
money or become a host family 
and then fill out a form with 

129
00:07:15,400 --> 00:07:17,480
all the questions and say, Hey, 
I want to be this. 

130
00:07:18,080 --> 00:07:21,280
And so I'm weekend warrior and 
that's not a word. 

131
00:07:21,400 --> 00:07:25,280
I'm working in the weekend to 
build this stuff and what other 

132
00:07:25,280 --> 00:07:27,360
to use Super Bass Knucks and 
Algolia. 

133
00:07:27,360 --> 00:07:29,640
That's like the such a good 
match. 

134
00:07:30,200 --> 00:07:33,600
And So what do you want to do 
today, Alex? 

135
00:07:33,600 --> 00:07:37,160
You like kind of quickly show it
and then we go into how you 

136
00:07:37,160 --> 00:07:39,360
would build something like that.
I feel like which? 

137
00:07:39,520 --> 00:07:40,480
Hyphen. 
What do you think? 

138
00:07:40,520 --> 00:07:43,000
I think that would be really 
cool because you're, I mean, I 

139
00:07:43,000 --> 00:07:45,080
know you're not done with the 
product, but I think it's a 

140
00:07:45,080 --> 00:07:48,320
really good, I think it's a 
really good lead in to at least 

141
00:07:48,320 --> 00:07:49,840
show it. 
And we're going to take it 

142
00:07:50,120 --> 00:07:53,560
almost from scratch, basically 
like a raw repo and like build 

143
00:07:53,560 --> 00:07:55,840
out features so people can get 
used to doing it. 

144
00:07:55,840 --> 00:07:57,960
So yeah, please, please share 
your screen and. 

145
00:07:58,960 --> 00:08:02,960
Let me just share my screen a 
little bit so you can see what 

146
00:08:02,960 --> 00:08:05,600
we're dealing with here You 
have. 

147
00:08:05,600 --> 00:08:08,880
I have to caveat this thing 
because I'm learning as I go. 

148
00:08:09,640 --> 00:08:10,880
Oh, I like it. 
I mean I. 

149
00:08:10,920 --> 00:08:12,240
That's part of the game, isn't 
it? 

150
00:08:12,520 --> 00:08:15,120
Oh, totally. 
And I've, I've used Al Golia 

151
00:08:15,600 --> 00:08:17,760
before. 
I haven't done much with Super 

152
00:08:17,760 --> 00:08:22,040
Bass other than like log in and 
check it out, but I definitely 

153
00:08:22,040 --> 00:08:25,480
don't know of you and so you're 
gonna have to help me out a lot 

154
00:08:25,480 --> 00:08:27,560
when we go through. 
That is all good. 

155
00:08:27,760 --> 00:08:33,080
That's part of the game. 
So what I use is like back in 

156
00:08:33,080 --> 00:08:36,520
the day, and I'm talking even 
3-4 years ago, stuff like this 

157
00:08:36,520 --> 00:08:39,679
didn't fully exist. 
I'm using Knox UI that just 

158
00:08:39,679 --> 00:08:42,320
gives you a whole bunch of 
things and it just looks good 

159
00:08:42,320 --> 00:08:43,720
like this. 
It's crazy. 

160
00:08:44,360 --> 00:08:48,200
Would you mind zooming in just 
to Yeah, yeah, OK. 

161
00:08:48,480 --> 00:08:51,400
Trying to zoom a bit, but you 
you get like a little bar here 

162
00:08:51,400 --> 00:08:54,240
that's not the worst. 
So essentially this is the 

163
00:08:54,240 --> 00:08:56,880
logged in view and 
out-of-the-box you can also just

164
00:08:56,880 --> 00:08:59,560
do this is probably better for 
the stream right to have it. 

165
00:08:59,680 --> 00:09:01,080
Either way, I think works, Yeah.
Oh. 

166
00:09:01,480 --> 00:09:02,720
It doesn't really matter. 
Maybe. 

167
00:09:02,920 --> 00:09:06,160
Yeah, either way. 
Anyways, so essentially what 

168
00:09:06,160 --> 00:09:13,040
I've built is like this is Next 
UI running in next having had 

169
00:09:13,240 --> 00:09:18,080
data from Superbase pushed into 
Algolia because the Super 

170
00:09:18,080 --> 00:09:21,840
important thing is that this cat
database, so this is like full 

171
00:09:21,840 --> 00:09:24,120
of cats here. 
So I'm just going to this page 

172
00:09:24,120 --> 00:09:26,720
here and this is still some fake
data. 

173
00:09:26,720 --> 00:09:29,120
This is not exactly correct. 
But you can see for all these 

174
00:09:29,120 --> 00:09:32,320
cats like birth date and then 
are they dead or not? 

175
00:09:32,320 --> 00:09:34,200
Because that sadly happens quite
a bit. 

176
00:09:35,720 --> 00:09:40,600
You know, when they were arrived
at the association protocol 

177
00:09:40,600 --> 00:09:42,440
means there's like this whole 
health protocol. 

178
00:09:42,440 --> 00:09:45,560
They all get all the time to 
just have them good as a, you 

179
00:09:45,560 --> 00:09:48,400
know, base health. 
And then there's so much stuff 

180
00:09:48,400 --> 00:09:52,200
here about like adoption, which 
families are they like because 

181
00:09:52,200 --> 00:09:54,760
they also have temporary 
families sometimes. 

182
00:09:55,280 --> 00:09:58,080
And then collar, are they good 
with dogs and cats? 

183
00:09:58,080 --> 00:10:00,600
And like you see, every time I 
hit a, a checkbox here, you can 

184
00:10:00,600 --> 00:10:06,000
see it automatically saves this 
thing now in super base and so 

185
00:10:06,000 --> 00:10:08,160
you can add images. 
This is really cool. 

186
00:10:08,160 --> 00:10:09,920
So. 
Just a question on the UI. 

187
00:10:10,240 --> 00:10:14,040
So Nuxt UI, is that something 
that Nuxt maintains themselves? 

188
00:10:14,640 --> 00:10:19,600
It's something called Nuxt Labs,
which is a side gig of the next 

189
00:10:19,600 --> 00:10:21,640
guys and that's actually where 
they make money. 

190
00:10:22,120 --> 00:10:26,800
So they have next next UI pro 
and there's like next studio and

191
00:10:26,800 --> 00:10:31,280
there's a a project like Faulta.
And so the next team maintains 

192
00:10:31,280 --> 00:10:35,240
these things and so it's on the 
side and, and that they give you

193
00:10:35,240 --> 00:10:38,000
all these kind of like good 
things and all the buttons, all 

194
00:10:38,000 --> 00:10:40,920
that stuff came from next UI. 
Like if I want to do a pop up 

195
00:10:40,920 --> 00:10:44,520
like this or all that stuff 
comes from that and it works 

196
00:10:44,520 --> 00:10:49,040
super well and it integrates 
very easily with a bunch of 

197
00:10:49,040 --> 00:10:52,000
other things like this graph 
does not come from that GY, but 

198
00:10:52,000 --> 00:10:55,000
you just put it in and then it 
kind of just adapts well. 

199
00:10:55,920 --> 00:10:59,680
So you can add like some 
treatments. 

200
00:11:00,080 --> 00:11:02,680
You know, when, when did it get 
this treatment? 

201
00:11:02,840 --> 00:11:04,840
What type of treatment is and 
you can see there's some 

202
00:11:04,840 --> 00:11:07,560
underscores here, but I'm 
literally still just working on 

203
00:11:07,560 --> 00:11:09,720
this. 
But when I hit save now it's 

204
00:11:10,080 --> 00:11:13,840
automatically here and it just 
saved in the database. 

205
00:11:14,200 --> 00:11:17,160
And so there's all these kind of
like little goodness things that

206
00:11:17,160 --> 00:11:20,720
I'm working on, right? 
When you add this in, there it 

207
00:11:20,720 --> 00:11:22,800
is. 
And so it's all good fun. 

208
00:11:23,160 --> 00:11:28,080
And so this part is just dealing
with the cats essentially. 

209
00:11:28,360 --> 00:11:32,320
And so where it gets interesting
with Algolia is that now these 

210
00:11:32,320 --> 00:11:37,480
folks can say, OK, I want the 
the family where they are AT and

211
00:11:37,480 --> 00:11:40,600
I want all the female cats. 
And so it filters down really 

212
00:11:40,600 --> 00:11:43,240
quickly. 
And so they can actually make, 

213
00:11:43,240 --> 00:11:45,200
and you can see the URL updates 
also. 

214
00:11:45,200 --> 00:11:52,280
So I'm planning to actually make
things like presets where they 

215
00:11:52,280 --> 00:11:59,400
can say I want all the cats that
were chipped, but stuff like 

216
00:11:59,400 --> 00:12:01,520
that, whatever. 
And so because they have all 

217
00:12:01,520 --> 00:12:03,800
these questions like, hey, can 
you group this for me and look 

218
00:12:03,800 --> 00:12:05,760
at these things like, sure, 
we'll just make that. 

219
00:12:05,760 --> 00:12:09,160
And then here you can also 
choose, let me just add certain 

220
00:12:09,160 --> 00:12:11,800
fields, yes or no. 
And all this comes from Next UI 

221
00:12:11,800 --> 00:12:15,480
combined with Ligolia. 
And that's just, it's kind of 

222
00:12:15,480 --> 00:12:17,640
magical, right? 
It works pretty well. 

223
00:12:18,120 --> 00:12:22,320
And this is all like the fencing
of Ligolia because when I type 

224
00:12:22,320 --> 00:12:25,920
this, it filters, but when I 
actually add like my name, which

225
00:12:25,920 --> 00:12:29,640
is one of those families, it 
filters on that as well. 

226
00:12:29,880 --> 00:12:32,880
And so that's all set up in 
Ligolia and that works just so 

227
00:12:32,880 --> 00:12:36,280
well. 
And just for the the viewers 

228
00:12:36,360 --> 00:12:38,880
looking at like, hey, Tim, why 
is half of it English and half 

229
00:12:38,880 --> 00:12:41,600
of it French? 
That's literally because I'm 

230
00:12:41,600 --> 00:12:44,360
just whacking this stuff in 
there so my wife can say, oh, 

231
00:12:44,360 --> 00:12:46,120
yeah, that works. 
Let's let's go with this. 

232
00:12:46,520 --> 00:12:48,640
That's cool, right? 
So there's no localization or 

233
00:12:48,640 --> 00:12:53,200
anything in that just yet. 
It's just like this means like 

234
00:12:53,200 --> 00:12:55,640
adoption family and this means 
host family, like stuff like 

235
00:12:55,640 --> 00:12:57,760
that. 
I just had to put it in so she 

236
00:12:57,760 --> 00:13:00,520
can see how it might look later.
And so. 

237
00:13:01,040 --> 00:13:04,080
With that in mind, we have 
foster family, so you can become

238
00:13:04,080 --> 00:13:07,360
a family and add a new family 
and you can be an adoption one 

239
00:13:07,360 --> 00:13:10,480
or host or both because we need 
this information for people to 

240
00:13:10,480 --> 00:13:13,640
be able to, you know, have a 
database of this stuff. 

241
00:13:14,160 --> 00:13:17,400
And then the last. 
You were like modeling out these

242
00:13:17,400 --> 00:13:20,200
databases where you're kind of 
just doing it all in your head, 

243
00:13:20,200 --> 00:13:23,520
or did you lay it out and use a 
tool to like pull it into super 

244
00:13:23,520 --> 00:13:26,800
basin somewhere? 
I tried to use a tool, but it 

245
00:13:26,800 --> 00:13:30,280
didn't really work. 
So I would, I just spent way too

246
00:13:30,280 --> 00:13:32,760
much time in Superbase. 
But I'll show you in a SEC what 

247
00:13:32,760 --> 00:13:34,680
it came out to be. 
And it actually works pretty 

248
00:13:34,680 --> 00:13:36,920
well. 
And so currently I'm working on 

249
00:13:36,920 --> 00:13:40,200
this bit because I want them to 
be able to build a site with 

250
00:13:40,200 --> 00:13:44,400
this data in here and that just 
outputs to some static next site

251
00:13:44,400 --> 00:13:46,760
somewhere. 
And so right now it's still 

252
00:13:46,760 --> 00:13:48,920
quite abstract. 
So I'm building pages and 

253
00:13:48,920 --> 00:13:51,640
components. 
And so I just made like a hero 

254
00:13:51,640 --> 00:13:54,600
component and each hero 
component has a field. 

255
00:13:54,600 --> 00:13:57,600
So this starts to look like a 
hatless CMS, which I didn't 

256
00:13:57,600 --> 00:14:00,800
want, but it kind of needed 
like, so if I want to make like 

257
00:14:00,800 --> 00:14:04,480
a text field, I can just add a 
text field and say this is title

258
00:14:05,200 --> 00:14:08,400
and then title, whatever, I'll 
put something in. 

259
00:14:08,680 --> 00:14:10,680
And so now this has a bunch of 
fields. 

260
00:14:11,080 --> 00:14:14,080
And when I go to pages, I can 
actually say, you know what, 

261
00:14:14,080 --> 00:14:16,240
there's that hero component. 
Let me just add it in. 

262
00:14:16,760 --> 00:14:19,480
And so I'm currently like, now 
you have two, but it's this is 

263
00:14:19,480 --> 00:14:22,720
all just Jason because I'm 
literally working on this today.

264
00:14:23,720 --> 00:14:26,320
So. 
And the ID will be that people 

265
00:14:26,320 --> 00:14:28,560
can drag and drop and this will 
become what you see here, will 

266
00:14:28,560 --> 00:14:30,800
become a form so they can 
actually type all the stuff. 

267
00:14:30,800 --> 00:14:33,280
And then on the side, they'll 
see the updates in the website 

268
00:14:33,280 --> 00:14:37,960
live. 
How does does the form get built

269
00:14:37,960 --> 00:14:41,400
out dynamically like SSR? 
That's wild. 

270
00:14:41,800 --> 00:14:44,040
It's all dynamic stuff like 
these. 

271
00:14:44,040 --> 00:14:47,920
The fact that this has a bunch 
of fields, I'm like when I do 

272
00:14:47,920 --> 00:14:52,400
this, I just update the the the 
state of the page that is not 

273
00:14:52,440 --> 00:14:54,800
unsaved. 
So when I hit save now, it just 

274
00:14:54,800 --> 00:14:59,840
saves it into superbase and I I 
can also just delete it. 

275
00:15:00,320 --> 00:15:02,200
I don't have any like. 
Are you sure? 

276
00:15:02,200 --> 00:15:05,200
So now I screwed something up. 
I think like you see nothing 

277
00:15:05,200 --> 00:15:06,680
here now but like. 
I do. 

278
00:15:08,080 --> 00:15:09,720
Exactly, I'm working on that 
stuff. 

279
00:15:09,720 --> 00:15:14,360
And so to have a look quickly in
Superbase, this is the data 

280
00:15:14,360 --> 00:15:16,320
model. 
And I know I realized this is 

281
00:15:16,320 --> 00:15:20,840
small. 
So in the end, the cat itself 

282
00:15:21,080 --> 00:15:24,920
has a ton of fields, right? 
Whereas they like all dates, 

283
00:15:24,920 --> 00:15:30,000
booleans, things like that. 
And then each cat has a host 

284
00:15:30,000 --> 00:15:33,800
family ID and an adoption family
ID potentially, which is then 

285
00:15:33,800 --> 00:15:35,760
connected to a family's 
database. 

286
00:15:36,720 --> 00:15:39,840
And then there's also they need 
to get weigh insurance 

287
00:15:39,840 --> 00:15:42,040
sometimes. 
And then it's, it's a date and a

288
00:15:42,040 --> 00:15:44,760
wait. 
And so they're connected to that

289
00:15:44,760 --> 00:15:47,160
because I need to be able to 
make that graph, right? 

290
00:15:47,680 --> 00:15:49,600
It needs to be separate data 
entries. 

291
00:15:50,400 --> 00:15:52,880
And then treatments as well, 
because there's a bunch of 

292
00:15:52,880 --> 00:15:54,320
different treatments they can 
get. 

293
00:15:54,320 --> 00:15:57,400
So when you look at a treatment 
is like an innumerable type. 

294
00:15:57,400 --> 00:16:00,320
So a bunch of things it can be. 
And we look at that. 

295
00:16:01,080 --> 00:16:03,240
You see here, there's a bunch of
different ones. 

296
00:16:03,560 --> 00:16:06,120
First vaccination, second 
vaccination. 

297
00:16:06,360 --> 00:16:11,240
Deworming or corona this? 
Is amazing because this is in 

298
00:16:11,240 --> 00:16:14,480
Superbase itself, yes? 
That's why Superbase is so 

299
00:16:14,480 --> 00:16:16,840
awesome. 
It allows you to just build this

300
00:16:16,840 --> 00:16:19,960
kind of in forms and stuff. 
That's really cool. 

301
00:16:20,000 --> 00:16:22,400
So you can look at the schema 
here and you say, OK, this is my

302
00:16:22,400 --> 00:16:27,880
cat schema. 
And so you can actually edit 

303
00:16:27,880 --> 00:16:29,920
that table in here if you wanted
to. 

304
00:16:30,000 --> 00:16:31,520
You see, these are all my 
fields. 

305
00:16:32,360 --> 00:16:36,000
I just put them in like this. 
Of course the real backup 

306
00:16:36,000 --> 00:16:38,720
developers are going to more 
have a look at the definition 

307
00:16:38,720 --> 00:16:41,840
like this and then run it like 
that. 

308
00:16:42,320 --> 00:16:45,480
But I'm that's not my Forte to 
be. 

309
00:16:45,840 --> 00:16:48,160
I thought I was like super full 
stack. 

310
00:16:48,400 --> 00:16:53,600
I'm not, let's be honest. 
It just, this just works well 

311
00:16:53,880 --> 00:16:58,200
and they just give you so much 
lovely tooling to to like get 

312
00:16:58,200 --> 00:17:01,520
stuff done. 
And it seems like it will scale 

313
00:17:01,520 --> 00:17:04,319
really well too. 
Well, I've done one of my 

314
00:17:04,319 --> 00:17:08,720
conference talks where people 
were life voting on stuff and 

315
00:17:08,720 --> 00:17:10,880
every photo they did was like a 
new database row. 

316
00:17:10,880 --> 00:17:14,280
And then I had a watcher on the 
database row in real time and 

317
00:17:14,280 --> 00:17:17,599
showed something on the screen 
and for 20 minutes, 1500 people 

318
00:17:17,599 --> 00:17:19,800
were just like folding like that
the whole time. 

319
00:17:20,599 --> 00:17:23,280
It didn't even break a tiny 
sweat. 

320
00:17:23,359 --> 00:17:25,400
It was. 
And were you hosted on their 

321
00:17:25,400 --> 00:17:29,560
cloud at that point? 
It's all on on superbase.com 

322
00:17:29,560 --> 00:17:31,840
free account. 
That's that's unbelievable. 

323
00:17:31,920 --> 00:17:33,840
Ridiculous. 
That was that. 

324
00:17:33,840 --> 00:17:35,560
What that was view count for 
something? 

325
00:17:36,080 --> 00:17:38,760
I did like that talk. 
I was playing guitar so people 

326
00:17:40,520 --> 00:17:45,720
and that was like I did it like 
7-8 Times Now and it was 

327
00:17:45,720 --> 00:17:49,680
ridiculous how well the skills. 
But also everybody who voted, I 

328
00:17:49,680 --> 00:17:53,080
like, I think like there was 
like 2000 people on the platform

329
00:17:53,080 --> 00:17:57,200
at the same time at certain 
events and cloud an area was on 

330
00:17:57,200 --> 00:18:00,320
like in runtime, even making 
their profile images like 

331
00:18:00,320 --> 00:18:01,920
circular and puts them on a 
canvas. 

332
00:18:02,360 --> 00:18:06,080
Like all of these tools scaled 
like nothing I've ever seen. 

333
00:18:06,640 --> 00:18:09,680
And so I'm going to stick with 
this super based stuff because 

334
00:18:09,680 --> 00:18:13,600
it scales like nothing else. 
And it's, it's so easy to use. 

335
00:18:14,080 --> 00:18:16,640
I had to get used a lot to 
things like this though. 

336
00:18:16,640 --> 00:18:20,200
And we might get into that when 
you start trying, there's like 

337
00:18:20,200 --> 00:18:24,720
policies here, right? 
So in this case, I made a policy

338
00:18:24,720 --> 00:18:28,720
that authenticated users can 
actually create, remove, and 

339
00:18:28,720 --> 00:18:30,960
update things, but people who 
are not authenticated can 

340
00:18:30,960 --> 00:18:32,920
actually not even see these 
database rows. 

341
00:18:33,760 --> 00:18:37,560
And so these policies were kind 
of a little tricky to get 

342
00:18:37,560 --> 00:18:39,960
started with because I wasn't 
used to that. 

343
00:18:40,360 --> 00:18:42,680
Yeah. 
Yeah, but we'll get into that, I

344
00:18:42,680 --> 00:18:44,400
think. 
That's powerful. 

345
00:18:45,000 --> 00:18:48,320
It is extremely powerful. 
I would. 

346
00:18:48,360 --> 00:18:51,560
Imagine we'll have to be careful
when we pipe over data into 

347
00:18:51,560 --> 00:18:53,800
Algolia. 
Like what data and like 

348
00:18:53,800 --> 00:18:58,440
sensitivity is going? 
100% and so right now I chose 

349
00:18:58,440 --> 00:19:00,440
because we haven't even shown 
Algolia just yet. 

350
00:19:00,440 --> 00:19:03,080
Let's go in there. 
And as you can see, this is the 

351
00:19:03,080 --> 00:19:06,760
data I have in there. 
And the most important bit is I 

352
00:19:06,920 --> 00:19:10,280
only have like, actually, yeah, 
I'm. 

353
00:19:10,360 --> 00:19:13,320
It's not good to be fair, 
because look, there's 

354
00:19:13,320 --> 00:19:15,720
information about this host 
family in here. 

355
00:19:15,920 --> 00:19:17,760
Yeah, that's the kind of stuff 
I'll have to leave out. 

356
00:19:18,040 --> 00:19:21,280
I should have actually probably 
just put the ID in there. 

357
00:19:21,400 --> 00:19:25,360
But what I want to do in here, I
go to my cats. 

358
00:19:25,720 --> 00:19:30,120
I kind of just want to filter on
this family and then go into 

359
00:19:30,120 --> 00:19:31,680
that cat and do something about 
it. 

360
00:19:31,680 --> 00:19:35,280
Yeah. 
So there's a give and take to be

361
00:19:35,280 --> 00:19:37,480
figured out. 
Luckily all the stuff you have 

362
00:19:37,480 --> 00:19:40,440
to be logged in to be able to 
see, like if I log out now. 

363
00:19:41,920 --> 00:19:45,080
The only, the only tricky part 
there, Tim and we can, we can 

364
00:19:45,080 --> 00:19:48,240
look at it, but like you have to
set certain things up in Algolia

365
00:19:48,240 --> 00:19:52,000
so that when we're grabbing that
data, we don't need it as well. 

366
00:19:52,000 --> 00:19:55,520
So. 
Yeah, and everything now in here

367
00:19:55,520 --> 00:19:58,960
is all fake because I wanted to 
keep it fake for now so that 

368
00:19:58,960 --> 00:20:01,440
that's all all right. 
Well, I'm, I'm stoked. 

369
00:20:01,440 --> 00:20:04,800
I mean, we're 20 minutes in. 
I think we did a good demo. 

370
00:20:04,800 --> 00:20:07,640
We have a base now, right? 
Like this is a good base. 

371
00:20:07,640 --> 00:20:09,440
Let's let's start cranking on 
code. 

372
00:20:09,440 --> 00:20:12,360
And I know how slow I type, so 
I. 

373
00:20:12,560 --> 00:20:16,640
Think me too, this took a while 
so I just killed my screen share

374
00:20:16,640 --> 00:20:21,240
and just go in it with you man. 
So for our audience, I've 

375
00:20:21,240 --> 00:20:29,200
created like a base repository 
that has next next UI and also 

376
00:20:29,680 --> 00:20:31,720
the packages for Super Bass and 
Algolia. 

377
00:20:31,720 --> 00:20:34,280
So the only thing we'd have to 
do now to actually properly get 

378
00:20:34,280 --> 00:20:37,600
started. 
Also, I did log in and 

379
00:20:37,600 --> 00:20:40,680
confirmation of a link click 
because that's just too much 

380
00:20:40,680 --> 00:20:42,920
typing. 
It's just not fun because you 

381
00:20:42,920 --> 00:20:47,040
have to do state of a form and a
lot like, you know, we don't 

382
00:20:47,040 --> 00:20:48,280
want to do that on the stream, 
right? 

383
00:20:48,320 --> 00:20:49,840
So. 
I think we'll, we'll probably be

384
00:20:49,840 --> 00:20:52,840
typing a lot, so I'll try to 
make this as big as possible for

385
00:20:52,840 --> 00:20:55,640
folks. 
Literally the only thing when we

386
00:20:55,640 --> 00:20:58,280
deliver this repo back to you, 
you'll probably see a lot of 

387
00:20:58,280 --> 00:21:00,800
this done. 
And I'll hold that in Coding 

388
00:21:00,800 --> 00:21:03,600
Cats GitHub. 
So when you load this up you 

389
00:21:03,600 --> 00:21:08,120
should only have to do PMPM 
install to get that rolling. 

390
00:21:08,280 --> 00:21:14,440
I will move off this main branch
right now and do a new one just 

391
00:21:14,440 --> 00:21:17,720
called final or something like 
that. 

392
00:21:18,600 --> 00:21:23,200
Yeah, because what we need is a 
super base account and an 

393
00:21:23,200 --> 00:21:27,040
Algolia account, and we need to 
have the credentials set into 

394
00:21:27,040 --> 00:21:30,040
our environment variables. 
Because without that, as you can

395
00:21:30,040 --> 00:21:31,640
see right now, it doesn't even 
run. 

396
00:21:32,040 --> 00:21:35,640
So let's get that stuff first. 
So if you're out in Elgalia, let

397
00:21:36,080 --> 00:21:39,440
me go home real quick. 
So this is kind of my main 

398
00:21:39,440 --> 00:21:41,920
screen. 
You might get a pop up if you've

399
00:21:41,920 --> 00:21:44,120
never been in here, and it'll 
walk you through some more of 

400
00:21:44,120 --> 00:21:46,920
this. 
But you should eventually be 

401
00:21:46,920 --> 00:21:50,840
able to to get to the point 
where you can create a new app. 

402
00:21:50,960 --> 00:21:53,880
So I'm going to create an 
application. 

403
00:21:54,720 --> 00:21:57,000
I'm gonna put it closer to me 
and that Tim. 

404
00:21:57,000 --> 00:21:58,560
Sorry, Tim. 
Yeah, it's all good. 

405
00:21:58,560 --> 00:22:00,320
It's faster for you and you're 
streaming. 

406
00:22:01,000 --> 00:22:03,160
So Oh my goodness. 
Oh, it's not cats. 

407
00:22:03,480 --> 00:22:06,080
Oh crap, yeah, I know. 
We've we've really broke our 

408
00:22:06,080 --> 00:22:09,520
brand here. 
Yeah, actually it's so much fun 

409
00:22:09,520 --> 00:22:12,920
that like we're I'm calling 
Catdev, building a cat database.

410
00:22:12,960 --> 00:22:15,320
I know the Catnip DB by the way 
the. 

411
00:22:15,320 --> 00:22:18,080
Crazy part is you were doing it 
before we even talked about 

412
00:22:18,080 --> 00:22:19,040
doing this. 
Stream. 

413
00:22:19,360 --> 00:22:22,280
It's organically fits, right? 
It's kind of nice. 

414
00:22:22,360 --> 00:22:24,000
What do you think suggestion 
here? 

415
00:22:25,760 --> 00:22:26,880
What are we looking at? 
I'm just. 

416
00:22:27,480 --> 00:22:31,600
Sorry, index on the Algolia, let
me let me make this larger so 

417
00:22:31,600 --> 00:22:33,000
people can see that just having 
a. 

418
00:22:33,480 --> 00:22:36,400
Look honestly, do do we want to 
make a simplified version of my 

419
00:22:36,400 --> 00:22:40,240
cat database without like the 
Super complicated stuff of 

420
00:22:40,240 --> 00:22:42,600
building web pages and dragging 
and dropping components? 

421
00:22:42,760 --> 00:22:46,040
I mean, we'll have to simplify a
decent amount because we only 

422
00:22:46,040 --> 00:22:50,720
have 8073 minutes left. 
Yeah, and you know what? 

423
00:22:50,840 --> 00:22:53,960
Getting it going takes a second.
But once it's in. 

424
00:22:54,360 --> 00:23:00,360
Let's let's do this and let's 
just do a coding cat Gov. 

425
00:23:00,840 --> 00:23:03,120
What's your cats? 
Let's let's just call it cats. 

426
00:23:03,120 --> 00:23:04,320
We're just going to put some 
cats in. 

427
00:23:04,520 --> 00:23:06,440
OK, cats. 
All right. 

428
00:23:06,520 --> 00:23:09,360
So index could be a little 
interesting. 

429
00:23:09,640 --> 00:23:12,640
They call them indexes and you 
have indices. 

430
00:23:12,640 --> 00:23:16,400
But in reality, just think of 
this as like a storage area or a

431
00:23:16,400 --> 00:23:17,400
project at this. 
Point. 

432
00:23:17,400 --> 00:23:19,800
Yeah, because they or you know 
why they call it an index. 

433
00:23:19,960 --> 00:23:24,440
When you have Postgres DB like 
in Superbase, you create an 

434
00:23:24,440 --> 00:23:28,120
index for certain fields you can
search into, right? 

435
00:23:28,440 --> 00:23:31,000
And now they call this an index.
But this is literally just for 

436
00:23:31,000 --> 00:23:33,720
searching, but it's a similar 
wording I guess. 

437
00:23:33,920 --> 00:23:37,720
Yeah, it's, it's interesting. 
So I've got all of that, I 

438
00:23:37,720 --> 00:23:39,520
think. 
We don't have data just yet. 

439
00:23:39,680 --> 00:23:42,920
Do we need data to do anything? 
Well, of course, because you 

440
00:23:42,920 --> 00:23:45,560
need to be able to get some 
search data back, but we need to

441
00:23:45,560 --> 00:23:47,800
get that data first from 
Superbase. 

442
00:23:48,480 --> 00:23:51,520
That's why I was wondering if we
need an API key or just wait. 

443
00:23:52,200 --> 00:23:54,720
Get the API key so the app can 
at least run. 

444
00:23:55,120 --> 00:23:57,000
So that's what I'm struggling 
with. 

445
00:23:57,000 --> 00:23:59,800
Where do I head free? 
Yeah, you go to your your 

446
00:23:59,800 --> 00:24:03,280
settings, yeah. 
And then there should be a drop 

447
00:24:03,280 --> 00:24:05,040
down where you can select what 
you're. 

448
00:24:05,120 --> 00:24:07,960
Yeah, I think that's probably 
the new one. 

449
00:24:09,360 --> 00:24:12,320
And then here you should, oh, 
wait, go to the right top. 

450
00:24:12,720 --> 00:24:14,480
Alex Patterson. 
Like the earlier keys. 

451
00:24:14,720 --> 00:24:16,760
Oh, there you go. 
That's a new setting maybe. 

452
00:24:17,000 --> 00:24:19,640
OK, OK. 
I think we only need search. 

453
00:24:20,000 --> 00:24:22,720
Oh, we will need both if we want
it. 

454
00:24:22,720 --> 00:24:25,960
I don't know if we're having 
enough time to be able to go 

455
00:24:25,960 --> 00:24:28,720
something to push the delta of 
the change to Algolia. 

456
00:24:28,720 --> 00:24:29,800
I don't think so. 
Let's. 

457
00:24:29,800 --> 00:24:32,160
Try. 
Let's try and just type it all 

458
00:24:32,160 --> 00:24:33,520
in and then we'll see where we 
get. 

459
00:24:33,560 --> 00:24:38,520
Exactly, for now just do dot env
and just get your normal key to 

460
00:24:38,520 --> 00:24:40,800
search only. 
Oh, do we need? 

461
00:24:41,040 --> 00:24:42,400
Yeah. 
Yeah, you need the application 

462
00:24:42,400 --> 00:24:44,200
ID as well. 
Search only. 

463
00:24:44,680 --> 00:24:47,880
Yeah, just go for this for now. 
Does that. 

464
00:24:48,040 --> 00:24:50,560
Yeah, that's that one, yeah. 
OK, cool. 

465
00:24:51,480 --> 00:24:55,680
And I think out-of-the-box it 
should should just now see that 

466
00:24:55,680 --> 00:24:57,640
you don't really have to put it 
in a convic. 

467
00:24:58,200 --> 00:25:00,320
That's the the black magic of 
next modules. 

468
00:25:00,320 --> 00:25:03,160
They do stuff for you that you 
don't always know why, but it 

469
00:25:03,160 --> 00:25:05,880
tends to work. 
And then on the Superbase side, 

470
00:25:05,880 --> 00:25:08,520
we're gonna create a Superbase 
project. 

471
00:25:08,800 --> 00:25:12,000
Yep. 
I thought I could do a new one, 

472
00:25:12,000 --> 00:25:13,080
but we'll just put it in 
Kodakai. 

473
00:25:13,080 --> 00:25:14,920
I don't care. 
Oh. 

474
00:25:14,920 --> 00:25:17,120
Yeah, per organization you have 
three projects. 

475
00:25:18,320 --> 00:25:20,160
That's why I keep burning them 
now. 

476
00:25:20,720 --> 00:25:23,920
There you go. 
A super strong password? 

477
00:25:23,920 --> 00:25:28,080
How about password? 
For now, that's all good. 

478
00:25:29,520 --> 00:25:31,640
That's good. 
Not good enough. 

479
00:25:31,720 --> 00:25:34,080
Oh, it might not. 
It might not let me. 

480
00:25:35,440 --> 00:25:39,480
So password 1234. 
That's not going to get better. 

481
00:25:39,480 --> 00:25:41,800
I know their CTO is not going to
allow this for you. 

482
00:25:42,600 --> 00:25:44,360
Man, all right, I'm just going 
to generate 1. 

483
00:25:45,000 --> 00:25:48,040
Yeah, exactly. 
That sounds good. 

484
00:25:49,960 --> 00:25:52,400
Let's see. 
WN, California? 

485
00:25:52,400 --> 00:25:55,880
No thanks, that's too far away. 
It's too far away man, we need 

486
00:25:55,880 --> 00:25:57,640
something in the middle. 
Perfect. 

487
00:25:57,640 --> 00:26:02,080
I know I need Iowa or like Ohio 
would even be better for me. 

488
00:26:04,800 --> 00:26:08,480
All right, so we have 3. 
Your API keys right now, so we 

489
00:26:08,480 --> 00:26:11,280
can already copy these. 
So this one. 

490
00:26:11,440 --> 00:26:13,160
Yeah, I think that's enough for 
now. 

491
00:26:13,160 --> 00:26:16,600
And then we need your URL which 
is a bit below. 

492
00:26:16,880 --> 00:26:18,880
Yeah, this one. 
Sweet. 

493
00:26:19,040 --> 00:26:21,880
OK. 
Right, so should we just try and

494
00:26:21,880 --> 00:26:24,680
run the app now? 
Now that it has all the data, 

495
00:26:24,680 --> 00:26:30,000
let's see if it actually is. 
Happy doing PMPM dev, looks like

496
00:26:30,000 --> 00:26:32,840
we got some fun tail and stuff 
kicking through. 

497
00:26:32,840 --> 00:26:34,480
Yes. 
And that's what comes 

498
00:26:34,560 --> 00:26:38,320
out-of-the-box essentially with 
a next UI that you stillwind. 

499
00:26:39,160 --> 00:26:41,160
There we go and you see this 
login. 

500
00:26:41,240 --> 00:26:45,440
That's what I made for you. 
So at least we're not, you know,

501
00:26:45,640 --> 00:26:48,040
we don't have to code the whole 
state of this form and then like

502
00:26:48,040 --> 00:26:50,880
confirms and all this stuff. 
Let's take a quick look at what 

503
00:26:50,880 --> 00:26:53,720
login is though, of course. 
Yeah, so that's a page. 

504
00:26:54,160 --> 00:26:59,000
And So what is your, what are 
you most used to right now with 

505
00:26:59,000 --> 00:27:00,440
your frameworks? 
It's probably spelt. 

506
00:27:00,520 --> 00:27:03,640
Good right health or or next 
yes, I kind of go back and forth

507
00:27:03,640 --> 00:27:08,040
on either of those so. 
So with Nuxton Few, it's very 

508
00:27:08,320 --> 00:27:11,320
templately driven, right? 
So you have your code bit on the

509
00:27:11,320 --> 00:27:15,120
top, and whatever happens in 
there is represented in the 

510
00:27:15,120 --> 00:27:17,040
template below. 
So it's one file. 

511
00:27:17,040 --> 00:27:18,480
It's a bit like Svelt in that 
sense. 

512
00:27:18,720 --> 00:27:21,120
I I feel like all these meta 
frameworks are getting pretty 

513
00:27:21,120 --> 00:27:22,840
close. 
There's some syntax that's a 

514
00:27:22,840 --> 00:27:25,840
little different, but true. 
Well, next GS, you can do 

515
00:27:25,840 --> 00:27:28,440
Everything Everywhere, which is 
slightly different, but they're 

516
00:27:28,440 --> 00:27:31,320
getting towards this even more 
nowadays to be fair. 

517
00:27:31,960 --> 00:27:36,320
And so in few, like all this U 
container, U card, all that 

518
00:27:36,320 --> 00:27:40,360
stuff is essentially just next 
UI components that we're using 

519
00:27:40,360 --> 00:27:42,680
here. 
And like this little template 

520
00:27:42,680 --> 00:27:45,960
thing that you can see on like 
below you like that's the 

521
00:27:45,960 --> 00:27:51,320
template of the full few file. 
When you go to line 43 there's 

522
00:27:51,320 --> 00:27:54,920
another template and you can see
that has hash header which is 

523
00:27:54,920 --> 00:27:58,800
essentially like a little hook 
into the the the component that 

524
00:27:59,040 --> 00:28:01,720
Next UI gave you to do anything 
custom you want. 

525
00:28:01,960 --> 00:28:04,720
Nice, cool. 
So I don't know how you call 

526
00:28:04,720 --> 00:28:07,160
that like in in few and next you
call this a slot. 

527
00:28:07,560 --> 00:28:10,440
Yeah, slot. 
I think is. 

528
00:28:11,120 --> 00:28:15,480
Makes the most sense and we can 
have scope slots and slots that 

529
00:28:15,480 --> 00:28:17,120
get variables and a whole bunch.
Of stuff. 

530
00:28:17,120 --> 00:28:19,560
Kind of funny because I feel 
like this is back to the old 

531
00:28:19,560 --> 00:28:24,640
angular set up for stuff which. 
Is well, if you look at few one 

532
00:28:24,640 --> 00:28:27,720
and the first like Angular stuff
that came out for web related 

533
00:28:27,720 --> 00:28:31,480
things, it's very similar, but 
they moved out of that. 

534
00:28:31,840 --> 00:28:35,520
Like right now it's kind of away
from it a bit, but the template 

535
00:28:35,520 --> 00:28:39,720
bits are still there. 
So when you scroll up, you'll 

536
00:28:39,720 --> 00:28:42,720
see that we have superbase and 
user. 

537
00:28:42,720 --> 00:28:45,920
And then there's this concept in
view now that's called 

538
00:28:45,920 --> 00:28:50,520
composable and it's like a use 
something and you could see 

539
00:28:50,520 --> 00:28:54,880
those as next or react hooks, 
but it has a slightly more 

540
00:28:54,880 --> 00:28:56,840
stuff. 
You can do a bit more with it 

541
00:28:57,360 --> 00:29:00,920
where you can encapsulate a 
whole bunch of stuff inside that

542
00:29:00,920 --> 00:29:04,200
function that you create. 
And then in you did it in React,

543
00:29:04,200 --> 00:29:06,880
it's all more in the open. 
It's a little bit more, it's 

544
00:29:06,880 --> 00:29:08,840
less forgiving, but you can do 
more things. 

545
00:29:08,840 --> 00:29:10,880
And then I mean, few, it's kind 
of you have to go to the file 

546
00:29:10,880 --> 00:29:14,560
and do everything there, OK. 
And it tends to output reactive 

547
00:29:14,560 --> 00:29:16,560
related things, which is kind of
nice. 

548
00:29:16,680 --> 00:29:19,840
These are things that OK, 
they're coming from somewhere. 

549
00:29:19,840 --> 00:29:21,960
Where where are your imports on 
this? 

550
00:29:22,160 --> 00:29:24,840
OK, so that's what is again 
interesting in next here like 

551
00:29:25,080 --> 00:29:28,320
the use super base client and 
use super base user come from 

552
00:29:28,320 --> 00:29:32,480
the Super base module for next 
and they literally just expose 

553
00:29:32,480 --> 00:29:34,160
them. 
Interesting. 

554
00:29:34,160 --> 00:29:36,240
Now there you go. 
I am not used to. 

555
00:29:36,360 --> 00:29:40,280
No imports, nothing. 
If you make a component in Next 

556
00:29:40,320 --> 00:29:42,800
and you put it in the components
folder, it's just there. 

557
00:29:42,800 --> 00:29:45,160
You just use it. 
There's no import needed. 

558
00:29:45,400 --> 00:29:46,720
The thing is, you can turn that 
off. 

559
00:29:47,400 --> 00:29:49,440
But the cool thing is because 
they have that feature, you can 

560
00:29:49,440 --> 00:29:52,520
also say that component and put 
Lacey before it and it just 

561
00:29:52,560 --> 00:29:54,520
hydrates it Lacey. 
That's why I was going to ask 

562
00:29:54,520 --> 00:29:56,480
like there's. 
Some all that fancy stuff. 

563
00:29:56,520 --> 00:29:58,960
It's all in there because it's 
out-of-the-box for them. 

564
00:29:59,680 --> 00:30:03,600
That Evan, you and team. 
Holy crap, the the guys at Knox 

565
00:30:03,600 --> 00:30:05,920
and few it's there's like this 
is the thing. 

566
00:30:05,920 --> 00:30:10,400
It's not as famous as like right
now with Astro and and next and 

567
00:30:10,400 --> 00:30:14,280
stuff, but all the things, all 
the, the, I'm not sure how 

568
00:30:14,280 --> 00:30:16,720
controversial this is, but lots 
of things we see in those 

569
00:30:16,720 --> 00:30:19,360
frameworks are actually Knox had
that like last year, but they 

570
00:30:19,360 --> 00:30:22,160
just didn't tell anyone. 
Yeah, I feel like that's the 

571
00:30:22,160 --> 00:30:24,280
case on all of these. 
They're they're like, oh, that's

572
00:30:24,280 --> 00:30:25,160
cool. 
Oh, that's cool. 

573
00:30:25,160 --> 00:30:26,600
And they kind. 
Of, yeah, and we all kind of 

574
00:30:26,600 --> 00:30:29,480
just align a little bit. 
How's how's how's the view on 

575
00:30:29,480 --> 00:30:30,960
signals? 
Do they have something for 

576
00:30:30,960 --> 00:30:35,160
signals already? 
I do not dare to say because I 

577
00:30:35,160 --> 00:30:40,400
haven't used it, but probably if
anyone here that uses few is in 

578
00:30:40,400 --> 00:30:42,440
the chat please tell us. 
I'm. 

579
00:30:42,440 --> 00:30:45,360
Sure they have. 
I'm I'm dying to know so it's 

580
00:30:45,360 --> 00:30:48,800
felt five will have runes, which
is basically signals coming out 

581
00:30:48,800 --> 00:30:51,760
too. 
So OK, so in the. 

582
00:30:51,880 --> 00:30:53,600
End. 
They do similar things, right? 

583
00:30:53,640 --> 00:30:57,800
So what to be able to make this 
work, let's go into Superbase 

584
00:30:57,800 --> 00:31:01,520
and actually turn on this type 
of login behavior on the 

585
00:31:01,520 --> 00:31:03,520
sidebar. 
There should be something with 

586
00:31:03,520 --> 00:31:08,880
yeah, authentication. 
And then you can configure, I 

587
00:31:08,880 --> 00:31:14,320
think go to providers, because 
here you can actually just do 

588
00:31:14,600 --> 00:31:17,040
everything. 
It's ridiculous. 

589
00:31:17,040 --> 00:31:20,240
It's so cool. 
So we're using e-mail and it's 

590
00:31:20,240 --> 00:31:24,640
already enabled, so we will 
probably need to go to URL 

591
00:31:24,640 --> 00:31:27,840
configuration though to actually
make that work. 

592
00:31:28,200 --> 00:31:30,640
Oh, it's already local host, so 
that's cool. 

593
00:31:31,680 --> 00:31:34,200
Let me quickly check my own 
Superbase, because we might have

594
00:31:34,200 --> 00:31:40,960
to put that redirect URL in also
authentication configuration. 

595
00:31:40,960 --> 00:31:44,440
Yeah, So what I have in redirect
URLs is just that local host and

596
00:31:44,440 --> 00:31:51,200
then slash confirm. 
So this is normally in Oauth, 

597
00:31:51,200 --> 00:31:53,760
you have this confirm thing and 
you have a token and it sets 

598
00:31:53,760 --> 00:31:56,240
everything up. 
This is similar with the e-mail 

599
00:31:56,240 --> 00:31:58,840
magic link thing that they do. 
It comes back with the code, 

600
00:31:59,160 --> 00:32:02,000
they do some stuff with Jason 
Web Tokens, set it up and then 

601
00:32:02,000 --> 00:32:05,880
redirect you back and. 
I assume in in the actual code 

602
00:32:05,880 --> 00:32:09,800
base you have a confirm file. 
Yes, you can see it there. 

603
00:32:09,800 --> 00:32:11,480
Confirm. 
There we go, sweet. 

604
00:32:11,920 --> 00:32:16,040
And what it does, and that's 
like super easy. 

605
00:32:16,040 --> 00:32:19,320
Now it just looks if there's a 
user with that composable that 

606
00:32:19,320 --> 00:32:22,720
you get for free from the module
and then we're watching that 

607
00:32:22,720 --> 00:32:26,440
user because it's it's it's a, a
reactive prop that comes out of 

608
00:32:26,440 --> 00:32:30,040
it and it says immediate is 
true, which means I'm directly 

609
00:32:30,040 --> 00:32:32,400
when this thing loads, I'm 
directly looking at if this 

610
00:32:32,400 --> 00:32:35,280
thing has changed or not. 
And if it exists, it just 

611
00:32:35,280 --> 00:32:39,120
redirect you to slash. 
And for me, like looking at 

612
00:32:39,120 --> 00:32:43,560
this, this all seems like it's 
what sort of client side 

613
00:32:43,560 --> 00:32:47,240
rendered right at this point. 
Right now this bit is client 

614
00:32:47,240 --> 00:32:50,560
side rendered, but this could 
also be server side rendered. 

615
00:32:50,560 --> 00:32:53,960
That's the next. 
Sometimes you don't really know 

616
00:32:54,240 --> 00:32:58,040
and so their default by now is 
actually it's all server and 

617
00:32:58,040 --> 00:33:00,000
client at all times. 
OK, cool. 

618
00:33:00,640 --> 00:33:03,440
And so if you really wanted to 
be just client, you can do dot 

619
00:33:03,440 --> 00:33:07,560
client in the file name or 
there's a client only component 

620
00:33:07,560 --> 00:33:10,680
you can put around some stuff. 
So just put your own e-mail 

621
00:33:10,680 --> 00:33:12,560
address here and see what if it 
sends it to you. 

622
00:33:13,160 --> 00:33:15,760
Alex Coding. 
There we go. 

623
00:33:16,360 --> 00:33:20,520
So you might want to go off 
screen to to to check your 

624
00:33:20,520 --> 00:33:22,600
e-mail to see if you have a 
super based link. 

625
00:33:23,120 --> 00:33:30,320
I do I will copy this clean link
and go like this. 

626
00:33:31,240 --> 00:33:34,680
And oh, it just the confirm was 
so fast that you're in now. 

627
00:33:35,240 --> 00:33:37,600
So. 
We can now actually see the home

628
00:33:37,600 --> 00:33:40,040
page. 
Just just because like, I'm, I'm

629
00:33:40,040 --> 00:33:43,880
a nerd and I, I work for an 
authentication company. 

630
00:33:43,880 --> 00:33:45,480
So it's cool that we're checking
this out. 

631
00:33:45,480 --> 00:33:48,400
Yeah, exactly. 
I really wanna know what's 

632
00:33:48,400 --> 00:33:51,600
floating around in here. 
Well, have a look if there's a 

633
00:33:51,600 --> 00:33:54,520
Jason Webb token or something, 
there must be something that 

634
00:33:54,520 --> 00:33:58,840
they've done. 
I should have probably cleared 

635
00:33:58,840 --> 00:34:00,560
this first is. 
This a cookie. 

636
00:34:00,560 --> 00:34:02,800
Perhaps they they said it. 
Here it looks like they have 

637
00:34:02,800 --> 00:34:07,080
some next stuff. 
I don't know, maybe. 

638
00:34:07,520 --> 00:34:10,679
What you can do maybe? 
Got started. 

639
00:34:10,679 --> 00:34:14,400
I I would expect a cookie, but 
since we're not server side 

640
00:34:14,400 --> 00:34:17,840
that's kind of interesting. 
Well, I think honestly this 

641
00:34:17,840 --> 00:34:20,960
probably, I don't know. 
Super based access token. 

642
00:34:21,239 --> 00:34:23,880
There we go. 
So that's a JWTI think. 

643
00:34:24,199 --> 00:34:26,080
Yeah, you have you ever checked 
this out so. 

644
00:34:27,159 --> 00:34:31,920
Here comes the commercial. 
I know it's it's kind of one of 

645
00:34:31,920 --> 00:34:35,760
those things. 
Is it this? 

646
00:34:37,239 --> 00:34:39,199
This is bad. 
I don't know where it's at. 

647
00:34:41,800 --> 00:34:43,880
No, no, no, no. 
This. 

648
00:34:43,880 --> 00:34:46,760
It's the same. 
We moved everything. 

649
00:34:46,760 --> 00:34:49,920
I can't find it anymore. 
So I'm going to do the bad thing

650
00:34:49,920 --> 00:34:53,960
and go go to our competitors. 
Oh boy, Nope. 

651
00:34:54,360 --> 00:34:58,840
Don't kill me, but this this is 
kind of what comes back from 

652
00:34:58,840 --> 00:35:00,760
Superbase and you'll see in 
here. 

653
00:35:01,320 --> 00:35:04,400
So this is a JWT. 
Oh, you can decode it. 

654
00:35:04,400 --> 00:35:05,240
That's cool. 
Yeah. 

655
00:35:05,240 --> 00:35:07,240
So it's it's I didn't know that,
yeah. 

656
00:35:07,600 --> 00:35:09,360
And so you can look at what's 
coming back. 

657
00:35:09,360 --> 00:35:12,920
And so the interesting thing on 
and we could probably spend a 

658
00:35:12,920 --> 00:35:15,880
whole day diving into this, but.
Authentication, yes. 

659
00:35:17,280 --> 00:35:20,320
The the cool part is like this 
is kind of your identifier 

660
00:35:20,320 --> 00:35:24,480
that's sitting in there and that
sub ID, but then it has our 

661
00:35:24,480 --> 00:35:28,320
e-mail and like why it was 
provided it was through e-mail 

662
00:35:28,320 --> 00:35:30,920
and that sort of stuff. 
But you can also, which I see 

663
00:35:30,920 --> 00:35:33,800
right here, provide a bunch of 
user metadata. 

664
00:35:34,000 --> 00:35:37,800
So like on Fusion auth, we we 
pass it's it's not only 

665
00:35:37,840 --> 00:35:40,880
authentication, it's also. 
Well, it's a user database I 

666
00:35:40,880 --> 00:35:41,800
imagine. 
Yeah. 

667
00:35:41,800 --> 00:35:45,920
So there's the customer identity
side of things too, so. 

668
00:35:46,240 --> 00:35:48,400
That's a really interesting bit,
yeah. 

669
00:35:48,840 --> 00:35:51,200
What you could do? 
Also you see that little icon 

670
00:35:51,200 --> 00:35:53,400
below there with the next logo? 
Oh yes. 

671
00:35:54,080 --> 00:35:56,720
So when you open this one, just 
click on the left one. 

672
00:35:56,920 --> 00:35:58,680
Oh, left one. 
Yeah, the other one is just 

673
00:35:58,680 --> 00:36:00,640
inspect. 
Oh, it's you're inspecting. 

674
00:36:00,640 --> 00:36:02,520
Or you can just click on a 
component now because you're 

675
00:36:02,520 --> 00:36:05,120
inspecting your components. 
Oh, that's wild. 

676
00:36:05,280 --> 00:36:07,320
So. 
It's just an old demo and see 

677
00:36:07,320 --> 00:36:10,080
what happens. 
This this is this is a veet 

678
00:36:10,080 --> 00:36:14,880
thing I would imagine. 
This is the next developer 

679
00:36:14,880 --> 00:36:18,320
modules, like what the thing's 
called Developer tools. 

680
00:36:18,320 --> 00:36:20,720
Literally. 
Yeah, when you click on this 

681
00:36:20,720 --> 00:36:24,280
now, just and it will open and 
you can see, yes, I was and it 

682
00:36:24,360 --> 00:36:25,760
actually opened. 
This is part of. 

683
00:36:25,840 --> 00:36:27,840
The feed stuff because they 
have. 

684
00:36:27,840 --> 00:36:30,080
This maybe that low level it's 
possible. 

685
00:36:31,160 --> 00:36:33,760
That's really cool. 
But you can also see if you 

686
00:36:33,920 --> 00:36:38,520
rather than inspect and go back,
you can actually or you can just

687
00:36:38,520 --> 00:36:41,960
click get started because it and
then here on the left, you can 

688
00:36:42,000 --> 00:36:44,680
see all your props, all your 
modules. 

689
00:36:45,120 --> 00:36:49,520
And as a company like Superbase,
you can make a Superbase panel 

690
00:36:49,520 --> 00:36:51,920
here where you can just browse 
your database and do things 

691
00:36:51,960 --> 00:36:52,840
you're. 
Kidding me? 

692
00:36:52,960 --> 00:36:55,280
Yeah, it's insane. 
This is the most mature death 

693
00:36:55,280 --> 00:36:57,960
tools I've ever seen. 
Yeah, I have never seen this 

694
00:36:57,960 --> 00:36:59,720
level. 
All your icons here, there's 

695
00:36:59,800 --> 00:37:02,320
Ogolia and there's like the 
people that worked on it, 

696
00:37:02,320 --> 00:37:04,040
Superbase. 
This is ridiculous. 

697
00:37:04,120 --> 00:37:06,640
This is ridiculous. 
How sweet is that? 

698
00:37:06,920 --> 00:37:09,640
That the next ecosystem is 
intensely good. 

699
00:37:10,040 --> 00:37:12,400
Wow. 
But people don't know it somehow

700
00:37:12,400 --> 00:37:14,560
because everybody just uses 
React, right? 

701
00:37:15,160 --> 00:37:18,560
Yeah, you're not wrong. 
OK, sorry, we're getting 

702
00:37:18,560 --> 00:37:22,000
sidetracked. 
Anyways, we are here now, so 

703
00:37:22,000 --> 00:37:27,120
which means we have, we actually
have a token, we can see the 

704
00:37:27,120 --> 00:37:29,600
thing. 
And so this is just next UI. 

705
00:37:29,760 --> 00:37:31,320
There's nothing else I've done 
now. 

706
00:37:31,800 --> 00:37:35,160
So maybe the next thing we 
should do is go into Superbase 

707
00:37:35,160 --> 00:37:39,760
and just make a table and fill 
it out quickly simply and just 

708
00:37:39,760 --> 00:37:42,160
query that stuff and see what we
can do. 

709
00:37:42,160 --> 00:37:44,760
What are we thinking, cats? 
Yeah, why not? 

710
00:37:45,560 --> 00:37:49,920
Why not? 
Right, we can just add a column 

711
00:37:49,920 --> 00:37:53,760
for the name. 
OK, name the string. 

712
00:37:54,120 --> 00:37:57,440
Type should probably be text or 
something with like far char, 

713
00:37:57,440 --> 00:38:00,520
but I guess text is fine. 
Yeah, just make a text for now. 

714
00:38:01,120 --> 00:38:03,320
And what do? 
What else do we want So we have 

715
00:38:03,320 --> 00:38:06,160
the name? 
Name. 

716
00:38:06,320 --> 00:38:07,800
Color. 
How about color? 

717
00:38:08,880 --> 00:38:10,680
We could. 
We could even make that like a 

718
00:38:10,720 --> 00:38:14,360
enum somehow. 
Oh, if you want, sure we have to

719
00:38:14,360 --> 00:38:18,000
check though if we not, we 
probably have to make the enum 

720
00:38:18,000 --> 00:38:19,080
first. 
OK. 

721
00:38:19,960 --> 00:38:23,680
Well, let's let's kill the. 
Let's save this one first. 

722
00:38:25,440 --> 00:38:29,120
And now we can actually go and 
make an enum, but we let me just

723
00:38:29,120 --> 00:38:31,600
check where to do that. 
Yeah, I was gonna say where are 

724
00:38:31,720 --> 00:38:35,440
enums? 
Yeah, so you go to the database 

725
00:38:35,440 --> 00:38:41,040
tab and all the way down the 
first icon in the 2nd row, 

726
00:38:41,040 --> 00:38:45,880
basically first time, two down. 
This one. 

727
00:38:46,160 --> 00:38:48,720
No, one more, one more. 
There we go. 

728
00:38:48,720 --> 00:38:50,560
And that innumerable types on 
the bottom. 

729
00:38:51,200 --> 00:38:52,200
Oh, nice all. 
Right. 

730
00:38:52,200 --> 00:38:53,600
And then you can just create 
one. 

731
00:38:53,760 --> 00:38:55,560
So we can do colors. 
Yep. 

732
00:38:56,840 --> 00:38:59,840
And then what? 
Black Oops. 

733
00:39:00,640 --> 00:39:02,920
Now we have what you can 
probably click add it on the 

734
00:39:02,920 --> 00:39:05,800
little screen. 
Enter black. 

735
00:39:07,080 --> 00:39:11,880
The fact we can do it like this 
is so nice and I know there's 

736
00:39:11,880 --> 00:39:16,480
Postgres editor apps on iOS or 
on on Mac OS and stuff, but it's

737
00:39:16,480 --> 00:39:18,520
so nice to do it in the same 
project. 

738
00:39:18,560 --> 00:39:21,680
Yeah, that is really nice. 
And then I can come back to our 

739
00:39:21,680 --> 00:39:24,160
table and edit the table. 
Yeah. 

740
00:39:24,160 --> 00:39:27,120
So yeah, actually edit table and
then add a column and just call 

741
00:39:27,120 --> 00:39:30,440
it colour and there should be 
enumerable type just right 

742
00:39:30,440 --> 00:39:31,080
there. 
Oh my. 

743
00:39:31,280 --> 00:39:33,560
Goodness. 
It's incredible, isn't it? 

744
00:39:33,800 --> 00:39:36,960
Yeah, that's really nice. 
I feel like we are hyping 

745
00:39:36,960 --> 00:39:39,680
something that's super basic to 
these folks, but for us, that's 

746
00:39:39,680 --> 00:39:43,200
freaking awesome. 
I feel like I've been living in,

747
00:39:43,200 --> 00:39:47,200
you know, Firebase land so long 
that like all these little nice 

748
00:39:47,200 --> 00:39:49,640
things that used to be in my 
relational database world and 

749
00:39:49,640 --> 00:39:52,240
SAP and stuff like, hey, here 
you go. 

750
00:39:52,240 --> 00:39:53,680
We we did that a million years 
ago. 

751
00:39:54,480 --> 00:39:55,920
Yeah, exactly. 
For them this is like the 

752
00:39:55,920 --> 00:39:58,280
basics, right? 
I kind of like this. 

753
00:39:58,280 --> 00:40:02,200
So OK, maybe what we should do 
is just insert like two or three

754
00:40:02,200 --> 00:40:05,720
rows so we have it and then we 
can query it with the Super 

755
00:40:05,720 --> 00:40:07,440
based. 
Stuff it would be really handy 

756
00:40:07,440 --> 00:40:11,400
as if they just based on these 
types and things if it would 

757
00:40:11,480 --> 00:40:15,640
automatically import a like a 
fake data kind of thing. 

758
00:40:16,560 --> 00:40:19,560
If while we say this, they 
probably have it, but I just 

759
00:40:19,560 --> 00:40:20,880
don't know. 
I don't know either. 

760
00:40:20,920 --> 00:40:23,560
Yeah. 
So I imagine that that. 

761
00:40:23,560 --> 00:40:27,480
Those are the default, you see, 
Default is now and ID will just 

762
00:40:27,520 --> 00:40:30,480
automatically update. 
So we can just go with whatever 

763
00:40:30,480 --> 00:40:33,200
we want here, yeah. 
That's that's my cat, Xena. 

764
00:40:33,400 --> 00:40:36,640
There we go. 
In the meantime, I'll quickly 

765
00:40:36,640 --> 00:40:41,840
grab some codes to do. 
AJ's AJ's gonna be a blue cat 

766
00:40:41,840 --> 00:40:47,920
today. 
Oh, I think actually I added a 

767
00:40:47,920 --> 00:40:50,080
bit of code in the repository to
do this already. 

768
00:40:52,240 --> 00:40:54,600
Fletcher, good name. 
All of our cats. 

769
00:40:56,160 --> 00:40:59,280
I have too many to add to this, 
so let's not do that, yeah? 

770
00:40:59,280 --> 00:41:03,120
Let's not do that, all right? 
Where to next? 

771
00:41:03,600 --> 00:41:07,560
One thing before we go, we have 
to put a policy on this so 

772
00:41:07,560 --> 00:41:10,520
you're actually able to query. 
So there's the green thing on 

773
00:41:10,520 --> 00:41:15,280
the top active RLS policies, 
yes, So we can actually make a 

774
00:41:15,280 --> 00:41:19,200
new one on the right. 
There's new policy and we can 

775
00:41:19,200 --> 00:41:22,440
probably go with the the full 
customization one because I 

776
00:41:22,440 --> 00:41:25,840
think I know it's one that's 
relatively easy to add. 

777
00:41:27,840 --> 00:41:30,680
Where do I see my policies? 
Here we go. 

778
00:41:30,680 --> 00:41:32,200
I'll just look at mine for a 
SEC. 

779
00:41:33,560 --> 00:41:38,320
Edit OK, what's the policy name 
call? 

780
00:41:38,320 --> 00:41:41,640
The policy name is just 
authenticated, users can do all 

781
00:41:41,640 --> 00:41:43,000
the things or something like 
that. 

782
00:41:43,800 --> 00:41:46,080
So just like auth. 
Yeah, sure. 

783
00:41:46,480 --> 00:41:50,160
And So what we want to do for 
yeah, exactly, we kind of want 

784
00:41:50,160 --> 00:41:53,000
to just click all for now. 
I know this is probably not the 

785
00:41:53,000 --> 00:41:55,720
right way to do it. 
And then you can target the role

786
00:41:55,720 --> 00:41:58,680
authenticated. 
And we are going to just hack 

787
00:41:58,680 --> 00:42:02,440
this thing by typing true in the
expression here like everything 

788
00:42:02,440 --> 00:42:04,920
is, let's just go if you're 
authenticated and do the thing. 

789
00:42:05,320 --> 00:42:07,440
Semi colon or anything? 
Let me check mine. 

790
00:42:08,200 --> 00:42:10,360
Nope. 
Sweet. 

791
00:42:10,640 --> 00:42:13,120
I don't think we need a true 
there, at least not in mine. 

792
00:42:13,120 --> 00:42:18,480
Oh OK, OK, let's just do this 
and just pray that the guys from

793
00:42:18,480 --> 00:42:21,320
Superbase watching this don't 
say dude, what the heck. 

794
00:42:22,560 --> 00:42:24,520
But I know for now this will 
work. 

795
00:42:24,680 --> 00:42:29,200
But just so we know, for people 
watching, they can do incredible

796
00:42:29,200 --> 00:42:30,840
things with this. 
Yeah, dive in this. 

797
00:42:31,120 --> 00:42:32,240
Column. 
Is. 

798
00:42:33,840 --> 00:42:37,280
Real, it's amazing, but for now 
at least, if you're 

799
00:42:37,280 --> 00:42:40,360
authenticated, which you are, 
you have the JWT token, you can 

800
00:42:40,360 --> 00:42:43,400
actually query this. 
So let's go to the code and I'll

801
00:42:43,400 --> 00:42:47,960
show you in composables. 
We made our own composable now, 

802
00:42:49,360 --> 00:42:52,800
and I just call it use info, but
we should probably call it use 

803
00:42:52,800 --> 00:42:55,080
cats, right? 
We want to get cats, so let's 

804
00:42:55,080 --> 00:43:00,040
rename it. 
And then on line one, it's also 

805
00:43:00,040 --> 00:43:02,560
says use info. 
Now you can just use cats. 

806
00:43:02,880 --> 00:43:06,640
And so the cool thing about 
Nexus, it will just know this 

807
00:43:06,640 --> 00:43:09,200
folder, it will import all these
for you. 

808
00:43:09,640 --> 00:43:11,000
You can just use it throughout 
the. 

809
00:43:11,000 --> 00:43:13,800
Context like that that hurts my 
head a little bit, but. 

810
00:43:13,800 --> 00:43:15,280
That's it's magical though, 
right? 

811
00:43:16,360 --> 00:43:19,880
But sometimes to be honest, you 
don't know why something doesn't

812
00:43:19,880 --> 00:43:23,040
work or why it does work because
some magic is happening 

813
00:43:23,040 --> 00:43:28,600
somewhere, right? 
That's let's call this like what

814
00:43:28,600 --> 00:43:32,480
we see here is use async data 
and it's another use composable,

815
00:43:32,480 --> 00:43:34,760
right? 
And that's something that next 

816
00:43:34,760 --> 00:43:39,160
gives you. 
So to do like an A top level 

817
00:43:39,160 --> 00:43:43,680
await async data, that's key 
there that cats that you just 

818
00:43:43,680 --> 00:43:46,600
put, that's actually the cache 
key that they will use while the

819
00:43:46,600 --> 00:43:49,600
app is running. 
So when you are in SSR mode, 

820
00:43:49,600 --> 00:43:52,800
right, and you query cats, the 
next time you query cats, it 

821
00:43:52,800 --> 00:43:55,520
will take the cache. 
That's really cool. 

822
00:43:55,520 --> 00:43:57,320
Well, that's super handy. 
That is. 

823
00:43:57,880 --> 00:44:00,000
It becomes an async function 
where you can do whatever you 

824
00:44:00,000 --> 00:44:01,440
want and you just return 
something. 

825
00:44:01,440 --> 00:44:03,880
So right now we're going to 
return all of everything from 

826
00:44:03,880 --> 00:44:05,600
cats. 
Awesome, I love it. 

827
00:44:05,880 --> 00:44:08,240
What this thing does though, 
it's pretty cool that we 

828
00:44:08,280 --> 00:44:11,360
shouldn't go too deep into now, 
but it has a bunch of features 

829
00:44:11,360 --> 00:44:14,080
where you you can pick and 
transform whatever you get back.

830
00:44:14,360 --> 00:44:17,240
Because what you see all the 
time, especially in the SSR 

831
00:44:17,240 --> 00:44:20,120
rendered apps, is that you query
everything. 

832
00:44:20,120 --> 00:44:23,320
So it's a huge chunk of data, 
but you might only need two 

833
00:44:23,320 --> 00:44:25,800
properties from each field from 
each object, right? 

834
00:44:25,960 --> 00:44:28,800
And that's where, like the graph
QLS of the world, you know you. 

835
00:44:28,800 --> 00:44:32,160
Can graph QL does that natively.
Obviously you just get what you 

836
00:44:32,160 --> 00:44:35,760
want, but in this case you might
get way too much. 

837
00:44:36,000 --> 00:44:38,520
And what you see all the time is
people just query the dress 

838
00:44:38,520 --> 00:44:41,560
thing, get everything. 
And then when you render on SSR,

839
00:44:41,560 --> 00:44:44,720
there's a script deck on the 
bottom that says window dot 

840
00:44:45,000 --> 00:44:48,200
application state full of stuff 
you don't use. 

841
00:44:48,760 --> 00:44:52,160
And that's that makes your app 
slow and it's big dumb. 

842
00:44:52,160 --> 00:44:56,440
People don't pair that down. 
Nope, I've never seen that 

843
00:44:56,440 --> 00:44:58,720
happen. 
Even I don't do that if you 

844
00:44:58,720 --> 00:45:01,440
don't think about it, because it
just works right. 

845
00:45:01,760 --> 00:45:05,600
And so in with this, they give 
you options to be able to say 

846
00:45:05,600 --> 00:45:07,720
you know what, from these 
objects, I just want these 

847
00:45:07,720 --> 00:45:09,320
fields or let me just transform 
them. 

848
00:45:09,320 --> 00:45:11,080
And then you only have like a 
tiny bit. 

849
00:45:11,600 --> 00:45:13,160
We're not doing that now because
we. 

850
00:45:13,160 --> 00:45:16,080
Don't I really wanted to like 
put it in here like name or 

851
00:45:16,080 --> 00:45:18,320
something? 
Well, this is just a select, 

852
00:45:18,560 --> 00:45:20,240
right? 
You can of course, this is just 

853
00:45:20,240 --> 00:45:24,280
the this client that we created 
on line 5, that's the Superbase 

854
00:45:24,280 --> 00:45:26,960
client. 
So if you just type name here, 

855
00:45:26,960 --> 00:45:29,840
that's the query to Postgres. 
So of course you can just do 

856
00:45:29,920 --> 00:45:33,080
name. 
I and I think that's that's 

857
00:45:33,080 --> 00:45:35,520
going to be if I go back over 
here. 

858
00:45:35,520 --> 00:45:37,560
That will be that name. 
This name. 

859
00:45:38,000 --> 00:45:40,280
So if I want a name and color, 
can we do? 

860
00:45:40,480 --> 00:45:42,840
Just name, comma, color. 
Comma. 

861
00:45:43,040 --> 00:45:47,160
That's what I was wondering. 
So this is now kind of like just

862
00:45:47,160 --> 00:45:50,640
a a postgres query. 
My guess is we'll probably need 

863
00:45:50,640 --> 00:45:55,200
ID because we'll we'll probably 
actually need tier point all the

864
00:45:55,200 --> 00:45:57,400
fields. 
In this case yes, but in my 

865
00:45:57,400 --> 00:46:00,600
case, when you saw my database 
huge, you don't. 

866
00:46:00,920 --> 00:46:02,400
Yeah, good point. 
So OK. 

867
00:46:02,440 --> 00:46:04,720
Let's do this. 
And so now let's go back to our 

868
00:46:04,720 --> 00:46:09,480
like, we go to pages and then 
index because we use file bases 

869
00:46:09,960 --> 00:46:10,680
stuff. 
Yeah. 

870
00:46:11,080 --> 00:46:14,520
So here let's make a script on 
the top. 

871
00:46:14,920 --> 00:46:17,560
OK. 
Because we don't have any logic 

872
00:46:17,560 --> 00:46:21,040
here now. 
And what do you want to do in 

873
00:46:21,040 --> 00:46:24,120
the script tag itself? 
You can say setup which means it

874
00:46:24,160 --> 00:46:27,800
automatically just fires it up 
and you get top level await and 

875
00:46:27,800 --> 00:46:30,200
stuff like. 
That are we doing anything like 

876
00:46:30,200 --> 00:46:32,400
TypeScript where we need Lang? 
Yeah, we can. 

877
00:46:32,440 --> 00:46:34,920
Sure. 
So in the script tag itself, you

878
00:46:34,920 --> 00:46:40,640
type Lang equals TS and then you
type setup after the gist on its

879
00:46:40,680 --> 00:46:44,160
own, like inside the script tag.
It's not native, I know. 

880
00:46:44,640 --> 00:46:47,760
Wow, OK. 
So we have a script setup now 

881
00:46:48,120 --> 00:46:50,800
and in here it, this is by 
default async. 

882
00:46:50,800 --> 00:46:53,640
So you can do a whole bunch of 
things and it it just you don't 

883
00:46:53,640 --> 00:46:54,920
have to do any returns and 
stuff. 

884
00:46:54,920 --> 00:46:59,040
It just every cons you make in 
here is now assigned to the 

885
00:46:59,040 --> 00:47:01,200
template. 
That's just some magic of the 

886
00:47:01,200 --> 00:47:03,920
setup function. 
So we're going to do a weight 

887
00:47:04,560 --> 00:47:07,880
and then yeah, because we it's 
an async function and then use 

888
00:47:07,880 --> 00:47:11,440
cats as a function and I'm 
gonna. 

889
00:47:11,480 --> 00:47:13,280
Stall that, by the way. 
I've never ridden this in my 

890
00:47:13,280 --> 00:47:16,000
life. 
It's but it's kind of natural, I

891
00:47:16,000 --> 00:47:17,440
imagine, right? 
Very intuitive. 

892
00:47:17,600 --> 00:47:21,920
So what you can do now is just 
grab cats, copy paste it. 

893
00:47:21,960 --> 00:47:26,560
And then right now let's see. 
So we're in the header. 

894
00:47:26,560 --> 00:47:29,040
So remove that button. 
Just we don't need it. 

895
00:47:29,520 --> 00:47:33,440
And I would say make a pre tag 
because we're gonna just dump 

896
00:47:33,440 --> 00:47:37,840
some JS in here and then it's 
two curlies to open and then you

897
00:47:37,840 --> 00:47:39,640
paste. 
No, you don't have no, no need. 

898
00:47:39,920 --> 00:47:42,040
Nope. 
Oh, that's the beauty of you. 

899
00:47:44,320 --> 00:47:46,240
Whoa. 
Oh, there it is already. 

900
00:47:46,840 --> 00:47:49,120
Look. 
At that, isn't that fancy. 

901
00:47:49,480 --> 00:47:52,400
That is fancy. 
It's doing some weird indenting,

902
00:47:52,400 --> 00:47:54,920
but. 
That's probably because you have

903
00:47:54,920 --> 00:47:56,960
a bunch of spaces somewhere 
before this. 

904
00:47:56,960 --> 00:48:02,000
Can we check in the code if you 
remove the space on all the 

905
00:48:02,000 --> 00:48:04,640
space on line 18? 
And I don't know, this might be 

906
00:48:04,640 --> 00:48:06,560
it. 
No the before the. 

907
00:48:06,960 --> 00:48:08,320
The the Oh, I see what you're 
saying. 

908
00:48:08,560 --> 00:48:13,160
Yeah, this, yes, that's just the
nature of pre, I think, to be 

909
00:48:13,160 --> 00:48:14,760
fair. 
Oh my God, it's nothing to do 

910
00:48:14,760 --> 00:48:15,360
with that. 
I just. 

911
00:48:15,360 --> 00:48:17,240
Spent like an afternoon out of 
work. 

912
00:48:17,440 --> 00:48:24,080
There's you tailwind things on 
the pose this. 

913
00:48:24,080 --> 00:48:27,560
Is all right. 
So we we yeah, this just comes 

914
00:48:27,560 --> 00:48:30,080
out-of-the-box from the next UI.
Super nice. 

915
00:48:30,440 --> 00:48:32,320
Do you see that drop down? 
They made that too. 

916
00:48:32,680 --> 00:48:36,480
And the cool thing about this is
it uses hatless UI components 

917
00:48:36,480 --> 00:48:39,720
with all the accessibility HTML.
All of it is in there and they 

918
00:48:39,720 --> 00:48:42,040
just put stuff on top of that. 
Yeah, they wrapped it nice. 

919
00:48:42,840 --> 00:48:45,520
That's it's very fancy. 
Can you can you customize the 

920
00:48:45,520 --> 00:48:48,200
styling on all this? 
Yes, because it's all tailwind. 

921
00:48:48,320 --> 00:48:50,200
They just have Tailwind 
implementation. 

922
00:48:51,040 --> 00:48:53,360
You can change the color and 
it's just, it just works. 

923
00:48:53,480 --> 00:48:56,520
It's it's pretty ridiculous. 
That is, that's really cool. 

924
00:48:56,520 --> 00:48:58,640
I love that the. 
Fun bit is like everybody who 

925
00:48:58,640 --> 00:49:01,880
makes a NOx module to who 
contributes to the open source 

926
00:49:01,880 --> 00:49:03,880
stuff. 
You get to use this for your 

927
00:49:03,880 --> 00:49:05,400
docks. 
They just have a starter and it 

928
00:49:05,440 --> 00:49:07,160
all looks good. 
It all looks the same. 

929
00:49:07,680 --> 00:49:09,800
That's cool. 
All right. 

930
00:49:09,800 --> 00:49:13,160
What's next? 
What we need to do, you know, 

931
00:49:13,160 --> 00:49:17,440
what we might want to do is add 
one more field to the database 

932
00:49:17,440 --> 00:49:21,240
that's like a boolean of some 
sort, OK, Because I want to 

933
00:49:21,240 --> 00:49:26,600
maybe filter on things like I 
don't know if they're vaccinated

934
00:49:26,600 --> 00:49:28,760
or not or something like that. 
Because we can then actually 

935
00:49:28,760 --> 00:49:32,680
make like something and let's 
just vaccinated. 

936
00:49:32,840 --> 00:49:34,520
And then you just don't do a 
bull type. 

937
00:49:36,760 --> 00:49:38,680
Yes. 
Did you fall or no? 

938
00:49:39,800 --> 00:49:43,640
Maybe do falls by default 
because they're not because what

939
00:49:43,640 --> 00:49:46,240
we can do now with Algolia is 
filter on the fact that they're 

940
00:49:46,240 --> 00:49:47,880
vaccinated. 
That's a great point, right? 

941
00:49:47,960 --> 00:49:51,680
I'm just adding that in. 
So you might wanna, oh, I'm not 

942
00:49:51,680 --> 00:49:55,400
sure if you can actually edit a 
row in here, can you? 

943
00:49:57,040 --> 00:50:00,160
Yeah. 
Holy moly, there we go. 

944
00:50:00,520 --> 00:50:03,440
Let's let's, let's just do 2 
with true and 10. 

945
00:50:03,440 --> 00:50:05,840
That's very nice, I didn't even 
know this. 

946
00:50:05,840 --> 00:50:08,600
You can just click. 
Double double click get to 

947
00:50:08,640 --> 00:50:09,840
there. 
OK. 

948
00:50:09,960 --> 00:50:13,120
So maybe make one of them 
vaccinated so we can filter on 

949
00:50:13,120 --> 00:50:15,960
it. 
Zena is definitely vaccinated. 

950
00:50:16,240 --> 00:50:19,680
There we go. 
All right, so now we go to the 

951
00:50:19,680 --> 00:50:22,400
fanciness. 
Fanciness that is Algolia. 

952
00:50:23,000 --> 00:50:29,280
So without spending way too much
time on coding something that 

953
00:50:29,280 --> 00:50:32,080
will actually sync it to Algolia
automatically even though we 

954
00:50:32,080 --> 00:50:33,680
could, I have the code here in 
front of me. 

955
00:50:34,320 --> 00:50:38,160
Maybe we just copy paste the 
Jason that we have in our pre 

956
00:50:38,160 --> 00:50:41,040
tag. 
Do you think I mean we have we 

957
00:50:41,040 --> 00:50:43,120
have 40 minutes we. 
Have like 40 minutes I. 

958
00:50:43,200 --> 00:50:46,560
Think we should try it because I
think that's the power of taking

959
00:50:46,560 --> 00:50:48,960
like and pushing data to 
Algolia. 

960
00:50:49,400 --> 00:50:51,640
That is power. 
OK, let me just have a look at 

961
00:50:51,640 --> 00:50:55,640
my code of how I do it 'cause we
can, we can actually pull it off

962
00:50:55,640 --> 00:50:57,120
I think. 
I think we can too. 

963
00:50:58,320 --> 00:51:02,880
And then like maybe you can, if 
we are tight on time, you can 

964
00:51:02,880 --> 00:51:07,680
send me like the snippets of 
search for their instant search.

965
00:51:07,840 --> 00:51:11,160
And while you're doing that 
wonder should we, should we 

966
00:51:11,160 --> 00:51:14,880
first take this data, put it in 
Algolia and actually show 

967
00:51:14,880 --> 00:51:17,200
instant search? 
I think that could be cool. 

968
00:51:17,280 --> 00:51:19,000
And then we do an automated 
mode. 

969
00:51:19,200 --> 00:51:20,520
I love it. 
Let's do that. 

970
00:51:21,520 --> 00:51:22,920
OK, yeah, this we're going to 
show. 

971
00:51:23,000 --> 00:51:26,360
This like dark mode on here? 
Maybe I'm just missing it? 

972
00:51:27,320 --> 00:51:30,200
I don't think so, but they have 
new docks and that's not this. 

973
00:51:30,440 --> 00:51:33,400
Oh, it's not. 
Yeah, there's like a a beta 

974
00:51:33,400 --> 00:51:35,920
docks. 
This one maybe? 

975
00:51:36,560 --> 00:51:39,280
Yeah, they sometimes they tell 
you, hey, go to the beta. 

976
00:51:39,280 --> 00:51:41,160
Oh yes, it's up at the top. 
There we go. 

977
00:51:41,240 --> 00:51:43,680
There we go. 
Look at how fancy this is. 

978
00:51:44,040 --> 00:51:46,080
Yes, my eye. 
They also recently moved the 

979
00:51:46,080 --> 00:51:50,240
whole community to Discord, so 
they're like, updated, yeah. 

980
00:51:50,680 --> 00:51:53,680
That's really cool. 
OK, so we're gonna do instant 

981
00:51:53,680 --> 00:51:55,920
search, right? 
Right, So what we do need to do 

982
00:51:55,920 --> 00:51:59,000
is seed Algolia first. 
Oh, right, right, right. 

983
00:51:59,000 --> 00:52:01,520
Sorry, so we can literally just 
go back to the browser. 

984
00:52:01,520 --> 00:52:04,240
If you hit refresh you will get 
the boolean as well, right? 

985
00:52:04,240 --> 00:52:06,240
Oh yeah, my bad. 
Do we? 

986
00:52:06,320 --> 00:52:08,840
Yes. 
So for now, let's just seed it 

987
00:52:08,840 --> 00:52:09,800
with this. 
OK. 

988
00:52:10,360 --> 00:52:14,120
So we're in Algolia. 
You're going back to our. 

989
00:52:14,120 --> 00:52:17,560
I'm going to my index. 
Yes, Scroll down all the way 

990
00:52:17,560 --> 00:52:19,360
down. 
If you Scroll down, you see 

991
00:52:19,360 --> 00:52:21,120
there's your index. 
You can click on it. 

992
00:52:21,840 --> 00:52:23,760
That's that's the one thing for.
I'll go there. 

993
00:52:23,760 --> 00:52:25,920
Sometimes I'm like, hey, why is 
that not easier? 

994
00:52:26,400 --> 00:52:29,840
Yeah, it seems like that's kind 
of far down or something. 

995
00:52:29,840 --> 00:52:31,600
I don't. 
Know it's because they offer so 

996
00:52:31,600 --> 00:52:35,160
much more that's true using that
right they have all these extra 

997
00:52:35,400 --> 00:52:38,400
products in there were 
personalization recommendations 

998
00:52:38,400 --> 00:52:40,040
all the things. 
That's a great point. 

999
00:52:40,200 --> 00:52:43,440
I'm I'm looking for the dark 
mode in here, but not finance. 

1000
00:52:43,440 --> 00:52:44,520
Sorry. 
Sorry folks, what's? 

1001
00:52:44,520 --> 00:52:48,800
Going to happen all right, so 
you can actually see add 

1002
00:52:48,800 --> 00:52:50,200
records. 
Oh, there we go. 

1003
00:52:50,280 --> 00:52:55,160
And we can just say manually, 
yeah, and just paste. 

1004
00:52:56,440 --> 00:52:57,920
Boop, boop. 
Nope, boop. 

1005
00:52:58,280 --> 00:53:04,040
There we go. 
Exactly, like sometimes I talk 

1006
00:53:04,040 --> 00:53:08,440
about this with my my boss 
Brian, who is actually ex Ogolia

1007
00:53:08,440 --> 00:53:11,520
death row. 
And he, he told me Ogolia's so 

1008
00:53:11,520 --> 00:53:14,120
good they almost don't need 
death row because we're 

1009
00:53:14,120 --> 00:53:16,360
literally just doing it without 
anybody helping. 

1010
00:53:16,640 --> 00:53:18,440
And this is pretty complex 
stuff, right? 

1011
00:53:18,680 --> 00:53:20,840
Yeah. 
And I I have to admit, there's 

1012
00:53:20,840 --> 00:53:25,560
probably more to the pulling, 
pushing data to Algolia than 

1013
00:53:25,560 --> 00:53:28,800
Algolia search itself because 
there's so much like done for 

1014
00:53:28,800 --> 00:53:30,120
you. 
Totally agreed. 

1015
00:53:30,520 --> 00:53:34,360
And that like there's, I did a, 
a stream with Chuck a few weeks 

1016
00:53:34,360 --> 00:53:38,000
back from Algolia where we 
actually explored like the more 

1017
00:53:38,000 --> 00:53:42,120
complex things once it's already
in and it can go so deep, it's 

1018
00:53:42,120 --> 00:53:44,720
ridiculous. 
Like reordering of search 

1019
00:53:44,720 --> 00:53:47,800
indexes and things like that of 
of the results based on what 

1020
00:53:47,800 --> 00:53:50,280
people click on all the things. 
Yeah, we did. 

1021
00:53:50,280 --> 00:53:53,680
We did one of those probably a 
year or two ago 'cause I was 

1022
00:53:53,680 --> 00:53:58,160
doing next GS and pushing our 
Firebase data up to it and then 

1023
00:53:58,800 --> 00:54:00,120
they. 
Seemed like you built this 

1024
00:54:00,120 --> 00:54:02,640
before. 
Yeah, I've done this in a 

1025
00:54:02,640 --> 00:54:06,320
different language for sure. 
Anyways, all right, so instant 

1026
00:54:06,320 --> 00:54:08,520
search. 
What you can do is show more 

1027
00:54:08,520 --> 00:54:11,520
attributes so we can have a 
little look at what and all the 

1028
00:54:11,520 --> 00:54:14,240
stuff that's here. 
Like there's just in the first 

1029
00:54:14,240 --> 00:54:18,800
one, if you go back, there's 
like a little link, like when 

1030
00:54:18,800 --> 00:54:23,240
you go to the first row of the 
data, there's like show, yeah, 

1031
00:54:23,240 --> 00:54:24,960
there we go. 
So now we see what we have. 

1032
00:54:25,560 --> 00:54:28,440
So what we need to do now to be 
able to search through this 

1033
00:54:28,440 --> 00:54:33,080
stuff 'cause I made you a little
instant search page already in 

1034
00:54:33,080 --> 00:54:35,880
the code base so we don't spend 
too much time with setup. 

1035
00:54:36,840 --> 00:54:40,920
I added just for now to keep it 
simple, little search box. 

1036
00:54:41,160 --> 00:54:43,840
So if we type something, we want
to be able to see a result, 

1037
00:54:43,840 --> 00:54:46,240
right? 
So what we need to do is set up 

1038
00:54:46,320 --> 00:54:49,360
our index so we can actually 
search on, let's say, the name. 

1039
00:54:50,280 --> 00:54:55,080
And then what we can also do is 
we can make faceted search based

1040
00:54:55,080 --> 00:54:58,960
on color and unfaccinated. 
I love it, walk me through it. 

1041
00:54:59,400 --> 00:55:03,840
All right, so configuration the 
second tab next to browse and 

1042
00:55:03,840 --> 00:55:07,160
then probably we need to go 
searchable attributes. 

1043
00:55:07,680 --> 00:55:10,440
So there we can just add one and
I think it's auto complete. 

1044
00:55:10,440 --> 00:55:14,600
So you can just type name. 
And we probably also want to 

1045
00:55:14,600 --> 00:55:17,760
search if we type black, you 
want the color and vaccinated. 

1046
00:55:18,080 --> 00:55:19,640
I'm not sure because that's true
or false. 

1047
00:55:19,640 --> 00:55:21,920
So that's I'm not sure you want 
to have that in your rich text 

1048
00:55:21,920 --> 00:55:23,920
search. 
Maybe this is fine for now. 

1049
00:55:26,560 --> 00:55:29,360
I don't really know what that 
does in this case. 

1050
00:55:29,360 --> 00:55:31,480
We'll try. 
It we'll see what. 

1051
00:55:31,520 --> 00:55:33,160
Happens. 
Well, well, once you have this, 

1052
00:55:33,160 --> 00:55:37,320
what you can do is later on add 
ranking and sorting and relevant

1053
00:55:37,320 --> 00:55:39,760
sorts and a bunch of very fancy 
things we. 

1054
00:55:39,760 --> 00:55:41,080
That stuff's amazing, by the 
way. 

1055
00:55:41,240 --> 00:55:42,880
I love that stuff and this 
stuff. 

1056
00:55:44,000 --> 00:55:47,400
Lots of words, lots of times 
stuff in that sentence, yes. 

1057
00:55:47,560 --> 00:55:50,960
Anyway, so probably what we want
to do now is at least for sure 

1058
00:55:50,960 --> 00:55:55,360
save it, of course, and then 
Scroll down to something with 

1059
00:55:55,400 --> 00:55:57,960
where it says facets. 
Oh yeah, on the bottom here it 

1060
00:55:57,960 --> 00:56:02,640
says facets. 
So we want to actually add the 

1061
00:56:02,640 --> 00:56:08,040
facets for color so we can add 
an attribute and vaccinate it. 

1062
00:56:10,360 --> 00:56:14,080
There we go. 
So now this at least knows it 

1063
00:56:14,080 --> 00:56:17,720
has to do something with like 
let me figure out what things 

1064
00:56:17,720 --> 00:56:20,560
are all the same color and then 
order the list for you. 

1065
00:56:20,560 --> 00:56:23,920
So it does all this magic stuff 
inside. 

1066
00:56:23,920 --> 00:56:26,280
So let's save this and I. 
Think it always confused me. 

1067
00:56:26,280 --> 00:56:28,480
Isn't this for the UI side of 
this? 

1068
00:56:30,880 --> 00:56:35,040
As far as I remember, if this is
searchable, you can have a 

1069
00:56:35,040 --> 00:56:37,800
little search box on top of your
list of facets and you can 

1070
00:56:37,800 --> 00:56:43,280
actually filter your facets to 
be less, but I'm not entirely 

1071
00:56:43,280 --> 00:56:46,400
sure if that's it. 
I'm hoping Chuck or Julie or 

1072
00:56:46,400 --> 00:56:49,440
someone else goalie is watching 
so they can they can help us 

1073
00:56:49,440 --> 00:56:50,880
here. 
I can send the comments if 

1074
00:56:50,880 --> 00:56:52,680
you're watching, there's a few 
of you out there. 

1075
00:56:53,200 --> 00:56:55,840
Exactly. 
OK so our basics are good, now 

1076
00:56:55,880 --> 00:56:59,360
we just have to copy paste the 
name of our index to be able to 

1077
00:56:59,400 --> 00:57:02,480
add that into the code. 
Which is. 

1078
00:57:03,160 --> 00:57:05,160
Where is our index. 
Browse. 

1079
00:57:07,000 --> 00:57:08,000
It's there. 
It is. 

1080
00:57:08,840 --> 00:57:12,760
Copy. 
So when you go to the Algolia 

1081
00:57:12,760 --> 00:57:17,760
page, I just made one for us and
I embedded a few things already.

1082
00:57:18,240 --> 00:57:24,160
So we have the Algolia module in
next GS that we're using. 

1083
00:57:24,680 --> 00:57:27,280
However, if you want to use 
instant search, that's a package

1084
00:57:27,280 --> 00:57:30,600
that they build. 
So we're kind of using both now.

1085
00:57:31,120 --> 00:57:34,280
So as you can see on line 9, it 
says use Ogolia ref. 

1086
00:57:34,280 --> 00:57:38,080
That's the reference to the 
Ogolia client, and that comes 

1087
00:57:38,480 --> 00:57:41,400
from the next module. 
It just does the magic for you 

1088
00:57:41,400 --> 00:57:43,560
to set up all of that. 
We don't need to touch anything.

1089
00:57:46,040 --> 00:57:49,840
We have the index name already. 
So now what you see, we have the

1090
00:57:49,840 --> 00:57:52,920
index name and we have the 
Algolia reference to their 

1091
00:57:52,920 --> 00:57:59,200
client and this EIS Algolia 
instant search tag. 

1092
00:57:59,840 --> 00:58:03,480
This is basically setting you up
for search and we've set up our 

1093
00:58:03,480 --> 00:58:07,200
client and our index name and 
then the components that come 

1094
00:58:07,200 --> 00:58:09,520
out of that package, you just 
can put them in there and it's 

1095
00:58:09,520 --> 00:58:11,040
and stuff happens. 
And is. 

1096
00:58:11,440 --> 00:58:14,520
I did this blindly, so let's see
if something comes out. 

1097
00:58:15,280 --> 00:58:19,680
And the way in view, which I'm 
I'm not entirely familiar with, 

1098
00:58:20,200 --> 00:58:23,720
a string will look up a variable
like this. 

1099
00:58:24,120 --> 00:58:27,360
OK, that will only happen when 
you put a colon before. 

1100
00:58:27,400 --> 00:58:30,120
Ah, OK. 
Where in JSX you would put the 

1101
00:58:30,120 --> 00:58:31,840
curlies. 
Yep, and then spell. 

1102
00:58:31,840 --> 00:58:34,480
We put columns. 
I don't know why. 

1103
00:58:34,680 --> 00:58:37,000
Got it. 
You know what, If you want to be

1104
00:58:37,000 --> 00:58:39,440
fancy, you can do JSX in few no 
problem. 

1105
00:58:39,880 --> 00:58:42,960
Oh. 
I and I am a huge fan of JSXI. 

1106
00:58:42,960 --> 00:58:44,760
Just like same here. 
It's templating in here. 

1107
00:58:44,760 --> 00:58:48,280
So it's not fully my thing, I 
had to get used to the colon 

1108
00:58:48,280 --> 00:58:50,600
thing, but it works fine. 
Are you familiar with Like 

1109
00:58:50,600 --> 00:58:54,360
what's the ES here? 
Yes, so this is an interesting 

1110
00:58:54,360 --> 00:58:59,200
bit here. 
Few instant search for few three

1111
00:59:01,120 --> 00:59:05,280
has a few different packages and
that's because if you do use 

1112
00:59:05,280 --> 00:59:11,040
this without Nuxt or when you 
use it with Webpack 5, it might 

1113
00:59:11,040 --> 00:59:15,160
need that you need the UMD 
bundle or the CGS bundle and 

1114
00:59:15,160 --> 00:59:19,640
next is very particular with 
what it wants because it has 

1115
00:59:19,640 --> 00:59:23,320
feet running underneath. 
They have opinions and once they

1116
00:59:23,320 --> 00:59:25,880
match, they can do all their 
black magic right. 

1117
00:59:26,120 --> 00:59:29,680
And so that's why we get the ES1
and then we don't need to do 

1118
00:59:29,680 --> 00:59:31,160
anything complicated here 
because. 

1119
00:59:31,200 --> 00:59:35,200
That's ecma ECMA script right? 
ESI believe. 

1120
00:59:36,120 --> 00:59:38,880
I think it's ES modules. 
OK, ES modules that makes. 

1121
00:59:38,880 --> 00:59:40,920
More sense. 
So there's different things you 

1122
00:59:40,920 --> 00:59:43,080
can do here. 
Like if you didn't want to do 

1123
00:59:43,080 --> 00:59:47,360
that ES modules thing, you can 
also go to the next config and 

1124
00:59:47,360 --> 00:59:51,880
then deep go deeper into say in 
feet load this thing like that. 

1125
00:59:52,760 --> 00:59:54,840
If you don't have to do that, 
it's much nicer, right? 

1126
00:59:55,000 --> 00:59:59,800
Yeah, for sure. 
Oh, it's already working OK it. 

1127
00:59:59,840 --> 01:00:02,800
Seems that way, yeah. 
It doesn't look great, but it 

1128
01:00:02,840 --> 01:00:06,120
works. 
So we have the object ID. 

1129
01:00:08,640 --> 01:00:11,120
Well, it's already reserved 
well, we're just not showing 

1130
01:00:11,120 --> 01:00:12,600
something nice here. 
Yep. 

1131
01:00:12,880 --> 01:00:17,280
So we're getting the which index
it is and what the ID is inside 

1132
01:00:17,280 --> 01:00:19,800
our dashboard. 
So I will mention to people, and

1133
01:00:19,800 --> 01:00:22,720
I don't know how to do this in 
view, but when I was running 

1134
01:00:22,720 --> 01:00:26,440
next, yes, I had searched the 
instant search on my all my 

1135
01:00:26,440 --> 01:00:28,080
pages. 
So it was on my main page. 

1136
01:00:28,440 --> 01:00:32,520
There is a way in there to set, 
don't go fetch anything until I 

1137
01:00:32,520 --> 01:00:34,320
type. 
So that way you're not getting 

1138
01:00:34,320 --> 01:00:37,040
that hit and it it's a Oh yeah. 
You can. 

1139
01:00:37,040 --> 01:00:40,040
You can do a bunch of that 
stuff, I just chose not to right

1140
01:00:40,040 --> 01:00:41,280
now. 
It just shows you everything and

1141
01:00:41,280 --> 01:00:43,320
you filter down essentially. 
Cool. 

1142
01:00:43,880 --> 01:00:46,640
Can we set up some cool styling 
for this? 

1143
01:00:46,640 --> 01:00:48,280
Shall we make that look a little
better? 

1144
01:00:48,320 --> 01:00:51,640
A little better. 
OK, if you go into the next 

1145
01:00:51,640 --> 01:00:55,240
config JS file or TS file on in 
your sidebar. 

1146
01:00:55,920 --> 01:00:58,520
Oh there we go. 
Right now you can see I set the 

1147
01:00:58,520 --> 01:01:00,840
theme to reset AH. 
OK. 

1148
01:01:01,600 --> 01:01:05,760
And let me just Google because I
think there's another theme that

1149
01:01:05,760 --> 01:01:08,360
you can use maybe if you just 
don't put a theme, if you remove

1150
01:01:08,360 --> 01:01:12,160
that, OK, it might just yeah, if
you just. 

1151
01:01:12,840 --> 01:01:17,040
Maybe just. 
Just say I'll go. 

1152
01:01:17,400 --> 01:01:20,480
Maybe all of this, let's say. 
Yeah, because they they have a 

1153
01:01:20,480 --> 01:01:23,960
few different themes you can 
use. 

1154
01:01:23,960 --> 01:01:26,880
Let me see. 
Well, that didn't do anything. 

1155
01:01:27,760 --> 01:01:30,160
Oh, there it goes. 
Oh, you can just do theme 

1156
01:01:30,160 --> 01:01:31,640
Algolia, OH. 
OK. 

1157
01:01:35,880 --> 01:01:39,120
And normally it should just 
rebuild now. 

1158
01:01:39,320 --> 01:01:41,840
Knox gets a little crazy when 
it's rebuilding. 

1159
01:01:41,920 --> 01:01:45,280
Well, that's a little intense. 
OK, so now we get the. 

1160
01:01:45,400 --> 01:01:47,400
IT doesn't look that awesome 
just yet. 

1161
01:01:47,920 --> 01:01:51,280
And I'm super zoomed in, so 
Nope, doesn't make the 

1162
01:01:51,360 --> 01:01:54,040
difference hard. 
So if you want, I can give you 

1163
01:01:54,040 --> 01:01:55,880
something that's like super 
fancy here. 

1164
01:01:55,920 --> 01:01:58,640
Yeah, dump it. 
Dump it in private or in a 

1165
01:01:58,640 --> 01:02:00,480
discord. 
It's either way. 

1166
01:02:01,360 --> 01:02:04,680
Because honestly, this kind of 
needs to look a little bit 

1167
01:02:04,680 --> 01:02:06,360
better, right? 
Yeah, it looks so. 

1168
01:02:06,360 --> 01:02:09,200
It looks rough. 
What I have done is something 

1169
01:02:09,440 --> 01:02:15,240
quite fancy because I've 
actually used Algolia Instant 

1170
01:02:15,240 --> 01:02:20,800
Search and then I, I kind of 
killed their HTML and used my 

1171
01:02:20,800 --> 01:02:26,600
own and I used Knox UI. 
So it's full Knox UI styling and

1172
01:02:26,600 --> 01:02:31,320
HTML, but Algolia data. 
The thing is I can just post 

1173
01:02:31,320 --> 01:02:34,600
this whole file to you. 
It however, has all the 

1174
01:02:34,600 --> 01:02:37,640
properties that I use in my 
database. 

1175
01:02:37,640 --> 01:02:40,360
So there's a bunch more 
properties, sure, but we could 

1176
01:02:40,360 --> 01:02:42,960
put it in and just scale it down
and see if it works, right. 

1177
01:02:43,040 --> 01:02:47,560
Let's do that. 
So I think I should probably in 

1178
01:02:47,560 --> 01:02:49,520
discord send you the file on its
own. 

1179
01:02:50,000 --> 01:02:52,120
That'll work. 
Or should I wait just go to 

1180
01:02:52,120 --> 01:02:53,720
GitHub? 
I think it open sourced the 

1181
01:02:53,720 --> 01:02:57,760
thing. 
Go to GitHub slash Tim Bannix. 

1182
01:02:57,920 --> 01:03:00,000
Oh, OK. 
And then we'll just find it. 

1183
01:03:00,200 --> 01:03:07,240
We can just copy it from there. 
And then just my repository. 

1184
01:03:07,240 --> 01:03:13,680
So not this one, can you? 
Yeah, let's see. 

1185
01:03:13,960 --> 01:03:17,200
Yeah. 
So the second one, yeah, that's 

1186
01:03:17,200 --> 01:03:22,720
French stuff again. 
And then find pages Cat's index.

1187
01:03:23,760 --> 01:03:29,280
Pages Cat's index view. 
Yeah. 

1188
01:03:29,280 --> 01:03:32,440
So this is pretty intense. 
There's kind of a lot, but let's

1189
01:03:32,440 --> 01:03:33,760
copy this. 
OK. 

1190
01:03:34,400 --> 01:03:38,240
And then we just scale it down 
in complexity. 

1191
01:03:40,360 --> 01:03:42,680
All right, so let's just start 
at the beginning. 

1192
01:03:42,680 --> 01:03:45,240
You can see I have a bunch of 
extra options here. 

1193
01:03:45,800 --> 01:03:50,240
I also add history and routing 
so the URL reflects what you 

1194
01:03:50,240 --> 01:03:51,360
search. 
When you click on. 

1195
01:03:51,360 --> 01:03:54,600
That's really cool. 
Because I wanted to do that so I

1196
01:03:54,600 --> 01:03:58,960
could make links for people that
says I want to get this thing 

1197
01:03:58,960 --> 01:04:01,000
filtered by host families or 
something. 

1198
01:04:01,000 --> 01:04:03,000
So it's like a URL you can link 
to. 

1199
01:04:03,720 --> 01:04:07,280
So you can see I have this 
Lieblesia on line 20. 

1200
01:04:07,280 --> 01:04:09,920
We need to make that your index 
name. 

1201
01:04:12,440 --> 01:04:14,800
This. 
Yep, I didn't get that. 

1202
01:04:15,760 --> 01:04:17,600
Yeah, isn't it? 
Oh yeah, same. 

1203
01:04:18,960 --> 01:04:22,360
The the great part is I have Ray
cast so. 

1204
01:04:22,560 --> 01:04:25,800
Oh, yeah, I don't. 
I, I could not get used to it. 

1205
01:04:26,080 --> 01:04:28,160
The thing is, you can see that 
import for the helpers. 

1206
01:04:28,160 --> 01:04:30,240
Let's kill that because we don't
have that here. 

1207
01:04:30,880 --> 01:04:32,840
So I have a little translation 
thing. 

1208
01:04:33,720 --> 01:04:35,040
Just kill it. 
We don't need that. 

1209
01:04:35,080 --> 01:04:37,640
Cool. 
There's some links here that 

1210
01:04:37,640 --> 01:04:41,280
just fine and you see I have a 
bunch of columns here. 

1211
01:04:41,360 --> 01:04:44,600
So we have name, color and 
vaccinated. 

1212
01:04:44,600 --> 01:04:52,520
So we can remove a bunch of 
stuff and just add vaccinated 

1213
01:04:52,520 --> 01:04:55,840
and like on line 34. 
Just let's make it an English 

1214
01:04:55,840 --> 01:04:58,080
name also. 
Oh. 

1215
01:04:58,520 --> 01:05:00,240
Yeah, some French stuff going on
here. 

1216
01:05:00,800 --> 01:05:04,000
All right, so we have some 
column selection. 

1217
01:05:04,200 --> 01:05:06,640
You see, here I do a translation
of the label. 

1218
01:05:06,840 --> 01:05:09,200
You can probably just keep it 
like this. 

1219
01:05:09,880 --> 01:05:13,240
Oh you know what? 
Instead of removing it on line 

1220
01:05:13,240 --> 01:05:15,520
51, just remove the function 
itself. 

1221
01:05:16,040 --> 01:05:19,120
The whole thing. 
I'm going to just just comment 

1222
01:05:19,120 --> 01:05:22,880
it out again so that it's so it 
works and remove that function 

1223
01:05:22,920 --> 01:05:26,040
translate label. 
So just return item dot label 

1224
01:05:26,040 --> 01:05:28,360
rather than the function. 
Oh, gotcha. 

1225
01:05:29,760 --> 01:05:32,760
Item dot label. 
Now honestly, this is exactly 

1226
01:05:32,760 --> 01:05:36,600
the same as probably not doing 
it at all, but for the sake of 

1227
01:05:36,600 --> 01:05:38,240
making this work, this should do
it. 

1228
01:05:38,560 --> 01:05:41,200
OK. 
And you see, I'm mapping a whole

1229
01:05:41,200 --> 01:05:45,360
bunch of stuff that we. 
So you will probably just remove

1230
01:05:45,480 --> 01:05:49,000
all of it, but keep that class 
and then add vaccination. 

1231
01:05:53,720 --> 01:05:56,520
You are dealing with MVP alpha 
code. 

1232
01:05:56,520 --> 01:05:59,960
In my case, I might not do this 
again, but at least it works. 

1233
01:06:00,080 --> 01:06:05,520
And now we just needed a comma. 
Yeah, when you select it, it 

1234
01:06:05,520 --> 01:06:08,480
goes to another URL. 
We probably don't need that 

1235
01:06:08,480 --> 01:06:10,040
because we don't have another 
URL. 

1236
01:06:10,040 --> 01:06:14,440
So remove the whole function and
then we can later on on the 

1237
01:06:14,440 --> 01:06:17,040
table definition we just remove 
that select thing. 

1238
01:06:17,320 --> 01:06:19,760
That's where I was like, yeah. 
It's somewhere below. 

1239
01:06:19,880 --> 01:06:25,320
Just find. 
Yeah, just find. 

1240
01:06:26,480 --> 01:06:29,320
Yeah, yeah, that one. 
Just remove this because we 

1241
01:06:29,320 --> 01:06:32,480
don't have no the whole thing we
need just select below OK. 

1242
01:06:33,240 --> 01:06:34,200
Gotcha. 
There we go. 

1243
01:06:34,480 --> 01:06:38,520
So there's a few things we need 
to change because I'm looking 

1244
01:06:38,520 --> 01:06:43,480
for certain things to filter on 
for facet and I kind of hard 

1245
01:06:43,480 --> 01:06:45,680
coded that because I have a set 
database. 

1246
01:06:46,000 --> 01:06:50,320
So when we scroll up all the way
to the beginning, you'll see 

1247
01:06:50,320 --> 01:06:55,880
that I'm using you page with a 
template on the left that has an

1248
01:06:55,880 --> 01:07:00,000
aside you see on line 77. 
And in the sidebar. 

1249
01:07:00,720 --> 01:07:05,440
I actually use a refinement list
that looks for something called 

1250
01:07:05,440 --> 01:07:07,560
facets. 
Because what I've done in my 

1251
01:07:07,560 --> 01:07:12,520
database, when I send it to 
Algolia, I look at like 20 

1252
01:07:12,520 --> 01:07:16,440
different fields, and if they're
true, I just push them in the 

1253
01:07:16,440 --> 01:07:19,080
facet list so there's an array 
that it can filter on. 

1254
01:07:19,520 --> 01:07:22,520
We don't have that at all. 
So what we might want to do 

1255
01:07:22,520 --> 01:07:25,560
rather than facets here is 
actually type color. 

1256
01:07:28,320 --> 01:07:32,280
Sorry, attribute is color. 
Yeah, and sort by you can just 

1257
01:07:32,280 --> 01:07:40,560
remove transform items is I 
forgot what I coded for that. 

1258
01:07:40,600 --> 01:07:42,360
Oh, that's this thing. 
We're good, we're good. 

1259
01:07:43,080 --> 01:07:46,640
And then there's a whole bunch 
of like this slot stuff again to

1260
01:07:46,640 --> 01:07:50,000
make all this work with Next UI.
OK. 

1261
01:07:50,680 --> 01:07:54,440
So this is kind of hackery, but 
you can use all the loveliness 

1262
01:07:54,440 --> 01:07:58,840
for Mongolia's engine and make 
it look like Next UI by doing 

1263
01:07:58,840 --> 01:08:00,560
this. 
And they're both so extensible 

1264
01:08:00,560 --> 01:08:02,960
that it just works. 
It's pretty magical. 

1265
01:08:03,360 --> 01:08:05,000
Yeah. 
And so like basically you're 

1266
01:08:05,000 --> 01:08:10,120
taking in item and it's fed in 
from. 

1267
01:08:10,840 --> 01:08:15,160
Yeah, So what this is called is 
a scoped slot and the slot gets 

1268
01:08:15,160 --> 01:08:19,359
variables from the function of 
the component called AIS 

1269
01:08:19,359 --> 01:08:21,279
refinement list that Algodia 
built. 

1270
01:08:21,680 --> 01:08:23,600
OK. 
So this component, the 

1271
01:08:23,600 --> 01:08:25,800
refinement list comes from their
package. 

1272
01:08:25,840 --> 01:08:28,080
I have no idea what it does. 
I don't touch it. 

1273
01:08:28,560 --> 01:08:31,840
And there's a slot specifically 
for the item. 

1274
01:08:32,319 --> 01:08:36,319
So the thing you're faceting on 
and you get like the refine 

1275
01:08:36,319 --> 01:08:40,080
function in the item properties 
from them in this this way. 

1276
01:08:40,720 --> 01:08:42,279
And then you can just get all 
that stuff. 

1277
01:08:42,760 --> 01:08:45,240
This is this is vaguely coming 
back to me. 

1278
01:08:45,840 --> 01:08:49,680
It's it's a brain twister if 
you've not used it, but once you

1279
01:08:49,680 --> 01:08:52,560
know, it's incredibly powerful. 
That's cool. 

1280
01:08:52,880 --> 01:08:54,920
Add change What's helped me out?
There, yeah. 

1281
01:08:55,000 --> 01:08:57,479
So a checkbox. 
Oh. 

1282
01:08:57,680 --> 01:08:59,000
Got it has to change property, 
right? 

1283
01:08:59,000 --> 01:09:01,279
And add change. 
If you put an add, it's always 

1284
01:09:01,279 --> 01:09:04,720
an event that either something 
that bubbles up from the child 

1285
01:09:04,720 --> 01:09:07,760
component that you can just push
as an emitter or it's a native 

1286
01:09:07,760 --> 01:09:08,680
thing. 
Perfect. 

1287
01:09:08,840 --> 01:09:10,960
And in this case it's you 
checkbox, right? 

1288
01:09:10,960 --> 01:09:17,680
So this is you next UI checkbox.
So they have a custom event that

1289
01:09:17,680 --> 01:09:20,479
they let bubble up and you can 
just wait for the change and 

1290
01:09:20,479 --> 01:09:24,520
then it refines cool and refines
function from Ogolia again. 

1291
01:09:25,760 --> 01:09:28,080
And then we've just got a 
divider. 

1292
01:09:28,080 --> 01:09:32,240
We can keep, but the next one, 
this is looking for the host 

1293
01:09:32,240 --> 01:09:33,600
family. 
We don't have that. 

1294
01:09:33,960 --> 01:09:38,479
We have vaccination, right? 
So instead of host family dot 

1295
01:09:39,080 --> 01:09:42,680
ID, dot name, we just type 
vaccination or vaccinated. 

1296
01:09:42,680 --> 01:09:43,439
What was it again? 
Yeah. 

1297
01:09:44,680 --> 01:09:47,600
I think that's it. 
And I think that's literally the

1298
01:09:47,600 --> 01:09:48,520
same. 
We can just. 

1299
01:09:49,840 --> 01:09:52,560
Double check over here. 
And yeah, let's let's be safe. 

1300
01:09:54,520 --> 01:09:56,600
Vaccinated, vaccinated. 
Perfect, perfect. 

1301
01:09:57,560 --> 01:10:00,800
The H3 three you probably will 
want to type vaccinated there. 

1302
01:10:01,520 --> 01:10:04,360
H3H3. 
On 110. 

1303
01:10:05,040 --> 01:10:10,280
Thank you 10 this. 
Yeah, 'cause this is French 

1304
01:10:10,280 --> 01:10:14,400
stuff we don't need. 
Oh, we might want to do that. 

1305
01:10:14,400 --> 01:10:17,960
For the previous one we changed 
as well to call it color rather 

1306
01:10:17,960 --> 01:10:20,480
than status. 
Perfect. 

1307
01:10:20,960 --> 01:10:23,160
All right, I think we only need 
those two. 

1308
01:10:23,280 --> 01:10:26,280
Whatever is below, there's some 
more faceting going on. 

1309
01:10:26,280 --> 01:10:28,760
We can just remove that. 
So this one we don't need. 

1310
01:10:29,560 --> 01:10:33,400
We also don't need their sacs 
because we didn't fill that out.

1311
01:10:33,400 --> 01:10:38,920
And that's that should be Yeah. 
So let's see what do we have 

1312
01:10:38,920 --> 01:10:40,320
left? 
I think we're good. 

1313
01:10:40,680 --> 01:10:46,240
And this is like another slot 
that you get from the sidebar 

1314
01:10:46,240 --> 01:10:49,160
and in the top of the sidebar we
just make make it like show some

1315
01:10:49,160 --> 01:10:50,080
links. 
Cool. 

1316
01:10:50,520 --> 01:10:53,880
And I think the next one is the 
hits. 

1317
01:10:54,240 --> 01:10:56,880
So it shows you all the results.
I'm familiar with that. 

1318
01:10:56,880 --> 01:11:01,800
It's it's funny that this items 
is not like more called out to 

1319
01:11:01,800 --> 01:11:03,160
me. 
That's that's the only weird 

1320
01:11:03,160 --> 01:11:04,720
thing I'm trying to get used to 
in view. 

1321
01:11:05,400 --> 01:11:09,720
Honestly, that's kind of strange
in few land because these slots 

1322
01:11:09,720 --> 01:11:13,400
that you get and you get data 
from the parent component 

1323
01:11:13,400 --> 01:11:16,200
essentially. 
I would like to know like what 

1324
01:11:16,200 --> 01:11:18,240
my options are, you know? 
Exactly. 

1325
01:11:18,240 --> 01:11:20,880
And it's kind of, but that's why
it is in these curlies, because 

1326
01:11:20,880 --> 01:11:24,640
you get more, you don't need the
curlies and you get everything. 

1327
01:11:25,200 --> 01:11:29,560
But The thing is, it's not typed
in a sense that you can now see 

1328
01:11:29,560 --> 01:11:31,200
what comes out. 
Yeah, that would be nice. 

1329
01:11:31,200 --> 01:11:34,880
It's a bit weird in that sense, 
but it's so powerful because 

1330
01:11:34,880 --> 01:11:38,720
what can come from there are 
functions, variables, objects, 

1331
01:11:38,800 --> 01:11:41,480
stuff, arrays of things. 
It's kind of all of it. 

1332
01:11:42,360 --> 01:11:44,520
Cool. 
Oh yeah, this is a button to 

1333
01:11:44,520 --> 01:11:47,480
make a new cat. 
We haven't built that, so we 

1334
01:11:47,480 --> 01:11:51,840
probably don't need that. 
There's our search box that 

1335
01:11:52,520 --> 01:11:55,000
yeah, let's just call this 
search cat. 

1336
01:11:57,960 --> 01:12:00,680
Nothing else we need there. 
It's refining, searching. 

1337
01:12:00,680 --> 01:12:02,800
And then there's a column 
selector. 

1338
01:12:02,800 --> 01:12:04,840
That's kind of cool. 
And then there's the table that 

1339
01:12:04,840 --> 01:12:06,920
just shows all the rows we just 
added. 

1340
01:12:07,600 --> 01:12:10,480
I think we're good. 
Let's find out. 

1341
01:12:11,360 --> 01:12:14,280
So we went deep. 
We didn't use the out-of-the-box

1342
01:12:14,280 --> 01:12:17,400
stuff now, but I'm kind of happy
that there we go. 

1343
01:12:17,400 --> 01:12:19,000
It just works. 
Holy, holy. 

1344
01:12:19,760 --> 01:12:21,360
Here's Xena there we. 
Go. 

1345
01:12:22,600 --> 01:12:26,520
I don't see the sight, Mardo. 
Hang on, let me, maybe I'm zoom 

1346
01:12:26,560 --> 01:12:28,520
issue no. 
That's interesting. 

1347
01:12:29,920 --> 01:12:36,280
Yeah, can I use those dev tools 
to to search maybe? 

1348
01:12:37,160 --> 01:12:40,520
We should be able to. 
Looks like I got some issues. 

1349
01:12:40,520 --> 01:12:43,280
There's some some warnings that,
well, maybe we should ignore 

1350
01:12:43,280 --> 01:12:45,600
these for the time being. 
Patients. 

1351
01:12:46,200 --> 01:12:48,000
I think that's hydration 
related, isn't it? 

1352
01:12:48,560 --> 01:12:53,400
Yeah, it seems that way. 
It doesn't know what the 

1353
01:12:53,400 --> 01:12:56,760
component is maybe. 
Oh, maybe we didn't load 

1354
01:12:56,760 --> 01:12:58,520
everything. 
Yeah, that's why I'm wondering. 

1355
01:12:59,600 --> 01:13:02,360
Oh, I know. 
Oh yeah. 

1356
01:13:02,360 --> 01:13:07,640
So we made one mistake. 
There's a bigger part of Next UI

1357
01:13:07,760 --> 01:13:09,640
that is called Next UI 
Professional. 

1358
01:13:10,440 --> 01:13:14,760
It gives you a bunch of stuff, 
but we can use it for free when 

1359
01:13:14,760 --> 01:13:16,880
you're just developing. 
So let me just give it to you 

1360
01:13:17,200 --> 01:13:19,120
what you need to do, because 
it's actually easy. 

1361
01:13:19,720 --> 01:13:22,520
Oh, just go back to the, the, 
the GitHub. 

1362
01:13:24,920 --> 01:13:27,400
Yeah. 
And so go to Next confic. 

1363
01:13:27,400 --> 01:13:31,720
And then when you're on the top,
you see in line three it extends

1364
01:13:31,720 --> 01:13:33,400
Next UI Pro. 
OK. 

1365
01:13:33,960 --> 01:13:45,370
Yeah, put that in your config 
and I think you need to do just 

1366
01:13:45,530 --> 01:13:52,170
PNPM add the next UI Pro. 
No, you need to add it first. 

1367
01:13:52,330 --> 01:13:54,410
Or did you already do that? 
Oh, there. 

1368
01:13:55,050 --> 01:13:58,290
Yeah, I added this. 
Yeah, but now you have to just 

1369
01:13:58,290 --> 01:14:02,450
install it as an MPM package. 
Oh, oh, oh, sorry. 

1370
01:14:03,050 --> 01:14:05,840
No worries. 
Install and then. 

1371
01:14:06,320 --> 01:14:08,600
UI. 
Pro Dash pro yes. 

1372
01:14:17,160 --> 01:14:21,040
I think we're cooking. 
Oh. 

1373
01:14:21,040 --> 01:14:30,040
There we go. 
Cool, now when we do this we get

1374
01:14:30,040 --> 01:14:36,160
all the nice filtering. 
Is it working? 

1375
01:14:36,360 --> 01:14:38,320
Holy moly. 
Yeah, it looks. 

1376
01:14:38,960 --> 01:14:41,200
Looks great, a little jumping 
around but. 

1377
01:14:41,480 --> 01:14:45,600
Yeah, that's because the moment 
you filter it removes something 

1378
01:14:45,600 --> 01:14:48,840
from the list, and there are 
ways to change that, but I just 

1379
01:14:48,840 --> 01:14:51,000
didn't do that here. 
Yeah, it's all good. 

1380
01:14:51,920 --> 01:14:54,800
And now we're kind of the 
vaccinated one with true and 

1381
01:14:54,800 --> 01:14:56,520
false is kind of strange, right?
Oops. 

1382
01:14:58,200 --> 01:15:00,840
So what do you want to do for 
that, to make that work in 

1383
01:15:00,840 --> 01:15:05,600
Algolia is if it's vaccinated, 
you push vaccinated in, and if 

1384
01:15:05,600 --> 01:15:08,360
it's not, you don't. 
And so then it can say 

1385
01:15:08,440 --> 01:15:11,360
vaccinated with a checkbox. 
Right now, it just has a 

1386
01:15:11,400 --> 01:15:12,400
failure. 
True and false. 

1387
01:15:12,680 --> 01:15:15,360
So that's why it works so well 
for black, blue and brown, 

1388
01:15:15,880 --> 01:15:18,760
because it's always there. 
That makes sense. 

1389
01:15:21,160 --> 01:15:25,280
So we now created like oh you 
even like on the the select box 

1390
01:15:25,280 --> 01:15:27,560
on the right top. 
You can even remove something. 

1391
01:15:28,840 --> 01:15:29,760
Oh. 
That's right. 

1392
01:15:30,360 --> 01:15:32,280
No, no, on the right top there's
three selected. 

1393
01:15:32,280 --> 01:15:34,760
You can just remove. 
I totally thought that was our 

1394
01:15:34,760 --> 01:15:36,280
color changer. 
I wasn't even paying. 

1395
01:15:36,280 --> 01:15:39,160
Attention I just I, I just. 
This is was it like but this is 

1396
01:15:39,160 --> 01:15:41,680
not Algolia, this is just next 
UI. 

1397
01:15:42,240 --> 01:15:47,320
Oh wow, that's cool. 
And they just built that in and 

1398
01:15:47,320 --> 01:15:49,880
you can even order the table, 
but you don't want to do that 

1399
01:15:49,880 --> 01:15:52,080
because we have Algolia. 
That's amazing. 

1400
01:15:52,080 --> 01:15:54,600
Algolia gives you the data for 
the table and you should do the 

1401
01:15:54,600 --> 01:15:57,600
ordering with that. 
And is this doing highlighting 

1402
01:15:57,600 --> 01:15:59,160
or it's not? 
No, I did. 

1403
01:15:59,160 --> 01:16:01,000
I just didn't build that in. 
But you can. 

1404
01:16:01,880 --> 01:16:05,680
Yeah, so like for instance, I'd,
I wish I had my old site, I 

1405
01:16:05,680 --> 01:16:09,400
should have put it on a old like
domain name when you go through 

1406
01:16:09,400 --> 01:16:12,160
the search. 
So instead of like on coding 

1407
01:16:12,160 --> 01:16:15,680
cat, now I feel like I'm going 
to have to talk with the L Golia

1408
01:16:15,680 --> 01:16:18,720
people. 
I just did a more localized 

1409
01:16:18,720 --> 01:16:21,600
search. 
So when you go to search so when

1410
01:16:21,600 --> 01:16:23,640
it highlights like that. 
Fancy. 

1411
01:16:23,800 --> 01:16:26,640
There's AAIS highlights I 
believe for. 

1412
01:16:26,640 --> 01:16:28,440
Instant. 
Search and it will. 

1413
01:16:28,560 --> 01:16:30,080
We'll put that on there for you,
so. 

1414
01:16:30,280 --> 01:16:33,960
I just didn't put that in, but 
now that you told me I should 

1415
01:16:33,960 --> 01:16:36,360
actually do that. 
Very cool. 

1416
01:16:36,680 --> 01:16:39,240
So we're like we have like 14 
minutes. 

1417
01:16:39,280 --> 01:16:41,800
Do you think we can get to 
pushing data? 

1418
01:16:41,920 --> 01:16:46,480
Yes, let's do it. 
So the the it's kind of strange 

1419
01:16:46,480 --> 01:16:47,960
though. 
So what we should probably do 

1420
01:16:47,960 --> 01:16:52,720
for now is just grab that data 
from the database and statically

1421
01:16:52,720 --> 01:16:55,360
put it in somewhere and then hit
a button and send that over. 

1422
01:16:55,680 --> 01:16:59,760
Because if we wanted to change 
something in the database and 

1423
01:16:59,760 --> 01:17:02,400
based on that change, then push 
it in Algolia, we have to build 

1424
01:17:02,400 --> 01:17:04,480
like a whole CRUD app to do 
that. 

1425
01:17:04,560 --> 01:17:07,360
And I don't think we can do that
in like 13 minutes. 

1426
01:17:07,520 --> 01:17:11,960
OK, So what we can do though is 
if you go to GitHub again. 

1427
01:17:12,160 --> 01:17:15,240
And just a random question 
'cause I mean super base can you

1428
01:17:15,240 --> 01:17:18,920
actually set up functions 'cause
I used to do this in Firebase 

1429
01:17:18,920 --> 01:17:21,240
where every time you did an 
update in the database the 

1430
01:17:21,240 --> 01:17:22,880
function would just push to 
Algolia. 

1431
01:17:23,120 --> 01:17:27,160
Is that a thing? 
Yes, I just didn't build that. 

1432
01:17:28,480 --> 01:17:31,480
I think it has that because they
all have serverless functions 

1433
01:17:31,560 --> 01:17:33,360
for example. 
Yeah, they do, right. 

1434
01:17:33,440 --> 01:17:36,160
Nice. 
Oh shit, sorry to to say that 

1435
01:17:36,160 --> 01:17:39,400
online, but you actually just 
gave me a really good idea 

1436
01:17:39,400 --> 01:17:44,720
because I put all of that when I
save something in oh, sorry, in 

1437
01:17:44,720 --> 01:17:47,480
Superbase, you see it updated on
the screen and then I have a 

1438
01:17:47,480 --> 01:17:49,680
custom function that I just say 
update or go here. 

1439
01:17:49,680 --> 01:17:53,640
Now with the delta of the change
of that cat, I could have just 

1440
01:17:53,640 --> 01:17:56,720
done that in superbase probably.
That's one of that's where I 

1441
01:17:56,720 --> 01:17:59,120
thought all this was headed, but
my apologize. 

1442
01:17:59,120 --> 01:18:00,760
I should have, no. 
That's so smart. 

1443
01:18:00,960 --> 01:18:02,800
Like two days ago or three days 
ago. 

1444
01:18:03,000 --> 01:18:06,040
No, I wish I had that. 
My coat would be cleaner. 

1445
01:18:06,600 --> 01:18:10,000
We just do that now, Should we? 
Should we take 12 minutes to 

1446
01:18:10,000 --> 01:18:12,360
figure out if that's possible? 
We'll take 12 minutes and see 

1447
01:18:12,360 --> 01:18:16,360
how far we can get right. 
Yeah, because you I expect APR 

1448
01:18:16,360 --> 01:18:17,720
soon from you. 
No, Yeah. 

1449
01:18:18,080 --> 01:18:21,080
No problem. 
All right, So what we'll end up 

1450
01:18:21,080 --> 01:18:23,520
doing? 
We'll just share a screen again 

1451
01:18:23,520 --> 01:18:25,000
and let's have a look. 
Yeah. 

1452
01:18:25,000 --> 01:18:27,560
So I think we have to go. 
That is pretty awesome. 

1453
01:18:28,360 --> 01:18:31,760
There has to be like a like 
it'll be a node JS set up. 

1454
01:18:31,760 --> 01:18:35,680
I'm curious if any community 
members have a super base 2 

1455
01:18:35,680 --> 01:18:38,840
Algolia. 
Function or something? 

1456
01:18:39,320 --> 01:18:42,800
There must be something I just I
just didn't check. 

1457
01:18:43,400 --> 01:18:47,560
Pipe dream, you dumb thing. 
Yeah, this is so silly, isn't 

1458
01:18:47,560 --> 01:18:49,320
it? 
I just have an idea of how to 

1459
01:18:49,320 --> 01:18:52,200
code it, so let's just code it, 
but maybe something exists. 

1460
01:18:52,560 --> 01:18:54,800
Here we go. 
Oh, this is just full text 

1461
01:18:54,800 --> 01:18:56,680
search itself, so you don't need
Algolia, no. 

1462
01:18:56,960 --> 01:18:59,680
No, no, this is, this is with 
Algolia, right? 

1463
01:19:00,680 --> 01:19:02,360
Am I wrong? 
No, I don't think so. 

1464
01:19:03,120 --> 01:19:05,000
I am wrong, sorry. 
Yep, you're right. 

1465
01:19:07,840 --> 01:19:11,320
The thing is, if you are a 
database person like a lot of 

1466
01:19:11,320 --> 01:19:14,360
people are, you don't need 
Algolia for this because you can

1467
01:19:14,360 --> 01:19:18,520
just do indexes. 
Yeah, on the your postgres, 

1468
01:19:18,520 --> 01:19:21,360
right. 
The thing that Algolia provides,

1469
01:19:21,360 --> 01:19:24,320
and this isn't just me pitching 
it because they've sponsored 

1470
01:19:24,320 --> 01:19:28,840
this episode, there's so much. 
What's the word I'm looking for?

1471
01:19:28,840 --> 01:19:31,760
Like the contextual pieces, all 
the magic. 

1472
01:19:31,760 --> 01:19:34,960
They give you. 
Yes, the magic part is so like 

1473
01:19:35,640 --> 01:19:40,680
say I search for animal, you can
actually have it like dog in a 

1474
01:19:40,680 --> 01:19:43,080
post and it'll bring that up. 
Yeah. 

1475
01:19:43,280 --> 01:19:47,720
Because it's like it knows like 
dictionary based searches and 

1476
01:19:48,240 --> 01:19:52,000
and that stuff is unbelievable 
like also like. 

1477
01:19:52,040 --> 01:19:56,080
Re ranking, synonyms, analytics,
all the things you want. 

1478
01:19:56,760 --> 01:20:01,880
So maybe we should find out in 
the last 10 minutes now if we 

1479
01:20:01,880 --> 01:20:06,080
can fire a function some of some
kind when a database Rd. 

1480
01:20:06,080 --> 01:20:08,360
changes. 
Yes maybe we can Google for 

1481
01:20:08,360 --> 01:20:11,680
that, like fire function based 
on road change or something. 

1482
01:20:13,720 --> 01:20:16,440
Maybe it's time to ask John to 
jump in and ask. 

1483
01:20:16,560 --> 01:20:19,760
Help us. 
Just talk to him, which would be

1484
01:20:19,760 --> 01:20:23,680
my last night, his today. 
He might have crossed over. 

1485
01:20:23,680 --> 01:20:25,960
John lives in the future, folks.
He's in Australia. 

1486
01:20:26,240 --> 01:20:31,800
So Oh yeah, exactly update data 
that it's all client related. 

1487
01:20:31,840 --> 01:20:38,760
Yeah, there has to be a trigger 
function Superbase trigger. 

1488
01:20:40,280 --> 01:20:42,920
If we cannot find it in the 
coming few minutes, I'll just 

1489
01:20:42,920 --> 01:20:46,560
show you how I did it and then 
people have an idea of how you 

1490
01:20:46,560 --> 01:20:49,960
could do that. 
You can schedule let's. 

1491
01:20:50,480 --> 01:20:53,840
See, it's not scheduling per SE,
but it it might be an edge 

1492
01:20:53,840 --> 01:20:57,520
function we fire. 
Let's see what this other one 

1493
01:20:57,520 --> 01:21:03,120
says. 
There is Postgres triggers, so 

1494
01:21:03,120 --> 01:21:05,840
here's a hook. 
Whoa, I don't know why that just

1495
01:21:05,840 --> 01:21:09,640
went there. 
Oh, it just lets you log in or 

1496
01:21:09,640 --> 01:21:13,760
something. 
Hooks maybe. 

1497
01:21:16,840 --> 01:21:19,080
Oh, that's interesting. 
Are they doing AI? 

1498
01:21:19,280 --> 01:21:20,080
Yeah. 
Search. 

1499
01:21:20,480 --> 01:21:22,560
Can you just ask AI this 
question? 

1500
01:21:23,680 --> 01:21:30,040
Maybe so if I go back. 
Just ask a question, right? 

1501
01:21:31,040 --> 01:21:39,120
Yeah, write a function that 
triggers from database update. 

1502
01:21:42,760 --> 01:21:44,600
Seems so ginormous. 
I got to shrink it down a 

1503
01:21:44,600 --> 01:21:46,400
little. 
Oh no, maybe it's not my fault. 

1504
01:21:46,720 --> 01:21:50,800
I don't know why that went. 
No, this is just scary UI that 

1505
01:21:50,800 --> 01:21:54,840
we cannot read now. 
Oh wait, look, so there's a hook

1506
01:21:54,840 --> 01:21:58,400
like it looks it talks about it.
Basic format of a hook file. 

1507
01:22:04,490 --> 01:22:17,760
Yeah, that's exactly it. 
But where does the code live? 

1508
01:22:17,920 --> 01:22:21,880
That's my question. 
I don't understand where if if 

1509
01:22:21,880 --> 01:22:27,640
you execute this inside of 
superbase that will create that 

1510
01:22:28,200 --> 01:22:30,480
I think. 
Yeah, just go to SQL Editor. 

1511
01:22:30,800 --> 01:22:32,920
I don't know. 
This isn't like SQL though, 

1512
01:22:32,920 --> 01:22:34,240
right? 
Is it? 

1513
01:22:34,600 --> 01:22:38,520
Oh, but this is. 
This looks like an SQL function 

1514
01:22:38,520 --> 01:22:43,160
or something. 
Your language is PLPGSQL. 

1515
01:22:43,760 --> 01:22:48,480
So if we do update salary log 
insert. 

1516
01:22:48,480 --> 01:22:51,840
Into this is a thing like if 
something's updated somewhere 

1517
01:22:51,840 --> 01:22:54,640
else, it then updates another 
database thing. 

1518
01:22:54,920 --> 01:22:56,680
Yeah. 
And for me I'm I'm thinking like

1519
01:22:56,680 --> 01:22:59,600
I want to capture it in an edge 
function itself. 

1520
01:23:00,920 --> 01:23:05,520
I'm sure you can subscribe to a 
change and then fire a function.

1521
01:23:05,720 --> 01:23:07,160
Yeah. 
My guess is we would have to 

1522
01:23:07,160 --> 01:23:09,920
like pull this down locally and 
then. 

1523
01:23:10,320 --> 01:23:11,680
See what you can do. 
Yeah. 

1524
01:23:12,840 --> 01:23:16,960
Maybe for the last few minutes, 
go to GitHub and I'll show you 

1525
01:23:16,960 --> 01:23:19,480
how I update. 
I'll go, yeah, that might be a 

1526
01:23:19,480 --> 01:23:21,560
good move just for now to just 
have a look. 

1527
01:23:21,760 --> 01:23:27,520
Yes, absolutely cool. 
Do that and go to libres. 

1528
01:23:28,480 --> 01:23:35,200
Exactly. 
So go to Lib helpers and find 

1529
01:23:35,200 --> 01:23:38,440
the update cat function. 
And you might want to zoom in a 

1530
01:23:38,440 --> 01:23:40,440
bit. 
It's on line 48. 

1531
01:23:40,640 --> 01:23:45,760
Yeah. 
So basically in like you can see

1532
01:23:45,760 --> 01:23:50,080
this is this looks really silly,
but I don't want to save all the

1533
01:23:50,080 --> 01:23:52,880
data into the database that is 
sent to Algolia. 

1534
01:23:53,240 --> 01:23:56,640
The database just has to clean 
stuff like the fact that a cat 

1535
01:23:56,640 --> 01:23:58,480
is adopted. 
It's a checkbox, true or false, 

1536
01:23:58,480 --> 01:24:01,000
right? 
But I don't want to send true or

1537
01:24:01,000 --> 01:24:04,760
false to Algolia. 
So I'm just whatever the cat 

1538
01:24:04,760 --> 01:24:07,960
object is that I have on the 
page is quite different than 

1539
01:24:07,960 --> 01:24:11,240
what's actually in the database.
So I kind of re clean it up. 

1540
01:24:11,360 --> 01:24:13,680
So this is what I sent to the 
database and when you Scroll 

1541
01:24:13,680 --> 01:24:20,200
down a bit more like all the 
fields, then I have this update 

1542
01:24:20,200 --> 01:24:24,720
Algolia of the same object that 
was actually on the page. 

1543
01:24:24,720 --> 01:24:26,400
So not what goes to the 
database. 

1544
01:24:26,920 --> 01:24:30,400
So can you find the update 
algolia function should be below

1545
01:24:30,400 --> 01:24:35,840
this I think or so I'll just 
maybe want to just is there. 

1546
01:24:36,280 --> 01:24:40,920
Oops, this one. 
Yes, and so here I'm actually 

1547
01:24:40,920 --> 01:24:44,960
grabbing the admin API key from 
Mongolia and not just the normal

1548
01:24:44,960 --> 01:24:48,880
one. 
I make it Algolia search like 

1549
01:24:48,880 --> 01:24:52,120
I'm importing this on the top of
this file, right? 

1550
01:24:52,600 --> 01:24:55,520
I make their search. 
This is just their node API. 

1551
01:24:56,360 --> 01:25:02,840
And so I initialize the index 
and then line 295 is horrible. 

1552
01:25:04,040 --> 01:25:08,880
Read that and weep. 
You know why this is in Fuji S 

1553
01:25:09,320 --> 01:25:14,920
when you have a proxy, which is 
a reactive thing, it's not just 

1554
01:25:15,000 --> 01:25:18,280
an object that can send over the
wire because it's a reactive 

1555
01:25:18,280 --> 01:25:19,920
thing with all its functions and
fanciness. 

1556
01:25:20,680 --> 01:25:25,240
And I did not Google, I just 
knew from two years ago that 

1557
01:25:25,240 --> 01:25:28,280
this was how to make it non 
reactive but just a Jason 

1558
01:25:28,280 --> 01:25:31,280
object. 
I think lots of few people are 

1559
01:25:31,280 --> 01:25:34,880
crying now when they watch this.
There's probably a function to 

1560
01:25:34,880 --> 01:25:37,480
make it non reactive and just 
half your object, but this is 

1561
01:25:37,480 --> 01:25:39,920
how I did it. 
Yeah, if you're on the newest 

1562
01:25:39,920 --> 01:25:43,840
piece of of next, there's 
actually a copy object of 

1563
01:25:43,840 --> 01:25:46,640
function built into to 
JavaScript now, so. 

1564
01:25:46,640 --> 01:25:48,160
I'm. 
Sure, I'll have to share that. 

1565
01:25:48,160 --> 01:25:49,920
With you if you have that so. 
You don't cry. 

1566
01:25:51,160 --> 01:25:53,240
Anyway, So what I do, I make an 
object ID. 

1567
01:25:53,240 --> 01:25:55,840
That's just the normal cat ID 
information, my database, 

1568
01:25:56,240 --> 01:25:58,800
because Algolia worked with 
object IDs. 

1569
01:25:59,560 --> 01:26:02,560
And as you noticed when we 
pasted our stuff, there was not 

1570
01:26:02,560 --> 01:26:04,360
an object ID, they just made you
one. 

1571
01:26:05,080 --> 01:26:08,240
But I kind of wanted this to be 
able to query one thing later. 

1572
01:26:08,360 --> 01:26:13,960
I wanted my own ID and so let's 
see. 

1573
01:26:14,080 --> 01:26:17,720
So I feel like you can also make
just ID if you were to move that

1574
01:26:17,720 --> 01:26:20,200
over indexable as well. 
So it would kind. 

1575
01:26:20,200 --> 01:26:24,160
Of probably yes and literally 
the only thing I did is save 

1576
01:26:24,160 --> 01:26:27,680
object, so not save objects 
because save objects is for all 

1577
01:26:27,680 --> 01:26:32,120
of them and this is just one and
if it doesn't exist, just make 

1578
01:26:32,120 --> 01:26:35,000
it. 
There is one function that it 

1579
01:26:35,000 --> 01:26:38,280
seems I have not I don't see 
here yeah. 

1580
01:26:38,280 --> 01:26:41,200
So we haven't actually talked 
about that as much, but I just 

1581
01:26:41,200 --> 01:26:43,680
said right when for these facets
that I just have an array of 

1582
01:26:43,680 --> 01:26:46,880
facets and stuff. 
There is another function here 

1583
01:26:47,120 --> 01:26:50,480
in this file that kind of it 
grabs the database version of 

1584
01:26:50,480 --> 01:26:53,680
that cat and then enhances it 
with a bunch of stuff. 

1585
01:26:53,680 --> 01:26:57,480
So it queries the families table
and it queries the treatments 

1586
01:26:57,480 --> 01:27:01,160
and the weights and it makes one
big object of everything for 

1587
01:27:01,160 --> 01:27:03,360
that cat. 
And that's what we're dealing 

1588
01:27:03,360 --> 01:27:05,720
with here and that's what's 
going into Algolia also. 

1589
01:27:05,960 --> 01:27:10,760
So actually what you would do, 
you would take exactly what Tim 

1590
01:27:10,760 --> 01:27:13,080
has written here. 
You would take all of this stuff

1591
01:27:13,640 --> 01:27:17,200
into a function that runs on 
Superbase and just trigger this 

1592
01:27:17,200 --> 01:27:19,480
every time the database updates 
instead. 

1593
01:27:19,600 --> 01:27:22,600
Exactly because the code I just 
used here, that's just node, 

1594
01:27:22,840 --> 01:27:23,760
right? 
Like it's. 

1595
01:27:23,840 --> 01:27:26,200
It might be in a JavaScript 
file, but it's essentially just.

1596
01:27:26,200 --> 01:27:28,200
You can run this in Node GS and 
just do this. 

1597
01:27:28,200 --> 01:27:32,160
Yeah, and and they'll run out on
Dino is their edge functions, 

1598
01:27:32,320 --> 01:27:33,960
it'll run the same way. 
So. 

1599
01:27:34,360 --> 01:27:37,280
Yeah, and great example. 
One thing is you have to hope 

1600
01:27:37,320 --> 01:27:41,960
that the Superbase SDK or the 
Super base will probably work. 

1601
01:27:41,960 --> 01:27:46,520
But the Algolia SDK works on on 
Bun or Dino or whatever it is, 

1602
01:27:46,520 --> 01:27:48,440
so we don't know. 
We'll have to check that. 

1603
01:27:48,920 --> 01:27:53,120
Yeah, for sure. 
Well, I think this was a great 

1604
01:27:53,120 --> 01:27:56,840
representation of how to build a
SAS, which you have much more 

1605
01:27:56,840 --> 01:28:00,040
baked. 
Do you plan on giving that to 

1606
01:28:00,040 --> 01:28:04,120
the world once you're done or? 
It's the plan to finish this 

1607
01:28:04,120 --> 01:28:07,120
thing because these people I 
built this for, they're all 

1608
01:28:07,120 --> 01:28:11,160
struggling and why not give them
this and a simple page builder 

1609
01:28:11,440 --> 01:28:15,280
so they can get donations and 
share stuff on Facebook and have

1610
01:28:15,280 --> 01:28:18,040
a database of cats because they 
don't know, don't even know to 

1611
01:28:18,040 --> 01:28:20,160
which families the cat was went 
to. 

1612
01:28:20,840 --> 01:28:24,720
And that might not sound so bad,
but sometimes, and we're dealing

1613
01:28:24,720 --> 01:28:26,880
with that right now because we 
are one of those families. 

1614
01:28:27,200 --> 01:28:29,680
The previous family didn't clean
well in their house. 

1615
01:28:30,160 --> 01:28:33,960
So the cats get sick, but 
they're not sick when they're in

1616
01:28:33,960 --> 01:28:35,400
that place. 
They're sick when they come to 

1617
01:28:35,400 --> 01:28:40,280
my house and then infect my cats
or give me scurvy or some crazy 

1618
01:28:40,280 --> 01:28:44,080
things, you know, whatever. 
And so you need to deal with 

1619
01:28:44,080 --> 01:28:45,360
that stuff and have a paper 
trail. 

1620
01:28:45,360 --> 01:28:48,480
It's really important. 
So you guys don't, do you do 

1621
01:28:48,480 --> 01:28:51,120
microchipping over there or no? 
Yes, they all have. 

1622
01:28:52,440 --> 01:28:55,680
And so the idea for me now is to
build this thing so they all got

1623
01:28:55,680 --> 01:28:58,880
a database and that like right 
now this is just for one. 

1624
01:28:58,960 --> 01:29:01,200
But the point is I will make it 
so you have multiple 

1625
01:29:01,200 --> 01:29:04,720
associations in the system and 
then when you make a new user 

1626
01:29:04,720 --> 01:29:07,600
account, you're just associated 
to one of them so you cannot see

1627
01:29:07,600 --> 01:29:11,160
the rest and all the cats fit to
an association as well. 

1628
01:29:11,440 --> 01:29:13,760
You can make accounts and you 
can give your friends accounts 

1629
01:29:13,760 --> 01:29:15,400
and then you can make your 
website. 

1630
01:29:15,400 --> 01:29:19,440
And then I make a bunch of fun 
integrations to share this cat 

1631
01:29:19,440 --> 01:29:22,200
on Facebook from the tool and it
will just do it like all these 

1632
01:29:22,200 --> 01:29:23,680
kind of like little helper 
things. 

1633
01:29:23,960 --> 01:29:27,440
And it can grow as big as 
receive a donation or sell this 

1634
01:29:27,440 --> 01:29:30,360
mug so you get money for your 
association. 

1635
01:29:30,360 --> 01:29:34,200
And for now I thought maybe I'd 
give it to them for like 5 bucks

1636
01:29:34,200 --> 01:29:36,240
a month and I host their website
and do the whole thing. 

1637
01:29:36,240 --> 01:29:39,440
I might just give it for free. 
Depends how many people want 

1638
01:29:39,440 --> 01:29:41,680
this thing. 
Yeah, I mean, maybe you give it 

1639
01:29:41,680 --> 01:29:44,520
to the people and have like an 
organization, like a shelter or 

1640
01:29:44,520 --> 01:29:45,800
something. 
Pay the five bucks you. 

1641
01:29:46,080 --> 01:29:48,240
Know some? 
Yeah, because there are bigger 

1642
01:29:48,240 --> 01:29:52,960
organizations called something 
like SPA that's that's one of 

1643
01:29:52,960 --> 01:29:54,920
those. 
And they they do it nationwide. 

1644
01:29:55,520 --> 01:29:58,400
And if they could pay for it, 
that would be nice. 

1645
01:29:58,640 --> 01:30:01,240
That would be cool, right? 
Well, Tim, we're up on it. 

1646
01:30:01,240 --> 01:30:03,720
So I just wanted to say again, 
thank you so much. 

1647
01:30:03,720 --> 01:30:06,360
I really appreciate it. 
Come on, anytime we'll build 

1648
01:30:06,360 --> 01:30:08,760
something cool, OK? 
We will. 

1649
01:30:09,000 --> 01:30:11,240
And you know what? 
Actually I didn't know these 

1650
01:30:11,240 --> 01:30:15,560
like these tools combined made 
me start this in a weekend. 

1651
01:30:15,680 --> 01:30:19,280
And if I had been slightly more 
full stacky and understand 

1652
01:30:19,280 --> 01:30:23,720
databases a bit more, you could 
build your basics of your SaaS 

1653
01:30:23,720 --> 01:30:26,880
with this tool chain in in 2-3 
weekends and you're good. 

1654
01:30:27,440 --> 01:30:28,800
Incredible. 
Really crazy, isn't it? 

1655
01:30:29,040 --> 01:30:31,640
It is check out Superbase, check
out Al Golia. 

1656
01:30:31,640 --> 01:30:33,640
It's it's pretty, pretty 
amazing. 

1657
01:30:33,640 --> 01:30:38,360
So we'll see you next week with 
live with code with coding Cat. 

1658
01:30:38,480 --> 01:30:39,920
Thanks everybody. 
Cheers man, 

1659
01:30:53,000 --> 01:30:56,600
I live. 
Inside my own world of make 

1660
01:30:57,520 --> 01:31:01,440
believe. 
Kids screaming in the cradles 

1661
01:31:02,200 --> 01:31:16,720
profanities. 
Ice Ice covered in this episode 

1662
01:31:16,720 --> 01:31:17,080
of Cold.
