YouTube2Text

How to Build Real Mobile Apps with Claude - FULL COURSE — Transcript

by Codesistency · 32,121 words · 4,414 segments · language en · Watch on YouTube

Full transcript

  1. 0:00So, I don't know if you have heard of
  2. 0:01Cali before, but it is a simple mobile
  3. 0:05application that is tracking the
  4. 0:06calories and it is making $6 million a
  5. 0:09month. So, I wanted to build my own
  6. 0:12version of it and publish it on the app
  7. 0:14store. Well, I have done that and the
  8. 0:16entire process took me 14 days and
  9. 0:19exactly 5 days after the launch, I got
  10. 0:21my very first customer and I have used
  11. 0:24AI throughout the entire process with a
  12. 0:27structured workflow and a plan. And for
  13. 0:30marketing side of the things, I have
  14. 0:32used AI influencers and I posted videos
  15. 0:35on Tik Tok and Instagram which brought
  16. 0:38me traffic and customers. And now in
  17. 0:40this video, I'll show you the entire
  18. 0:42process by building a simplified version
  19. 0:45of my mobile application. I'll show you
  20. 0:47everything from generating beautiful
  21. 0:49designs to planning the app to building
  22. 0:52a landing page with demo mockups. And
  23. 0:55you can use the same workflow for any
  24. 0:57kind of application that you can
  25. 0:59imagine. Before we get into coding, let
  26. 1:01me give you a quick demo of the end
  27. 1:02result so that you know what we are
  28. 1:04building in this course. All right. So
  29. 1:06this is the exact end result that we're
  30. 1:08going to have in this video which is a
  31. 1:10simplified version of my actual
  32. 1:12application which is published on app
  33. 1:14store. So let me give you a quick demo.
  34. 1:16So first off we start with the
  35. 1:18onboarding process. As soon as you press
  36. 1:21this button there will be a couple of
  37. 1:22different questions so that we can get
  38. 1:24you a personalized meal plan. Here I'll
  39. 1:27say this is my gender. Let's say next.
  40. 1:30Then you can select your birthday date.
  41. 1:32You can tell everything is working as
  42. 1:34expected.
  43. 1:36And then what's your height? I'll just
  44. 1:38go with the default. This is my weight,
  45. 1:41let's say. And I want to gain weight.
  46. 1:44And then let's say I want to go with
  47. 1:47something like 75.
  48. 1:51This is how I'm active month uh weekly.
  49. 1:55And then let's say I want to get like 1
  50. 1:57kilos per week, which is kind of
  51. 1:59aggressive, but that's fine. Let's say
  52. 2:01next. I want to have a classic diet.
  53. 2:04Once you say next, this is going to
  54. 2:06build your plan in the background. So
  55. 2:09basically, we are sending your data to
  56. 2:11OpenAI and as you can tell, it's going
  57. 2:13to calculate then give you some details
  58. 2:15that you should get daily. Like this is
  59. 2:18how much calorie I need to get daily to
  60. 2:20be able to hit my hit my goals. So I'm
  61. 2:24just going to say continue. And after
  62. 2:26this, we need to kind of like sign in,
  63. 2:28right? so that we can have our progress
  64. 2:31or the details saved in the application
  65. 2:34as well as in the database. Now once you
  66. 2:36sign in this is the UI that you're going
  67. 2:38to get. We have three different screens.
  68. 2:40Home screen, the food scanning screen.
  69. 2:43Now we cannot really see the background
  70. 2:45or the camera because this is running on
  71. 2:47simulator. But if you run this in your
  72. 2:50actual phone, you will basically use the
  73. 2:52camera. So this will actually work. In
  74. 2:55the simulator, you can use your gallery
  75. 2:57if you really wanted to. So once you
  76. 2:59press this button, you can select images
  77. 3:01from your gallery and that would also
  78. 3:03work. Then we also have the profile
  79. 3:06screen. And under the profile screen, we
  80. 3:08have user details. Then we also have a
  81. 3:10privacy policy which is something that
  82. 3:12we have actually built and deployed. And
  83. 3:14we also linked it to this button and we
  84. 3:17also have the same thing for terms of
  85. 3:19services. Now if you don't have these
  86. 3:21then your application will be rejected
  87. 3:23by Apple. Then we have sign out delete
  88. 3:26your account functionality. Again this
  89. 3:29is something that you have to have. This
  90. 3:31is not optional. Then on top of
  91. 3:33everything we have the send feedback
  92. 3:35button which is working actually with
  93. 3:38Sentry. So your users can report a bug
  94. 3:41or give you some feedback or ask for
  95. 3:44more features in this application. And
  96. 3:46then under the home screen we have the
  97. 3:48calendar. You can go back in two weeks
  98. 3:51and if you wanted to extend it, you can
  99. 3:53do so. Then we have the streak
  100. 3:55functionality like basically every
  101. 3:57single day that you log in this will be
  102. 4:00incremented. It is just kind of like
  103. 4:02motivational feature not really anything
  104. 4:05complex. Now other than this the most
  105. 4:07important feature is going to be meal
  106. 4:10scanning. So let's go ahead and test
  107. 4:12out. You can just select the meal from
  108. 4:14your gallery or you can take the photo
  109. 4:16as well. But since you are in simulator,
  110. 4:18I'll just show you this option. Here we
  111. 4:21can retake or just say analyze the food.
  112. 4:23We're just going to run a task in the
  113. 4:25background. So basically, we will take
  114. 4:27this photo and send it to OpenAI or any
  115. 4:30kind of AI platform. Then they will
  116. 4:33calculate the calories, protein, carbs,
  117. 4:36and fat. Then we can either scan another
  118. 4:39food or just say done. This will be
  119. 4:41added to our meals under the home
  120. 4:44screen. So this is the entire
  121. 4:46application that we are going to build
  122. 4:48in this tutorial and at the end I'll
  123. 4:50show you how to generate AI influencers
  124. 4:52with before and after videos then how to
  125. 4:55edit them that can go viral on Instagram
  126. 4:58and Tik Tok. Now this is not yet another
  127. 5:01VIP coding tutorial but it is like a
  128. 5:03playbook that you can follow along to
  129. 5:06bring your ideas into reality with AI
  130. 5:08tools. Throughout this course, I'll be
  131. 5:10sharing tips and tricks that you must
  132. 5:12know such as having a privacy policy in
  133. 5:15terms of services pages for your
  134. 5:18application. Otherwise, your app will be
  135. 5:20rejected by Apple or in the similar way
  136. 5:23you have to have a delete your account
  137. 5:25option. And another thing is that if you
  138. 5:27include both options like Google, then
  139. 5:30you must have Apple as well otherwise
  140. 5:33your application will get rejected by
  141. 5:35Apple once again. So these are the
  142. 5:37things that you would learn the hard way
  143. 5:40but hopefully in this video I'll share
  144. 5:42most of the things that I know. Now when
  145. 5:44it comes to the text tag we are using
  146. 5:45some of the best tools out there and
  147. 5:47they are completely free to get started
  148. 5:49with. So you don't need a credit card to
  149. 5:52be able to follow along. We will use
  150. 5:54React Native and Expo as our framework
  151. 5:56and this is one of the best ways to
  152. 5:58build a mobile app as of 2026. You have
  153. 6:02only one codebase that can run on both
  154. 6:04iOS and Android. For authentication, we
  155. 6:07will be using Clerk which provides all
  156. 6:09kinds of sign-in options and it's as
  157. 6:12easy as switching a button. For
  158. 6:14database, we will use Postgress which
  159. 6:16will be provided by Neon and it'll be
  160. 6:18deployed on the cloud. And for running
  161. 6:21our AI agents, we will be using
  162. 6:23trigger.deaf which is going to do most
  163. 6:25of the heavy lifting. So when we take a
  164. 6:27photo of our meal in the background a
  165. 6:30task will fire where we sent this photo
  166. 6:32to open aai to analyze the calories and
  167. 6:35macros. We will update the UI in real
  168. 6:37time and if anything fails trigger.dev
  169. 6:40will handle the retries automatically
  170. 6:43and we will store the images and
  171. 6:45optimize them using image kit. For error
  172. 6:47tracking and monitoring we will use
  173. 6:50Sentry which also has an AI code
  174. 6:52reviewing tool that we will get into
  175. 6:54later in the video. I will leave some
  176. 6:56special links in the description that
  177. 6:58will get you free credits on all of
  178. 7:00these tools. And as usual, the source
  179. 7:03code of this project will also be free.
  180. 7:05Now, with all that being said, let's not
  181. 7:07waste any time and get started with the
  182. 7:09course. Now just before we get started I
  183. 7:12quickly want to mention that we have a
  184. 7:14school community and within this school
  185. 7:17community I have basically documented
  186. 7:19the entire journey of building my own
  187. 7:22application and publishing it to app
  188. 7:25store. Here you can tell everything took
  189. 7:27exactly 14 days because the day zero is
  190. 7:30kind of like crash course. So everything
  191. 7:33took around 14 days to submit it to the
  192. 7:36app store and then we start with
  193. 7:38marketing and new classes will be coming
  194. 7:42every single day. So this is a community
  195. 7:44for those of you that are interested to
  196. 7:46see the entire process like having
  197. 7:49payments, you know, we have monthly,
  198. 7:52yearly plans, maybe even some weekly
  199. 7:54plans. Then how do you get through the
  200. 7:57entire submission process or something
  201. 8:00like how to implement push
  202. 8:01notifications? And this is not just a
  203. 8:03course, but it's a live community. Here
  204. 8:05you can tell everyone is sharing their
  205. 8:08own process like motivating each other,
  206. 8:10so on and so forth. And actually, one of
  207. 8:13our students has already published their
  208. 8:15app on the app store. And just for the
  209. 8:17record, this is his app and he built it
  210. 8:20with me within our community in exactly
  211. 8:2214 days. And just to give you some
  212. 8:25insights, like when you press one of
  213. 8:27these classes, we have specific videos
  214. 8:30for that day. And you can always come
  215. 8:33back and doublech checkck these lessons
  216. 8:35if you're interested. So, if you want to
  217. 8:37join, I'm going to leave the link in
  218. 8:38description. And hopefully I'll see you
  219. 8:40inside.
  220. 8:42All right. So, as usual, we're going to
  221. 8:43start from absolute scratch. I just have
  222. 8:46an empty folder which is opened up in VS
  223. 8:48Code. And this is the name that I came
  224. 8:49up with. You can really call this
  225. 8:51anything that you wish. Now, before we
  226. 8:53jump into coding, there are a couple of
  227. 8:54different things that I want to mention.
  228. 8:56The very first one is Node.js. I'm
  229. 8:58assuming that every single one of you
  230. 9:00already have this installed, but just in
  231. 9:02case if you don't have it, you need to
  232. 9:03visit nojs.org, press the download
  233. 9:06button, and then leave everything as
  234. 9:08default. Then just install it. Okay. So
  235. 9:10this is the very first thing that you
  236. 9:12need to have. Now when it comes to AI,
  237. 9:14I'll be using cloud, but you can really
  238. 9:15use anything that you wish. That could
  239. 9:17be codex, cursor, anti-gravity, you
  240. 9:20know, wind surf, really anything. And as
  241. 9:23you know already, this is not 2018
  242. 9:25anymore. We don't really write code by
  243. 9:27hand, which is extremely slow. Okay, so
  244. 9:30I'll be using cloud and there are a
  245. 9:31couple of different ways of using it. So
  246. 9:34you can use their desktop application or
  247. 9:36their terminal. Sorry, not their
  248. 9:38terminal but just within a terminal or
  249. 9:41within a VS code with their extension
  250. 9:44and this is what I'll be using. So
  251. 9:46basically within VS code let me open
  252. 9:47this up like here literally you can just
  253. 9:50press doubleclick anywhere on this right
  254. 9:53hand side and then press this button and
  255. 9:55then you will be able to run cloud. Now
  256. 9:58if you don't have like if you cannot see
  257. 10:00this button that's because you don't
  258. 10:02really have their extension. Let me
  259. 10:04showing everything. And then you'll just
  260. 10:06install cloud code for VS code. So once
  261. 10:10you install it, it's going to ask you to
  262. 10:12log in. And then once you log in, you'll
  263. 10:14be able to just talk with cloud. And
  264. 10:17here there are a couple of different
  265. 10:18models. As I'm recording this video, the
  266. 10:22recent model that just came out is, I
  267. 10:24think, Opus 5. I'll be using Opus 5. I
  268. 10:27think Fable 5 is better than that, but
  269. 10:30it just uses so many tokens. So in this
  270. 10:33case I'll be going with Opus 5. Okay.
  271. 10:37Now again let me try to zoom in. And now
  272. 10:40as you already know I have built and
  273. 10:42deployed a mobile application to app
  274. 10:44store in exactly 14 days. And to be able
  275. 10:47to make it I have used a really really
  276. 10:50cool workflow and in this video I'm
  277. 10:52going to show you everything that I've
  278. 10:53done. So here I have some diagrams.
  279. 10:55Let's go ahead and take a look at it.
  280. 10:57And I have some prompts that I'm going
  281. 10:59to provide it to you within the link in
  282. 11:01the description. Okay, so here is the
  283. 11:03workflow that we're going to be using.
  284. 11:06First off, we would like to plan and
  285. 11:08describe our project. Like we're going
  286. 11:10to define the idea, the goals, features,
  287. 11:13the screens that we're going to have,
  288. 11:15you know, the user flow, and then the
  289. 11:17text tag. Then once we have our plan,
  290. 11:20depending on this plan, we are going to
  291. 11:21generate UI. And for the UI design,
  292. 11:25we'll be using AI. And I have actually a
  293. 11:28pretty cool workflow or I should say
  294. 11:30some prompts that generates really
  295. 11:33really good looking UI designs. And here
  296. 11:35again like I have generated bunch of
  297. 11:37them. And for every single one of these
  298. 11:39designs we have the prompts. So you can
  299. 11:42copy them like I'll show you how to do
  300. 11:44it from absolute scratch. But yeah these
  301. 11:47are the first two steps. And then once
  302. 11:50we have the UI design, we'll just get
  303. 11:52into the features screen by screen. So
  304. 11:55here let's say we have the
  305. 11:57authentication screen right we'll get
  306. 11:59started with it once it is done we'll go
  307. 12:01with the next screen so on and so forth
  308. 12:04and for every single feature we can use
  309. 12:07some kind of AI tool that's going to
  310. 12:10that's going to analyze our codebase and
  311. 12:12it's going to tell if there is anything
  312. 12:14that we need to fix. So first off we're
  313. 12:17going to selfch checkck that right. So
  314. 12:18we'll test this out within our simulator
  315. 12:21or with our actual phone and once we
  316. 12:24pass them then we'll ask AI to have a
  317. 12:27code review and then here it's going to
  318. 12:29say you know if the feature is
  319. 12:31completed. So if the feature is
  320. 12:32completed we're going to commit our
  321. 12:34changes and move on to the next feature.
  322. 12:37But just in case if we have some issues
  323. 12:39then we'll go ahead and run this loop
  324. 12:41again and again. Okay. And then
  325. 12:44eventually once we have no more features
  326. 12:46that means the project has been
  327. 12:48completed. We have built every single
  328. 12:50feature, reviewed it and finalized it.
  329. 12:53Okay, so that's the workflow. First off,
  330. 12:56I'll go into the plan mode prompt and
  331. 12:58I'm going to copy everything. Now I
  332. 13:00would say just pause the video and try
  333. 13:02to read this prompt. Basically we are
  334. 13:04asking AI to interview us with this you
  335. 13:07know about this project so that it never
  336. 13:09guesses anything but instead asks us
  337. 13:12everything right so we are on the same
  338. 13:14page so I'm going to copy everything and
  339. 13:17at the very end we will you know let me
  340. 13:20just paste and then I'll explain here
  341. 13:22I'll go ahead open up the cloud instance
  342. 13:25you can use cursor or you know codeex
  343. 13:27anything really just go ahead paste this
  344. 13:30in and then we'll start describing our
  345. 13:33project. Now you can type it out which
  346. 13:35is pretty boring and slow or you can
  347. 13:37just you know press this button and talk
  348. 13:40with cloud. Okay. So in this case I'd
  349. 13:43like to just press this button and talk
  350. 13:45with cloud you know explain most of the
  351. 13:47things that I want to have in this
  352. 13:50application. So I'm going to give every
  353. 13:52single detail you know as much as
  354. 13:54possible and then also the text tag.
  355. 13:57Okay. So I'm going to press this button
  356. 13:59and let's go ahead start talking.
  357. 14:03Well, actually, let me do it again.
  358. 14:07All right. So, I want to build a project
  359. 14:10just like Cali. If you don't know
  360. 14:12already, it is a calorie tracking app.
  361. 14:15Basically, users will take a photo of
  362. 14:18their meal and then we will send this
  363. 14:20photo to OpenAI or any kind of AI agent.
  364. 14:25you know, it's going to take a look at
  365. 14:26the photo, analyze it, then it's going
  366. 14:29to give the amount of calories we have
  367. 14:31in that meal, protein, you know, fats,
  368. 14:35carbs, and even like macros or it's
  369. 14:38actually the same thing. Uh, but
  370. 14:40anyways, so that's the general idea of
  371. 14:43our application and we would like to
  372. 14:45make this experience for, you know, like
  373. 14:49we would like to make it for every
  374. 14:51single individual. So it's not going to
  375. 14:53be random. And to be able to achieve
  376. 14:55this, we can have an onboarding process.
  377. 14:58So we're going to ask users their age,
  378. 15:01you know, their height, their weight,
  379. 15:03what's their goal. Do they want to cut
  380. 15:06weights or do they want to do they want
  381. 15:09to gain weights? You know, that kind of
  382. 15:11thing. So we would like to have the
  383. 15:13onboarding process. We would like to
  384. 15:15have an authentication screen. And then
  385. 15:18once they process once they once they
  386. 15:22gone through the authentication process
  387. 15:24and onboarding process we're going to
  388. 15:26take them to our homepage where they can
  389. 15:30take a look at their history of the
  390. 15:32foods and there will be a screen where
  391. 15:35they can you know open up their camera
  392. 15:37and take a photo of their meal. And then
  393. 15:41there will also be a profile screen
  394. 15:43where they can edit their information.
  395. 15:47Okay. So, I hope this this gives you
  396. 15:50kind of like an idea. And this is
  397. 15:53basically the same thing or like a
  398. 15:54similar thing that I've shown in the
  399. 15:56intro of this project. So, we're going
  400. 15:59to have the authentication screen,
  401. 16:00onboarding, you know, the camera screen,
  402. 16:04home screen, profile, so on and so
  403. 16:06forth. And I think now we can give my
  404. 16:09text tag and it's going to ask us a
  405. 16:11bunch of different questions. Anyways,
  406. 16:13so here I'll say for authentication I
  407. 16:17would like to use clerk with Google and
  408. 16:20you know Apple authentication options.
  409. 16:24Then for database we're going to be
  410. 16:26using Postgress which will be provided
  411. 16:28by Neon. And for AI agents and
  412. 16:32background jobs we'll be using
  413. 16:34trigger.dev.
  414. 16:36And what else? I think for for error
  415. 16:39tracking and monitoring we'll be using
  416. 16:41Sentry and for image storage and
  417. 16:45optimization as well as transformations
  418. 16:47we'll be using image kit. So keep those
  419. 16:50in mind and you know go ahead ask me the
  420. 16:53questions then eventually once I answer
  421. 16:57every single question you would like to
  422. 16:59create a plan MD file and we'll be using
  423. 17:02expo and react native to build this
  424. 17:05project but for now I don't really want
  425. 17:08you to initialize initialize the expo
  426. 17:12project
  427. 17:15okay so here I don't know why it says
  428. 17:16expo but it should be expo I'll copy it
  429. 17:20and I think I'll just scroll to the top
  430. 17:22here. I had a typo with AI. Now Kelly is
  431. 17:26going to be Cal AI. Let's see if there
  432. 17:29is anything else.
  433. 17:32Okay, export React Native. And yeah, I
  434. 17:35think I'll select the plan mode. This is
  435. 17:37really really important because we would
  436. 17:39like to plan it and we'll just um send
  437. 17:42it. And now before we start answering
  438. 17:45the questions from cloud, let's go ahead
  439. 17:47and set up the tools that we'll be using
  440. 17:49in this tutorial. So first off, we'll
  441. 17:51start with the trigger.dev. Now, if you
  442. 17:54don't know already, this is the platform
  443. 17:56for building AI agents and workflows in
  444. 17:59Typescript. So think about what our
  445. 18:02application actually does. A user scans
  446. 18:04a meal, right? And then an AI agent has
  447. 18:08to analyze that image. So, it's going to
  448. 18:10figure out the ingredients, estimate the
  449. 18:12calories and macros. Now, that's a
  450. 18:15longunning job. It can take 10 to 15
  451. 18:18seconds, and it can fail halfway
  452. 18:20through. So, you can't really run
  453. 18:22something like that inside a mobile
  454. 18:25applications request cycle. And that's
  455. 18:27exactly where trigger.dev comes into
  456. 18:30play. Now, to be honest, this is going
  457. 18:32to be the main engine of this project.
  458. 18:34Everything our AI agents do, you know,
  459. 18:37the image analysis, the calorie
  460. 18:39estimates, all of it runs on
  461. 18:42trigger.deaf. So our agents will run on
  462. 18:45their infrastructure and there will be
  463. 18:47no timeouts, no servers to manage and
  464. 18:50you know if the AI call fails at any
  465. 18:53point, it's going to retry
  466. 18:55automatically. So overall, whenever we
  467. 18:58have an AI workflow or a background job
  468. 19:01in this course, this is where it's going
  469. 19:03to live. Now here we can tell there are
  470. 19:05a bunch of different use cases. You can
  471. 19:07take a look at them individually. We'll
  472. 19:09be using I think bunch of them in the
  473. 19:11incoming sections. We'll even use their
  474. 19:13real time um you know the real-time
  475. 19:16hooks so that we can show users if you
  476. 19:18are analyzing their food you know if you
  477. 19:21are getting the macros so on and so
  478. 19:23forth. And it is also open source. Here
  479. 19:25you can take a look at the codebase if
  480. 19:28you are really interested. Now I'm going
  481. 19:30to leave the link in the description.
  482. 19:31Let's go ahead and login. You don't
  483. 19:33really need a credit card to be able to
  484. 19:35follow along because they have a really
  485. 19:37really generous tier that you don't
  486. 19:40really need to pay anything to get
  487. 19:42started with. And this video is kindly
  488. 19:44sponsored by trigger.dev. So, I'll go
  489. 19:47ahead and log in. I'll be using my
  490. 19:49GitHub account, but you can really use
  491. 19:51anything that you wish in this case. So,
  492. 19:53here I'm in my dashboard, and as you can
  493. 19:55tell, I already have the test project.
  494. 19:57This is something that I have created
  495. 19:59before recording this video, but we will
  496. 20:01just create one from absolute scratch.
  497. 20:03So, probably this is what you're going
  498. 20:05to see when you first log in after the
  499. 20:07onboarding. Let's go ahead and give a
  500. 20:09project name. So, I'll just try to zoom
  501. 20:12in. I'm going to say like maybe cali
  502. 20:16clone just like this.
  503. 20:20So, here I think you can leave them, but
  504. 20:23let's just say what are we working on?
  505. 20:26Let's just say AI agent.
  506. 20:29We are using expo. And then the last
  507. 20:32question is what are you trying to do
  508. 20:34with trigger.dev? I think here I'll just
  509. 20:36say ship a production workflow. Then we
  510. 20:39can create this. Now it's going to show
  511. 20:41us the instructions to set this up,
  512. 20:43which is something that we'll get into.
  513. 20:45First, let's go ahead and go back to VS
  514. 20:48Code here. Before I answer any of these
  515. 20:51questions, I think I'll open up my
  516. 20:52terminal and I'll just generate an expo
  517. 20:55application. Now, for this you can visit
  518. 20:58expo.dev/documentation
  519. 21:01and we can just copy this. So here it
  520. 21:03says mpx create expo app at latest and
  521. 21:07I'd like to initialize it under the
  522. 21:10current folder. So I'll just put dot at
  523. 21:12the end. Now we could ask cloud to run
  524. 21:14this as well. But here I'd like to show
  525. 21:16you something which is that if you want
  526. 21:19to test this out in your actual phone,
  527. 21:21you need to go with the SDK 54. But
  528. 21:24otherwise, you need to go with the
  529. 21:26latest SDK and this is the recommended
  530. 21:29for most projects. So in my case, I'll
  531. 21:31be going with the SDK 57.
  532. 21:35Then this will basically bootstrap a
  533. 21:37project.
  534. 21:39Now while this is installing I think we
  535. 21:41can shrink the terminal and answer these
  536. 21:44questions. So for the back end you can
  537. 21:47read the question but basically we would
  538. 21:49like to use the expo API routes. So
  539. 21:52instead of building a separate you know
  540. 21:54separate back end we can literally use
  541. 21:57the expo API routes. If you have ever
  542. 21:59used Nex.js it is the similar concept.
  543. 22:03So, we're going to have an API folder
  544. 22:05within the app and we can run our
  545. 22:07backend code.
  546. 22:10Okay. For AI workflow, we'll be using
  547. 22:12trigger.dev and you know their real time
  548. 22:15features. For AI model, I think I
  549. 22:19already have the OpenAI subscription.
  550. 22:22So, I'm going to be selecting this one.
  551. 22:24As you can tell, Cloud recommends
  552. 22:26itself, but I'll go with OpenAI,
  553. 22:29you know, GPT. And then here it says
  554. 22:32what does V1 is done actually mean for
  555. 22:34you? Now I think this is such an
  556. 22:36important question. Basically for V1 I
  557. 22:39always want to have something that is
  558. 22:41super simple and just working. Once I
  559. 22:44have a basic version in V1 then I can
  560. 22:48you know prepare it for the real app
  561. 22:50store launch or you know I can add the
  562. 22:53payments privacy policy so on and so
  563. 22:56forth. here. We would like to just have
  564. 22:58something that is working with a nice UI
  565. 23:01design, right? So, I'm going to go ahead
  566. 23:02and select this and we'll submit the
  567. 23:05answers. Now, of course, we're going to
  568. 23:07get more questions. It is not just a
  569. 23:10simple four question batch. If you take
  570. 23:13a look at the prompt here, we say ask me
  571. 23:15questions in small batches like three to
  572. 23:18six at a time. And it's going to be
  573. 23:21grouped by the topic, right? So here
  574. 23:24we'll just get more and more questions.
  575. 23:26Now while cloud is thinking about the
  576. 23:28questions, let's set up the other tools
  577. 23:30that we'll be using. We have neon.com
  578. 23:34which will provide a free Postgress
  579. 23:36database for us and it's going to be
  580. 23:38deployed on the cloud. Again, I'm going
  581. 23:40to leave the link in description. You'll
  582. 23:41get, you know, free plan, free credits,
  583. 23:44and just go ahead and log in. It's
  584. 23:46completely free to get started with.
  585. 23:48Once again, you don't really need a
  586. 23:50credit card. In my case, I'll be logging
  587. 23:52with my GitHub account and I already
  588. 23:55have bunch of different projects. But
  589. 23:57what you'll be doing is pressing this
  590. 23:59button. We'll say create a new project
  591. 24:02in here. As you can tell, I have Cali
  592. 24:05test. But now I'll just say Cal AI pro
  593. 24:08which stands for production. Then here I
  594. 24:11think you can, you know, choose
  595. 24:13anything. I'll leave everything as a
  596. 24:14default. Okay, we're going to create
  597. 24:17this. Then we can get our environment
  598. 24:19variable. In a second, we'll basically
  599. 24:21copy and paste this to our env file.
  600. 24:24Then we'll be using image kit for image
  601. 24:27storage and for any kind of image
  602. 24:30optimizations and transformations. So
  603. 24:33here again you'll have the link go ahead
  604. 24:35and login. You'll get the public key,
  605. 24:38private key and then there is the
  606. 24:40endpoint URL. You can basically grab
  607. 24:43them under the developer options and
  608. 24:45they have bunch of different SDKs.
  609. 24:47basically SDK for anything and
  610. 24:50everything. In our case, we'll be using
  611. 24:52Expo or I think NodeJS in this case. Let
  612. 24:56me see where that is. Yeah, it's going
  613. 24:58to be this one. We'll get into the
  614. 25:00documentation in the incoming sections.
  615. 25:02So, first off, go ahead and get your
  616. 25:04public key, private key, as well as the
  617. 25:07URL endpoint. I think I can show you
  618. 25:09what to do with them in the incoming
  619. 25:11minutes. But basically, when you first
  620. 25:14press this, it's going to ask you to set
  621. 25:16up your password. Once you set this up,
  622. 25:19you'll just go ahead and submit this.
  623. 25:21Then you'll be able to copy this key.
  624. 25:23Okay. The very last tool that we're
  625. 25:25going to set up is going to be Sentry,
  626. 25:27which is basically the error tracking
  627. 25:29and monitoring platform that we'll be
  628. 25:31using. Now, Sentry is much more than
  629. 25:34this, but we'll get into the details in
  630. 25:36the incoming sections. And basically
  631. 25:38they are the number one as you can tell
  632. 25:40from the testimonials. Any big company
  633. 25:43like Slack, Cloudflare, Versel, Linear,
  634. 25:46even like GitHub, they're using Sentry.
  635. 25:49So go ahead and get the free credits
  636. 25:52with the link in the description. I've
  637. 25:54partnered with them. So they'll give you
  638. 25:56like $80 for free in credits. So here
  639. 26:00I'll go ahead and log in. Then we will
  640. 26:03create a project. Maybe we can do it in
  641. 26:06the incoming sections. Okay, so these
  642. 26:08are all the tools that we're going to
  643. 26:09set up. As you can tell, I have bunch of
  644. 26:11different projects, but we're going to
  645. 26:13create one from absolute scratch in the
  646. 26:15incoming sections. So, let's go back
  647. 26:18into cloud and we'll answer the next
  648. 26:22batch of questions. So, here you can
  649. 26:24pause the video and take a look at this
  650. 26:26question. Basically it says who is going
  651. 26:28to compute the daily calorie targets
  652. 26:31from these information which is going to
  653. 26:33be passed in the onboarding. Now most of
  654. 26:36the time the recommended option is the
  655. 26:39way to go but here of course this is
  656. 26:41this is not what I'd like to have. We
  657. 26:43would like to generate these targets
  658. 26:46with AI. So I'm going to press this one.
  659. 26:48And the next question is what order do
  660. 26:51onboarding oath in the app come in? It's
  661. 26:53going to be in this exact order. This is
  662. 26:56how my actual application works as well.
  663. 26:59So first off, we walk through the users
  664. 27:01with the onboarding process before they
  665. 27:04even authenticate. And then at the end
  666. 27:06of the onboarding, we ask them to
  667. 27:08authenticate so that we can save their
  668. 27:10data, you know, their progress. And then
  669. 27:13once they're authenticated, we'll take
  670. 27:14them to the home screen. So here it
  671. 27:18says, how does the mail photo get to
  672. 27:20image kit direct from app? So this is
  673. 27:24the recommended like this is what claude
  674. 27:26says. So here we can tell this is the
  675. 27:28fastest option and this is what claude
  676. 27:31is recommending. So I'm going to go
  677. 27:32ahead and select this one. Then for the
  678. 27:35corrections it says after the AI returns
  679. 27:37macros what can the user do about it?
  680. 27:42Okay. So maybe they will be able to edit
  681. 27:44the macros manually.
  682. 27:47And also I'm going to be selecting this
  683. 27:49option. This is completely up to you how
  684. 27:52you want this application to work. Now,
  685. 27:54in your case, you might be getting
  686. 27:55different questions as well. It's
  687. 27:57completely fine. Just go ahead and
  688. 28:00answer them depending on what AI asks
  689. 28:02you. Now, again, the goal of this
  690. 28:04tutorial is not getting the exact same
  691. 28:07end result. But instead, I want you to
  692. 28:10show, you know, I want to show you my
  693. 28:12workflow that I'm using that I have used
  694. 28:15to deploy my app in 14 days. Right? So,
  695. 28:19at the end of like 20 days or even like
  696. 28:2219 days, I got my very first client by
  697. 28:25using this workflow. And this is the
  698. 28:27goal. This is what I want to teach you
  699. 28:29instead of getting the exact same end
  700. 28:30result. Okay. So, with that said, I'm
  701. 28:33going to go ahead and submit these
  702. 28:35answers as well. I think we're going to
  703. 28:37get a batch of different questions once
  704. 28:41again. And at the very end, I think
  705. 28:44Claude will generate a planet. MD file.
  706. 28:47So it's going to be somewhere right
  707. 28:49here. Then we will follow that plan step
  708. 28:52by step. So this is the next question
  709. 28:54that I have. And here I don't really
  710. 28:56want to go with the recommended option
  711. 28:58because in my actual application this is
  712. 29:00not how I set that up. So here it says
  713. 29:03first off user will go through the
  714. 29:05onboarding questions. They will sign up
  715. 29:07and then they will see building your
  716. 29:09plan UI. But in my application first off
  717. 29:12they go onboarding questions. then they
  718. 29:15would see building your plan and then
  719. 29:17they would sign up. So this is what I'm
  720. 29:19going to say here. I'll say first of
  721. 29:23user will go through the onboarding
  722. 29:26questions
  723. 29:27then we will show
  724. 29:32the
  725. 29:35building your plan UI right so here let
  726. 29:38me just say UI
  727. 29:41and then
  728. 29:44they will sign up and we will store that
  729. 29:50calculated data to database. Okay, so I
  730. 29:53hope that makes sense. If not, we're
  731. 29:55going to see it in the incoming sections
  732. 29:57when we when we actually built this
  733. 30:00feature. Okay, so I'm going to say
  734. 30:02that's my answer. Let's go to the next
  735. 30:05question. AI targets are in
  736. 30:07deterministic, which is fine. So I'm
  737. 30:09going to select this option. And OpenAI
  738. 30:12is extremely cheap when it comes to this
  739. 30:15use case. So, I think for every single
  740. 30:18run, we will just spend like $0.01,
  741. 30:21like almost nothing. And I'm going to
  742. 30:24show you that in the incoming sections
  743. 30:26in the OpenAI dashboard.
  744. 30:30So, the next question is, what does the
  745. 30:32home screen show? I think we're going to
  746. 30:34show the calories rank macro bars. Let's
  747. 30:38just select bunch of them. Horizontal
  748. 30:40date stripped.
  749. 30:43Today's log meals list. Absolutely. Yes.
  750. 30:45And we can have the streak counter. So
  751. 30:49basically this is a similar thing that I
  752. 30:51want to have. Let me just scroll to the
  753. 30:52bottom
  754. 30:55like this is the UI that I generated
  755. 30:57with AI for my own application. I know
  756. 31:00it's a bit hard to see it but basically
  757. 31:02we will try to generate this again. I'm
  758. 31:04going to show you how to do it. So with
  759. 31:07this I'm going to go to the next
  760. 31:09question. we can get the device time
  761. 31:11zone and it's going to be stored per
  762. 31:14user. Okay, so that's the recommended
  763. 31:17option and this is what I have actually
  764. 31:19that's what that's sorry that's actually
  765. 31:21what I want to have here. I'll go ahead
  766. 31:23and submit the answers. So here we got
  767. 31:26the next batch of questions in this
  768. 31:29case. Please feel free to pause the
  769. 31:30video and read it. You can go with the
  770. 31:32recommended option. I think this is what
  771. 31:34I would do in production but this is a
  772. 31:36tutorial so I'm going to be going with
  773. 31:38this option. Okay. So like even if you
  774. 31:41select this one, Cloud will be able to
  775. 31:43implement it with no issues. But you
  776. 31:45know instead of taking 10 minutes, we
  777. 31:47can we can handle it in 2 minutes,
  778. 31:50right? And just save some time within
  779. 31:52this tutorial. For the camera UX, like
  780. 31:56user hits the shutter, what do they see
  781. 31:58next? We would like to see an optimistic
  782. 32:01card fills and live. I think yeah, we
  783. 32:04can go with this one. So we're going to
  784. 32:06have the real time data coming from
  785. 32:08trigger.dev and I'm going to show you
  786. 32:10how to implement that. So I'll just have
  787. 32:12this option on AI failure. I think like
  788. 32:17mostly you would get the first option
  789. 32:18but let's try to read it. Couldn't
  790. 32:21identify this. Yeah, I think we can re
  791. 32:24retake the photo because if you think if
  792. 32:27user just take a photo of the wall there
  793. 32:30is no food, right? So we will not be
  794. 32:33able to identify it. So I think we can
  795. 32:35go with this option and we'll just say
  796. 32:37you need to retake it. But maybe user
  797. 32:40took the actual photo of the food. So in
  798. 32:43this case we would like to auto retry at
  799. 32:46least once, right? So I'm going to
  800. 32:48select these options. You can go with
  801. 32:50the other options, but this is what I'm
  802. 32:52going to be having for now. I don't
  803. 32:54really want to implement any payments or
  804. 32:56any payw walls. Um let's just see not
  805. 32:59really no push notifications. We would
  806. 33:01like to just keep this simple for the
  807. 33:04version one like these are the things
  808. 33:06that you can implement once you complete
  809. 33:08this tutorial and actually these are the
  810. 33:11things that we have implemented in our
  811. 33:13school community like we have done the
  812. 33:15payw wall with revenue cat we have done
  813. 33:17the push notifications with expo and you
  814. 33:20know we even have the weight history
  815. 33:22water and exercise if you're interested
  816. 33:25you can double check that within our
  817. 33:27school community but these are the
  818. 33:29things that I'll just skip for this
  819. 33:32project because we just want to have a
  820. 33:34simple V1. So I'm going to say skip
  821. 33:37these for V1.
  822. 33:40We just want to have a working MVP.
  823. 33:47Now the next question is about the RM.
  824. 33:50I'll be using terrizle RM. we'll be
  825. 33:52using 10 stack query native wind which
  826. 33:55is basically tailwind but for react
  827. 33:57native and for the development builds we
  828. 34:00would like to use EA as development
  829. 34:02build now I'm going to get into that
  830. 34:04what that means basically if you're
  831. 34:07building an actual project you would
  832. 34:09like to create a development build then
  833. 34:12using the expo go application because
  834. 34:14this is just for learning purposes it is
  835. 34:17for demo projects when you have an
  836. 34:20actual application
  837. 34:22like you cannot just use expo go okay so
  838. 34:24it's for learning purposes in our case
  839. 34:27we'll be using ES development build and
  840. 34:30you know this is something that I'll get
  841. 34:32into in the incoming sections so for now
  842. 34:35let's go ahead and say submit the
  843. 34:37answers all right so we just got the
  844. 34:39very last batch of questions let's go
  845. 34:41ahead and answer them so here it says
  846. 34:43clerk owns identity and neon owns the
  847. 34:47application data how does a clerk user
  848. 34:50become a row in our users table here.
  849. 34:52I'd like to visualize it before we get
  850. 34:54into it. Basically, if you think about
  851. 34:56that, our users will sign up through
  852. 35:00clerk, right? So, here I'll just go
  853. 35:01ahead create a user. Let's say they sign
  854. 35:04up through a clerk. Well, we don't
  855. 35:06really have this user in our database.
  856. 35:08How do we take it and save it to here?
  857. 35:11Now, the best way of doing it is using
  858. 35:13something called web hooks.
  859. 35:16And this is this is what we'll be using
  860. 35:20because it's the you know the production
  861. 35:22way of doing it and I want to show you
  862. 35:24that. So we will be running these web
  863. 35:26hooks. They're going to be coming from
  864. 35:28clerk and we'll run a function in the
  865. 35:31background in trigger.dev.
  866. 35:33So like we'll get into it in a couple of
  867. 35:36minutes or in the incoming sections. So
  868. 35:39here I'll just say maybe other option.
  869. 35:42Let's say cleric web hooks and
  870. 35:44trigger.dev
  871. 35:47background jobs.
  872. 35:50So here is the next question. I'll be
  873. 35:52going with this one. I have already read
  874. 35:54this entire thing. So I'm going to
  875. 35:56select everything. And then for the mail
  876. 35:58data, let's just say we would like to
  877. 36:00have the mail name, calories, and you
  878. 36:02know protein, carbs, and fat. for the
  879. 36:06done part what we'd like to do. I'll
  880. 36:09just say for now we don't really want to
  881. 36:11have any test suits. We'll just manually
  882. 36:14test it. Okay, we'll just submit this
  883. 36:17and hopefully we're going to get a plan
  884. 36:20MD file in a couple of seconds. Now,
  885. 36:22while Claude is building the plan MD
  886. 36:25file, there are two different things
  887. 36:26that I want to talk about, which is the
  888. 36:28agents.md as well as cloud.md. Let's go
  889. 36:32back into diagrams. I have this. Let's
  890. 36:34just try to read it out loud. So, first
  891. 36:37off, what they are in the first place,
  892. 36:39they are both plain markdown instruction
  893. 36:42files that get autoloaded into the AI's
  894. 36:45context. So, you can think of it like
  895. 36:47the readme file, but for AI agents. So,
  896. 36:51here they're going to be loaded at the
  897. 36:53start of every single session. So this
  898. 36:56is where you put project conventions,
  899. 36:59the architecture notes, you know, things
  900. 37:01like always do this, never do that, that
  901. 37:04kind of rules. And the difference is
  902. 37:07just who reads them. So cloud.md is
  903. 37:10built for cloud specifically, but
  904. 37:13agents.md can be used for any single
  905. 37:16like any kind of agent. So what I do is
  906. 37:19usually I put every single instructions
  907. 37:22under the agents.md. Okay? And then I
  908. 37:25put a reference from cloud to this file.
  909. 37:29And this is exactly what we have
  910. 37:30actually. If you take a look at that,
  911. 37:32you know, we'll have bunch of different
  912. 37:34instructions. Let me just show you. So
  913. 37:37here we'll have bunch of different
  914. 37:38instructions. And then from cloud.md,
  915. 37:41we'll just say go ahead and read this
  916. 37:43file. Okay, so that's the general idea.
  917. 37:46You can pause the video and read it.
  918. 37:48This is what I do. I put my actual
  919. 37:51instructions in the agent md file. Then
  920. 37:54I just add one line import within the
  921. 37:56claw.md just like what we have right
  922. 38:00here. And here once again this is the
  923. 38:02file that will be loaded at the
  924. 38:04beginning of every single session. So
  925. 38:06here when you just say something like
  926. 38:08you know implement me this feature
  927. 38:10before cloud runs this it's going to
  928. 38:13read the agents.md file. Okay. So again
  929. 38:16I just want to visualize this. Let's say
  930. 38:19this is you. You ask something to AI. AI
  931. 38:22answers. then you ask something else so
  932. 38:24on and so forth. At the beginning of
  933. 38:26this conversation, the agents empty file
  934. 38:30will be loaded. Okay. So here claude
  935. 38:33will always read your instructions that
  936. 38:35you have under this file. All right. So
  937. 38:38other than this we got the plan as you
  938. 38:41can tell this is generated by claude.
  939. 38:43Now what I would usually do I would
  940. 38:45definitely read this from start until
  941. 38:48the end and only then I would say auto
  942. 38:50accept or if I don't really like
  943. 38:53anything I'll just say let me try to
  944. 38:56manually approve edits or you know keep
  945. 38:58planning. This is what I have done when
  946. 39:00I was building my own project but here
  947. 39:03let's just keep it short and simple.
  948. 39:05I'll just trust AI. Okay, once again,
  949. 39:08you definitely want to take some time
  950. 39:10and go through this entire file for like
  951. 39:1310 to 15 minutes so that you don't
  952. 39:16really have anything that you don't like
  953. 39:18in the first place. So, in this case,
  954. 39:20I'm going to say yes and auto accept.
  955. 39:22It's going to take that plan, you know,
  956. 39:24summarize it and put it under a plan
  957. 39:27empty file with to-dos. Okay. And every
  958. 39:31single time,
  959. 39:33like, let me just maximize the screen.
  960. 39:35Every single time when we want to build
  961. 39:37a future, we will just add like a check
  962. 39:41mark, right? So let's say we implemented
  963. 39:43the authentication or whatever this is,
  964. 39:46we'll just add a check mark right here
  965. 39:48and then we'll move forward until this
  966. 39:50entire file is completed.
  967. 39:55So here I'll go back into cloud.md.
  968. 39:58Let's just see what's going to happen.
  969. 40:01So here I think it asks me to install
  970. 40:03clerk. For now I'll just say no really
  971. 40:05don't do anything and for now we just
  972. 40:08have the plan MD file. What I'll be
  973. 40:11doing is actually call this all
  974. 40:12uppercased which is just a preference.
  975. 40:14This is what I'm going to have. Now we
  976. 40:16are going to take this plan and
  977. 40:18depending on this plan we would like to
  978. 40:20generate the UI design because if you
  979. 40:23remember that's the workflow that we are
  980. 40:25going through. So, first off, we got our
  981. 40:27plan. We described our project. You
  982. 40:30know, we defined the idea, goals,
  983. 40:32features, pages, so on and so forth. Now
  984. 40:34that we have the plan, it's time to
  985. 40:36generate the UI design. I'm going to
  986. 40:38leave this for the next section. For
  987. 40:40now, let's go ahead and just create a
  988. 40:43GitHub repo and push our code into that.
  989. 40:47So, here I'll just say go ahead and
  990. 40:49create a new repository. I think this is
  991. 40:54how we can do it.
  992. 40:55github.com/new.
  993. 40:57For the name, I'll just say keeli
  994. 41:00tutorial.
  995. 41:03For now, I'll make it public. Sorry, for
  996. 41:06now, I'm going to make it private, but
  997. 41:07at the time that you're watching this
  998. 41:09video, it's going to be public. So, the
  999. 41:11source code will be for free. Okay, I'm
  1000. 41:14just going to say create the repository.
  1001. 41:19And then I'll get the you know this
  1002. 41:22command which basically will take an
  1003. 41:24existing repository from the command
  1004. 41:26line and then it'll push it to this repo
  1005. 41:29here. I'll open up my terminal. I think
  1006. 41:32we don't have anything up and running.
  1007. 41:34If you want to run this app, we are
  1008. 41:35going to be running one of these
  1009. 41:37commands which is something that we'll
  1010. 41:38do in the next section. For now I'm just
  1011. 41:40going to clear this up and let's go here
  1012. 41:43and I'll just say add this to the, you
  1013. 41:46know, staging area. Let's get a commit
  1014. 41:49message with AI. You can type this as
  1015. 41:51well by def, you know, by hand, but I'll
  1016. 41:54just generate it with AI. And let's say
  1017. 41:56commit our changes. And then we can
  1018. 41:59basically just paste this in into our
  1019. 42:02terminal, which will take everything
  1020. 42:04that we have locally and it's going to
  1021. 42:06push it to this repo. Okay. So here you
  1022. 42:11can tell we have our code up and running
  1023. 42:13on GitHub. So with this in the next
  1024. 42:16section we're going to get started with
  1025. 42:18the actual UI design using AI and once
  1026. 42:21we have the UI design we'll implement
  1027. 42:23these features one by one. So I'll see
  1028. 42:26you in the next lesson. All right. So
  1029. 42:28now that we have our plan file ready it
  1030. 42:31is time to get started with the UI
  1031. 42:33design. Now I want you to visit the you
  1032. 42:36know this document that I'll provide in
  1033. 42:38the description. Scroll to the bottom
  1034. 42:40and you're going to find the calorie
  1035. 42:42tracker app UI prompt. So here you can
  1036. 42:45basically copy this entire thing
  1037. 42:50and then we'll go back into cloud right
  1038. 42:53here. I'm going to say
  1039. 42:56just go ahead and read the plan. MD file
  1040. 42:59that I have and then depending on our
  1041. 43:01application, depending on our plan, I
  1042. 43:04want you to generate me a prompt similar
  1043. 43:08to this one that I just provided.
  1044. 43:13And then right below to it, you would
  1045. 43:14like to paste this prompt. So it's going
  1046. 43:17to basically take a look at your plan,
  1047. 43:19which screens you have, you know, what
  1048. 43:21features, so on and so forth. And it's
  1049. 43:23going to create a prompt similar to this
  1050. 43:26one, but instead of making it random, it
  1051. 43:30will actually it'll be coming from your
  1052. 43:33actual plan. And then we're going to
  1053. 43:36copy this prompt and paste it into a AI
  1054. 43:39image generation tool. In my case, I use
  1055. 43:42GPT, but you can also use something like
  1056. 43:45Gemini or really anything that you wish.
  1057. 43:48And while this is giving us the prompt,
  1058. 43:50I'll go ahead and show you kind of like
  1059. 43:52the things that I that I have done in
  1060. 43:55the past. So, this was couple of months
  1061. 43:57ago where I provided this prompt and
  1062. 44:00that was the end result that I just got.
  1063. 44:02Now, the UI is definitely not ugly, but
  1064. 44:06it is just too colorful and I didn't
  1065. 44:08like it at all. So I said, "Let me just
  1066. 44:10give you a reference image." And in this
  1067. 44:13case, I used the actual Kelly
  1068. 44:15screenshot. And then I said, you know,
  1069. 44:17make it similar to this one where we
  1070. 44:19would like to have the light mode. Um,
  1071. 44:22you know, get rid of the blue color
  1072. 44:23palette and just keep it minimalistic.
  1073. 44:27And then that was the UI design that I
  1074. 44:30got or I would say the yeah, the system
  1075. 44:33design, UI design, couple of different
  1076. 44:35screens. Um, general idea, right? the
  1077. 44:39general wipe of this application and
  1078. 44:41then I said I don't really want to call
  1079. 44:43it as keli go ahead and call something
  1080. 44:46like bulky AI and then I had to generate
  1081. 44:50a logo because I didn't really like this
  1082. 44:52one then I just went to a different chat
  1083. 44:55and then I said you know let me just
  1084. 44:57scroll to the top I provided this
  1085. 44:59example and I found this randomly on X
  1086. 45:03or on Twitter I would say and basically
  1087. 45:05I just said you know get inspired by
  1088. 45:08these logos and generate an image of
  1089. 45:10grid of 12 logos for a fitness bulking
  1090. 45:14app. But I didn't really like any of
  1091. 45:15these results. So I pasted Cali. You
  1092. 45:18know, I said get inspired by this Apple
  1093. 45:22logo. But then turns out it just gives
  1094. 45:24me apples only. Then I said make it
  1095. 45:26something different than Apple. So here
  1096. 45:28I just follow up couple of different
  1097. 45:30times and eventually I was happy with
  1098. 45:34this end result. So I said, you know,
  1099. 45:37make it black and white, no purple
  1100. 45:39color. Yeah, eventually I just said, you
  1101. 45:42know, make it transparent background and
  1102. 45:44give me dark and light modes. And then I
  1103. 45:48would copy this image from right here.
  1104. 45:50And then I say, you know, integrated
  1105. 45:52into the design itself here. You can
  1106. 45:55tell that's what I got. So this is kind
  1107. 45:57of like the workflow. This is what you
  1108. 45:59would like to do. Get the prompt, right?
  1109. 46:02So I'll just show you the VS code. Okay.
  1110. 46:06So here we have the entire prompt. You
  1111. 46:08will get the prompt, paste it, and then
  1112. 46:10do a couple of different variations. If
  1113. 46:12you don't like the very first result,
  1114. 46:14you can add an reference image and then
  1115. 46:18generate your logo integrate into it.
  1116. 46:20Then once you have, you know, once you
  1117. 46:23have the system design, then you can ask
  1118. 46:26for the screens individually. Like in
  1119. 46:28this case I just said give me all the
  1120. 46:31screens for on boarding. So let me try
  1121. 46:34to zoom in. First we ask for the gender
  1122. 46:37right then for the height weight you
  1123. 46:40know what's the goal so on and so forth.
  1124. 46:43And now if we want to build any of these
  1125. 46:45screens we can just upscale them
  1126. 46:47individually and give it as a task to
  1127. 46:50cloud. And this is something that we'll
  1128. 46:52get into here. I'm just trying to
  1129. 46:54explain you the workflow. So the rest of
  1130. 46:57it is basically the same thing here. I
  1131. 46:59take a screenshot from Cali as a
  1132. 47:02reference image and I say this is kind
  1133. 47:04of like the welcoming screen that I
  1134. 47:06would like to have and I say you know
  1135. 47:09give me a similar thing to this one
  1136. 47:11here. You can take a look at my prompt.
  1137. 47:14That was the end result that I got. I
  1138. 47:16said remove the language thing right
  1139. 47:19here and just keep it simple. Then once
  1140. 47:21you have the design you can copy it and
  1141. 47:24paste it into your VS Code. Let's
  1142. 47:26actually do it. You can get this from
  1143. 47:28the source code. I'll explain you in a
  1144. 47:30second. So basically go right here,
  1145. 47:32create a folder called design and then
  1146. 47:35you can find this file from source code
  1147. 47:38under the design folder. And I'm going
  1148. 47:40to call this as welcome screen UI
  1149. 47:44design.
  1150. 47:47Okay. So here you'll just ask cloud to
  1151. 47:49implement it as the welcome screen. And
  1152. 47:52you're going to see in a couple of
  1153. 47:53minutes that you know cloud will
  1154. 47:55basically clone this 100% correctly. And
  1155. 48:00then now you might be asking how do we
  1156. 48:02get this image right? So you can just
  1157. 48:04ask GPT say something like you know
  1158. 48:07generate the phone image where the
  1159. 48:09camera is open. Basically I'm explaining
  1160. 48:12this image and then I say make it to be
  1161. 48:14a transparent background so that I can
  1162. 48:16use it without any issues. And then you
  1163. 48:20will install this image. Again, you can
  1164. 48:22grab it from the source code if you are
  1165. 48:24really interested. Here, instead of
  1166. 48:26putting it under the design, I'll put it
  1167. 48:28under the assets, under the images.
  1168. 48:32And then I'll say something like welcome
  1169. 48:35screen UI.
  1170. 48:38Let's just say demo image.
  1171. 48:42Okay. So, that's kind of like the
  1172. 48:45workflow that we'll be implementing. And
  1173. 48:48let's actually first get started with
  1174. 48:50this simple
  1175. 48:52simple screen. Okay. So here let's go
  1176. 48:56into cloud. I'm going to be explaining
  1177. 48:58this in a second. Like I'm just going to
  1178. 49:00say take a look at this image and try to
  1179. 49:03implement it. But before that again
  1180. 49:06there is a kind of like a workflow that
  1181. 49:09I use to copy UIs 100% correctly. And
  1182. 49:13let me show you that pretty quickly. So
  1183. 49:15this is what I call the build and verify
  1184. 49:18loop. And here is how that work.
  1185. 49:20Basically, we want to build a feature.
  1186. 49:22In this case, we just want to copy this
  1187. 49:24entire UI. And before we try to copy it,
  1188. 49:28what we do is this. We take a screenshot
  1189. 49:31from the simulator right from our phone,
  1190. 49:34which is something that we will run in a
  1191. 49:36second. And then we compare it to this
  1192. 49:39design. So cloud will take a screenshot
  1193. 49:43of the phone, right? the UI design that
  1194. 49:46we are trying to build and it's going to
  1195. 49:47compare it to this one and if it is not
  1196. 49:51really identical it is just going to
  1197. 49:54rerun this loop again and again until it
  1198. 49:57is identical. Now this is AI you cannot
  1199. 49:59really trust it 100% like that doesn't
  1200. 50:03mean the UI will be you know 100%
  1201. 50:06identical but it's going to be pretty
  1202. 50:08close like very very similar. Okay, so
  1203. 50:12that's kind of like the loop that we
  1204. 50:15will try to go through and we can
  1205. 50:17explain this to cloud in simple terms.
  1206. 50:20Okay, so with this in mind, let's first
  1207. 50:22try to run this application. I'll open
  1208. 50:25up my terminal, clear this up and we can
  1209. 50:28just say MPX expo run or just even MPX
  1210. 50:33expo start.
  1211. 50:37So this is going to run our application.
  1212. 50:39Let me open up the simulator
  1213. 50:44and then I'll press I. Since I'm on Mac,
  1214. 50:47I would like to open this up on iOS, but
  1215. 50:50if you're on Windows, you would press A.
  1216. 50:53That would open it up in in Android.
  1217. 50:56Okay. Here you can just
  1218. 50:58um we have a question. I'll just press
  1219. 51:00enter. It'll install the Expo, the
  1220. 51:03latest version. All right. So here you
  1221. 51:05can tell I have my simulator and I have
  1222. 51:08this application up and running. But now
  1223. 51:10the thing is this is running in expo
  1224. 51:13which is fine for basic projects for
  1225. 51:16learning purposes. But if you want to
  1226. 51:19build a real world project this is not
  1227. 51:21going to be enough. So in that case we
  1228. 51:23would like to get what we call a
  1229. 51:26development build. So here I have bunch
  1230. 51:28of different things. Please ignore them.
  1231. 51:31And we will basically get this entire
  1232. 51:34application not within the expo but as
  1233. 51:37if it is a separate application. And
  1234. 51:40it's really easy to implement. First off
  1235. 51:42you need to install a package and I'd
  1236. 51:44like to show you this. So it is called
  1237. 51:46expo dev client.
  1238. 51:52If you're interested you can take a look
  1239. 51:54at the documentation in more detail.
  1240. 51:57Basically, you'll like to copy this and
  1241. 51:59paste it right here. We'll install this
  1242. 52:02package and then we will basically build
  1243. 52:05our application. So, in this case, I'm
  1244. 52:08on iOS. You'd like to copy this and
  1245. 52:10paste it to your terminal.
  1246. 52:14For the first time, this is going to
  1247. 52:16take some time, but then it should be,
  1248. 52:19you know, faster for the next
  1249. 52:20iterations. And this will create an iOS
  1250. 52:23folder which will be the native code for
  1251. 52:26this application.
  1252. 52:29Okay. So if this is confusing like
  1253. 52:31overall just understand that if you want
  1254. 52:34to build a realworld application,
  1255. 52:36Expoggo is not going to be enough
  1256. 52:39because you're going to have a lot of
  1257. 52:40complex features and native modules.
  1258. 52:45You can use Xpogo for basic apps but not
  1259. 52:48for real world projects. And that's
  1260. 52:50where development build comes into play.
  1261. 52:53In this case, you just need to install
  1262. 52:55one package and rebuild your
  1263. 52:58application. And that's that's the
  1264. 53:01entire thing. So here after a couple of
  1265. 53:03minutes here, we can tell we got our own
  1266. 53:06development build. It is called KAI
  1267. 53:09tutorial. So by default, it's going to
  1268. 53:11be called as your folder name. And now
  1269. 53:13if you say open, it is just going to
  1270. 53:16open this application. Now notice how it
  1271. 53:18is not really running this within the
  1272. 53:20expo go.
  1273. 53:23So here I'll just try to close this
  1274. 53:27like let me just close everything
  1275. 53:31and open this up like it is the same
  1276. 53:33application but it is not really running
  1277. 53:35within the expo. Okay so that's kind of
  1278. 53:38like a small detail but now we have our
  1279. 53:41application it is up and running. we can
  1280. 53:43get started with this welcome screen UI
  1281. 53:46design here. I'll go ahead and open up a
  1282. 53:49new chat within the cloud and then I'll
  1283. 53:52just try to explain what we want what we
  1284. 53:54want to do. Now before we try to explain
  1285. 53:56anything, let's go ahead and set up the
  1286. 53:58native event. So here I'll go ahead and
  1287. 54:01visit nativevent.dev.
  1288. 54:03Let's visit the documentation. So in
  1289. 54:06this case I'll be using version 4. at
  1290. 54:09the time that I'm recording like version
  1291. 54:11five is in pre-release. So I'll just be
  1292. 54:14using the more stable version. I'll copy
  1293. 54:16this entire documentation. Okay, this
  1294. 54:19entire page and this is what we have in
  1295. 54:21the you know age of AI. Basically
  1296. 54:24instead of reading everything you just
  1297. 54:26copy it and paste it to AI and it's
  1298. 54:29going to implement that. So here I'll
  1299. 54:31paste this in and at the very end I'll
  1300. 54:33just say I have just attached the
  1301. 54:36documentation of native wind step by
  1302. 54:39step I want you to follow it and
  1303. 54:42implemented in this codebase don't do
  1304. 54:45anything extra or less just follow the
  1305. 54:48documentation and make sure that native
  1306. 54:51event is working in this project.
  1307. 54:55Okay, so we can send this and if you
  1308. 54:58have any other you know tasks you don't
  1309. 55:01really need to wait for this. You can
  1310. 55:03just re you know run another instance
  1311. 55:06but what I mostly do is just doing one
  1312. 55:09task at a time so that I can you know
  1313. 55:12manage everything and like I don't
  1314. 55:14really rush anyways. Okay, so we're
  1315. 55:17going to get the native wind
  1316. 55:18installation. I think we can close this.
  1317. 55:21We don't we are not going to really need
  1318. 55:22it. But if you're wondering what's going
  1319. 55:25to happen is that cloud will install all
  1320. 55:27these packages you know set up the
  1321. 55:30config file update the global CSS babel
  1322. 55:33file so on and so forth and eventually
  1323. 55:36it should work out now while native wind
  1324. 55:39is getting implemented I think we can go
  1325. 55:41ahead and try to explain this loop to
  1326. 55:43cloud here is my prompt and by the way
  1327. 55:46I'll give the permissions here's my
  1328. 55:48prompt this is what I say I say in this
  1329. 55:51application we would like to have a
  1330. 55:52welcome come screen. Basically, when
  1331. 55:54users open this app, this will be the
  1332. 55:57first thing that they're going to see.
  1333. 55:59And here I say for the UI design, I'm
  1334. 56:01going to attach you this image and I
  1335. 56:04want you to put yourself into a loop
  1336. 56:06like you can read the prompt. Basically,
  1337. 56:09it's going to take a screenshot from the
  1338. 56:11simulator and then compare it to this UI
  1339. 56:14design. And it's going to be doing this
  1340. 56:15until they are both identical, right?
  1341. 56:18And I think one of the things I forgot
  1342. 56:21so far is providing the logo. So let me
  1343. 56:24go ahead and get this logo. And if you
  1344. 56:27want to use it, you can grab it from the
  1345. 56:30source code. So under the assets, under
  1346. 56:32the images, we're going to have
  1347. 56:33logo.png. All right. So looks like
  1348. 56:35native wind has been wired up and cloud
  1349. 56:38says I have already kind of like
  1350. 56:40verified it. So everything is working as
  1351. 56:43expected. I have got this logo called
  1352. 56:46logo dark.png png and we will be using
  1353. 56:48it in the home screen just like this
  1354. 56:51one. If you wanted to, you can grab it
  1355. 56:54from the source code or use your own
  1356. 56:56logo for this application. I'll just
  1357. 56:58attach this to the chat right here. I'm
  1358. 57:02going to press add and then let's say
  1359. 57:04logo dark.png.
  1360. 57:07Not this one really. Let's say at logo
  1361. 57:10dark.png.
  1362. 57:12Okay. And for the permissions, I'll just
  1363. 57:15say auto. which is going to really which
  1364. 57:17is not really going to ask me any kind
  1365. 57:19of questions because I have I have given
  1366. 57:22the bypass permission. So I'm just going
  1367. 57:25to say auto and run this. If you don't
  1368. 57:28know how to give the bypass permission,
  1369. 57:30you can open up a new chat and ask to
  1370. 57:33cloud like how to add bypass
  1371. 57:39permissions or you know how to enable
  1372. 57:41bypass permissions
  1373. 57:44in cloud and then just ask you know go
  1374. 57:47ahead and do it for me. it is going to
  1375. 57:50update one line in kind of like a
  1376. 57:52configuration file and then if you use
  1377. 57:55the auto mode, it is not going to ask
  1378. 57:57you any kind of questions. Okay, so with
  1379. 58:00that said, let's just wait what we're
  1380. 58:01going to get and I'll just be right
  1381. 58:04back. All right, so here we can tell we
  1382. 58:06got the very first version. I would say
  1383. 58:09it is not really looking identical, but
  1384. 58:11that's fine. That was the very first
  1385. 58:13iteration. Now what cloud will do it'll
  1386. 58:16take a screenshot of this simulator
  1387. 58:19right and then it's going to compare it
  1388. 58:22to this UI design and then I believe
  1389. 58:25it's going to be doing it couple of
  1390. 58:27different times until we get them you
  1391. 58:30know have identical I think in the first
  1392. 58:32iteration it should realize that here we
  1393. 58:35have three lines and it should be at
  1394. 58:38maximum two so I think it's going to fix
  1395. 58:41that if not we can you follow up
  1396. 58:44manually. But this is a workflow that
  1397. 58:47works really really fine. And you know,
  1398. 58:49as I said, I have used this and it just
  1399. 58:52make it just made everything super fast
  1400. 58:55as fast as it could be. Now, I think one
  1401. 58:58of the other feedbacks that I could give
  1402. 59:00is the font weight. Like here it is much
  1403. 59:04more thinner and I think it looks more
  1404. 59:06elegant, but this is like a bit too too
  1405. 59:10much. Like I think this is a font weight
  1406. 59:12of let's say 500. But what we have right
  1407. 59:15here is like probably 700. So we could
  1408. 59:18go ahead and follow up with it in a
  1409. 59:20couple of minutes once this is done. All
  1410. 59:22right. So this is the second followup. I
  1411. 59:25think this looks way cleaner than the
  1412. 59:27very first version. Now we have two
  1413. 59:30lines. The font weight has been decored
  1414. 59:33like it is it is almost identical to
  1415. 59:36what we have right here. So with this, I
  1416. 59:39think it is still trying to compare it,
  1417. 59:41but I am pretty happy with the end
  1418. 59:43result. I think it just looks pretty
  1419. 59:46much identical. Now, while Cloud is
  1420. 59:48trying to make it even better, let's go
  1421. 59:51into GPT. And here, if you remember, I
  1422. 59:54asked GPT to generate all the screens
  1423. 59:58for onboarding. But here, you can tell
  1424. 1:00:00that they look pretty small and it is
  1425. 1:00:02too much information to give cloud at
  1426. 1:00:05once. So what I have done is saying
  1427. 1:00:08something like you know give me the
  1428. 1:00:10first five screens. Let me find it. So
  1429. 1:00:13here I say upscale the first five
  1430. 1:00:16screens of onboarding. So here this is
  1431. 1:00:20what we're going to start with. When
  1432. 1:00:21user says get started then this will be
  1433. 1:00:24the next screen. Next. So on and so
  1434. 1:00:27forth as you can tell. And then after
  1435. 1:00:29the first five screens, I said upscale
  1436. 1:00:32the next five screens of onboarding as
  1437. 1:00:35well. Right now what I'll be doing, I'll
  1438. 1:00:38basically copy this image and then I'll
  1439. 1:00:42paste it into cloud or actually to my
  1440. 1:00:45codebase. You can grab it from the
  1441. 1:00:47source code, but you know you can use
  1442. 1:00:50your own images as well, your own
  1443. 1:00:53designs. Here I'm going to paste it
  1444. 1:00:56under the design folder. And I think I'm
  1445. 1:00:58going to call it something like maybe
  1446. 1:01:01onboarding
  1447. 1:01:04one slash or 1-5.
  1448. 1:01:08Then I'm going to get this image.
  1449. 1:01:12Okay. So I think instead of getting this
  1450. 1:01:15one, wait, let me just find it. Instead
  1451. 1:01:18of getting this one, I'm going to get
  1452. 1:01:20that one because here we say, you know,
  1453. 1:01:22keep everything as it is, but remove the
  1454. 1:01:25skip for now button. Previously, we we
  1455. 1:01:28had this uh we had this text, which is
  1456. 1:01:31something that I don't really want to
  1457. 1:01:32have. So, I'm going to just copy this.
  1458. 1:01:34Let's try to paste it right here. And
  1459. 1:01:37I'm going to delete this previous file.
  1460. 1:01:43Okay. So basically, we just got the
  1461. 1:01:45exact same image, but without those
  1462. 1:01:48buttons that says skip for now. Okay. So
  1463. 1:01:52with that, I think I'm going to do the
  1464. 1:01:54same thing for the next screen.
  1465. 1:01:58And then I'll just paste it right here.
  1466. 1:02:00And this is going to be, let's say,
  1467. 1:02:02onboarding from 5 to 10.
  1468. 1:02:08Just like that.
  1469. 1:02:11All right. So Claude is still trying to
  1470. 1:02:13do something but I'm pretty happy with
  1471. 1:02:15how that look. So I'm just going to
  1472. 1:02:17pause it manually and then I'll say when
  1473. 1:02:20user press the get started button I want
  1474. 1:02:23you to go ahead and implement the
  1475. 1:02:26onboarding screens. So it's going to
  1476. 1:02:28start by asking these questions like
  1477. 1:02:31first let me zoom in. We are going to
  1478. 1:02:33ask the gender, height, weight, so on
  1479. 1:02:36and so forth. So here I'll go ahead and
  1480. 1:02:38just talk with claude try to explain it
  1481. 1:02:40simply. Okay. So so far the welcome
  1482. 1:02:44screen looks perfect. Do not change
  1483. 1:02:47anything about it. But when users press
  1484. 1:02:50the get started button we would like to
  1485. 1:02:52start the onboarding process. Just like
  1486. 1:02:55what we have explained in plan MD file.
  1487. 1:02:59And for the UI design, I'm going to
  1488. 1:03:01attach you two different screens where
  1489. 1:03:04we have around 10 different onboarding
  1490. 1:03:07pages or screens I would say. I want you
  1491. 1:03:10to implement them. Try to copy them as
  1492. 1:03:14much as possible and put yourself into
  1493. 1:03:17this verify loop so that you can take a
  1494. 1:03:21screenshot from the simulator and then
  1495. 1:03:24compare it to the UI design.
  1496. 1:03:28Okay. So here I'm just going to attach
  1497. 1:03:30those images which is onboarding one to
  1498. 1:03:33five and let's say onboarding 5 to 10
  1499. 1:03:37and then I'll follow up. Now these
  1500. 1:03:40images are just references for UI
  1501. 1:03:44design. You do not really need to ask
  1502. 1:03:46the exact same questions. Just make sure
  1503. 1:03:49to ask the questions that we have in
  1504. 1:03:52plan.md.
  1505. 1:03:56Okay, so with that said, I think I'm
  1506. 1:03:58just going to full send this and let's
  1507. 1:04:00see what we're going to have once Claude
  1508. 1:04:03is done with it. All right, so this is
  1509. 1:04:05taking a bit longer than usual because
  1510. 1:04:07we have bunch of different screens and
  1511. 1:04:10basically Claude is just going through
  1512. 1:04:13the entire process by itself. As you can
  1513. 1:04:15tell, I'm not pressing, but it selects
  1514. 1:04:18the options for every single screen. And
  1515. 1:04:21then here we can tell eventually it says
  1516. 1:04:24you know these are your targets and I
  1517. 1:04:28think it is still testing this out.
  1518. 1:04:31Eventually once this is done we will
  1519. 1:04:33integrate the authentication and I think
  1520. 1:04:35we can get our API key from OpenAI. So
  1521. 1:04:39I'll just wait for this entire loop to
  1522. 1:04:41be completed. Once it is done I'll just
  1523. 1:04:43be right back and then I'll walk you
  1524. 1:04:45through the next steps. All right. So
  1525. 1:04:47looks like Cloud has implemented the
  1526. 1:04:49entire UI design. Let's go ahead and
  1527. 1:04:51give it a go. When I say get started, we
  1528. 1:04:54have these options. Let's go ahead and
  1529. 1:04:56just take a look at them. Everything is
  1530. 1:04:59working as expected.
  1531. 1:05:04So here, let's say this is my current
  1532. 1:05:06weight. I want to gain weight. So I want
  1533. 1:05:09to be something like this. Let's say I
  1534. 1:05:12think this UI could be improved. Like
  1535. 1:05:14this is not the best UI if I have to be
  1536. 1:05:16honest, but I think it's fine to get
  1537. 1:05:19started with. Let's say I'm very active
  1538. 1:05:23and
  1539. 1:05:25for weekly let's say I just want to get
  1540. 1:05:27to one kilo per week which is aggressive
  1541. 1:05:30but that's fine
  1542. 1:05:32let's say classic diet
  1543. 1:05:34then this is going to run in the
  1544. 1:05:36background where we actually get the
  1545. 1:05:38values with open AAI and once we say
  1546. 1:05:42continue here we should be on the
  1547. 1:05:44authentication page
  1548. 1:05:47and for the authentication we are going
  1549. 1:05:49to be using clerk. Let's go ahead and
  1550. 1:05:51set this up. First off, we need to
  1551. 1:05:53create the env file. And within this,
  1552. 1:05:57we're going to have some environment
  1553. 1:05:59variables. So, first off, head over to
  1554. 1:06:02clerk.com. I'll put the link in the
  1555. 1:06:04description. It's going to be completely
  1556. 1:06:06free to get started with. Once you're in
  1557. 1:06:08your dashboard, just say create a new
  1558. 1:06:11application. And then for the name, I'll
  1559. 1:06:13just say Cali tutorial. You can call it
  1560. 1:06:17anything. And then for the sign-in
  1561. 1:06:19options, I think I'll just have Google
  1562. 1:06:22and Apple. Now, if you're having an
  1563. 1:06:25authentication option like Google, then
  1564. 1:06:28you have to have Apple as well.
  1565. 1:06:30Otherwise, Apple will reject your
  1566. 1:06:32application when you want to deploy it
  1567. 1:06:34to App Store. And now, just to keep it
  1568. 1:06:36simple, I'm not going to include the
  1569. 1:06:38email authentication. So, I'll just
  1570. 1:06:40remove that. But if you wanted to add
  1571. 1:06:42more, you can just press these buttons
  1572. 1:06:45and like that's going to be enough.
  1573. 1:06:48Clerk will handle everything for you.
  1574. 1:06:51But for this project, I think both of
  1575. 1:06:53them are just enough. So I'll say create
  1576. 1:06:56application. And they give you a prompt
  1577. 1:06:59where you can just copy and paste to
  1578. 1:07:02your AI agent. But what I'd like to do
  1579. 1:07:04is actually taking a look at the quick
  1580. 1:07:07start. So, usually I would just copy it
  1581. 1:07:09and paste it, but I want to show you the
  1582. 1:07:12quick start as well. So, here we would
  1583. 1:07:15like to use Expo. So, let's go ahead and
  1584. 1:07:17select this SDK. If you scroll to the
  1585. 1:07:20bottom, you're going to see that they
  1586. 1:07:22say you need to get this environment
  1587. 1:07:24variable. And here, make sure that you
  1588. 1:07:26select the correct project. So, here I
  1589. 1:07:29have bunch of different projects from
  1590. 1:07:31the past, but this is the one that we
  1591. 1:07:33just created. So go ahead and copy it,
  1592. 1:07:36then paste it under the env. Later in
  1593. 1:07:39the video, we're going to have bunch of
  1594. 1:07:40different environment variables like one
  1595. 1:07:43of them will be database URL and like so
  1596. 1:07:46on and so forth. For now, let's just
  1597. 1:07:49only have the expo public clerk
  1598. 1:07:52publishable key. All right. So now that
  1599. 1:07:54we have this environment variable, we
  1600. 1:07:56can go ahead and implement the
  1601. 1:07:57authentication just by asking to claude.
  1602. 1:08:00But before we do so, I think one quick
  1603. 1:08:02optimization would be getting the clerk
  1604. 1:08:05skills. So I'll say clerk skills and
  1605. 1:08:08specifically clerk AI skills. Um this
  1606. 1:08:12will basically get the upto-date
  1607. 1:08:15information or the documentation from
  1608. 1:08:18clerk and give it as a context to cloud.
  1609. 1:08:23So here I'll just copy this entire file.
  1610. 1:08:25Okay. And then I'll go into a new cloud
  1611. 1:08:28instance and then I'll paste this in.
  1612. 1:08:32And at the very end I'll say something
  1613. 1:08:34like I have just pasted the entire clerk
  1614. 1:08:39AI skills page. I want you to install
  1615. 1:08:41the skills that would be needed for this
  1616. 1:08:44project. So this is a expo react native
  1617. 1:08:48project and we're going to be using web
  1618. 1:08:50hooks as well. So maybe you need to get
  1619. 1:08:52the skills for back end as well. go
  1620. 1:08:55ahead and figure this out. Then install
  1621. 1:08:58the skills for this project.
  1622. 1:09:03All right. So in my case, it turns out I
  1623. 1:09:05have already installed the skills
  1624. 1:09:08globally in my machine. But in your
  1625. 1:09:10case, if you don't have them already,
  1626. 1:09:12you will probably get them under the
  1627. 1:09:14cloud under a folder called skills.
  1628. 1:09:17Okay? So cloud will figure out to
  1629. 1:09:19install it. But in my case, as I said, I
  1630. 1:09:22already have them. Now, just in case if
  1631. 1:09:25you don't know what a skill is in the
  1632. 1:09:27first place, basically you can think of
  1633. 1:09:29them as reusable modular instructions
  1634. 1:09:33that teach AI agents how to execute
  1635. 1:09:36multi-step workflows without needing to
  1636. 1:09:39be prompted from scratch every single
  1637. 1:09:42time. In this case, like we'll be using
  1638. 1:09:44skills for authentication, right?
  1639. 1:09:47specifically with clerk, but maybe later
  1640. 1:09:50in the video we can get more skills to
  1641. 1:09:52do different things. Okay, so with this
  1642. 1:09:57in mind, I think we can go ahead and
  1643. 1:10:00explain everything to cloud after the
  1644. 1:10:03onboarding screen.
  1645. 1:10:06Okay, so currently I really like the UI,
  1646. 1:10:09how everything works in the onboarding
  1647. 1:10:11process. But at the end of this process,
  1648. 1:10:16we should show some kind of a UI where
  1649. 1:10:20we have the Google and Apple
  1650. 1:10:22authentication buttons and when user
  1651. 1:10:25press them, it should actually work. The
  1652. 1:10:28authentication will be implemented with
  1653. 1:10:30clerk. I already have the environment
  1654. 1:10:33variables and we also have the clerk
  1655. 1:10:36skills. So go ahead and try to try to
  1656. 1:10:40implement it with a beautiful UI that
  1657. 1:10:42matches the theme of our actual
  1658. 1:10:46application. So I keep it simple,
  1659. 1:10:48minimalistic yet working.
  1660. 1:10:52Okay, so let's just wait what we're
  1661. 1:10:55going to get and then I'll just be right
  1662. 1:10:57back. All right, so Clad has implemented
  1663. 1:10:59it and it tried to do a real test. So I
  1664. 1:11:02just stopped it so that we can test out
  1665. 1:11:04manually. Here I'll go ahead and select
  1666. 1:11:07some options. Then you know let's see if
  1667. 1:11:10the authentication will work.
  1668. 1:11:22So we got the plan. Let's say continue.
  1669. 1:11:26Okay. Now we are in the authentication
  1670. 1:11:28screen here. I'll just take a screenshot
  1671. 1:11:31because I want to add the Google icon
  1672. 1:11:35right here. I'll follow up in a second,
  1673. 1:11:37but first let's test this out. So here,
  1674. 1:11:40I'll just say continue. So here I
  1675. 1:11:42already have an account because I have
  1676. 1:11:45used the simulator in the past. If
  1677. 1:11:47you're using it for the first time, you
  1678. 1:11:49need to put your email and password.
  1679. 1:11:51Then for the next login, it's going to
  1680. 1:11:53be saved and it'll be right here. Okay.
  1681. 1:11:56So here I'll just say continue. And once
  1682. 1:11:59we signed up,
  1683. 1:12:02as you can tell, once we are
  1684. 1:12:03authenticated, we are in the homepage,
  1685. 1:12:05which is something that we will update.
  1686. 1:12:08But let's go back into clerk dashboard.
  1687. 1:12:11So, it's going to be right here under
  1688. 1:12:13the users. Hopefully, we should have
  1689. 1:12:15this user who just signed up. Okay. So,
  1690. 1:12:19that means the authentication process is
  1691. 1:12:21working as expected. Now I can say sign
  1692. 1:12:24out and we are redirected to the again
  1693. 1:12:29welcome screen. And here if we just say
  1694. 1:12:31sign in as you can tell we are able to
  1695. 1:12:34see the screen. Um here I'll just follow
  1696. 1:12:37up. I'll paste this image and I'll say
  1697. 1:12:40right next to the continue with Google
  1698. 1:12:43text on the left hand side we would like
  1699. 1:12:45to have the Google icon. So go ahead and
  1700. 1:12:49add it right there.
  1701. 1:12:52So here we can tell we got the logo and
  1702. 1:12:55I think this looks way cleaner than what
  1703. 1:12:57we had previously. So with this I think
  1704. 1:13:00we can end the section. Basically we
  1705. 1:13:02have the onboarding process and we have
  1706. 1:13:06the authentication working as expected.
  1707. 1:13:08Before we commit our changes, what I'll
  1708. 1:13:10be doing is going under the get ignore
  1709. 1:13:13and I'm going to ignore the env file
  1710. 1:13:16because we're going to have our,
  1711. 1:13:19you know, secrets. we don't really want
  1712. 1:13:20to push them to GitHub. So at some point
  1713. 1:13:24in this file just put the env.v
  1714. 1:13:30local
  1715. 1:13:31and we can delete these extra spaces.
  1716. 1:13:34Okay. So with this now this file has
  1717. 1:13:37been ignored. Now if we go back to our
  1718. 1:13:41workflow. So if you go back to our
  1719. 1:13:43workflow you're going to see that we
  1720. 1:13:44have already generated the plan. We
  1721. 1:13:46generated the UI design. Then we break
  1722. 1:13:49it into specific features and we have
  1723. 1:13:51built them one by one. So we got the
  1724. 1:13:54authentication and onboarding in the
  1725. 1:13:56section. Then we selfch check them
  1726. 1:13:58within our simulator. Right? So we went
  1727. 1:14:01through the onboarding process, the
  1728. 1:14:03authentication screen and you know we
  1729. 1:14:06tested out everything manually just to
  1730. 1:14:08double check and make sure everything is
  1731. 1:14:10working. Now on top of this what you
  1732. 1:14:12would like to do is running some kind of
  1733. 1:14:15a code reviewer on your codebase and
  1734. 1:14:18that would be as you like as you can
  1735. 1:14:21imagine that would be an AI tool and
  1736. 1:14:23specifically I would use something like
  1737. 1:14:26code ravit or there are a bunch of
  1738. 1:14:27different options but that would be my
  1739. 1:14:30favorite in this tutorial I'm going to
  1740. 1:14:32skip that u but if you want to check
  1741. 1:14:34that out it's completely free to get
  1742. 1:14:36started with and this video is not
  1743. 1:14:38sponsored by them like absolutely not
  1744. 1:14:41they have 14 days free trial and I think
  1745. 1:14:44you can give it a go if you're
  1746. 1:14:45interested like just to keep this short
  1747. 1:14:47and simple I will only skip this process
  1748. 1:14:51but it's very very simple basically
  1749. 1:14:53before you commit your changes in your
  1750. 1:14:56pull request AI would take a look at
  1751. 1:14:58your codebase and if you're interested
  1752. 1:15:01in how to use it so if you would be
  1753. 1:15:03interested in this tutorial I have shown
  1754. 1:15:05the entire process and I can link it in
  1755. 1:15:07the description basically like you're
  1756. 1:15:11going to see how to implement this
  1757. 1:15:12entire part but other than this
  1758. 1:15:15everything is working like there is
  1759. 1:15:18nothing else that we are missing in this
  1760. 1:15:20workflow okay so with that I'll go back
  1761. 1:15:23into VS code we ignored the env file I
  1762. 1:15:28think we can just commit our changes
  1763. 1:15:32so I'm going to stage everything let's
  1764. 1:15:34get a commit message.
  1765. 1:15:42We're going to commit this and let's say
  1766. 1:15:44sync this up, which will basically get
  1767. 1:15:47all these local changes and push it to,
  1768. 1:15:51you know, push it to our repo in GitHub.
  1769. 1:15:55Let's take a look at that. That was
  1770. 1:15:56called Cali tutorial.
  1771. 1:16:00So, here you can tell we got the latest
  1772. 1:16:02changes just now. Okay. So with that,
  1773. 1:16:05I'll see you in the next lesson.
  1774. 1:16:08All right. So this is where we left. We
  1775. 1:16:10have the onboarding screen which is
  1776. 1:16:12working as expected. And on top of it,
  1777. 1:16:14we have the authentication which is also
  1778. 1:16:16working without any issues. But now
  1779. 1:16:18there is a problem that we would like to
  1780. 1:16:20fix. And before we try to fix it, let me
  1781. 1:16:22try to explain what's the problem in the
  1782. 1:16:24first place. So if you take a look at
  1783. 1:16:26the clerk dashboard, you're going to see
  1784. 1:16:28that we have the user, which is fine.
  1785. 1:16:30But in our database, we don't really
  1786. 1:16:32have any data. Specifically, we don't
  1787. 1:16:35really have this user that is signed up,
  1788. 1:16:38right? So somehow we would like to take
  1789. 1:16:40this user from here and save it to our
  1790. 1:16:44database as well. So we are not going to
  1791. 1:16:46delete it from here. This is needed for
  1792. 1:16:48authentication. But we will just kind of
  1793. 1:16:50like copy it from here and save it to
  1794. 1:16:54right here. And we want to make this in
  1795. 1:16:57a way that it's going to be automated
  1796. 1:16:59because if you think maybe your
  1797. 1:17:01application will get like 10,000 users,
  1798. 1:17:04right? You can't really copy them one by
  1799. 1:17:07one and paste them manually. So for this
  1800. 1:17:10we have what we call web hooks. And it
  1801. 1:17:13sounds pretty complicated but it's
  1802. 1:17:14actually a pretty simple concept and let
  1803. 1:17:17me try to explain. Okay. So first off,
  1804. 1:17:20web hooks are some automated messages
  1805. 1:17:22that are sent when something happens and
  1806. 1:17:25in this case that something is when a
  1807. 1:17:28user create it or even delete it. So
  1808. 1:17:31when user signs up clerk will save that
  1809. 1:17:34user and then it's going to send a web
  1810. 1:17:36hook. So specifically an event it's
  1811. 1:17:39going to say you know a user just been
  1812. 1:17:42created. Okay, so that's the event name
  1813. 1:17:44and we're going to get this event name.
  1814. 1:17:46We'll check. So if it is user created
  1815. 1:17:49then we'll basically take this user and
  1816. 1:17:52save it to our database. Now we have it
  1817. 1:17:54both in the clerk dashboard as well as
  1818. 1:17:57in our database right
  1819. 1:18:00and then there are different events like
  1820. 1:18:02events for almost for everything. So we
  1821. 1:18:05have user deleted. Let's say user you
  1822. 1:18:08know just visits the app and it says
  1823. 1:18:10delete my account. We would like to
  1824. 1:18:12delete it both from clerk and from our
  1825. 1:18:15database. And once it is deleted from
  1826. 1:18:17clerk, clerk will send this event to our
  1827. 1:18:20endpoint. Then we can delete it from the
  1828. 1:18:23DB as well. And there is also user
  1829. 1:18:25updated.
  1830. 1:18:28So these are the events that we are
  1831. 1:18:29going to be sub subscribing to which
  1832. 1:18:31means like we're going to listen for
  1833. 1:18:33them. So we'll go right here under the
  1834. 1:18:35clerk dashboard. Make sure you select
  1835. 1:18:37the correct application. Then go under
  1836. 1:18:40the configure developers and then you're
  1837. 1:18:43going to select the web hooks. Now from
  1838. 1:18:45here we would like to add an endpoint.
  1839. 1:18:48So here once you press this button
  1840. 1:18:50you're going to notice that you need to
  1841. 1:18:52have a deployed URL for your API. Now we
  1842. 1:18:56are in development. So that means we
  1843. 1:18:59only have local host. We don't really
  1844. 1:19:01have a deployed API. So that looks kind
  1845. 1:19:04of like a problem but there is a quick
  1846. 1:19:07fix. So we'll be using a platform or a
  1847. 1:19:10tool that is called Enrock which is very
  1848. 1:19:13very popular. Just go ahead and log in.
  1849. 1:19:16It's completely free. And once you're
  1850. 1:19:18logged in under the domains, you're
  1851. 1:19:20going to get a free domain that you can
  1852. 1:19:22use. So I'm going to get into it in a
  1853. 1:19:24second. But first, let's go ahead and
  1854. 1:19:27visit the clerk dashboard. From here, we
  1855. 1:19:30are going to select the user events. You
  1856. 1:19:32can select them individually or just
  1857. 1:19:34select all of them at once. Okay. So
  1858. 1:19:37these are the events that we're going to
  1859. 1:19:38be listening to. But before you say
  1860. 1:19:41create, we would like to add our
  1861. 1:19:43endpoint. Now you might be asking, okay,
  1862. 1:19:45so we have the endpoint, we have the,
  1863. 1:19:48you know, the placeholder, the input.
  1864. 1:19:50What do I do? Do we just copy it from
  1865. 1:19:52here and paste it to right here? What is
  1866. 1:19:56this / web hook? Well, that's a good
  1867. 1:19:58question. In these kind of scenarios,
  1868. 1:20:00anytime you're confused, what I would
  1869. 1:20:03do, I would just take the screenshot.
  1870. 1:20:05Okay. So, I'm going to take this entire
  1871. 1:20:06thing and go into cloud, paste this in,
  1872. 1:20:10and then I'll go back. I'll take the
  1873. 1:20:12screenshot from Enrog and I'll make sure
  1874. 1:20:15that, you know, the URL is visible. I'm
  1875. 1:20:17under the domains and I got this domain
  1876. 1:20:20and I'll just paste this in and then
  1877. 1:20:22I'll try to ask cloud to help me out.
  1878. 1:20:24So, here I'm trying to de demonstrate
  1879. 1:20:28in the case, you know, if there is
  1880. 1:20:30something that I'm confused what I would
  1881. 1:20:31do. I would take the screenshots and
  1882. 1:20:33then I'll try to talk with Claude. So
  1883. 1:20:35I'm going to shrink the left hand side
  1884. 1:20:37and I'll just explain the situation.
  1885. 1:20:41Okay. So hey Cloud, how are you doing? I
  1886. 1:20:44have this kind of like confusion and I
  1887. 1:20:46want you to help me out. So basically
  1888. 1:20:49when users sign up with clerk, we are
  1889. 1:20:52storing them in clerk only. I want to
  1890. 1:20:55use trigger.dev with a background job.
  1891. 1:20:59And you know with the web hooks I
  1892. 1:21:01basically want to take the user from
  1893. 1:21:03clerk and save it to my neon database.
  1894. 1:21:07And for this I know that I need to
  1895. 1:21:09create an API endpoint. But these
  1896. 1:21:13screenshots that I have just attached
  1897. 1:21:15kind of makes me confused. What do I do?
  1898. 1:21:17What's going to be my endpoint looking
  1899. 1:21:20like? Um just help me out. How do I fill
  1900. 1:21:24in the clerk dashboard?
  1901. 1:21:28So here on the endpoint URL, what do I
  1902. 1:21:31paste?
  1903. 1:21:32And for now, just don't really do
  1904. 1:21:34anything. Just inform me and then I'll
  1905. 1:21:37follow up with you, you know, just in
  1906. 1:21:40case if I ask you something, I'll follow
  1907. 1:21:42up.
  1908. 1:21:44Okay? So this is exactly what I'm doing
  1909. 1:21:46daytoday like anytime I get confused
  1910. 1:21:49with a dashboard you know with a feature
  1911. 1:21:52I just take the screenshot and give the
  1912. 1:21:55details as much as possible like here I
  1913. 1:21:58don't really say what do I put here
  1914. 1:22:00right so there is a context behind it
  1915. 1:22:03I'm confused because of this value as
  1916. 1:22:05well so I'm going to provide that I'm
  1917. 1:22:08going to provide this to AI as well
  1918. 1:22:10instead of just letting it to guess what
  1919. 1:22:13I'm confused
  1920. 1:22:14Okay. So with you know with that said we
  1921. 1:22:18will just see what Claude tells us
  1922. 1:22:21probably is going to inform us like what
  1923. 1:22:23you should do what you should paste so
  1924. 1:22:26on and so forth and once we have that we
  1925. 1:22:30will just ask cloud to set up our
  1926. 1:22:32database you know create the schema um
  1927. 1:22:35the tables you know I think we're going
  1928. 1:22:38to have the meals table users table
  1929. 1:22:40depending on the plan MD file so here I
  1930. 1:22:44think we already already determined all
  1931. 1:22:46the fields. As you can tell, we have the
  1932. 1:22:49data model.
  1933. 1:22:51Okay, so let's just wait for this to be
  1934. 1:22:53completed and I'll just be right back.
  1935. 1:22:55So, clutch just came up with the answer.
  1936. 1:22:57Please feel free to pause the video and
  1937. 1:22:59read it. It's very easy and I think it's
  1938. 1:23:02explained perfectly. Uh but basically,
  1939. 1:23:04it says you would like to create this
  1940. 1:23:07endpoint which is going to be under the
  1941. 1:23:08source app API web hooks and clerk
  1942. 1:23:12API.ts file. So, we're going to create
  1943. 1:23:14this in a second. And then it says
  1944. 1:23:17basically go ahead put this URL into
  1945. 1:23:20clerk dashboard.
  1946. 1:23:22And as I said, what angrog is for is
  1947. 1:23:26basically it's going to bridge the clerk
  1948. 1:23:29servers to our laptop in local
  1949. 1:23:32development only. So instead of you know
  1950. 1:23:34[snorts] having our API running on local
  1951. 1:23:36host, it's going to kind of like fake
  1952. 1:23:39the situation as if it is running on
  1953. 1:23:41this URL. so that we can paste this to
  1954. 1:23:44clerk. So I'm going to copy it and go
  1955. 1:23:46right here because if you put something
  1956. 1:23:48like local host, it is not going to
  1957. 1:23:51work. Okay, so here you don't really
  1958. 1:23:53want to say something like local host.
  1959. 1:23:55Well, absolutely not. It's not going to
  1960. 1:23:56work. This is our domain and on top of
  1961. 1:23:59it we have this endpoint API web hooks
  1962. 1:24:02clerk. Okay, so with that now we will
  1963. 1:24:05create this and this will give us a
  1964. 1:24:07secret key as you can tell a signing
  1965. 1:24:10secret. you would like to copy this and
  1966. 1:24:13go into your env file.
  1967. 1:24:16Here you can tell cloud also tells you
  1968. 1:24:19like this is what you need to do. We'll
  1969. 1:24:21go under the env
  1970. 1:24:24let me just maximize the screen.
  1971. 1:24:27This is the value and let's get the key.
  1972. 1:24:31Now technically you can call this
  1973. 1:24:32anything but this is the commission
  1974. 1:24:34clerk web hook signing secret. So go
  1975. 1:24:37ahead and save this file. Then we need
  1976. 1:24:40to run this in our terminal. So we
  1977. 1:24:43already have a terminal that is up and
  1978. 1:24:45running for expo. We will still keep
  1979. 1:24:47this open but we will create a new
  1980. 1:24:49terminal. And within this we would like
  1981. 1:24:52to run this command. So I'm going to
  1982. 1:24:55copy it and paste it. Basically from the
  1983. 1:24:58start until the end I want you to keep
  1984. 1:25:01this terminal open. Both the expo and
  1985. 1:25:05right here we have the anchor terminal.
  1986. 1:25:07And later in the video, we are going to
  1987. 1:25:09need another one for trigger.dev.
  1988. 1:25:12But for now, let's just focus on only
  1989. 1:25:15these two. Okay, so before we do
  1990. 1:25:18anything else, I think we need to set up
  1991. 1:25:20our database because, you know, we don't
  1992. 1:25:23really have any tables or any kind of
  1993. 1:25:25thing in our database, right? Let's go
  1994. 1:25:28right here. I will visit the connect
  1995. 1:25:30button and then I'll just say go under
  1996. 1:25:32the env. I'll copy the snippet and then
  1997. 1:25:35I'll just be right back in my env file
  1998. 1:25:39and
  1999. 1:25:41let me just say database URL and then
  2000. 1:25:44I'm going to paste this value. Well,
  2001. 1:25:46actually I'll just paste this entire
  2002. 1:25:48thing and that's because I got it from,
  2003. 1:25:52you know, from Neon. And here just go
  2004. 1:25:56ahead and delete the quotes. We don't
  2005. 1:25:58really need them.
  2006. 1:26:01Okay. So here let's just talk with
  2007. 1:26:03claude and explain the situation.
  2008. 1:26:06All right. So in our case we already
  2009. 1:26:08have the URL. We paste this into cleric
  2010. 1:26:11dashboard. We have our angrog terminal
  2011. 1:26:13up and running. We have our you know
  2012. 1:26:17clerk web hook signing secret as the
  2013. 1:26:19environment variable. And I just got my
  2014. 1:26:22database URL connection string as well.
  2015. 1:26:25Now before you do anything else that is
  2016. 1:26:28related to web hooks. First off, I want
  2017. 1:26:30you to initialize my database which is
  2018. 1:26:34neon postgress. So we will be using
  2019. 1:26:37drizzle as our RM and for the data
  2020. 1:26:40modeling you can take a look at our plan
  2021. 1:26:44MD file and just see all the details.
  2022. 1:26:47Then you should give me some scripts
  2023. 1:26:50that I can initialize the database, you
  2024. 1:26:52know, run migrations, so on and so
  2025. 1:26:55forth.
  2026. 1:26:58And here I'll just you know paste the
  2027. 1:27:01plan MD file as a reference. And now
  2028. 1:27:05while this is trying to initialize it
  2029. 1:27:07here I'd like to explain one more thing.
  2030. 1:27:09So here I just said we are going to get
  2031. 1:27:11all these events and we're going to do
  2032. 1:27:13something different for every single one
  2033. 1:27:15of them. For example when we want to
  2034. 1:27:17create the user we are going to run a
  2035. 1:27:19method that is going to create the user.
  2036. 1:27:22But now this method could fail in the
  2037. 1:27:24first time right because you know let's
  2038. 1:27:26say our database is done how do we retry
  2039. 1:27:29it right how do we make sure that you
  2040. 1:27:31know it always works even if it fails in
  2041. 1:27:34the first try even if our database is
  2042. 1:27:36slow or you know even if it is down how
  2043. 1:27:40do we have retries well basically that's
  2044. 1:27:43why we are using triggerdev for it's
  2045. 1:27:46going to handle everything for you the
  2046. 1:27:49entire infrastructure is right here. All
  2047. 1:27:52you need to do is basically writing five
  2048. 1:27:55to 10 lines of code for every single one
  2049. 1:27:58of these methods. So let's say this
  2050. 1:28:00failed in the very first run. Well, it's
  2051. 1:28:03going to retry it again. If it fails
  2052. 1:28:05again, it could retry again and
  2053. 1:28:08hopefully and eventually this function
  2054. 1:28:10will run and then the user will be saved
  2055. 1:28:13to database, right? And we're going to
  2056. 1:28:15do the same thing for user deleted like
  2057. 1:28:18we'll have a different method and for
  2058. 1:28:20user updated as well.
  2059. 1:28:24Okay. And we'll get into it in a couple
  2060. 1:28:26of minutes. So here we go. Now database
  2061. 1:28:29is live and it is verified end to end.
  2062. 1:28:32So what cloud has done is creating all
  2063. 1:28:35these files. Basically we have our
  2064. 1:28:38schema.ts ts file which says you know
  2065. 1:28:40these are the tables that we're going to
  2066. 1:28:42have and these are the fields that that
  2067. 1:28:44will live within that table. So that's
  2068. 1:28:47for the users table and then we have the
  2069. 1:28:50meals table like we're going to store
  2070. 1:28:52the image URL you know the user ID that
  2071. 1:28:55says you know which user owns this meal
  2072. 1:28:59and then you know the status like are we
  2073. 1:29:02analyzing or did we already calculate it
  2074. 1:29:05so on and so forth and then we have the
  2075. 1:29:07index.ts ts this is going to export the
  2076. 1:29:10schema as well as the database instance
  2077. 1:29:13so that we can communicate with our
  2078. 1:29:15database. Then we have the result config
  2079. 1:29:17file. So here it says we are using
  2080. 1:29:19Postgress. Here are the files that you
  2081. 1:29:22know the locations for our schema and
  2082. 1:29:24then the out folder and then the casing
  2083. 1:29:28as well as the database URL environment
  2084. 1:29:31variable
  2085. 1:29:33and then we have some scripts that we
  2086. 1:29:35can run. I think Cloud has already run
  2087. 1:29:38the generate. So if you go into our
  2088. 1:29:40database and refresh, you're going to
  2089. 1:29:42see that we have two different tables.
  2090. 1:29:44For now, we don't really have any data,
  2091. 1:29:46but we will create in a second. And then
  2092. 1:29:50you know like here is the loop. Let's
  2093. 1:29:52say you edit something within the
  2094. 1:29:54schema.ts file. You would run DB
  2095. 1:29:56generate and DB migrate. Okay, so that's
  2096. 1:30:00the basics of database setup. Now, back
  2097. 1:30:03in the old days, we would just come here
  2098. 1:30:05and write everything by hand. But as you
  2099. 1:30:07can tell, this is not really the thing
  2100. 1:30:09anymore. And I think it's not a bad
  2101. 1:30:12thing. Like you would just spend 20
  2102. 1:30:14minutes by writing these by hand. And
  2103. 1:30:17you know, there's like no point of doing
  2104. 1:30:19that at the moment. You just explain
  2105. 1:30:22everything in detail and claude or you
  2106. 1:30:25know, cursor they build it for you.
  2107. 1:30:28Okay. So with that said, now let's go
  2108. 1:30:29ahead and talk with Claude so that we
  2109. 1:30:32can basically run the trigger background
  2110. 1:30:35jobs. And before we do so, I'd like to
  2111. 1:30:38go ahead and visit trigger.dev and I'm
  2112. 1:30:41going to say get the skills. So I'm
  2113. 1:30:43going to copy this entire page.
  2114. 1:30:45Basically, if you paste this to the
  2115. 1:30:47terminal, you can install the skills.
  2116. 1:30:49And let's actually do it. So I'm going
  2117. 1:30:52to copy this. Let's go into a new
  2118. 1:30:54terminal. and then I'll paste this in.
  2119. 1:30:59I'll press enter and then let's see what
  2120. 1:31:01we're going to get. So this is the first
  2121. 1:31:03question that I got. Since I'm using
  2122. 1:31:05cloud, I'm going to select this one. But
  2123. 1:31:07if you're using any of the other ones,
  2124. 1:31:09you know, just go ahead and press
  2125. 1:31:11spacebar. But here I'll just, you know,
  2126. 1:31:14select this one and then I'll press
  2127. 1:31:15enter. Then for the skills, what do we
  2128. 1:31:19want to install? I think I'll just go
  2129. 1:31:21ahead and install everything. But you
  2130. 1:31:23can see like they have even cost
  2131. 1:31:25savings. They literally have a skill so
  2132. 1:31:27that you don't really spend more than
  2133. 1:31:29you should. That's unbelievable. I'll go
  2134. 1:31:32ahead just get the getting started and
  2135. 1:31:35real time and front end skills. Okay,
  2136. 1:31:38basically I have everything and as you
  2137. 1:31:41can tell they are all installed under
  2138. 1:31:43the cloud under the skills. Um, so yeah,
  2139. 1:31:46I think we are completely done with the
  2140. 1:31:48skills setup. Now let's explain this to
  2141. 1:31:51cloud. Okay, so we have our angrog set
  2142. 1:31:55up. We have the enkrog terminal up and
  2143. 1:31:58running as well. We have the database
  2144. 1:32:00set up, you know, schema, so on and so
  2145. 1:32:02forth. Now go ahead and take a look at
  2146. 1:32:06the trigger.dev skills that we installed
  2147. 1:32:10under the cloud folder and you know just
  2148. 1:32:14try to implement the web hooks. So I
  2149. 1:32:17want you to generate three different
  2150. 1:32:19methods. We're going to have one for
  2151. 1:32:22user creation, one deletion, and for the
  2152. 1:32:26update.
  2153. 1:32:30So I just realized in this prompt I had
  2154. 1:32:33some typos like I said anchor, but looks
  2155. 1:32:35like the voice detection got it kind of
  2156. 1:32:38like wrong. It says anchor log. I think
  2157. 1:32:41that's still fine. Cloud will be able to
  2158. 1:32:43understand it. like it should know that
  2159. 1:32:45I meant ankro. Um other than this there
  2160. 1:32:49is no issues like here you can tell clot
  2161. 1:32:51says this project has no
  2162. 1:32:53trigger.config.ts
  2163. 1:32:55file. So I need to set that up and this
  2164. 1:32:58is a file that would be generated if you
  2165. 1:33:00just copy and paste this script from the
  2166. 1:33:03trigger dashboard. So here we have the
  2167. 1:33:07project ID that is attached to the
  2168. 1:33:09current project. And basically this
  2169. 1:33:12would be you know this would be added to
  2170. 1:33:14your trigger config.ts file. It is still
  2171. 1:33:18fine. Cloud will do it for us. And here
  2172. 1:33:20it can even check that you are logged in
  2173. 1:33:24as this user. Right? So I'm logged in as
  2174. 1:33:26this user and I have this project and
  2175. 1:33:29this is the project ID.
  2176. 1:33:32Here you can tell like it's able to get
  2177. 1:33:34all the details and I think now it is
  2178. 1:33:36looking at the skills that we have which
  2179. 1:33:39is under the skills folder and hopefully
  2180. 1:33:42it's going to implement it successfully.
  2181. 1:33:45Once this is done I'll just be right
  2182. 1:33:46back. All right. So after some time
  2183. 1:33:48cloud is done with it and it has even
  2184. 1:33:51verified it. Now let's see what files
  2185. 1:33:53has been changed and you know what we
  2186. 1:33:56got how that work. So first off, if you
  2187. 1:33:58want to have some API routes, then you
  2188. 1:34:01need to visit app.json and update this
  2189. 1:34:03line. By default, this is equal to
  2190. 1:34:06static. And like you have to update this
  2191. 1:34:09to be equal to server and that's what
  2192. 1:34:12claude has done. And once again, this is
  2193. 1:34:15something that you need to do if you
  2194. 1:34:17want to have your API routes or
  2195. 1:34:19specifically expo API routes. Okay. So
  2196. 1:34:23here we have the API folder and to be
  2197. 1:34:25able to use this you need to set this to
  2198. 1:34:28be equal to server. That's the first
  2199. 1:34:30thing. The other thing as I mentioned we
  2200. 1:34:33would need to create this file and put
  2201. 1:34:35the project ID right here. As you can
  2202. 1:34:38tell we have more options and if you're
  2203. 1:34:40interested in detail you can take a look
  2204. 1:34:42at the trigger documentation or even
  2205. 1:34:44just ask it to code like explain what
  2206. 1:34:47else we have right here. For example,
  2207. 1:34:49here I think we have something like
  2208. 1:34:52randomize.
  2209. 1:34:53Maybe within here. Yeah, we have
  2210. 1:34:56randomize. We have out of memory. So on
  2211. 1:34:59and so forth. And then we have the clerk
  2212. 1:35:02API file. And by the way, CL tells you
  2213. 1:35:05like what they do. This is going to
  2214. 1:35:07verify the signature just to make sure
  2215. 1:35:09that the event is actually coming from
  2216. 1:35:12clerk and not some random user.
  2217. 1:35:16And then finally we have this file which
  2218. 1:35:19contains those three different methods.
  2219. 1:35:22So we have the case for user created. We
  2220. 1:35:25have for user updation or update and
  2221. 1:35:29finally the user deletion. Basically
  2222. 1:35:32we're going to delete it from the
  2223. 1:35:33database. Um so yeah right here that's
  2224. 1:35:37entire file around like 60 lines of code
  2225. 1:35:40and we are using the task method coming
  2226. 1:35:43from trigger. Basically, you create the
  2227. 1:35:46task and then attach a attach a function
  2228. 1:35:49that's going to be running once that
  2229. 1:35:52task needs to be done, right? Um, so
  2230. 1:35:56yeah, we also have the ids. Now, if you
  2231. 1:35:59go back to trigger.dev, you're going to
  2232. 1:36:02see that you have all these tasks,
  2233. 1:36:04right? So, we have clerk, user, created,
  2234. 1:36:07deleted, and updated. Notice how they
  2235. 1:36:10are matching with these ids.
  2236. 1:36:13And if you press them, you're going to
  2237. 1:36:15see like if you ever run them, you can
  2238. 1:36:18see the details. Um I think Claude has
  2239. 1:36:21already run these just to double check
  2240. 1:36:24that everything is working. Here you can
  2241. 1:36:26tell everything is completed
  2242. 1:36:27successfully. Now what I want you to do
  2243. 1:36:30is going into your clerk dashboard. So
  2244. 1:36:33we will double check.
  2245. 1:36:35We will delete this user and we will
  2246. 1:36:37sign up from scratch. So I'm going to
  2247. 1:36:39delete this user. And once we sign up
  2248. 1:36:42this time it should be created both both
  2249. 1:36:45here and in the database. Okay.
  2250. 1:36:47Currently if I reload I don't really
  2251. 1:36:49have the user in my database. Okay. So
  2252. 1:36:52I'll go ahead and sign in
  2253. 1:36:56or in this case I'll sign up because we
  2254. 1:36:59don't have this user in clerk.
  2255. 1:37:06Okay. So my account has been created.
  2256. 1:37:08Let's go back. If I reload, I'll see the
  2257. 1:37:12user in clerk. This was already working.
  2258. 1:37:15But now if we reload here, we will see
  2259. 1:37:18the user. I was going to say I think we
  2260. 1:37:21didn't get this. That's because we are
  2261. 1:37:23not running the trigger terminal. So
  2262. 1:37:25that was my mistake. We just forgot to
  2263. 1:37:28run this. So here in a separate
  2264. 1:37:30terminal, let's go ahead and get this
  2265. 1:37:33command.
  2266. 1:37:34Um where was it?
  2267. 1:37:37I think I'll just ask Claude to tell me
  2268. 1:37:40that script. All right. So, I just said,
  2269. 1:37:41what's the command to run trigger from
  2270. 1:37:44my terminal? This is the command that I
  2271. 1:37:46forgot. So, we're going to run this. And
  2272. 1:37:48there is one more thing that we need to
  2273. 1:37:50do. Let's just wait for this to be
  2274. 1:37:53started.
  2275. 1:37:55Okay. So, here you can tell it is
  2276. 1:37:57running without any issues. Then there
  2277. 1:37:59is one more thing like we need to get
  2278. 1:38:01the trigger secret key. I'm going to
  2279. 1:38:04copy this. Let's go into the env file
  2280. 1:38:08and let me maximize this. We're going to
  2281. 1:38:11get this value from trigger dashboard.
  2282. 1:38:13So head over to API keys. You're going
  2283. 1:38:16to see it under the sidebar. Just scroll
  2284. 1:38:18to the bottom and copy this value. And
  2285. 1:38:20if you want to update this, just press
  2286. 1:38:22regenerate. And here you can tell we
  2287. 1:38:24need to set this under the trigger
  2288. 1:38:27secret key environment variable. Okay.
  2289. 1:38:31So with that, since we have updated the
  2290. 1:38:34env file, I think we might need to rerun
  2291. 1:38:36our project. So I'm going to kill this.
  2292. 1:38:39Let's say clear. And I'll just run MPX
  2293. 1:38:41expo. And I'm going I'm going to delete
  2294. 1:38:44this user once again. Now we need to
  2295. 1:38:47delete this because when we sign up,
  2296. 1:38:49this event will be sended. If you
  2297. 1:38:51already have the user, it is not going
  2298. 1:38:53to send this event, right? Because user
  2299. 1:38:56already created. Okay. So with this now,
  2300. 1:38:59let's go back. I'm going to reload this
  2301. 1:39:01application and then we'll try to sign
  2302. 1:39:03in
  2303. 1:39:06and let's take a look at this terminal
  2304. 1:39:08by the way like um on trigger.dev dev.
  2305. 1:39:12This is running
  2306. 1:39:16and user deleted has just run because we
  2307. 1:39:19deleted the account. But now once we
  2308. 1:39:21sign up, user created will run in a
  2309. 1:39:25second here. You can tell. Now we can go
  2310. 1:39:28back to clerk dashboard. We'll have the
  2311. 1:39:31user right here as well as in the
  2312. 1:39:33database as you can tell. So with that,
  2313. 1:39:36we have just implemented this entire
  2314. 1:39:38thing. And just in case if it fails in
  2315. 1:39:41the first try, trigger will rerun this
  2316. 1:39:45method. Right? So here we can go under
  2317. 1:39:48the tasks or actually under the runs.
  2318. 1:39:51You can see that we just got the user
  2319. 1:39:53created
  2320. 1:39:55run or the event and it is done
  2321. 1:39:58successfully. All right. So with this we
  2322. 1:40:00have the user synchronization working as
  2323. 1:40:03expected and you have learned something
  2324. 1:40:05very very important which is called web
  2325. 1:40:08hooks. And from here on out, basically
  2326. 1:40:10you can use this concept in any of your
  2327. 1:40:13future projects. And I think it's really
  2328. 1:40:15important to know how this work,
  2329. 1:40:18especially in this kind of like vibe
  2330. 1:40:20coding area. Okay. So with that said,
  2331. 1:40:23let's go ahead and commit our changes
  2332. 1:40:25and leave this section right here. And
  2333. 1:40:28in the next one, we can get started with
  2334. 1:40:30the actual home screen design. So we're
  2335. 1:40:32going to have, you know, the homepage,
  2336. 1:40:35we're going to have the camera screen
  2337. 1:40:37profile. so on and so forth. For now,
  2338. 1:40:39we'll just try to commit everything. You
  2339. 1:40:42know, just press this button, stage
  2340. 1:40:44everything, get a commit message,
  2341. 1:40:50and then we can just say commit this.
  2342. 1:40:56All right. So, I've just committed and
  2343. 1:40:58synced them up with this. Let's leave
  2344. 1:41:00this lesson right here. I'll see you in
  2345. 1:41:02the next one. All right. So, this is
  2346. 1:41:04where we left so far. We have
  2347. 1:41:06authentication, onboarding and web
  2348. 1:41:08hooks. Everything is working as
  2349. 1:41:10expected. Now, we would like to build
  2350. 1:41:12the home screen profile and camera. And
  2351. 1:41:15for this, I got a kind of like um a
  2352. 1:41:19reference UI design. I took the
  2353. 1:41:21screenshot from Cali and will ask cloud
  2354. 1:41:24to build something similar to this one.
  2355. 1:41:27Now, if you didn't like this UI, you can
  2356. 1:41:30ask chat GPT to generate a different
  2357. 1:41:34variation of this one. and you know
  2358. 1:41:36reiterate until you find the one that
  2359. 1:41:38you liked. Then you would just paste it
  2360. 1:41:40right here under the design and you can
  2361. 1:41:43name it something like example home
  2362. 1:41:45screen UI design.png
  2363. 1:41:48or if you would like to use this image
  2364. 1:41:50just go under the source code copy this
  2365. 1:41:52file and paste it right here.
  2366. 1:41:55Okay, so here we don't really want to
  2367. 1:41:57have the progress screen or the groups
  2368. 1:42:00screen. I just want to have home,
  2369. 1:42:03profile, and maybe a camera screen,
  2370. 1:42:06right? So, so just imagine that we're
  2371. 1:42:08going to have three tabs. Now, let's go
  2372. 1:42:11ahead and try to explain this to cloud.
  2373. 1:42:14And before we do so, here I want to
  2374. 1:42:16mention that we'd like to use expo
  2375. 1:42:18native tabs. If you don't know what that
  2376. 1:42:20is, basically by using the native tabs,
  2377. 1:42:23we will be able to get the liquid glass
  2378. 1:42:26effect out of the box. Okay, so this is
  2379. 1:42:28the latest or I would say one of the
  2380. 1:42:31latest features in iOS where you have
  2381. 1:42:34this really really nice looking liquid
  2382. 1:42:36glass effect and all you need to do is
  2383. 1:42:39just using the native tabs which is
  2384. 1:42:41coming from expo. So I'm going to copy
  2385. 1:42:43this entire page as markdown and I would
  2386. 1:42:47paste it here in a second. First let me
  2387. 1:42:49try to explain to claude what we want to
  2388. 1:42:52build.
  2389. 1:42:55All right. So, so far in our
  2390. 1:42:57application, we have everything working
  2391. 1:42:59from authentication to onboarding to web
  2392. 1:43:02hooks. Now, it's time to get started
  2393. 1:43:04with the home screen, profile screen, as
  2394. 1:43:08well as the camera screen. So, under the
  2395. 1:43:11camera screen, user will be able to take
  2396. 1:43:14the photo of their food. And we will get
  2397. 1:43:17into it later, but for now, we would
  2398. 1:43:19like to design the home screen and the
  2399. 1:43:22profile screen. For the tabs, we would
  2400. 1:43:25like to use Expo native tabs and I'll
  2401. 1:43:29just attach the documentation from Expo.
  2402. 1:43:32So, you can take a look at it as an
  2403. 1:43:34example.
  2404. 1:43:36Okay. So, this is my entire prompt, but
  2405. 1:43:39I think I'd like to give some more
  2406. 1:43:41details.
  2407. 1:43:44So, for the UI design, I want you to
  2408. 1:43:47keep this style as you know the same as
  2409. 1:43:51we have at the moment. And here under
  2410. 1:43:54the design folder I have an example UI
  2411. 1:43:58image. You can take a look at it as a
  2412. 1:44:00reference file. So don't try to copy it
  2413. 1:44:03100% but you know make it as close as
  2414. 1:44:07possible or just get inspired by it.
  2415. 1:44:12Okay. So here I think I'm just going to
  2416. 1:44:14attach this file so it has it as a
  2417. 1:44:17reference and also and also I will
  2418. 1:44:20attach the plan MD file.
  2419. 1:44:23And then I'll say now when you implement
  2420. 1:44:26these screens please take a look at the
  2421. 1:44:29plan.md file as we have the instructions
  2422. 1:44:32right there. So we have at the beginning
  2423. 1:44:36we have decided all kinds of features
  2424. 1:44:38under the plan MD. So if you don't know
  2425. 1:44:41what to do don't guess anything. Just
  2426. 1:44:43take a look at this plan file.
  2427. 1:44:49Okay. and then I'll just paste the
  2428. 1:44:51documentation of native tabs that I have
  2429. 1:44:54just copied.
  2430. 1:44:56Okay. So I think I'm just going to send
  2431. 1:44:58it and I'll just wait a little bit and
  2432. 1:45:01see what claude will came up with. So
  2433. 1:45:03after some time this is what claude has
  2434. 1:45:06came up with. I think it is looking
  2435. 1:45:08pretty similar to what we have provided.
  2436. 1:45:11Like it is not the exact same thing but
  2437. 1:45:13it's pretty similar I would say. And
  2438. 1:45:16notice how we don't really have the
  2439. 1:45:18progress or groups tabs. Instead, we
  2440. 1:45:21have home, scan, and profile. Now,
  2441. 1:45:24profile screen definitely doesn't look
  2442. 1:45:26like what I want to have. So, we're
  2443. 1:45:28going to go ahead and add some
  2444. 1:45:30follow-ups. But before that, here you
  2445. 1:45:32can tell we need to rebuild our
  2446. 1:45:35application because we are using a new
  2447. 1:45:38native module. So, I'm going to go ahead
  2448. 1:45:40open up my terminal. Let's Ctrl C and
  2449. 1:45:43kill this. Right, with Ctrl + C, you can
  2450. 1:45:46stop it and you can just say MPX expo
  2451. 1:45:49run iOS. If you're on Android, you would
  2452. 1:45:52just say Android.
  2453. 1:45:54Okay, so I'll just wait for this to be
  2454. 1:45:56rebuilt and once this is done, we can
  2455. 1:45:59rerun our application and hopefully um
  2456. 1:46:02you know get those SVGs working as
  2457. 1:46:05expected. Now this will take some time
  2458. 1:46:07to build our app and instead of just
  2459. 1:46:09waiting and not doing anything, we can
  2460. 1:46:11just open up a new cloud instance and
  2461. 1:46:14add a new feature. So here what I want
  2462. 1:46:16to do is basically when we press this
  2463. 1:46:19streak button, we would like to see some
  2464. 1:46:22kind of a popup that would tell users
  2465. 1:46:24how many days that they have been
  2466. 1:46:26tracking their calories. So here I'll go
  2467. 1:46:29ahead and explain it simply to cloud.
  2468. 1:46:32So under the home screen at the very top
  2469. 1:46:35we have this streak button. When we
  2470. 1:46:37press that nothing happens but basically
  2471. 1:46:40implemented in a way that when user
  2472. 1:46:42press this button we would like to see a
  2473. 1:46:44pop-up that is fading like sliding in
  2474. 1:46:48from the bottom of the screen. Keep the
  2475. 1:46:50UI simple but you know just make it
  2476. 1:46:53motivational.
  2477. 1:46:56Okay. So I'll go ahead and run this. And
  2478. 1:46:58by the way we have this debug button.
  2479. 1:47:01Like this is something that Expo
  2480. 1:47:02provides. But if you want to get rid of
  2481. 1:47:04that, you can just say tools button and
  2482. 1:47:07now it's not going to be visible. If you
  2483. 1:47:09want to bring this back, you can press
  2484. 1:47:11Ctrl D, scroll to the bottom, and you
  2485. 1:47:14know, enable it. Probably this would be
  2486. 1:47:17something that I should have mentioned
  2487. 1:47:19earlier in the video, but better late
  2488. 1:47:22than never. Okay, so I'll wait for this
  2489. 1:47:24to be completed and we'll check out how
  2490. 1:47:27the popup will look like. All right, so
  2491. 1:47:30our application has been rebuilt as you
  2492. 1:47:33can tell from the terminal and we have
  2493. 1:47:35these circles working as expected. And
  2494. 1:47:38when we press this button, as you can
  2495. 1:47:39tell, we have a nice popup or I would
  2496. 1:47:42say a sheet which is sliding in from the
  2497. 1:47:45bottom. But this overlay, as you can
  2498. 1:47:48tell, it is like sliding in, which
  2499. 1:47:50doesn't really look nice. It should be
  2500. 1:47:52fading in. So here, I'll go ahead and
  2501. 1:47:54explain it this um explain it to Claude.
  2502. 1:47:58All right. So, everything is working
  2503. 1:48:00fine as expected. But there is one thing
  2504. 1:48:03that I don't really like, which is the
  2505. 1:48:05overlay. Instead of having the overlay
  2506. 1:48:08sliding in, it should be kind of like
  2507. 1:48:10fade in. Go ahead and implement it.
  2508. 1:48:15Okay. So, once again, like this overlay,
  2509. 1:48:18which is this black background, it
  2510. 1:48:21should not be sliding and it looks very
  2511. 1:48:23off.
  2512. 1:48:25So once this has been implemented, I
  2513. 1:48:27think you're going to see the
  2514. 1:48:28difference. All right. So looks like
  2515. 1:48:30it's done. Let's go ahead and double
  2516. 1:48:32check. Here you can tell the overlay
  2517. 1:48:34doesn't really slides in, but instead it
  2518. 1:48:37fades in. And here is the solution. Like
  2519. 1:48:40claw says, I have updated this animation
  2520. 1:48:42type. And I think this looks way cleaner
  2521. 1:48:45than what we had previously. But now
  2522. 1:48:47there is another kind of like issue that
  2523. 1:48:49we have. And the solution is simple. But
  2524. 1:48:53first let me try to explain the issue.
  2525. 1:48:55So this user has signed in right. We
  2526. 1:48:58have this user both in clerk and in our
  2527. 1:49:00database. But I think this data is
  2528. 1:49:03hardcoded because we never used open AAI
  2529. 1:49:07to generate these values. And if you
  2530. 1:49:09take a look at the database under the
  2531. 1:49:12user table, you're going to see that all
  2532. 1:49:14the values are actually empty.
  2533. 1:49:17Let me just maximize the screen. And by
  2534. 1:49:20saying all the values I mean like the
  2535. 1:49:23you know the gender, date of birth,
  2536. 1:49:25height, weight, so on and so forth,
  2537. 1:49:28right? These values should be coming
  2538. 1:49:31from onboarding. So we'll go ahead and
  2539. 1:49:33explain this to cloud and kind of like
  2540. 1:49:35wire this up. And before we try to go
  2541. 1:49:38into cloud, let's go ahead and get the
  2542. 1:49:41API key from OpenAI. Now I'm going to be
  2543. 1:49:44using OpenAI, but you can really use
  2544. 1:49:46anything that you wish. That could be I
  2545. 1:49:48think Gemini or really anything. It
  2546. 1:49:51could be Antrophic but I already have
  2547. 1:49:54some credits in OpenAI. I think I have
  2548. 1:49:58you know added around like $20 but you
  2549. 1:50:00can definitely add less than this. Um
  2550. 1:50:03like $5 should be enough or I think if
  2551. 1:50:05you use Google or Gemini that would be
  2552. 1:50:09completely free to get started with.
  2553. 1:50:11Okay. So I'll be showing you the Open AI
  2554. 1:50:14way of doing it. But if you want to use
  2555. 1:50:16Gemini, just ask it to cloud and it'll
  2556. 1:50:19walk you through it. It'll be very very
  2557. 1:50:21similar. So you would basically create a
  2558. 1:50:24new secret key. In this case, I'm just
  2559. 1:50:26going to say cali tutorial
  2560. 1:50:30and then I'll say create this secret
  2561. 1:50:32key. Now here you need to copy it and
  2562. 1:50:35paste it into yourv file. Now don't try
  2563. 1:50:39to use mine because I'll be deleting it
  2564. 1:50:42before publishing this video. So here
  2565. 1:50:44I'll just say open AI let's say API
  2566. 1:50:49key and then I'll paste my value.
  2567. 1:50:54Now let's go into cloud and try to
  2568. 1:50:56explain what we would like to do.
  2569. 1:51:00Okay. So so far our application is
  2570. 1:51:03mostly working as expected. But there is
  2571. 1:51:05one issue which is about the onboarding
  2572. 1:51:09and the data that we generate for this
  2573. 1:51:11user. So how many calories left protein
  2574. 1:51:15carbs and fat I think these are
  2575. 1:51:17hardcoded you need to generate these
  2576. 1:51:21values
  2577. 1:51:22uh using open AAI basically send the
  2578. 1:51:26information of the user when they sign
  2579. 1:51:28up or when they went through the
  2580. 1:51:30onboarding process you need to take
  2581. 1:51:33these values send them to openai and
  2582. 1:51:36whatever openai returns you need to save
  2583. 1:51:39it to database and then also display it
  2584. 1:51:41on the UI.
  2585. 1:51:45Okay, so this is the first part of the
  2586. 1:51:47implementation. The other part is let's
  2587. 1:51:50try to sign out. The other part is you
  2588. 1:51:54know what happens if user just signs in
  2589. 1:51:57without going through the onboarding
  2590. 1:51:59process, right?
  2591. 1:52:02We still want to show them the
  2592. 1:52:04onboarding screen. So once they sign in,
  2593. 1:52:06just imagine like they're signing up
  2594. 1:52:08right here and instead of showing them
  2595. 1:52:11the home screen, we'd like to show them
  2596. 1:52:13the onboarding process. So basically, no
  2597. 1:52:16matter what happens, they have to go
  2598. 1:52:18through the onboarding process. So I
  2599. 1:52:20have accidentally sent this prompt. So I
  2600. 1:52:23just paused it. I'm going to copy it and
  2601. 1:52:25paste it right here. And then I'll
  2602. 1:52:26explain what I have just said.
  2603. 1:52:29And in the case of user signing up
  2604. 1:52:33without going through the onboarding
  2605. 1:52:35process, when they log in, you should
  2606. 1:52:37still show them the onboarding process.
  2607. 1:52:40Like no matter what happens, the user
  2608. 1:52:43should go through the onboarding
  2609. 1:52:46process. like they have to provide these
  2610. 1:52:48values like their gender, height, you
  2611. 1:52:51know, all kinds of questions that we
  2612. 1:52:53have in the onboarding so that we can
  2613. 1:52:55generate,
  2614. 1:52:57you know, their um macros, calories, so
  2615. 1:53:01on and so forth. Okay, go ahead and
  2616. 1:53:04implement this
  2617. 1:53:06and I believe CL should be able to do
  2618. 1:53:09it. If not, we can always follow up. So
  2619. 1:53:13the tasks that we have given to cloud is
  2620. 1:53:16pretty simple. So I'll just wait once
  2621. 1:53:18this is done. I'll just be right back.
  2622. 1:53:20Now while this is getting built, we can
  2623. 1:53:22go into clerk dashboard and just delete
  2624. 1:53:25this user because we are going to go
  2625. 1:53:27through this entire process from
  2626. 1:53:29scratch. So I have just deleted the user
  2627. 1:53:32and from the trigger.dev dev under the
  2628. 1:53:34runs we can see that clerk user deleted
  2629. 1:53:37method or the task run and you know it
  2630. 1:53:40is done in 3 seconds successfully we
  2631. 1:53:44don't really have any issues and under
  2632. 1:53:46the database under the users as you can
  2633. 1:53:49tell that user is gone all right so
  2634. 1:53:52after some time cloud was able to
  2635. 1:53:54implement it and we'll go ahead and test
  2636. 1:53:57this out manually basically the main
  2637. 1:53:59logic is under the generate plan file
  2638. 1:54:02and you and take a look at the entire
  2639. 1:54:04path like the entire workflow how
  2640. 1:54:07everything happens step by step. Just
  2641. 1:54:09pause the video and read it. I'll just
  2642. 1:54:11show you the main logic and what we are
  2643. 1:54:14doing under the hood. Okay, so we have
  2644. 1:54:17the OpenAI SDK as usual. We are using
  2645. 1:54:20the task from trigger because that's the
  2646. 1:54:24infrastructure that we'll be using for
  2647. 1:54:26our AI agents. Then we are using the GPT
  2648. 1:54:295.6 six Luna model which is fast. Um and
  2649. 1:54:34then we just say you know you're a
  2650. 1:54:37registered dietician and you're building
  2651. 1:54:39a daily nutrition plan for one person.
  2652. 1:54:42Here are the rules. You know here is our
  2653. 1:54:45schema. Then we have the task that we
  2654. 1:54:47would like to run here. You can tell.
  2655. 1:54:51Okay. So with this in mind we can go
  2656. 1:54:54ahead and give it a go. I'll go ahead
  2657. 1:54:56and just say get started and follow
  2658. 1:54:59along with the onboarding. I'll just
  2659. 1:55:01leave everything as default. Let's say I
  2660. 1:55:04want to gain weight.
  2661. 1:55:07Let's just say something like 65 or
  2662. 1:55:10sorry 75.
  2663. 1:55:12And here let's say very active.
  2664. 1:55:16Let's go a bit aggressive. And just
  2665. 1:55:18before we say next, make sure that
  2666. 1:55:21you're running all these terminals. So
  2667. 1:55:23you have the expo app running. you have
  2668. 1:55:26enkrock running as well as the trigger
  2669. 1:55:30um trigger terminal right and you can
  2670. 1:55:32run it with this command okay so I have
  2671. 1:55:35already run them off camera like I test
  2672. 1:55:38this out but we will rerun it again so
  2673. 1:55:41I'm going to say classic next and now
  2674. 1:55:44this is going to build our plan now here
  2675. 1:55:46you can tell we just got a new run we
  2676. 1:55:48can go into the dashboard let's just see
  2677. 1:55:51under the runs here you can tell in real
  2678. 1:55:54time it tells tell us that
  2679. 1:55:56like it's been executed. And here we go.
  2680. 1:55:59It is like it did not fail. It is done
  2681. 1:56:03successfully. And here you can take a
  2682. 1:56:05look at the payload output. How long it
  2683. 1:56:08took, you know, every single detail.
  2684. 1:56:11I'll just leave it for you to explore
  2685. 1:56:13the dashboard in detail. Okay. So with
  2686. 1:56:16this, we got the UI. There are some
  2687. 1:56:18issues and I'm just going to take the
  2688. 1:56:20screenshot. So we'll ask it to cloud to
  2689. 1:56:23kind of like fix it. But this is only UI
  2690. 1:56:26related, no functionality. So I'm just
  2691. 1:56:29going to say continue.
  2692. 1:56:32And actually before we say continue,
  2693. 1:56:34let's just keep this in mind. We have
  2694. 1:56:364,100
  2695. 1:56:37calories per day. So just keep this in
  2696. 1:56:41mind and we'll just double check if this
  2697. 1:56:43will be saved to database. And here we
  2698. 1:56:45have the other values. Okay. So I'll
  2699. 1:56:48just say continue. Let's say continue
  2700. 1:56:50with Google.
  2701. 1:56:52So once our account is created, it
  2702. 1:56:55should save all this data to our
  2703. 1:56:57database.
  2704. 1:56:58So notice how the cleric user created
  2705. 1:57:02will run in a second. I was going to
  2706. 1:57:04say, but looks like something has
  2707. 1:57:06failed.
  2708. 1:57:08What is this?
  2709. 1:57:10Okay, so we're going to get into this. I
  2710. 1:57:12think it is only development error
  2711. 1:57:14because this has worked out and it says
  2712. 1:57:17success. So, I'm just going to reload
  2713. 1:57:19this. Ctrl D and reload.
  2714. 1:57:27Let's wait for this to be loaded.
  2715. 1:57:32Okay, so definitely something is wrong.
  2716. 1:57:35We'll get into it. Let's take a look at
  2717. 1:57:37it here. Everything
  2718. 1:57:40looks like working. Okay, so turns out
  2719. 1:57:43I'm missing the clerk secret key. and we
  2720. 1:57:45can grab this.
  2721. 1:57:48So, first off, I'm going to visit
  2722. 1:57:51um I'm going to visit the env file and
  2723. 1:57:54then we're going to have the clerk
  2724. 1:57:56secret key. But wait, I already have
  2725. 1:57:58this. It says clerk secret key to your
  2726. 1:58:05Okay, that's interesting. Maybe this is
  2727. 1:58:07not really matching with our actual
  2728. 1:58:10project. So I'm going to go into clerk.
  2729. 1:58:14Let's say quick start
  2730. 1:58:16for Node.js
  2731. 1:58:21or for the express. Let's scroll to the
  2732. 1:58:24bottom. Cali tutorial. And I'm just
  2733. 1:58:26going to copy everything from here.
  2734. 1:58:28Paste it right here at the bottom.
  2735. 1:58:33Okay. So it's actually the correct
  2736. 1:58:35value. Well, I don't know why this did
  2737. 1:58:38not work. Maybe we need to rerun our
  2738. 1:58:40application.
  2739. 1:58:42So, I'm going to kill this and I'm going
  2740. 1:58:44to say clear MPX expo and let's just
  2741. 1:58:48start it.
  2742. 1:58:51I'm going to press R to reload our app
  2743. 1:58:54or let's press I.
  2744. 1:58:57It's going to rerun it.
  2745. 1:59:03Okay. So I think the onboarding process
  2746. 1:59:05didn't really worked out initially
  2747. 1:59:07because we were missing the environment
  2748. 1:59:09variable which is completely fine. Let's
  2749. 1:59:11just double check if we have this user.
  2750. 1:59:14Yeah, we have it. But as you can tell
  2751. 1:59:16the values are not really here. So let's
  2752. 1:59:19go through it once again. So this is
  2753. 1:59:21real world programming. You of course
  2754. 1:59:24you know you always get these type of
  2755. 1:59:26errors or issues but yeah you just need
  2756. 1:59:30to learn how to fix them. So we just
  2757. 1:59:32realized within the terminal we are
  2758. 1:59:34missing a value. We just provided that.
  2759. 1:59:36Rerun our application and now everything
  2760. 1:59:39should work out. Let's say gain weight.
  2761. 1:59:41We'll go with 75.
  2762. 1:59:51Okay. So notice how this will rerun
  2763. 1:59:54again. Generate plan. You can go into
  2764. 1:59:56the dashboard under the runs executing.
  2765. 2:00:00You can press it like once this is done.
  2766. 2:00:04I think it says completed already.
  2767. 2:00:07Okay. So keep this value in mind 3740.
  2768. 2:00:11I'll say continue.
  2769. 2:00:13And this value should be saved to our
  2770. 2:00:15database. Let's go here. Reload. Here
  2771. 2:00:19you can tell we got every single thing.
  2772. 2:00:21Um 37 40 and the other values are also
  2773. 2:00:26correct. So that means everything is
  2774. 2:00:28working now as expected. We got rid of
  2775. 2:00:31that issue that we're trying to fix. And
  2776. 2:00:34currently I am in Indonesia and that
  2777. 2:00:37means the time zone is also correct.
  2778. 2:00:39Like it says Asia Makasar or I don't
  2779. 2:00:42know how you pronounce it but this is
  2780. 2:00:44also correct. All right. So let's go
  2781. 2:00:47back to VS Code. There is one thing that
  2782. 2:00:49I'd like to follow up with Claude. So if
  2783. 2:00:53you remember I took a screenshot. So
  2784. 2:00:55I'll just go ahead and get it from my
  2785. 2:00:57clipboard history. So, it was this
  2786. 2:01:00screenshot, right? The UI doesn't really
  2787. 2:01:02look nice. I'm going to say go ahead and
  2788. 2:01:04fix this.
  2789. 2:01:06So, everything is working as expected,
  2790. 2:01:08but the attached UI is kind of broken. I
  2791. 2:01:12want you to add the proper spacing
  2792. 2:01:15between the continue button and then
  2793. 2:01:18this purple container. And, you know,
  2794. 2:01:22make sure that this page is scrollable.
  2795. 2:01:24So, we see the continue button at the
  2796. 2:01:27bottom. You know, just overall go ahead
  2797. 2:01:29and make this UI look clean.
  2798. 2:01:35All right. So, looks like Cloud has
  2799. 2:01:36fixed it. To be able to test this out, I
  2800. 2:01:39think I need to log out and go through
  2801. 2:01:41the onboarding process just to be able
  2802. 2:01:43to see the screen, which is something
  2803. 2:01:45that I'm not going to be doing at the
  2804. 2:01:46moment. I'll just trust Cloud for now.
  2805. 2:01:49And maybe by the end of this tutorial we
  2806. 2:01:52can check out the UI of this screen.
  2807. 2:01:55Okay. So with that said now we can get
  2808. 2:01:57into the scan screen and basically here
  2809. 2:02:01we will ask for the permission so that
  2810. 2:02:03we can access to the camera of the user
  2811. 2:02:06and to be able to implement this you
  2812. 2:02:08need to update the app.json file. Now of
  2813. 2:02:12course we don't really need to do it
  2814. 2:02:13manually. Let me find this file. will
  2815. 2:02:16just ask cloud to you know ask for the
  2816. 2:02:19permission from users. If you don't add
  2817. 2:02:22the permission it is not going to work.
  2818. 2:02:25Um okay so basically when they visit
  2819. 2:02:28this screen camera will open and then
  2820. 2:02:30they will scan the meal. So let's go and
  2821. 2:02:33open up a new chat and then explain
  2822. 2:02:36everything to cloud and then I'm going
  2823. 2:02:38to explain how everything will work step
  2824. 2:02:40by step. And actually before we start
  2825. 2:02:42talking with cloud let me show you the
  2826. 2:02:44workflow that we're going to have. So
  2827. 2:02:46when user take a photo of their meal our
  2828. 2:02:48API rod will run where we would like to
  2829. 2:02:51upload the image to image kit. Then we
  2830. 2:02:54would like to save the meal to our
  2831. 2:02:56postgress database with the pending
  2832. 2:02:58state because we are just starting to
  2833. 2:03:00analyze the meal and get the macros
  2834. 2:03:04right like the calories protein so on
  2835. 2:03:06and so forth. And then the most
  2836. 2:03:08important part is the trigger.dev task.
  2837. 2:03:12This will run and here is where we'll
  2838. 2:03:15have our AI agents. So we'll say hey
  2839. 2:03:18OpenAI please take this photo and
  2840. 2:03:21analyze it. And once it is done it's
  2841. 2:03:23going to give us some response back.
  2842. 2:03:25Then we will update our database with
  2843. 2:03:27the you know calories, macros etc. Then
  2844. 2:03:31we can update the state in real time as
  2845. 2:03:33well. So user will see what is going on
  2846. 2:03:36what are we doing in the background and
  2847. 2:03:38then once everything is done uh once we
  2848. 2:03:41got the result our UI will be updated in
  2849. 2:03:43real time as well. Okay, now before we
  2850. 2:03:46implement anything, let's go into image
  2851. 2:03:48kit, visit our dashboard under the
  2852. 2:03:51developer options. Let's get some of
  2853. 2:03:54these values. So, I'm going to get my
  2854. 2:03:56image kit public key. Go under the
  2855. 2:03:59envit_key.
  2856. 2:04:04And I'm going to have the same thing for
  2857. 2:04:07secret key. Let's say image kit
  2858. 2:04:11secret key.
  2859. 2:04:14And then I'm going to copy this value.
  2860. 2:04:21And then I think we can also get the URL
  2861. 2:04:24endpoint. So I'm going to copy it. And
  2862. 2:04:27then I'll say image kit
  2863. 2:04:30URL endpoint.
  2864. 2:04:34Okay. Now with this in mind I think we
  2865. 2:04:36are ready to get started with um one
  2866. 2:04:40more thing you can always visit image
  2867. 2:04:43kit documentation for any kind of
  2868. 2:04:45feature that you want to implement on
  2869. 2:04:47top of what we are going to be building.
  2870. 2:04:49Let's say you want to have some videos
  2871. 2:04:51and you would like to resize them,
  2872. 2:04:54right? You would just come here and you
  2873. 2:04:56can take a look at the features. But to
  2874. 2:04:58be able to implement this, all you need
  2875. 2:05:00to do is copying this entire file or the
  2876. 2:05:03entire instructions to your LLM. Like
  2877. 2:05:06this is such a nice addition. Just copy
  2878. 2:05:09it, paste it, and then talk with cloud
  2879. 2:05:11or cursor whatever you are using. Okay.
  2880. 2:05:14So with this in mind, I'll try to
  2881. 2:05:16explain this workflow to claude and then
  2882. 2:05:19we'll just try to kind of like test this
  2883. 2:05:22out and see how everything will work.
  2884. 2:05:27Okay. So so far in my application
  2885. 2:05:29everything is working. I'm happy with
  2886. 2:05:31what you have generated so far. Now I
  2887. 2:05:34want you to build the scan screen. First
  2888. 2:05:37off, when user visits this page, we
  2889. 2:05:40would like to ask them for permission
  2890. 2:05:42that we can access to their camera. Once
  2891. 2:05:45they give the permission, we would like
  2892. 2:05:47to, you know, allow them to take a photo
  2893. 2:05:50of their meal and, you know, see some
  2894. 2:05:53kind of button that says analyze the
  2895. 2:05:56food. Once they press that button, we
  2896. 2:05:58would like to do a couple of different
  2897. 2:06:00things. So, we would like to save the
  2898. 2:06:02image to image kit. We would like to
  2899. 2:06:05save the meal to our database with the
  2900. 2:06:08pending state and we would like to kind
  2901. 2:06:11of like run the trigger task where we
  2902. 2:06:14will send this image to open AAI analyze
  2903. 2:06:18it and get the result. Now while doing
  2904. 2:06:21this we can use the real time feature of
  2905. 2:06:24trigger and for this I can provide you
  2906. 2:06:27the documentation or actually you can
  2907. 2:06:31take a look at the trigger skills that
  2908. 2:06:34we have under the cloud folder.
  2909. 2:06:39Okay. So I think this is my prompt. I
  2910. 2:06:41try to explain everything in detail. Um
  2911. 2:06:45we can say yeah I think I'll just send
  2912. 2:06:47this and see what we're going to get.
  2913. 2:06:51in the you know off camera I have
  2914. 2:06:53already tried this like last week when I
  2915. 2:06:56was building the demo application and
  2916. 2:06:58cloud was able to give me exactly what I
  2917. 2:07:01wanted to have but you know this is AI
  2918. 2:07:03you cannot really trust it 100% of the
  2919. 2:07:06time so whatever we got we'll just try
  2920. 2:07:08to um we'll try to test this out
  2921. 2:07:11manually no matter what happens so I'll
  2922. 2:07:14just wait for this to be completed once
  2923. 2:07:16this is done I'll just be right back all
  2924. 2:07:18right so after some time This has been
  2925. 2:07:20implemented and we are going to go ahead
  2926. 2:07:22and test this out. Before we jump into
  2927. 2:07:24testing, here are a couple of different
  2928. 2:07:27files that Cloud has generated. And
  2929. 2:07:30let's pretty quickly try to go over
  2930. 2:07:32them. And before we do so, you need to
  2931. 2:07:34kill your terminal. Okay, so right here,
  2932. 2:07:37kill your Expo terminal, then run MPXO
  2933. 2:07:41pre-built. Then you would like to run
  2934. 2:07:44you know MPX expose start with the clear
  2935. 2:07:48flag with that it should be working out.
  2936. 2:07:50If you get any kind of issues or
  2937. 2:07:52problems just take the screenshot and
  2938. 2:07:55paste it to cloud. Um you know it should
  2939. 2:07:57be able to fix that. Other than this
  2940. 2:08:00like we got the camera file in here we
  2941. 2:08:03are using the expo camera which is a
  2942. 2:08:05native module and with this we are
  2943. 2:08:08getting the hook called use camera
  2944. 2:08:11permission and basically when you want
  2945. 2:08:14to take a photo before you do so we will
  2946. 2:08:17run this method which is called as
  2947. 2:08:19request permission right and then if you
  2948. 2:08:22visit the app.json JSON within this file
  2949. 2:08:26you're going to see that let me just
  2950. 2:08:28scroll to the bottom under the plugins
  2951. 2:08:31under the Xbox camera we have the camera
  2952. 2:08:34permission. So here you would just put
  2953. 2:08:36your name name of your application and
  2954. 2:08:39then you will say something like this
  2955. 2:08:41app uses the camera to read the calories
  2956. 2:08:44and macros in your meal and this will
  2957. 2:08:46ask a question to the user where you
  2958. 2:08:49know if they want to give access to the
  2959. 2:08:51camera and it is the same idea if you
  2960. 2:08:54want to you know access
  2961. 2:08:56to the library of the user right so if
  2962. 2:09:00you have I mean you probably use bunch
  2963. 2:09:03of different apps in real world and you
  2964. 2:09:05know they always ask you know let's say
  2965. 2:09:07Instagram wants to access your photos
  2966. 2:09:10and it's going to be this place where
  2967. 2:09:12you will ask that question as the
  2968. 2:09:14developer
  2969. 2:09:16okay so that's the file for UI and the
  2970. 2:09:20permission then we have the backend code
  2971. 2:09:22which is under the mills API so this is
  2972. 2:09:26going to be under the source API
  2973. 2:09:28actually source app API and then we have
  2974. 2:09:32the mills API I end point. Now we can
  2975. 2:09:36jump into source code and take a look at
  2976. 2:09:39it what is going on in detail. But
  2977. 2:09:41basically this is going to handle the
  2978. 2:09:43image kit upload. You know it's going to
  2979. 2:09:45create the analyzing row trigger to run
  2980. 2:09:48and then it's going to return the
  2981. 2:09:50handles on uh public access token and
  2982. 2:09:53then we have the analyze meal which is
  2983. 2:09:55going to run the actual task in trigger.
  2984. 2:09:59So we give the prompt just like
  2985. 2:10:01previously you know we say you're a
  2986. 2:10:03nutritionist estimating what is on a
  2987. 2:10:05plate from a single photo and then we
  2988. 2:10:08just run the task. So super simple
  2989. 2:10:11JavaScript or TypeScript I would say we
  2990. 2:10:14are manipulating or we are you know
  2991. 2:10:17updating the database. Okay. So with
  2992. 2:10:20this let's go ahead and test this out.
  2993. 2:10:22I'll just say allow camera here. You can
  2994. 2:10:24tell we got the request for the
  2995. 2:10:27permission. I'll say allow. Now, since
  2996. 2:10:29this is a simulator, we cannot really
  2997. 2:10:31use the camera. Like you cannot really
  2998. 2:10:33see
  2999. 2:10:35um anything even like you cannot use
  3000. 2:10:37your laptop camera. But when we test
  3001. 2:10:40this out in in our phone, uh the camera
  3002. 2:10:42will work. So, I'm going to just press
  3003. 2:10:44this button here. You can tell we got
  3004. 2:10:46the analyze the food. I'll just say
  3005. 2:10:49retake. What happens when we press this?
  3006. 2:10:52Well, nothing happens, but we can
  3007. 2:10:53integrate that. Or actually it is
  3008. 2:10:55working but it is kind of like slow or
  3009. 2:10:58buggy I would say.
  3010. 2:11:01Yeah, there is definitely some delay.
  3011. 2:11:05I'll just try to reload this
  3012. 2:11:07application. Okay, so I'll take the
  3013. 2:11:09photo and let's say analyze the foot.
  3014. 2:11:11Before we do so, I think I'll visit my
  3015. 2:11:14trigger dashboard. And here you can tell
  3016. 2:11:17we have the task. It is right here. Um,
  3017. 2:11:21I think we might need to add the
  3018. 2:11:23environment variable of our database.
  3019. 2:11:27So, let's just check if cloud has say
  3020. 2:11:30something like this. Yeah, here it says
  3021. 2:11:32you need to get the database URL
  3022. 2:11:36and our environment is going to be
  3023. 2:11:38development. Let's get the value from
  3024. 2:11:40the env file.
  3025. 2:11:43So, just copy this entire thing and
  3026. 2:11:45paste it right here.
  3027. 2:11:49And you need to make sure that you're
  3028. 2:11:51running your terminals
  3029. 2:11:54like this is the trigger terminal and
  3030. 2:11:57you are running the expo application as
  3031. 2:11:59well. So with this I think I'll just
  3032. 2:12:01take a look at my terminal and say
  3033. 2:12:03analyze the food. Um looks like it says
  3034. 2:12:06connect could not connect to the server.
  3035. 2:12:10Maybe we might need to reload our
  3036. 2:12:12application or maybe rerun this
  3037. 2:12:14terminal.
  3038. 2:12:16So I have just rerun the application and
  3039. 2:12:18I'll try to test this out. Let's say
  3040. 2:12:21analyze the food. Hopefully something
  3041. 2:12:23should run on trigger.dev
  3042. 2:12:26if we have implemented this correctly.
  3043. 2:12:32All right. So it took some time but here
  3044. 2:12:34we go. Now it started running and I
  3045. 2:12:36believe that this should be running in
  3046. 2:12:38real time.
  3047. 2:12:40Okay. So here we go. We got the error
  3048. 2:12:42which is true. It says that doesn't look
  3049. 2:12:45like food. And let's take a look at the
  3050. 2:12:48trigger. Under the tasks,
  3051. 2:12:51sorry, under the runs, we just got the
  3052. 2:12:55uh latest one, which is analyze meal.
  3053. 2:12:59Okay, so we even got the kind of like
  3054. 2:13:02the info message, right? It says this
  3055. 2:13:05photo is not food. And you know anytime
  3056. 2:13:07you got some errors you can just jump
  3057. 2:13:09here and try to debug it and just see
  3058. 2:13:12what is going on. Now I'll just actually
  3059. 2:13:15copy this and I'd like to see this where
  3060. 2:13:18this is in my code. I believe it is
  3061. 2:13:20under that file called analyze meal
  3062. 2:13:22here. You can tell we are using the
  3063. 2:13:24logger. Um and I think this is very very
  3064. 2:13:27important to use with trigger because if
  3065. 2:13:30if something fails just like here and if
  3066. 2:13:32you are not using the logger you will
  3067. 2:13:34not be able to see what is going on.
  3068. 2:13:36Okay. Now with that said maybe we can do
  3069. 2:13:39something else like we cannot take the
  3070. 2:13:42photo of our food. What we can do is
  3071. 2:13:44allowing the access to the photo gallery
  3072. 2:13:48and then you know if we have some meal
  3073. 2:13:51food just like this we can provide it to
  3074. 2:13:54our application. So here I'll go into
  3075. 2:13:57clot and I'll just say simply implement
  3076. 2:13:59this.
  3077. 2:14:01So under the scan screen I want you to
  3078. 2:14:04add a button for gallery access. And
  3079. 2:14:08with this gallery access, we should be
  3080. 2:14:10able to select food images from our
  3081. 2:14:14gallery and you know provided to our
  3082. 2:14:18application. So it doesn't have to be
  3083. 2:14:20only taking the photo from from camera.
  3084. 2:14:26All right. So looks like this has been
  3085. 2:14:28implemented and for this there is a
  3086. 2:14:30package called expo image picker which
  3087. 2:14:32is going to basically allow us to access
  3088. 2:14:35to the you know gallery of the device
  3089. 2:14:39and again to be able to implement this
  3090. 2:14:41you need to have the permission under
  3091. 2:14:43the app.json just like in Xbox camera
  3092. 2:14:47here you would like to have the same
  3093. 2:14:48thing for the image picker package. All
  3094. 2:14:52right so with this let's go ahead and
  3095. 2:14:53give it a try. I think I will reload my
  3096. 2:14:56application.
  3097. 2:15:03So, we are authenticated. This will take
  3098. 2:15:05us to the home screen. From here, let's
  3099. 2:15:07say scan a mail. Here we go. We have the
  3100. 2:15:10button. Once we press that, we're going
  3101. 2:15:12to get the permission. Now, in this
  3102. 2:15:14simulator, I have already give the
  3103. 2:15:16access. So, it doesn't really ask me
  3104. 2:15:18again. But if you're using it for the
  3105. 2:15:20first time, it's going to ask you to
  3106. 2:15:22give the permission. Once you allow it,
  3107. 2:15:25you can choose the food. I think here
  3108. 2:15:28I'll just say analyze the food and
  3109. 2:15:31I'll take a look at the terminal. This
  3110. 2:15:33should run.
  3111. 2:15:35I don't know if the you know the
  3112. 2:15:38connection was lost. Maybe I need to
  3113. 2:15:40rerun this here. I'll just say analyze
  3114. 2:15:43the food. So here we go in real time. It
  3115. 2:15:46gives us feedback.
  3116. 2:15:48We are analyzing the food. And here you
  3117. 2:15:50can tell as soon as it is executed, as
  3118. 2:15:53soon as it is completed, we can get the
  3119. 2:15:55values. So this is sliced chicken breast
  3120. 2:15:59which is around 750 calories. And here
  3121. 2:16:02are the macros. Now we can go into
  3122. 2:16:05trigger.dev under the runs. We should be
  3123. 2:16:07able to see it.
  3124. 2:16:10Like here we can tell here's the
  3125. 2:16:12payload, here's the output. And that's
  3126. 2:16:15exactly what we see in the UI. Now, off
  3127. 2:16:18camera, I have asked Claude to implement
  3128. 2:16:21this in a way that the first scan is
  3129. 2:16:24going to fail because I want to show you
  3130. 2:16:26that what happens in real world when it
  3131. 2:16:29fails for the first time. Well, the
  3132. 2:16:31trigger.dev will run a retry, right? And
  3133. 2:16:34let's try to actually give it a go. So,
  3134. 2:16:37here I'm going to say scan another one.
  3135. 2:16:39And this time, let's select this one. As
  3136. 2:16:43soon as we say analyze the foot, it's
  3137. 2:16:46going to start running.
  3138. 2:16:49Let's see. I'll just refresh.
  3139. 2:16:54Okay. So, like we cannot still see it
  3140. 2:16:56here is because the image I think is
  3141. 2:16:58getting passed to image kit. But once it
  3142. 2:17:01is done, we should have the run. Now, it
  3143. 2:17:04is executing. And for the first time, I
  3144. 2:17:07believe it's going to fail.
  3145. 2:17:10So, attempt one. As you can tell, it has
  3146. 2:17:12failed. Now it is running again. So we
  3147. 2:17:14have a retry and this is exactly what's
  3148. 2:17:17going to happen in real world. You
  3149. 2:17:19cannot really expect this to run
  3150. 2:17:21successfully every single time. So this
  3151. 2:17:24is the proof that we actually have the
  3152. 2:17:26infrastructure that is already built for
  3153. 2:17:28us which is going to retry it without
  3154. 2:17:31you doing anything really. Okay. So with
  3155. 2:17:34that said now I'll just say okay I
  3156. 2:17:37tested this out. bring it back to the
  3157. 2:17:42previous version without failing.
  3158. 2:17:49Now I'll just say done. Let's check if
  3159. 2:17:52we're going to have anything in the
  3160. 2:17:53database or if we already have. So under
  3161. 2:17:57the meals table, as you can tell, we
  3162. 2:18:00have like one of them has failed, the
  3163. 2:18:02other ones are completed.
  3164. 2:18:06And we can see that we have every single
  3165. 2:18:08value. Now I think we need to reload our
  3166. 2:18:12application to be able to see it. Here
  3167. 2:18:15I'll go ahead and reload this.
  3168. 2:18:19And in the homepage it should fetch
  3169. 2:18:22these meals. I was going to say but
  3170. 2:18:25looks like this is not this has not been
  3171. 2:18:27implemented. So let's go ahead and ask
  3172. 2:18:29cloud to you know write a query. It's
  3173. 2:18:32going to be super simple. We are just
  3174. 2:18:34going to fetch this data from the
  3175. 2:18:36database and display it right here. And
  3176. 2:18:38now just before we ask cloud to
  3177. 2:18:40implement it, there is something that I
  3178. 2:18:42want to talk about which is about the
  3179. 2:18:44image optimizations. So here let's think
  3180. 2:18:46about that when we take the photo of the
  3181. 2:18:49image, it is a large photo, right? It's
  3182. 2:18:51a large image. But when we try to
  3183. 2:18:54display it right here, we don't really
  3184. 2:18:56need a huge size, right? So we can
  3185. 2:18:59resize it which is going to be better
  3186. 2:19:01for the network access or you know like
  3187. 2:19:06we are going to transfer less data. So
  3188. 2:19:09here let's think about that that was the
  3189. 2:19:11original image. This is stored in image
  3190. 2:19:13kit but what we can do we can just ask
  3191. 2:19:16for image kit to deliver this in a
  3192. 2:19:19smaller size because that's what we're
  3193. 2:19:22going to see right here. Okay. So with
  3194. 2:19:24this in mind, we can just ask Claude to
  3195. 2:19:27use the image kit optimizations. So
  3196. 2:19:30here's my prompt. You can pause the
  3197. 2:19:32video and read it. Now at the very end,
  3198. 2:19:34I'm going to say use context 7. If you
  3199. 2:19:37don't know what this is, basically this
  3200. 2:19:39is going to check the latest
  3201. 2:19:41documentation of image kit. And this is
  3202. 2:19:44one of those tools that you have to
  3203. 2:19:46have. And all you need to do to set this
  3204. 2:19:49up is just opening up a new instance and
  3205. 2:19:52just ask cloud to you know install it
  3206. 2:19:55for you for your machine. So just go
  3207. 2:19:58here and say can you please install
  3208. 2:20:01contact 7 in my machine. So I want to
  3209. 2:20:04have it for every single project
  3210. 2:20:07and then you will just send it. That
  3211. 2:20:10would set that up. I already have it.
  3212. 2:20:12Now, this is a like this is one of these
  3213. 2:20:15tools that you have to know. So, I'll
  3214. 2:20:17just show you that pretty quickly. Okay.
  3215. 2:20:19So, here you can tell we have the
  3216. 2:20:20documentation for every single thing.
  3217. 2:20:23Basically, let's just search for image
  3218. 2:20:25kit.
  3219. 2:20:26Here you can tell we have everything up
  3220. 2:20:29to date and our AI tool will be able to
  3221. 2:20:32check this out and get the latest
  3222. 2:20:34information. Okay, so with that said,
  3223. 2:20:37let's send it and see what we're going
  3224. 2:20:39to get back. So, here we go. This has
  3225. 2:20:42been implemented. We are able to see the
  3226. 2:20:44scans that we already had. Now there is
  3227. 2:20:47one thing that I don't really like which
  3228. 2:20:49is the not food option. So if you know
  3229. 2:20:53if we have something that is not food
  3230. 2:20:55just like in this case then we don't
  3231. 2:20:57really want to see it in today's meals
  3232. 2:21:00and there's also like not extra space. I
  3233. 2:21:03need to fix that. So let's try to
  3234. 2:21:05explain this. So, under the today's
  3235. 2:21:08meals section, when we have something
  3236. 2:21:10that is not food, just don't display it
  3237. 2:21:14in that section or even like maybe don't
  3238. 2:21:16store it in the database. So, we don't
  3239. 2:21:18really get it under this section. Also,
  3240. 2:21:21just give some extra spacing or extra
  3241. 2:21:24padding from the bottom so the native
  3242. 2:21:27tabs are not really overlapping with
  3243. 2:21:30these meals.
  3244. 2:21:33All right. So this has also been
  3245. 2:21:34implemented. As you can tell, we have
  3246. 2:21:36extra space and the not food options are
  3247. 2:21:40gone. So with this, I think I'm going to
  3248. 2:21:42leave this section right here. In the
  3249. 2:21:44incoming sections, we can add more
  3250. 2:21:46optimizations and you know, we can test
  3251. 2:21:48this out more just to see what we are
  3252. 2:21:51missing and what what else we can add on
  3253. 2:21:54top of it. Then I think in the incoming
  3254. 2:21:56sections, we can also get into the
  3255. 2:21:58profile screen. So for now, I think I'm
  3256. 2:22:00going to maximize the screen. Let's
  3257. 2:22:03close everything
  3258. 2:22:06and then I'm going to stage everything
  3259. 2:22:08that we have so far.
  3260. 2:22:12Wait, I think they're already staged.
  3261. 2:22:14Um,
  3262. 2:22:16I'm going to stage these as well.
  3263. 2:22:20And let's get a commit message. Then
  3264. 2:22:22we're going to commit then sync this up.
  3265. 2:22:30All right. So with this hopefully I'll
  3266. 2:22:32see you in the next lesson.
  3267. 2:22:34All right. So this is where we left. Now
  3268. 2:22:36before we get started with the profile
  3269. 2:22:38screen, there is a problem that we need
  3270. 2:22:40to talk about and thankfully there is a
  3271. 2:22:42solution that we can implement. Now the
  3272. 2:22:45problem here is that even if you like it
  3273. 2:22:47or don't like it, your users will get
  3274. 2:22:50some errors. You might be thinking that
  3275. 2:22:52I have implemented everything in the
  3276. 2:22:54best way possible, they are not going to
  3277. 2:22:56get errors. Well, unfortunately this is
  3278. 2:22:58not how they work. This is real world
  3279. 2:23:01programming and a real mobile
  3280. 2:23:03application. So, they're going to get
  3281. 2:23:05some errors, which is fine. But what you
  3282. 2:23:08would like to do as the solution here is
  3283. 2:23:11setting up a tool that will always watch
  3284. 2:23:14your users, right? Watch your
  3285. 2:23:16application. And anytime they get an
  3286. 2:23:19error, you'll be notified in real time.
  3287. 2:23:21And this real-time notification could be
  3288. 2:23:24via Slack, Gmail, or anything that you
  3289. 2:23:27would like to set up. Now the tool that
  3290. 2:23:29we're going to be using here is of
  3291. 2:23:31course going to be sentry and here is
  3292. 2:23:33kind of like the diagram that I have
  3293. 2:23:36provided and you know I just want to
  3294. 2:23:38walk you through it. Okay. So again what
  3295. 2:23:40happens when your users face some
  3296. 2:23:43errors? Well they will definitely not
  3297. 2:23:45send you an email. They'll just delete
  3298. 2:23:48the application leave a one-star review
  3299. 2:23:51probably with a very bad comment. And
  3300. 2:23:55you know when they got some errors, if
  3301. 2:23:56you're not using Sentry, you have no
  3302. 2:23:58idea what broke for whom or why. But if
  3303. 2:24:03you have Sentry set it up, which is
  3304. 2:24:05going to, you know, watch your
  3305. 2:24:06application. This is literally kind of
  3306. 2:24:08like a watch tower. And then it's going
  3307. 2:24:11to catch the errors. It's going to show
  3308. 2:24:13you the session replays, which means
  3309. 2:24:15basically it's going to record the
  3310. 2:24:17screen when the error happens, right? So
  3311. 2:24:20that you can see how your users are
  3312. 2:24:22using the app and you know like what
  3313. 2:24:26time error happens when they press this
  3314. 2:24:28button or that one or that one so on and
  3315. 2:24:31so forth and then you can get the
  3316. 2:24:33performance tracking as well. There are
  3317. 2:24:35like traces and bottlenecks you can set
  3318. 2:24:38up structured logs which is something
  3319. 2:24:40that will be done and as I said you'll
  3320. 2:24:42get realtime alerts. So, this is
  3321. 2:24:45definitely something that you'd like to
  3322. 2:24:47set up no matter what happens because
  3323. 2:24:49otherwise there is no way for you to
  3324. 2:24:51know if your users are getting errors or
  3325. 2:24:54not. You will just learn it the hard way
  3326. 2:24:56from the reviews. Now, with that said,
  3327. 2:24:59there is something else that I want to
  3328. 2:25:00talk about. Instead of using only
  3329. 2:25:02console logs, we have sentry logs. Here,
  3330. 2:25:05I put kind of like a comparison. You can
  3331. 2:25:08pause the video and read it and I'll
  3332. 2:25:10just try to walk you through it pretty
  3333. 2:25:11quickly. So, console.log log is super
  3334. 2:25:14simple. It just lives on the user's
  3335. 2:25:16device. It's going to disappear when the
  3336. 2:25:19application closes, right? But Sentry
  3337. 2:25:21logs are persistent and searchable and
  3338. 2:25:24they send to Sentry's servers. So from
  3339. 2:25:27the Sentry dashboard, you'll be able to
  3340. 2:25:29actually see the logs and this is
  3341. 2:25:31something that we'll get into a bit
  3342. 2:25:34later in the video. And then you know
  3343. 2:25:36this is plain text, but this is
  3344. 2:25:38structured. You can literally query it
  3345. 2:25:41with any kind of tag. Then this has no
  3346. 2:25:43connection to errors but this is linked
  3347. 2:25:46to traces errors and session replace. So
  3348. 2:25:49instead of guessing you will literally
  3349. 2:25:50just see what is going on from the
  3350. 2:25:52sentry locks.
  3351. 2:25:55And here I have kind of like a real
  3352. 2:25:57world scenario. This is something that I
  3353. 2:25:59use in almost every single one of my
  3354. 2:26:01tutorial because it explains the
  3355. 2:26:04situation. So just think you know like
  3356. 2:26:07imagine you have 50,000 users and you
  3357. 2:26:10have an e-commerce application and let's
  3358. 2:26:13say you're getting around like 500
  3359. 2:26:15checkouts a day and some of them will
  3360. 2:26:17fail even if you like it or don't like
  3361. 2:26:19it. Some of them will fail. That could
  3362. 2:26:22be you know because of your Stripe setup
  3363. 2:26:25is incorrect or I don't know your users
  3364. 2:26:28don't really have enough credits in
  3365. 2:26:30their card so on and so forth. So if you
  3366. 2:26:32use sentry logs you can just go ahead
  3367. 2:26:34and add all these type of queries you
  3368. 2:26:37know you can just search for the users
  3369. 2:26:39in LA in the last 24 hours but with
  3370. 2:26:42console log unfortunately this is not
  3371. 2:26:45possible all right so I hope this gives
  3372. 2:26:47you kind of like an overview of sentry
  3373. 2:26:49it is much more than this they actually
  3374. 2:26:52have a code reviewing tool called seir
  3375. 2:26:55and we'll get into that in a couple of
  3376. 2:26:57minutes as well and just to mention like
  3377. 2:27:00some of the best companies companies out
  3378. 2:27:02there. The biggest ones are using
  3379. 2:27:04Sentry. So, it's definitely something
  3380. 2:27:06that you would like to learn both for
  3381. 2:27:08your job and, you know, for your own
  3382. 2:27:10projects if you would like to deploy an
  3383. 2:27:13app to the App Store. Okay, so with that
  3384. 2:27:16said, let's go into Sentry. I think we
  3385. 2:27:18already signed up early in the video.
  3386. 2:27:21Now, let's go ahead and create a new
  3387. 2:27:23project. Let me just see where I can
  3388. 2:27:26create it. So I already have bunch of
  3389. 2:27:28different projects, but if you're using
  3390. 2:27:30it for the first time in the dashboard,
  3391. 2:27:32you will probably see a button that says
  3392. 2:27:34create project. So I'm going to go ahead
  3393. 2:27:37and press this. We would like to uh we'd
  3394. 2:27:40like to select React Native as our
  3395. 2:27:42platform. Then here you can customize
  3396. 2:27:44the alert frequency. Like there are a
  3397. 2:27:46bunch of different options. I'll just
  3398. 2:27:48leave everything on default. Let's give
  3399. 2:27:50it a name for the project slug. I'll
  3400. 2:27:52just say Kell AI
  3401. 2:27:55tutorial maybe like this.
  3402. 2:27:59This is my team. If you have, you know,
  3403. 2:28:01if you're working with a team, you can
  3404. 2:28:03add your own team, so on and so forth.
  3405. 2:28:05But in this case, I'll just leave it as
  3406. 2:28:06it is. And then you can set this up in
  3407. 2:28:09Slack, Discord, and Microsoft Teams. Um,
  3408. 2:28:13I don't know who used that, but that's
  3409. 2:28:15fine. By default, it is already
  3410. 2:28:18integrated with Gmail. So anytime
  3411. 2:28:21something fails you will get an email
  3412. 2:28:23from from Sentry. Okay. Now I'll just
  3413. 2:28:27say create the project. There is
  3414. 2:28:29something called Sentry wizard which is
  3415. 2:28:31like the CLI tool that they have. All
  3416. 2:28:34you need to do is copying this and
  3417. 2:28:37pasting it to the terminal. And I think
  3418. 2:28:40like you can copy the instructions as
  3419. 2:28:42well for your LLM.
  3420. 2:28:44Um yeah actually this is what I'll be
  3421. 2:28:47doing. I'll just copy it and I'll just
  3422. 2:28:49ask cloud to implement it for me because
  3423. 2:28:52that's why they put this option, right?
  3424. 2:28:55So, I'm going to go ahead paste this in
  3425. 2:28:57and at the very top, let me just add my
  3426. 2:28:59prompt. So, this is the entire
  3427. 2:29:02instructions or kind of like the
  3428. 2:29:04documentation I got from Sentry. Go
  3429. 2:29:07ahead, follow it and set this up in this
  3430. 2:29:10project.
  3431. 2:29:13Now once this is set it up, we need to
  3432. 2:29:16rebuild our application because we're
  3433. 2:29:18going to install I mean this is going to
  3434. 2:29:20install some native modules and as I
  3435. 2:29:23said previously anytime you install a
  3436. 2:29:26new native module you need to rebuild
  3437. 2:29:28your application. So here we go. This
  3438. 2:29:31has been set it up but as I said we need
  3439. 2:29:33to rebuild the dev client because this
  3440. 2:29:36adds a new native module right. So I'll
  3441. 2:29:39open up my terminal. Let's kill the expo
  3442. 2:29:42terminal. I'm going to clear this up.
  3443. 2:29:44I'm going to say mpx expo run iOS. Now,
  3444. 2:29:48while this is building, we can take a
  3445. 2:29:50look at the code like what happened? How
  3446. 2:29:53did this um you know how how did we got
  3447. 2:29:56the initialization. So basically we are
  3448. 2:29:59getting the sentry SDK. So it is right
  3449. 2:30:02here from React Native. Then we have the
  3450. 2:30:05DSN which is like the connection string
  3451. 2:30:07that connects us to this project that we
  3452. 2:30:10just created. Then a couple of different
  3453. 2:30:13options. Now here for the integrations
  3454. 2:30:15we already have the session replay. This
  3455. 2:30:18is going to take the screenshots or
  3456. 2:30:21actually screen recordings anytime there
  3457. 2:30:24is an error happening in your app. So
  3458. 2:30:27you can take a look at it from the
  3459. 2:30:29Sentry dashboard and we'll actually get
  3460. 2:30:31into it in a second. But here I think I
  3461. 2:30:34want to add some options. By default,
  3462. 2:30:36Sentry sensors everything for privacy.
  3463. 2:30:39But since we are in development, I think
  3464. 2:30:41we can turn this off. So there is like
  3465. 2:30:44mask options. I'm going to say uh mask
  3466. 2:30:48all images. I think I'm just going to
  3467. 2:30:50say false. By default, it's equal to
  3468. 2:30:52true. And then I'll do the same thing
  3469. 2:30:54for text
  3470. 2:30:57and for the vectors.
  3471. 2:31:00Okay. So we can save this and for logs
  3472. 2:31:04here you can tell we just say enable
  3473. 2:31:06them that's equal to true and that would
  3474. 2:31:09be enough. Now other than this if you
  3475. 2:31:11take a look at the cloud it says you
  3476. 2:31:14need to get the oath token for the
  3477. 2:31:16source source map uploads um it's pretty
  3478. 2:31:20easy. All you need to do visiting the
  3479. 2:31:22dashboard under the search just search
  3480. 2:31:24for the organization tokens. So from the
  3481. 2:31:28settings, it'll take you to the screen
  3482. 2:31:30and let's create a new one. For the
  3483. 2:31:33name, I'll just say kei
  3484. 2:31:36token.
  3485. 2:31:38I'll say create a token and then we'll
  3486. 2:31:40copy it and then we'll just paste it
  3487. 2:31:43under the env.
  3488. 2:31:46So here I'll go ahead.
  3489. 2:31:48Let me maximize the screen. This is the
  3490. 2:31:51value and the key is going to be this
  3491. 2:31:54one.
  3492. 2:31:58So with this go ahead and save this
  3493. 2:32:00file. Then here you can tell my
  3494. 2:32:03application has been restarted and we
  3495. 2:32:05got the session replay setup. I think
  3496. 2:32:08now everything is fine to test out. So I
  3497. 2:32:12think I'll just ask cloud to add a
  3498. 2:32:14button. So I'll just say add a test
  3499. 2:32:17button in the home screen. Let me just
  3500. 2:32:20talk to it.
  3501. 2:32:22Now I just want to test out if
  3502. 2:32:24everything will work for Sentry. I want
  3503. 2:32:27you to add a test button in the home
  3504. 2:32:29screen where I can just press and throw
  3505. 2:32:32an error just to check if Sentry is
  3506. 2:32:35working and then we'll delete this
  3507. 2:32:37button.
  3508. 2:32:39So here we go. We just got the button.
  3509. 2:32:41I'll go ahead and press that. It throws
  3510. 2:32:44an error. Let's go into our dashboards
  3511. 2:32:47under the issues. Just reload and make
  3512. 2:32:50sure that you select the actual project.
  3513. 2:32:53So in this case I have bunch of but this
  3514. 2:32:55is the one selected. I'll just try to
  3515. 2:32:58reload once again. And here you can tell
  3516. 2:33:0020 seconds ago we just got this error.
  3517. 2:33:03Let's go ahead and take a look at the
  3518. 2:33:04details. And basically from this
  3519. 2:33:06dashboard you can get access to every
  3520. 2:33:08single detail about this error. You know
  3521. 2:33:11the device, the operating system. We
  3522. 2:33:13have trace ID which is something that
  3523. 2:33:15we'll get into in a second. We have the
  3524. 2:33:17part of the code that caused you know
  3525. 2:33:20that was the reason for this error and
  3526. 2:33:23then we have the session replay like
  3527. 2:33:25here this is literally a video recording
  3528. 2:33:28of that exact moment like when user
  3529. 2:33:31press this button that's when this error
  3530. 2:33:34happened and this is not only that you
  3531. 2:33:36can scroll to the bottom and see all
  3532. 2:33:38kinds of details and here I'll just let
  3533. 2:33:41you let you to explore the dashboard
  3534. 2:33:43there is one tool that I called
  3535. 2:33:46previously ly like this is the sear
  3536. 2:33:49which is basically a code reviewing and
  3537. 2:33:52autofixing tool. So here you would give
  3538. 2:33:55access to the repository and then it
  3539. 2:33:57would basically take a look at the
  3540. 2:34:00entire error context right it would see
  3541. 2:34:03the code block why this is happening
  3542. 2:34:05take a look at the session replay and
  3543. 2:34:07then add a full fix I think we can get
  3544. 2:34:10into it in a couple of minutes but first
  3545. 2:34:13that was just for testing purposes what
  3546. 2:34:15I'll be doing I'll just ask cloud to
  3547. 2:34:17remove this button I'll just say okay it
  3548. 2:34:20works remove that test button.
  3549. 2:34:26So this will delete the button and
  3550. 2:34:28instead what we would like to implement
  3551. 2:34:30is going to be sentry locks. So here
  3552. 2:34:33again they have the entire page where we
  3553. 2:34:35can copy it with this button and paste
  3554. 2:34:37it to our LLM. Right. And I think they
  3555. 2:34:40have the copy prompt as well.
  3556. 2:34:44Yeah, I think I'll just copy this one
  3557. 2:34:46instead of copying the entire page in
  3558. 2:34:48here. Basically we would like to enable
  3559. 2:34:50it. This is something that we have
  3560. 2:34:52already done with this option. Then
  3561. 2:34:54there are a couple of different options
  3562. 2:34:56for logging. So we have error info, we
  3563. 2:34:59have warning, debug, trace. There is
  3564. 2:35:02something called fatill as well. So this
  3565. 2:35:05would be something that you would like
  3566. 2:35:07to use you know when something is really
  3567. 2:35:10really important for you to know like
  3568. 2:35:11when the database doesn't connect or
  3569. 2:35:14something similar. So you can take a
  3570. 2:35:16look at the entire documentation but you
  3571. 2:35:18know as of 2026 I think it's just
  3572. 2:35:21important to understand what the feature
  3573. 2:35:24is and how that work. The code
  3574. 2:35:26implementation is something that we
  3575. 2:35:29don't really get into that that much. So
  3576. 2:35:32with that said I'll go ahead and say now
  3577. 2:35:35I will paste the documentation of sentry
  3578. 2:35:38logs and I want you to implement it in
  3579. 2:35:40this project. We already enabled this
  3580. 2:35:43under the root layout file. So all you
  3581. 2:35:46need to do is finding proper use cases
  3582. 2:35:49to include the sentry logs.
  3583. 2:35:53Okay. So with this I'm going to paste
  3584. 2:35:55this thing right here. Um wait is this
  3585. 2:35:59enough? It says use curl to download
  3586. 2:36:01read and follow.
  3587. 2:36:04Yeah I think this should be enough
  3588. 2:36:06because
  3589. 2:36:08this will get the sentry skills I
  3590. 2:36:10believe. Now I just pause the video and
  3591. 2:36:12think of it for a second. I think this
  3592. 2:36:14is for initializing the sentry like
  3593. 2:36:17setting this up. We already set that up.
  3594. 2:36:19So instead I'll just copy this entire
  3595. 2:36:21page and I'm going to delete this part
  3596. 2:36:25and I'll paste this one. All right. So
  3597. 2:36:28cloud is done with it and we have six
  3598. 2:36:30different places where we are using
  3599. 2:36:32sentry logs. So the very first one is
  3600. 2:36:35when the onboarding plan generated.
  3601. 2:36:38Let's go ahead and take a look at it. It
  3602. 2:36:40is under the API.ts.
  3603. 2:36:42Now depending on the formula, we will
  3604. 2:36:44either get the warning or the info as
  3605. 2:36:47the logger, right? Depending on the plan
  3606. 2:36:50source. And here you can tell we are
  3607. 2:36:52adding some tags which will make it to
  3608. 2:36:54be queryable and you know searchable
  3609. 2:36:58from the sentry dashboard. So you can
  3610. 2:37:01always go right here under the project
  3611. 2:37:04and we will find the logs. I think we
  3612. 2:37:07can get into it a little bit later in
  3613. 2:37:09the video because at the time we don't
  3614. 2:37:11really have any logs but you know if you
  3615. 2:37:14imagine that you have a user base let's
  3616. 2:37:17say like 100 users then this part will
  3617. 2:37:21be really really helpful.
  3618. 2:37:24Okay let's see what other logs we have
  3619. 2:37:27when the onboarding is completed
  3620. 2:37:31which is right here. As you can tell,
  3621. 2:37:33this is just an information um you
  3622. 2:37:36knowformational log. But if something
  3623. 2:37:38fails, of course, we'll have it as an
  3624. 2:37:41error log and we have the reason so that
  3625. 2:37:44we can take a look at it and immediately
  3626. 2:37:46jump into our codebase and fix the
  3627. 2:37:49issues. Then we have for I think when
  3628. 2:37:52the profile save failed. Yeah, which is
  3629. 2:37:55this one. Then what else? When the meal
  3630. 2:37:58upload failed. I think this is one of
  3631. 2:38:00the most important use cases. And then
  3632. 2:38:02another one we have is under the
  3633. 2:38:04camera.tsx. Let's take a look at it.
  3634. 2:38:09So I think it is this one here. We can
  3635. 2:38:11tell depending on the outcome, we either
  3636. 2:38:13have an info or warning. Okay. So that's
  3637. 2:38:16the syntax. I think like you don't
  3638. 2:38:19really need to memorize it at all. Just
  3639. 2:38:21know what central logs are all about and
  3640. 2:38:24the implementation is like really
  3641. 2:38:27unnecessary at this point. So with that
  3642. 2:38:30said, I think for now we are done with
  3643. 2:38:33the logs. I'd like to keep this section
  3644. 2:38:36as it is. Um in the next section we can
  3645. 2:38:39get started with the profile screen. So
  3646. 2:38:41with that said on top of logs let's go
  3647. 2:38:44ahead and implement sentry tracing. Now
  3648. 2:38:46before we try to implement it let's ask
  3649. 2:38:48the question what is tracing in the
  3650. 2:38:51first place? So tracing involves
  3651. 2:38:53capturing the timing and flow of
  3652. 2:38:55requests and operations as they happen
  3653. 2:38:58in your application. This powerful
  3654. 2:39:00debugging tool helps you identify which
  3655. 2:39:03link in a sequence of events may be
  3656. 2:39:05causing a problem such as slow
  3657. 2:39:08performance. So that's tracing in simple
  3658. 2:39:12terms. Here is a self-explanatory image
  3659. 2:39:15as well. Now let's go into the React
  3660. 2:39:17Native documentation specifically and
  3661. 2:39:20copy this entire page. Paste it into
  3662. 2:39:23cloud. Again, if you want to implement
  3663. 2:39:25it, I think you just need to add this
  3664. 2:39:27option first and then you just need to
  3665. 2:39:30wrap your application with sentry.
  3666. 2:39:34And this is something that cloud can do
  3667. 2:39:36for us. So here we just need to go and
  3668. 2:39:39paste the documentation. And before that
  3669. 2:39:42or actually after this I'll say
  3670. 2:39:46I have just pasted the documentation for
  3671. 2:39:49sentry tracing. Please go ahead and
  3672. 2:39:52implement this in my codebase in a
  3673. 2:39:55simple in a simple way.
  3674. 2:40:00So while cloud is implementing once
  3675. 2:40:03again with tracing sentry will track our
  3676. 2:40:06software performance measuring metrics
  3677. 2:40:08like throughput and latency and it's
  3678. 2:40:11going to display the impact of errors
  3679. 2:40:13across multiple systems. All right. So
  3680. 2:40:16this has also been set up. Now the more
  3681. 2:40:19we use this app the more data we're
  3682. 2:40:21going to see on the sentry dashboard. So
  3683. 2:40:24at this point all we need to do is using
  3684. 2:40:26the app making some more logs you know
  3685. 2:40:29some more errors so that we can see them
  3686. 2:40:31on the sentry dashboard. Okay. So with
  3687. 2:40:34that said I think we can get into the
  3688. 2:40:36profile screen. Now everything is fine
  3689. 2:40:39but I just don't really like the UI and
  3690. 2:40:42here I have a file under the design. So,
  3691. 2:40:46I got this screenshot from Cali and I'll
  3692. 2:40:49just ask cloud to kind of like get
  3693. 2:40:52inspired by it. And under the profile
  3694. 2:40:56screen, I think we need to have some
  3695. 2:40:58must-h have links such as the privacy,
  3696. 2:41:02you know, privacy policy and terms of
  3697. 2:41:05services. Other than that, we need to
  3698. 2:41:07have the log out button and delete your
  3699. 2:41:11account button. Now if you don't have
  3700. 2:41:13the delete your account button then your
  3701. 2:41:15application will be rejected by Apple
  3702. 2:41:18because you are storing the user data
  3703. 2:41:20right we have authentication so we have
  3704. 2:41:23to have delete your account option
  3705. 2:41:25that's one thing that you should keep in
  3706. 2:41:27mind the other one is having the privacy
  3707. 2:41:30policy and terms of services because
  3708. 2:41:33when you want to publish your app to the
  3709. 2:41:36app store in their dashboard they ask
  3710. 2:41:38you to provide a link for your privacy
  3711. 2:41:42policy and it has to be deployed on
  3712. 2:41:45somewhere. Now it could be as simple as
  3713. 2:41:48you know like a Versel you know like a
  3714. 2:41:50Versel URL or Netlfy you don't really
  3715. 2:41:53need to buy a com URL so you don't need
  3716. 2:41:56to pay but just have something that is
  3717. 2:41:58up and running and for this later in the
  3718. 2:42:01video we'll be using Cloudflare I'll
  3719. 2:42:03show you how to set that up but yeah
  3720. 2:42:06with this in mind let's go ahead and
  3721. 2:42:08talk with Cloud here I'll open up a new
  3722. 2:42:11instance and then I'll just say let me
  3723. 2:42:14first attach this file it is called
  3724. 2:42:17settings screen design.png png. And just
  3725. 2:42:21before I start talking with clot here,
  3726. 2:42:23I'll just say remove the invite friends
  3727. 2:42:26button. We don't really want to have
  3728. 2:42:28this feature, but I'm just going to
  3729. 2:42:29leave everything that we have under the
  3730. 2:42:31accounts. Even though most of them are
  3731. 2:42:34not going to work, I just want to have
  3732. 2:42:35this clean UI. And then for goals and
  3733. 2:42:38tracking, I think we can leave the rest
  3734. 2:42:40as well. On top of it, I'll ask a couple
  3735. 2:42:42of different fields.
  3736. 2:42:45Okay. So now I want you to build me the
  3737. 2:42:47profile screen. I mean, we already have
  3738. 2:42:49the profile screen, but I don't really
  3739. 2:42:51like the current UI that we have. So,
  3740. 2:42:54take a look at this attached image that
  3741. 2:42:56I just provided, and I want you to get
  3742. 2:42:59inspired by it and build the similar
  3743. 2:43:02style and similar content for this
  3744. 2:43:05profile screen. I want you to remove the
  3745. 2:43:08invite friends section, but add the rest
  3746. 2:43:11of it, like the account, goals, and
  3747. 2:43:13tracking. And at the very bottom, add a
  3748. 2:43:17button that says delete your account and
  3749. 2:43:19also have some links to privacy policy,
  3750. 2:43:23terms of services. So yeah, that's my
  3751. 2:43:26entire prompt. Um, at the end, I had to
  3752. 2:43:29cut the video, but here we go. Now, I'll
  3753. 2:43:31just go ahead and run this. Let's see
  3754. 2:43:34what it's going to come back with. If
  3755. 2:43:36there is anything that we don't really
  3756. 2:43:38like, we can always follow up. All
  3757. 2:43:40right, so this is what we got back. I
  3758. 2:43:41think it looks pretty crisp and clean,
  3759. 2:43:44but there are a couple of different
  3760. 2:43:45details that I'd like to fix. So, first
  3761. 2:43:47off, the sign up button should be
  3762. 2:43:49somewhere at the very bottom. And also,
  3763. 2:43:52I think this component is kind of like
  3764. 2:43:54unnecessary because we have this right
  3765. 2:43:57here in the home screen. So, I'll go
  3766. 2:44:00ahead and try to explain this to Cloud.
  3767. 2:44:03So, overall, I like the vibe of this
  3768. 2:44:06screen, but I want you to put the sign
  3769. 2:44:09up button at the very bottom of the
  3770. 2:44:12screen. Maybe like just above the delete
  3771. 2:44:14your account button. And also get rid of
  3772. 2:44:18the calls and tracking section. We don't
  3773. 2:44:20really want to see these values under
  3774. 2:44:22the profile screen because we already
  3775. 2:44:25have them under the home.
  3776. 2:44:28So, this is the updated result, but I
  3777. 2:44:31think I'll just ask it to add some more
  3778. 2:44:34fields like the personal details. I
  3779. 2:44:36don't know this entire thing, even
  3780. 2:44:38though they're not going to work. I just
  3781. 2:44:40want to add them so it doesn't really
  3782. 2:44:41look too empty.
  3783. 2:44:44All right. So, overall, I like the
  3784. 2:44:46profile screen, but just like under the
  3785. 2:44:49settings screen, design.png, png. I want
  3786. 2:44:52you to have the section with the
  3787. 2:44:54personal details, preferences, language,
  3788. 2:44:57and upgrade to family plan buttons. Even
  3789. 2:45:01though they're not going to do anything,
  3790. 2:45:03just have them for UI purposes.
  3791. 2:45:08All right, so this is what we got and I
  3792. 2:45:10think it looks pretty clean. Now when
  3793. 2:45:12you press the privacy policy it will
  3794. 2:45:14open up an example link which is
  3795. 2:45:17something that we will fix a bit later
  3796. 2:45:19in the video maybe in the next section.
  3797. 2:45:22Now here when we press this button I'll
  3798. 2:45:24just say you know uh go ahead and make
  3799. 2:45:27sure that the data of the user deleted
  3800. 2:45:30both from clerk and our database and I
  3801. 2:45:34will also say that it should ask for a
  3802. 2:45:36confirmation message.
  3803. 2:45:41Okay, so with this let's go ahead and
  3804. 2:45:43send it. Then it should be implemented
  3805. 2:45:45pretty quickly. All right, so this has
  3806. 2:45:47also been implemented. Basically, we can
  3807. 2:45:49delete the account just by calling our
  3808. 2:45:52API endpoint. It will delete the user
  3809. 2:45:54from both database and from the cleric
  3810. 2:45:57dashboard. Now here, notice how we don't
  3811. 2:46:00really have extra spacing at the bottom.
  3812. 2:46:02So I'll just say go ahead and add some
  3813. 2:46:04pettings
  3814. 2:46:06under the profile screen. Just add some
  3815. 2:46:08pettings from the bottom. So the text at
  3816. 2:46:11the very end is not really overlapping
  3817. 2:46:14with the with the tab bar.
  3818. 2:46:19All right. Now, as you can tell, we have
  3819. 2:46:21this extra spacing. Now, we can go ahead
  3820. 2:46:24and test this out where we will delete
  3821. 2:46:26the account and we'll check if the data
  3822. 2:46:28is deleted both from clerk and database.
  3823. 2:46:32Now, just before I test this out, I'd
  3824. 2:46:34like to follow up one more time because
  3825. 2:46:36we would like to delete not only the
  3826. 2:46:38user account, but we also want to delete
  3827. 2:46:41the meals, right? Anything that is
  3828. 2:46:44related to this user should be deleted.
  3829. 2:46:47Also, the images that we have under the
  3830. 2:46:49image kit. So, if you go under the media
  3831. 2:46:52library, you're going to see that you
  3832. 2:46:54have a meals folder. So, these are the
  3833. 2:46:56things that I have uploaded in the past,
  3834. 2:46:58but this is coming from this project.
  3835. 2:47:01And under this folder you will see that
  3836. 2:47:03we have couple of different images right
  3837. 2:47:05these are the ones that I have uploaded.
  3838. 2:47:08So if the user account is deleted we
  3839. 2:47:11would like to delete these images as
  3840. 2:47:13well because otherwise they would occupy
  3841. 2:47:16storage for no reason. So I'll just
  3842. 2:47:19follow up one more time and then we'll
  3843. 2:47:21test this out. So here I'm just
  3844. 2:47:23following up pretty quickly just to make
  3845. 2:47:25sure that every single data for this
  3846. 2:47:28user will be deleted once they delete
  3847. 2:47:30their account. So this would be the
  3848. 2:47:32clerk user, it would be the user from
  3849. 2:47:35database, the meals that this user
  3850. 2:47:38generated, you know, the images in image
  3851. 2:47:40kit, literally everything that is rel
  3852. 2:47:43that is related to this user account.
  3853. 2:47:48All right, so looks like cloud has
  3854. 2:47:49double checked. Now, let's go ahead and
  3855. 2:47:51test this out manually. I'll say delete
  3856. 2:47:53the account. If you say cancel, nothing
  3857. 2:47:55happens. But if you say delete, we
  3858. 2:47:57should be logged out in a second.
  3859. 2:48:02Here we go. Now, we'll go back to
  3860. 2:48:04database. We don't have the user. We
  3861. 2:48:07don't have the meals. Let's go into
  3862. 2:48:09clerk dashboard. If I reload, we will
  3863. 2:48:12not have the user neither, right? Then
  3864. 2:48:15if we go under the meals, I think these
  3865. 2:48:18are the images that this user uploaded.
  3866. 2:48:21So these are the ones that I have
  3867. 2:48:22uploaded in the past. But these three
  3868. 2:48:25should be deleted. That's what I
  3869. 2:48:26believe. Okay. Here we can tell those
  3870. 2:48:29images are gone and these are the ones
  3871. 2:48:31that I have uploaded in the past. It has
  3872. 2:48:34nothing to do with the previous session.
  3873. 2:48:37All right. So with that overall
  3874. 2:48:39everything is working as expected. I
  3875. 2:48:41think from the welcome screen I'll just
  3876. 2:48:44get rid of this text. I think it just
  3877. 2:48:47looks too much.
  3878. 2:48:49So here I'll search for it. It is called
  3879. 2:48:52scan meals. Yeah, it is this one.
  3880. 2:48:58So I'll just get rid of this text
  3881. 2:49:00completely.
  3882. 2:49:01I think this now looks way more cleaner
  3883. 2:49:04than what we had previously. Okay. Okay.
  3884. 2:49:07So with this let's try to sign in once
  3885. 2:49:09again with with that previous account.
  3886. 2:49:15So basically we are signing up now and
  3887. 2:49:18then this should immediately take us to
  3888. 2:49:20the onboarding screen instead of the
  3889. 2:49:22home screen.
  3890. 2:49:26Okay, here we go. I'll go ahead and fill
  3891. 2:49:28this in.
  3892. 2:49:31So, I just pretty quickly went through
  3893. 2:49:33every single question and now this is
  3894. 2:49:36going to build the plan in the
  3895. 2:49:37background
  3896. 2:49:39and then hopefully we should be able to
  3897. 2:49:41have it.
  3898. 2:49:43Here we go. Now, this will be saved. And
  3899. 2:49:46by the way, I think this UI was
  3900. 2:49:48something that we talked about in the
  3901. 2:49:50past. It was broken, but now it is
  3902. 2:49:52working as expected, right? We have
  3903. 2:49:54proper spacing. Um, yeah, I think I
  3904. 2:49:58think it looks clean. I'll just say
  3905. 2:50:00continue. And this data should be saved
  3906. 2:50:03to the current account. Here we go. It's
  3907. 2:50:06the same values that we have just seen.
  3908. 2:50:09All right. So, overall, everything works
  3909. 2:50:11as expected in this section. I'm pretty
  3910. 2:50:13happy with what we have so far. So, I'll
  3911. 2:50:16leave the section right here. I'll close
  3912. 2:50:18everything. Let's go ahead and stage all
  3913. 2:50:21of our changes. Get a commit message.
  3914. 2:50:24and then we're going to push this. So
  3915. 2:50:26this is the commit message that we got
  3916. 2:50:28from AI. I'll go ahead and commit. Then
  3917. 2:50:30I'll say you know sync up the changes.
  3918. 2:50:33All right. So with this in this section
  3919. 2:50:35we have built entire profile screen. We
  3920. 2:50:38have implemented the delete your account
  3921. 2:50:40functionality and we have learned that
  3922. 2:50:43you know you have to have those buttons
  3923. 2:50:45which is for privacy policy and terms of
  3924. 2:50:48services. In the incoming sections, we
  3925. 2:50:50are going to build an actual legal page
  3926. 2:50:53and we are going to link it to those
  3927. 2:50:56links. And other than that, we have set
  3928. 2:50:59up Sentry with logs and tracing. And we
  3929. 2:51:02learned why you should use Sentry in the
  3930. 2:51:05first place. All right. So, with that
  3931. 2:51:07said, hopefully I'll see you in the next
  3932. 2:51:08lesson.
  3933. 2:51:10All right. So, this is where we left. To
  3934. 2:51:12be honest, we are pretty much done with
  3935. 2:51:14the entire application. like we have the
  3936. 2:51:16basics working in the first place but we
  3937. 2:51:19can add some additional features and
  3938. 2:51:21some optimizations. For example, for
  3939. 2:51:24this calendar we can add the feature
  3940. 2:51:26where we can scroll through it and go
  3941. 2:51:29you know two weeks previously right. um
  3942. 2:51:33or when you press it should be able to
  3943. 2:51:35show you this entire day and I think it
  3944. 2:51:37is already doing that but yeah like all
  3945. 2:51:40we need to do is just adding some
  3946. 2:51:42optimizations and one of the
  3947. 2:51:44optimizations that I'd like to add is
  3948. 2:51:46going to be related to scaling the image
  3949. 2:51:49when we scan a meal we would like to
  3950. 2:51:52downscale it and then send it AI so that
  3951. 2:51:55we don't really use extra credits so
  3952. 2:51:58here I'll go ahead and have a prompt
  3953. 2:52:00like this one I'll say downscale the
  3954. 2:52:02photo before sending it to the vision
  3955. 2:52:05model when we scan the food. And here
  3956. 2:52:10I'll say oops I've accidentally pressed
  3957. 2:52:12enter. So I'm going to pause this
  3958. 2:52:16and then I'll say I'll let me just talk
  3959. 2:52:20with cloud. So here I'll just paste the
  3960. 2:52:23documentation of image kit. You can take
  3961. 2:52:26a look at it take it as a reference and
  3962. 2:52:29then go ahead implement that.
  3963. 2:52:34Okay. So, I'll go back. Let's copy this
  3964. 2:52:37entire file or this documentation for
  3965. 2:52:40our LLM. And then right here, I'll paste
  3966. 2:52:43this in. Now, while this is implementing
  3967. 2:52:46this part, we can open up a new
  3968. 2:52:48instance. And then we can say, you know,
  3969. 2:52:51make this calendar to be scrollable.
  3970. 2:52:55So under the homepage we have the
  3971. 2:52:58calendar but I want to make it in a way
  3972. 2:53:02that it could be scrollable back to two
  3973. 2:53:05weeks or maybe just one week. It cannot
  3974. 2:53:09go to further dates but it can go back
  3975. 2:53:12in time and so yeah go ahead and
  3976. 2:53:15implement it so that it can be
  3977. 2:53:16scrollable.
  3978. 2:53:19All right so this is probably not the
  3979. 2:53:21best prompt but it should work out. And
  3980. 2:53:24while these are getting implemented, I
  3981. 2:53:26think I'd like to get rid of this
  3982. 2:53:27button. It is kind of like unnecessary.
  3983. 2:53:30That's what I believe. So I'm just going
  3984. 2:53:32to search for it. Scan a mail.
  3985. 2:53:38So I'll just delete this entire press.
  3986. 2:53:40Well,
  3987. 2:53:42okay, it's not gone. Let me try to
  3988. 2:53:44reload the app. So once I reload it, as
  3989. 2:53:48you can tell, that button is gone. I
  3990. 2:53:49think this looks cleaner.
  3991. 2:53:52And while this is implementing, we are
  3992. 2:53:54getting some errors. But let's just wait
  3993. 2:53:55for this to be completed and then I'll
  3994. 2:53:57just be right back. And looks like we
  3995. 2:54:00have a warning in this file. It says
  3996. 2:54:03week map.
  3997. 2:54:05Yeah. Okay. So, it's it's going to
  3998. 2:54:07define the week and then it should work
  3999. 2:54:09out. So, both of these features have
  4000. 2:54:11been implemented. As you can tell, I can
  4001. 2:54:13go back two weeks
  4002. 2:54:16and yeah, I think it works without any
  4003. 2:54:19flaws. Other than this, we also have the
  4004. 2:54:22downscaling working. It is under the
  4005. 2:54:24analyze meal here. You can tell like let
  4006. 2:54:27me just show you that exact part. We
  4007. 2:54:30have the vision transform and it's going
  4008. 2:54:32to be using these arguments to downscale
  4009. 2:54:36the image in real time with image kit.
  4010. 2:54:39Now I have also asked cloud to create a
  4011. 2:54:41test screen. And within this screen, we
  4012. 2:54:44have bunch of different buttons where we
  4013. 2:54:46can kind of like simulate the button,
  4014. 2:54:48simulate the errors that we would get in
  4015. 2:54:50real world. So when you press any of
  4016. 2:54:52them, it's going to throw the error and
  4017. 2:54:55we are going to catch it with Sentry.
  4018. 2:54:57And then to be able to see the details,
  4019. 2:54:59we can go into our Sentry dashboard
  4020. 2:55:01under the issues under the feed. You'll
  4021. 2:55:04be able to see all the errors that we
  4022. 2:55:05got right here. So I'm going to reload.
  4023. 2:55:11So these are all the errors that we have
  4024. 2:55:13so far. And now let's go ahead press one
  4025. 2:55:16of them.
  4026. 2:55:18Now here probably you're going to have a
  4027. 2:55:20button for see here that says you know
  4028. 2:55:23set up your repository. Once you press
  4029. 2:55:26that button this is what you're going to
  4030. 2:55:27see. Just go ahead and say add
  4031. 2:55:30repositories to this project and then
  4032. 2:55:33select the current repository so that it
  4033. 2:55:35will be able to you know take a look at
  4034. 2:55:38the codebase and fix the issues. where
  4035. 2:55:40is this coming from? So, we can
  4036. 2:55:42literally just go ahead and start an
  4037. 2:55:44analysis.
  4038. 2:55:48This will take some time. It'll you know
  4039. 2:55:51find the issue, find the solution and
  4040. 2:55:53then it'll say this is the problem and
  4041. 2:55:56here is what you need to do to get rid
  4042. 2:55:58of this uh this error. So, after some
  4043. 2:56:02time it gives me all the details and
  4044. 2:56:04then at the very bottom it says do you
  4045. 2:56:06want to make a plan or not? Let's just
  4046. 2:56:08say yes. Let's go ahead and make a plan.
  4047. 2:56:11Now, while this is getting the plan, the
  4048. 2:56:13rest is just like what we have seen
  4049. 2:56:16before. We have every single detail. And
  4050. 2:56:18at the end, we also have the session
  4051. 2:56:21replay.
  4052. 2:56:22So, here are the steps to resolve this
  4053. 2:56:25problem. Now, we already know what's the
  4054. 2:56:27issue and what's the problem. But in
  4055. 2:56:29real world, you will not be able to
  4056. 2:56:31actually see it. So, here it'll it'll
  4057. 2:56:33just tell you what you should do step by
  4058. 2:56:35step. Now other than the errors there is
  4059. 2:56:38also a button or like a widget where you
  4060. 2:56:41can collect feedback from your users and
  4061. 2:56:44I think we can implement this button not
  4062. 2:56:47really inside this um inside this branch
  4063. 2:56:50but maybe it can be somewhere right
  4064. 2:56:53here. So, I'll go ahead and say
  4065. 2:56:56I want to have the Sentry feedback
  4066. 2:56:58button under the profile screen, but it
  4067. 2:57:01shouldn't be like nested under the
  4068. 2:57:04Sentry test bench. Maybe it should be
  4069. 2:57:07just above the sign up button or, you
  4070. 2:57:10know, somewhere in the profile screen.
  4071. 2:57:12That would make sense.
  4072. 2:57:15Now, from the dashboard, just head over
  4073. 2:57:17to the search and search for user
  4074. 2:57:20feedback. Now in my case it looks like
  4075. 2:57:22we don't really have any feedback but
  4076. 2:57:25actually we have and it went under the
  4077. 2:57:28spam and that's because we said test
  4078. 2:57:30right so sentry is clever enough to
  4079. 2:57:34understand this is just a testing uh
  4080. 2:57:37feedback because here we say this is me
  4081. 2:57:39testing from development but if we send
  4082. 2:57:41something you know an actual report it
  4083. 2:57:45would be under the inbox. So here you
  4084. 2:57:47can tell you know which user send it,
  4085. 2:57:49how they send it, why they send it,
  4086. 2:57:52everything is right here and like it
  4087. 2:57:54even shows the linked error. So you can
  4088. 2:57:57take a look at the error itself, not
  4089. 2:57:59only the report or the bug. All right.
  4090. 2:58:02So with all that being said, this is the
  4091. 2:58:04basic version of our application. Now
  4092. 2:58:07the rest is your creativity or the
  4093. 2:58:09features that you would like to add. You
  4094. 2:58:11need to follow the exact same steps that
  4095. 2:58:13we have done so far. talk with cloud for
  4096. 2:58:16UI just go ahead and generate the design
  4097. 2:58:19in the same way that I have explained so
  4098. 2:58:22far use the prompts so on right now here
  4099. 2:58:26I'll leave it as it is and I'd like to
  4100. 2:58:28commit my changes for this section and
  4101. 2:58:31then in the next one we can get started
  4102. 2:58:32with the privacy policy and terms of
  4103. 2:58:35service and for them I also have a
  4104. 2:58:38separate prompts that we'll get into in
  4105. 2:58:41a couple of minutes so here I'll go
  4106. 2:58:43ahead and stage everything and then
  4107. 2:58:46let's get a commit message as usual.
  4108. 2:58:48I'll close everything.
  4109. 2:58:51Then we'll commit and sync this up. All
  4110. 2:58:54right. So with this hopefully I'll see
  4111. 2:58:56you in the next lesson.
  4112. 2:58:58All right. So in this section we are
  4113. 2:59:00going to set up our privacy policy and
  4114. 2:59:02terms of service. At the moment when we
  4115. 2:59:05press there is a link that is opening
  4116. 2:59:07but it is just the example.com. We'd
  4117. 2:59:09like to replace it with our deployed URL
  4118. 2:59:13for you know privacy policy and terms of
  4119. 2:59:16service and it's actually easier than
  4120. 2:59:18what you think. So we need to just
  4121. 2:59:21create a legal folder. This is what I do
  4122. 2:59:23usually. This is exactly the same
  4123. 2:59:26process that I have done while building
  4124. 2:59:28my own application. So under the legal
  4125. 2:59:31folder we will have some HTML files and
  4126. 2:59:35some styling and then basically we are
  4127. 2:59:38going to deploy that URL to Cloudflare
  4128. 2:59:41for free. Then if you wanted to you can
  4129. 2:59:43get an actual domain for like $5 or I
  4130. 2:59:46don't know $10 depending on the type of
  4131. 2:59:49URL that you would like to get. But in
  4132. 2:59:51this video we'll do it for completely
  4133. 2:59:53free. Okay. So before we get into this
  4134. 2:59:56again I'd like to mention that if you
  4135. 2:59:58don't have privacy policy or terms of
  4136. 3:00:00service then your application will be
  4137. 3:00:03rejected by Apple because when you
  4138. 3:00:05submit your app they want you to put the
  4139. 3:00:08links for these in their dashboard.
  4140. 3:00:11Okay. And now for both of them I have
  4141. 3:00:14two different prompts. I'm going to
  4142. 3:00:16leave the link in the description. So
  4143. 3:00:18let's go ahead and first get the terms
  4144. 3:00:20of services prompt. So here you can
  4145. 3:00:23basically pause the video and read it
  4146. 3:00:25but we basically say just take a look at
  4147. 3:00:28the entire codebase analyze it and
  4148. 3:00:31generate a terms of service that would
  4149. 3:00:34be production ready. Okay here I'll go
  4150. 3:00:38ahead into cloud and then I'll paste it
  4151. 3:00:41right here. And before I submit this
  4152. 3:00:44I'll just follow up with a prompt. So
  4153. 3:00:46here's my follow-up prompt. I said
  4154. 3:00:48create the terms of services under the
  4155. 3:00:51legal folder that we have right here and
  4156. 3:00:54it should have just some simple HTML and
  4157. 3:00:57CSS. I said make sure UI is looking in
  4158. 3:01:00the same theme as our mobile app and
  4159. 3:01:03there will be a landing page and in the
  4160. 3:01:05navbar and footer we can have terms of
  4161. 3:01:08services and privacy policy links. For
  4162. 3:01:11now ignore privacy policy content. I
  4163. 3:01:14will follow up for it later in the
  4164. 3:01:16video. Right. So here this should create
  4165. 3:01:18that landing page as well as the terms
  4166. 3:01:22of service that terms of service page.
  4167. 3:01:24Now here we can take a look at the Cali
  4168. 3:01:28um landing page that they have. It looks
  4169. 3:01:31absolutely beautiful and we can even you
  4170. 3:01:33know give this as a reference that you
  4171. 3:01:36can take a look at and you know build
  4172. 3:01:38something similar to this one. Now how
  4173. 3:01:41do we get these type of demo images
  4174. 3:01:43right? So here I'll just try to walk you
  4175. 3:01:46through it in a second. So for these
  4176. 3:01:48screenshots there is a website called
  4177. 3:01:50shots.so. Now they have both a free plan
  4178. 3:01:53and paid plan. I didn't really bought
  4179. 3:01:56their paid plan. I'm just using the free
  4180. 3:01:58one and for me it is just enough. Okay.
  4181. 3:02:01So this is what you're going to get
  4182. 3:02:02initially from the screenshots. Let's go
  4183. 3:02:04ahead and select iPhone 17 as our
  4184. 3:02:07simulator. And then here we can add a
  4185. 3:02:10background. Let me find it. I think it's
  4186. 3:02:12going to be under the frame here. You
  4187. 3:02:15can have a solid background, but since
  4188. 3:02:17we just want it to look like this,
  4189. 3:02:20right? Like it is just only the image.
  4190. 3:02:23So for that reason, for the background,
  4191. 3:02:25we'll just have transparent. And then
  4192. 3:02:27what I do is zooming in as much as
  4193. 3:02:29possible so that I get rid of these
  4194. 3:02:32extra spaces from the top and from the
  4195. 3:02:35bottom.
  4196. 3:02:36Maybe something like this. And then we
  4197. 3:02:39need to select the media. Now, what you
  4198. 3:02:41would like to do is going back to your
  4199. 3:02:44simulator
  4200. 3:02:45into your application and then taking a
  4201. 3:02:48screenshot. So, right here, let's go
  4202. 3:02:50ahead and I don't know, take the
  4203. 3:02:52screenshot of this part. Let's say copy
  4204. 3:02:55this image. I'll just copy to clipboard
  4205. 3:02:58and go back and I'll just paste this in.
  4206. 3:03:01Here we go. Now, we have the image. All
  4207. 3:03:03we need to do is installing it
  4208. 3:03:07or exporting it. Now with this we can go
  4209. 3:03:10back to VS Code under the legal. I'll
  4210. 3:03:14just have it right here. And I'm going
  4211. 3:03:16to say demo one.png.
  4212. 3:03:19Once we have the UI, we can basically
  4213. 3:03:22use this image in that uh you know in
  4214. 3:03:26that specific file or in the UI. Now
  4215. 3:03:29here let's just answer some of the
  4216. 3:03:31questions that we have from cloud. So
  4217. 3:03:34this is the first question. This is my
  4218. 3:03:36answer. You can take a look at the next
  4219. 3:03:38one. This is about the age. Then we have
  4220. 3:03:40disputes. I'll just go with the
  4221. 3:03:42recommended options. But you know this
  4222. 3:03:44is a tutorial so I'm just going pretty
  4223. 3:03:47quickly. Um if you're building your own
  4224. 3:03:49application and if you want to deploy it
  4225. 3:03:51of course you need to take some time and
  4226. 3:03:53you know read them actually and then
  4227. 3:03:55answer depending on your situation like
  4228. 3:03:58maybe your application is only 18 plus
  4229. 3:04:01age right? So you don't really want to
  4230. 3:04:03select this one.
  4231. 3:04:06Now, while this is building it, let's go
  4232. 3:04:08back to our screenshots or the demo
  4233. 3:04:11images. Now, here you can tilt it if you
  4234. 3:04:14really wanted to, but I think they
  4235. 3:04:16already have the options. So, just go
  4236. 3:04:17ahead and select it. Then, what I would
  4237. 3:04:19do again, I would zoom in as much as
  4238. 3:04:21possible. Then, I would export it, then
  4239. 3:04:24use it in my homepage. Or you can even
  4240. 3:04:26have screenshots like these. And on top
  4241. 3:04:29of this, you can have two or three other
  4242. 3:04:33options just like this one. Right? Then
  4243. 3:04:36you would take more screenshots and
  4244. 3:04:38paste them right here. Then export the
  4245. 3:04:40image or you can have two if you really
  4246. 3:04:43wanted to.
  4247. 3:04:46So these are the things that we have
  4248. 3:04:47done in one of my previous courses as
  4249. 3:04:50well. And this is what we have built. It
  4250. 3:04:52was an AI trip planner. And here you can
  4251. 3:04:54tell this is how we created those
  4252. 3:04:57images. So we have one for you know like
  4253. 3:05:00with the two options with only one and
  4254. 3:05:03one tilted. Then we have a privacy
  4255. 3:05:06policy.
  4256. 3:05:08It is right here. Then we have a terms
  4257. 3:05:11of service and you know everything is
  4258. 3:05:14built with cloud in that tutorial as
  4259. 3:05:16well. Okay. So with this you have
  4260. 3:05:17learned how to create these type of
  4261. 3:05:19images for your future projects. All
  4262. 3:05:22right. So cloud is done with it. Before
  4263. 3:05:24we take a look at the end result here
  4264. 3:05:26under the legal folder we have couple of
  4265. 3:05:28different files such as the index which
  4266. 3:05:31is our landing page. Then we have
  4267. 3:05:33privacy HTML as well as terms of
  4268. 3:05:35services. Then we have all of our
  4269. 3:05:37styling under the style. CSS. And I
  4270. 3:05:40think it got the logo as well as the
  4271. 3:05:42phone mockup. These are the images that
  4272. 3:05:44we already had under the assets. So it
  4273. 3:05:47basically copied them from here and
  4274. 3:05:49pasteed right here. Now with that said,
  4275. 3:05:52let's go ahead and double check. And I
  4276. 3:05:55think this looks absolutely disgusting
  4277. 3:05:57or just something that I didn't like at
  4278. 3:05:59all. It looks pretty AI. Now I'll say
  4279. 3:06:03you know we would like to fix this and
  4280. 3:06:05I'll give Claude a reference in this
  4281. 3:06:08case that's going to be Cali. I think
  4282. 3:06:10this looks very clean like white
  4283. 3:06:12background and I don't want to have the
  4284. 3:06:15dark theme in the first place. So
  4285. 3:06:18there's an extension called go full
  4286. 3:06:20page. If you press this extension, it'll
  4287. 3:06:22basically take the entire page as a
  4288. 3:06:25screenshot
  4289. 3:06:27and then you can copy it,
  4290. 3:06:31then paste it right here. Then we can
  4291. 3:06:33follow up with a prompt. So here is my
  4292. 3:06:36prompt. Please pause the video and read
  4293. 3:06:38it. Then I'm going to send this. Let's
  4294. 3:06:40see what we're going to get back. All
  4295. 3:06:42right. So Cloud is still building it.
  4296. 3:06:44And I have realized one thing about this
  4297. 3:06:46image, which is that we have a shadow.
  4298. 3:06:49So, usually I remove it. I forgot to
  4299. 3:06:51tell you, but let me actually display
  4300. 3:06:54pretty quickly. Under the mockup for
  4301. 3:06:57shadow here, you would like to have a
  4302. 3:07:00none. Okay. So, I'm just going to say
  4303. 3:07:01get rid of that so that we don't really
  4304. 3:07:03have this shadow right here. It looks
  4305. 3:07:07off.
  4306. 3:07:09So, you'd like to get rid of the shadow.
  4307. 3:07:11Then again, zoom in as much as possible
  4308. 3:07:14to get rid of those spaces from the top
  4309. 3:07:16and from the bottom. Then let's try to
  4310. 3:07:19export it. So I'm going to bring it back
  4311. 3:07:21to VS Code.
  4312. 3:07:24And actually I'm going to delete demo
  4313. 3:07:271.png and rename this to be demo 1.png.
  4314. 3:07:33Now here you can tell that background
  4315. 3:07:35shadow is gone. And I'll just ask cloud
  4316. 3:07:38to make this larger.
  4317. 3:07:43But first I'll wait for this to be
  4318. 3:07:44completed. So here I just simply follow
  4319. 3:07:47up and say make this look a little bit
  4320. 3:07:49larger. And here is the end result. So I
  4321. 3:07:51think this is looking pretty cool and we
  4322. 3:07:54have the terms of service page as well.
  4323. 3:07:57Now in the exact same way I'll go ahead
  4324. 3:07:59and copy the prompt for privacy policy.
  4325. 3:08:03And then I'll just paste it right here.
  4326. 3:08:08And by the way, while this is building,
  4327. 3:08:10currently our privacy policy has just a
  4328. 3:08:13placeholder. Now it's going to go ahead
  4329. 3:08:16and you know add the actual content. Now
  4330. 3:08:19the other thing that I want to mention
  4331. 3:08:20is that AI doesn't really know your full
  4332. 3:08:23legal name or the registered address. So
  4333. 3:08:26it's going to give couple of different
  4334. 3:08:27placeholders thanks to this prompt that
  4335. 3:08:29we have and then you can just read this
  4336. 3:08:32entire file pretty quickly just by
  4337. 3:08:34taking a look at the placeholders and
  4338. 3:08:37update them with your actual values. All
  4339. 3:08:39right. So after some time we have
  4340. 3:08:41privacy policy ready as well. Now again
  4341. 3:08:44you would like to update the placeholder
  4342. 3:08:46values with your actual details but
  4343. 3:08:48other than this I think we are
  4344. 3:08:50completely fine to deploy this
  4345. 3:08:53um deploy this legal page. So for this
  4346. 3:08:56we'll go into cloudflare you need to
  4347. 3:08:59sign in and create an account. It's
  4348. 3:09:02completely free to get started with.
  4349. 3:09:04This is what I'll be using. You can use
  4350. 3:09:06Versell netifi or any other options
  4351. 3:09:08really. They have a CLI tool. I'm
  4352. 3:09:11talking about Cloudflare by the way.
  4353. 3:09:13They have a CLI tool called Wrangler.
  4354. 3:09:16And what you can do is just asking cloud
  4355. 3:09:18to set this up for you. It is called
  4356. 3:09:21Wrangler. I already have it. So here
  4357. 3:09:23I'll just say So this is my prompt. I'll
  4358. 3:09:25just send it and let's see what we're
  4359. 3:09:27going to get back. All right. So here we
  4360. 3:09:29go. It's been deployed. I'll go ahead
  4361. 3:09:31and controlclick to it. As you can tell,
  4362. 3:09:34we had it in local host, but now we have
  4363. 3:09:37it on an actual domain. So here in my
  4364. 3:09:40case it kind of confused the bulky
  4365. 3:09:43aai.app which is my actual URL for my
  4366. 3:09:46real application.
  4367. 3:09:48So I just said you know don't mess this
  4368. 3:09:50up. Leave it everything as it is. U this
  4369. 3:09:53is just a demo project. Um yeah go ahead
  4370. 3:09:55and implement that. So that's my prompt
  4371. 3:09:57that I have done off camera. Other than
  4372. 3:10:00this just with one single prompt we got
  4373. 3:10:03our application or the landing page
  4374. 3:10:05deployed on the web. We have terms of
  4375. 3:10:08services. Let's go ahead and double
  4376. 3:10:10check. It's working. And then we can go
  4377. 3:10:14and visit the privacy policy as well.
  4378. 3:10:19So there is one thing in the footer that
  4379. 3:10:21I just realized like this button the
  4380. 3:10:25text is not really visible. You can
  4381. 3:10:27follow up with clot you know say make
  4382. 3:10:30the colors um make the colors to be
  4383. 3:10:33white just like in the navbar. Okay. So
  4384. 3:10:35the rest is just following up and
  4385. 3:10:37customizing the screen. There is nothing
  4386. 3:10:39else left on this landing page as well
  4387. 3:10:42as the um legal pages. All right. So
  4388. 3:10:45that was the entire project. I hope you
  4389. 3:10:47enjoyed it and learned something new
  4390. 3:10:49from it. Now basically using this exact
  4391. 3:10:51same workflow, you can build any kind of
  4392. 3:10:53app that you ever wanted to. Now just
  4393. 3:10:56for the record I have created a script
  4394. 3:10:58file so that I can basically add some
  4395. 3:11:00test data to my database without
  4396. 3:11:03actually scanning my you know without
  4397. 3:11:06actually scanning some food. So that's
  4398. 3:11:09what we have done. I just asked it to
  4399. 3:11:11cloud to add this data. Um so yeah if
  4400. 3:11:15you see this in the in the source code
  4401. 3:11:18don't get confused. So with that let's
  4402. 3:11:20go ahead and commit all of our changes.
  4403. 3:11:22Then we will end this course. So here
  4404. 3:11:25I'll go ahead and just say stage every
  4405. 3:11:27single change.
  4406. 3:11:29Let's get the commit message and then
  4407. 3:11:31we're going to commit this
  4408. 3:11:37and then we'll sync this up. All right.
  4409. 3:11:40So with this we are completely done with
  4410. 3:11:42this project. I'll make the source code
  4411. 3:11:44free as well. You will find the link in
  4412. 3:11:46description. So with that thanks for
  4413. 3:11:48watching and hopefully I'll see you in
  4414. 3:11:50the next one.

About this transcript

This page contains the full transcript of How to Build Real Mobile Apps with Claude - FULL COURSE by Codesistency, generated from the public captions YouTube serves with the video. The transcript has 32,121 words across 4,414 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.