YouTube2Text

Build SaaS with AI | Part 3 | Create Simple UI and Text Repurposing Flow β€” Transcript

by Sabrina Ramonov πŸ„ Β· 5,607 words Β· 767 segments Β· language en Β· Watch on YouTube

Full transcript

  1. 0:00my name is Sabrina ramov and in this
  2. 0:01video we're going to start building our
  3. 0:03MVP for AI powered remixing of social
  4. 0:07media content and just to recap at a
  5. 0:10high level what we're building
  6. 0:11eventually the platform will be able to
  7. 0:13connect to social media sources and
  8. 0:15repurpose or remix the content using
  9. 0:17your personal brand personal knowledge
  10. 0:20base then publish to social media
  11. 0:22Platforms in an automated weekly Q in
  12. 0:24the first video in this series we
  13. 0:26significantly scoped down the spec to
  14. 0:28something that we can actually build for
  15. 0:30an MVP and by the way I think that can
  16. 0:32vary depending on your technical skill
  17. 0:34level and what resources you have access
  18. 0:36to so if you're super technical you can
  19. 0:39probably build out a lot more features
  20. 0:41than what we are going to build out in
  21. 0:43this spec V1 if you're not technical
  22. 0:45then that's when I really recommend
  23. 0:47trimming down the spec as much as
  24. 0:48possible rely heavily on your domain
  25. 0:50expertise and feedback from your
  26. 0:52potential users to figure out what is
  27. 0:54the tiny tiny core that you can build in
  28. 0:57a short period of time that would
  29. 0:58provide value if you're super technical
  30. 1:00and you're comfortable bringing in a lot
  31. 1:02more features in the MVP then go ahead
  32. 1:04and do that just make sure you don't
  33. 1:06take too long right the goal is to get
  34. 1:09this in the hands of actual users as
  35. 1:11quickly as possible in the previous
  36. 1:12video we talked about taking the spec
  37. 1:15kind of simplifying it with just the one
  38. 1:17screen we're going to build out first
  39. 1:18the create screen where you remix
  40. 1:20content from One Source One text source
  41. 1:23to another piece of text and this is the
  42. 1:26AI updated version of the spec remember
  43. 1:28we fed it through CLA to get feedback on
  44. 1:30how to update the spec and here I made
  45. 1:33some additional changes as well so
  46. 1:35everything in blue is what I've added
  47. 1:38and everything in red is what I'm going
  48. 1:40to remove when I feed it into cursor AI
  49. 1:43to start building out the code and let's
  50. 1:45walk through this real quick so in the
  51. 1:46past week I've already built multiple
  52. 1:48apps using cursor and CLA artifacts and
  53. 1:51I noticed that initially there were a
  54. 1:54couple things that it would always kind
  55. 1:55of trip up on and that are super easy to
  56. 1:58fix if you if you just tell it that and
  57. 2:00so for future MVPs and stuff like I
  58. 2:03always want to specify this we're going
  59. 2:05to use nextjs typescript T and CSS and
  60. 2:08app router like this is our text stack
  61. 2:09we want to make sure we're using App
  62. 2:11router when creating new screens uh do
  63. 2:14not use a source directory if you
  64. 2:15remember from the second video when we
  65. 2:18actually set up the repo there were all
  66. 2:20these options we just just selected the
  67. 2:22default options but we want to make sure
  68. 2:24the AI knows that so it has the context
  69. 2:27of like what framework we're using what
  70. 2:28tools we're using and it should follow
  71. 2:31that framework so that everything's
  72. 2:32consistent here I also add always show
  73. 2:35the proposed directory structure and new
  74. 2:37files that must be created this is
  75. 2:39really helpful because cursor AI will
  76. 2:41just be like create this new file it may
  77. 2:44not be super clear where you should
  78. 2:45create that file and so I like to be
  79. 2:47explicit like show me how the directory
  80. 2:50structure is updated as we creates or
  81. 2:53edits or delete files and then I even
  82. 2:56ask for each step to specify the file
  83. 2:57name and path and then here is another
  84. 2:59issue is that I noticed again I I've
  85. 3:01built multiple MVPs now with cursor and
  86. 3:03clot artifacts this past week often
  87. 3:05times it would forget to include this
  88. 3:07line use clients in a components that
  89. 3:10require client side state and so I'm
  90. 3:12just including it here just makes it
  91. 3:14easier when you spin up a project if it
  92. 3:15does that from the get-go so we don't
  93. 3:17have to go in there and fix it it's a
  94. 3:19super easy fix but it's just one of
  95. 3:21those things like why not just include
  96. 3:22it in the prompt and then these two
  97. 3:24things are more specific to Tailwind so
  98. 3:27when we build out just the UI section of
  99. 3:30the app I like to include this and just
  100. 3:32make sure this just tells the AI very
  101. 3:35specifically like our styling config is
  102. 3:37located in this file so it knows and
  103. 3:40just in general I want to use like a
  104. 3:42modern color palette I want to make sure
  105. 3:44text is readable I've had this issue for
  106. 3:46example forget if it was the vampire
  107. 3:48security checkpoint game or whatever but
  108. 3:50like sometimes the font would be white
  109. 3:52in a text input that is also white so
  110. 3:55you couldn't read the text unless you
  111. 3:56highlighted it so it's just it's just
  112. 3:58one of those things that comes up and we
  113. 4:00just want to make it clear from the
  114. 4:02beginning to follow this best practice
  115. 4:06and then I added this as well just to be
  116. 4:07a bit more explicit so the UI screen
  117. 4:10consists of the following sections it's
  118. 4:12going to be navigation and the create
  119. 4:15screen and then we just want to build
  120. 4:17the UI P portion first and then we're
  121. 4:19going to do the logic later and we're
  122. 4:21going to tell it to use the attached
  123. 4:22mockup as a guideline uh we kind of had
  124. 4:24that before I just rephrased it and then
  125. 4:26I also added to make it clear when the
  126. 4:28user opens the homepage the create
  127. 4:31screen is what they should be looking at
  128. 4:33I want to talk a little bit about this
  129. 4:34so typically if you're building out an
  130. 4:36MVP you typically want to think about
  131. 4:38the data model first so like how is your
  132. 4:40database going to be structured and then
  133. 4:42think about the UI screens and then last
  134. 4:45think about the logic and user
  135. 4:47interactions since for our V1 we won't
  136. 4:49have a database yet we're just going to
  137. 4:51build the UI portion first and then
  138. 4:54leave todos so this is like it's like a
  139. 4:57comment that reminds you to implement
  140. 4:59this stuff later after the UI we're
  141. 5:01going to build like the logic user
  142. 5:02interactions and workflows okay so I
  143. 5:04just removed this and just rewarded it
  144. 5:07here and then in the navigation I'm just
  145. 5:10going to remove these because we don't
  146. 5:12we're not implementing that in our V1
  147. 5:14anyway I left dashboard so that we have
  148. 5:16like one other link as an example in the
  149. 5:19sidebar and then I also removed inure
  150. 5:21responsive design again really not in
  151. 5:23scope for V1 from the crate screen I
  152. 5:25removed error handling and input
  153. 5:27validation again this is all great just
  154. 5:29just really not necessary for V1 so
  155. 5:32these two items are the UI screens that
  156. 5:34we're going to focus on building first
  157. 5:36so I'm going to feed this into cursor
  158. 5:38first and then after that we're going to
  159. 5:40feed the logic portions of the prompt so
  160. 5:43how we generate the content display the
  161. 5:45content and allow for editing and again
  162. 5:47these items in red I'm removing from the
  163. 5:50prompt from the spec remember that
  164. 5:52Claude suggested this improved version
  165. 5:56of the spec when we asked for it and so
  166. 5:58that's why these were included and kind
  167. 5:59of added to the spec and it's it's all
  168. 6:02definitely best practice that we should
  169. 6:04be thinking about but just not necessary
  170. 6:06for V1 right now okay and then same here
  171. 6:09I didn't even think about the character
  172. 6:10count for each platform again Claude is
  173. 6:13the one who suggested that which is
  174. 6:14great but just not in scope for V1 and
  175. 6:17we're not going to be connecting to
  176. 6:18social media accounts yet okay and then
  177. 6:20before we get started let's go set up
  178. 6:22our cursor so make sure you open cursor
  179. 6:26you should already have a project called
  180. 6:28remix if you do
  181. 6:30not so go to wherever you develop stuff
  182. 6:34and then run this command npx
  183. 6:37create-- apppp at latest and then this
  184. 6:40is the name of your app so it could be
  185. 6:42test whatever it is that you want to
  186. 6:44build and it's going to walk you through
  187. 6:46a set of questions and just hit enter
  188. 6:49for all of them you're just going to use
  189. 6:50the default selection for all of them
  190. 6:52once you've done that open the project
  191. 6:55you just created in our case it's called
  192. 6:56remix okay and then hit command L to
  193. 6:59open open the AI chat on this right hand
  194. 7:02side so the first thing we're going to
  195. 7:03do in cursor is set up some rules so go
  196. 7:06to cursor cursor here settings cursor
  197. 7:10settings over here and then here where
  198. 7:13it says rules for AI these are rules
  199. 7:15that gets shown to the AI on all chats
  200. 7:17and command K sessions so here are my
  201. 7:20rules and I just grabed these from the
  202. 7:23cursor Community Forum share your rules
  203. 7:25for AI and in this thread people share
  204. 7:29kind of like their best practices rules
  205. 7:31that they input for the AI and sometimes
  206. 7:33it's Project Specific tool specific this
  207. 7:37I think is generic enough to include for
  208. 7:39like any project so think step by step
  209. 7:42first brainstorm first describe your
  210. 7:43plan in detail you know prioritize
  211. 7:46fixing errors rather than apologizing if
  212. 7:48you can't Implement something make sure
  213. 7:50you add a to-do comment so we can find
  214. 7:53that later that it's a missing
  215. 7:54functionality return a completely eded
  216. 7:56file and finally review the code make
  217. 7:59sure it's complete and satisfies all
  218. 8:01requirements so input that here it
  219. 8:03should automatically save and then you
  220. 8:05can go ahead and close that and I'll
  221. 8:06have the copy paste version of this in
  222. 8:08the newsletter accompanying this video
  223. 8:11so just stay tuned for that okay so now
  224. 8:13let's go ahead and take our spec first
  225. 8:16let's remove the stuff in Red so we
  226. 8:18don't copy paste it copy paste it okay
  227. 8:22and we're just going to take this first
  228. 8:24section about around building the UI
  229. 8:26screens once we're done with that then
  230. 8:28we're going to build out the logic
  231. 8:30okay so here and ask anything copy paste
  232. 8:33everything there I'm just going to add
  233. 8:36bullet points here okay that looks good
  234. 8:39just double check everything and then
  235. 8:41you want to hit command enter to chat
  236. 8:43with the entire code base so the default
  237. 8:45here in cursor is it feeds in your
  238. 8:48current open file as context if you want
  239. 8:50to chat with the entire codebase though
  240. 8:52like feeding in the entire codebases
  241. 8:54context into the prompt then you do
  242. 8:56command enter and this works well when
  243. 8:58your Co codebase is still like pretty
  244. 9:00small again we're starting from scratch
  245. 9:02here as the codebase gets larger and
  246. 9:04larger and we're adding individual
  247. 9:05features we do want to limit the amount
  248. 9:08of context that we're sending because
  249. 9:09too much context can actually confuse
  250. 9:12the AI and here is cursor's response you
  251. 9:15can always check what context was fed in
  252. 9:17if you expand this over here and it's
  253. 9:20still generating the response I believe
  254. 9:22but we can start taking a look so here's
  255. 9:23the directory structure and then it's
  256. 9:26going to tell us like exactly what code
  257. 9:28to write in each file so let's go ahead
  258. 9:30and just make sure we replicate the same
  259. 9:32directory structure so we have another
  260. 9:34directory components with these files
  261. 9:36another directory create another
  262. 9:39directory dashboard and then we should
  263. 9:41already have page and layout okay so
  264. 9:44let's go ahead and replicate this
  265. 9:46structure So within app we're going to
  266. 9:49create a folder called components and
  267. 9:52then that folder has three files layout.
  268. 9:54TSX sidebar. TSX and top bar
  269. 10:00okay and then we are going to create
  270. 10:04another folder called
  271. 10:07create which has a file page.
  272. 10:10TSX and then we'll create another folder
  273. 10:14called dashboard and dashboard is just a
  274. 10:16placeholder for now I just wanted to
  275. 10:18have at least like one other Link in the
  276. 10:19sidebar Okay cool so let's just double
  277. 10:23check everything looks like the
  278. 10:25directory structure we got app
  279. 10:26components of these files creates
  280. 10:28creates and we already have page. CSX
  281. 10:31here and layout. CSX okay so now we're
  282. 10:34going to implement the components and
  283. 10:35Pages step by step so update app layout
  284. 10:39click apply here on the right hand side
  285. 10:41check you know check the changes so you
  286. 10:43can accept or reject individual changes
  287. 10:46this case we're going to click accept
  288. 10:48Okay then we're going to create the app
  289. 10:51components layout. TSX it's over here so
  290. 10:54navigate to that file first you can see
  291. 10:57here cursor didn't autol link to it
  292. 10:59because a file doesn't exist yet so
  293. 11:01we're going to click to open the file
  294. 11:03and then apply the changes to this file
  295. 11:06okay then click accept again make sure
  296. 11:07to save the file okay now we're going to
  297. 11:10go to sidebar so same thing and then
  298. 11:12apply the changes click accept hit save
  299. 11:16okay same thing now go to Top Bar apply
  300. 11:19the changes click accept hit save okay
  301. 11:22here this page already existed before so
  302. 11:25we're just going to navigate to it click
  303. 11:27accept okay
  304. 11:29and then this is a new page app slre
  305. 11:32page. TX TSX so go there click play okay
  306. 11:36and then app D this is a new page as
  307. 11:38well and again this is just a
  308. 11:40placeholder and it's nice that there's a
  309. 11:42to-do here Implement dashboard content
  310. 11:44because one of the things I like to do
  311. 11:45is throughout an entire project I can
  312. 11:47list out all the to-do items in the
  313. 11:50project so go ahead and let's read this
  314. 11:52and just in general I recommend being
  315. 11:54like a very active participant even
  316. 11:56though this is AI driven coding like I'm
  317. 11:59I'm holding its hand quite a bit and
  318. 12:01it's really important to like check that
  319. 12:04it's doing what we want and even if you
  320. 12:06don't have a technical background like
  321. 12:07you're brand new to all of this I still
  322. 12:09recommend reading this because it's
  323. 12:11summarizing like what's going on what
  324. 12:13it's trying to do so it included a
  325. 12:16persistent left sidebar top bar a create
  326. 12:18screen with multi-line text input for
  327. 12:20the original content then you select the
  328. 12:22platform and then a generate content
  329. 12:25button placeholder for the dashboard
  330. 12:27screen and then it confirms that where
  331. 12:29you using Tailwind CSS and a nice color
  332. 12:31palettes and then these are the next
  333. 12:33steps in the implementation so first
  334. 12:36let's how do I run first let's like test
  335. 12:41that everything works we should at least
  336. 12:42be able to see the UI so here I'm asking
  337. 12:45cursor how do I run the app and
  338. 12:47basically you open a terminal I really
  339. 12:49like warp dodev the AI power terminal
  340. 12:51but within cursor I usually use the
  341. 12:54built-in terminal so that I don't have
  342. 12:55to change screens everything's in one
  343. 12:57place so let's just follow follow the
  344. 12:59instructions npm install okay start the
  345. 13:02development server that's npm runev okay
  346. 13:05you can see it here and then you just
  347. 13:08click on the link so command click on
  348. 13:10Mac okay that's it that's our UI right
  349. 13:13so we've got the persistent sidebar
  350. 13:15switches to dashboard this changes the
  351. 13:17original content will go here and then
  352. 13:19we're going to select the platforms here
  353. 13:21so again this is just the UI we haven't
  354. 13:23implemented any logic or workflows yet
  355. 13:26now what we want to do is Implement like
  356. 13:28the next part
  357. 13:29and I'm going to copy this section
  358. 13:31because this is I want to make sure that
  359. 13:34cursor like always has the context of
  360. 13:36what stack we're using in my experience
  361. 13:38so far this past week it's just the
  362. 13:39results are much better if I just am
  363. 13:41very explicit this is the framework I'm
  364. 13:43using uh these are the options within
  365. 13:45that framework I'm using this is where
  366. 13:46like key things are located and so this
  367. 13:49is the part that I will use again in
  368. 13:52this prompt to create the logic you
  369. 13:54don't really need this stuff because
  370. 13:55this is more like the UI facing part
  371. 13:58what we want to do is actually take this
  372. 14:00stuff oh hang on let me remove the items
  373. 14:03in red first so again we're just
  374. 14:05reducing the scope even further which I
  375. 14:07know is painful but it's it's quite
  376. 14:10necessary again the more technical you
  377. 14:12are if you're comfortable with adding in
  378. 14:14Spec that's totally fine just don't let
  379. 14:17it be an excuse for not launching and
  380. 14:19getting this in the hands of users okay
  381. 14:21so here's the spec let's add some
  382. 14:23bullets okay and then let's be really
  383. 14:26clear like over here implement the
  384. 14:29following logic okay that's good to go
  385. 14:33and then we will chat with the entire
  386. 14:34code base again since multiple files
  387. 14:36here are going to have to be changed
  388. 14:38okay so here's the directory structure
  389. 14:40and you can see new files that we're
  390. 14:41going to have to create so let's go
  391. 14:42ahead and just start creating those now
  392. 14:45generator TSX okay generated contents.
  393. 14:51TSX prompts edit modal oops you can see
  394. 14:55here it clearly indicates like what's
  395. 14:57new in parentheses here so so we're
  396. 14:59going to have to create this new
  397. 15:00directory called API on this level and
  398. 15:03then we're going to create a new file
  399. 15:04called generate content. TS and then
  400. 15:08looks like another it's interesting that
  401. 15:11it decided to call this utils here is
  402. 15:14where our API call to open AI will be
  403. 15:17and then we already have these three
  404. 15:18files so we don't need to create them
  405. 15:20okay cool so now let's Implement
  406. 15:22everything step by step so just go here
  407. 15:25app components content generator this is
  408. 15:27again a brand new file so so it's not
  409. 15:29going to autol link to that file this is
  410. 15:31one of the things I wish a cursor would
  411. 15:33do just like automatically create a file
  412. 15:35if it doesn't exist there are other
  413. 15:37tools that can do that for example a.
  414. 15:39chat and you can even build like a
  415. 15:41little emac plugin so you can just have
  416. 15:43a separate buffer that's AER but we're
  417. 15:45just going to use this for now we're
  418. 15:47going to generated content component
  419. 15:50click apply now it's making the changes
  420. 15:53click accept boom now go to prompt edit
  421. 15:57modal Okay click accept make sure to hit
  422. 15:59save update the create page so app SLC
  423. 16:04create page click accept Okay open the
  424. 16:08open AI utility function so util openai
  425. 16:12this is what's going to make the API
  426. 16:14call to open Ai and you can see here
  427. 16:18like there's already some things we'll
  428. 16:20want to change we'll need to first of
  429. 16:21all set up our open AI API key here it's
  430. 16:24using GPT 3.5 turbo which in my opinion
  431. 16:27kind of sucks for writing we'll at least
  432. 16:29want to switch that to four and then the
  433. 16:32prompt itself is it's pretty weak but
  434. 16:34again it's fine we just want to get
  435. 16:35everything up and running and then we
  436. 16:37can update the prompt okay and then
  437. 16:39we're going to create the API route for
  438. 16:40Generate Das content so open the API
  439. 16:43folder here click accept Okay Okay and
  440. 16:47then here's a summary of what we've done
  441. 16:49try to read through it and like try to
  442. 16:52match where it is in the code base a lot
  443. 16:54of the variable names and stuff are
  444. 16:55pretty readable like generated content
  445. 16:58you know content platform you know so
  446. 17:01really just try to follow along as best
  447. 17:03as you can if you don't have a technical
  448. 17:04background if you do have a technical
  449. 17:06background then I do recommend like
  450. 17:08taking the time to kind of dig in
  451. 17:11understand how it structured things um
  452. 17:13because it's just going to help you get
  453. 17:15faster with it in the future okay so to
  454. 17:17complete the implementation you'll need
  455. 17:19to install the open AI package so let's
  456. 17:21go ahead and do that so I'm going to do
  457. 17:23contrl XC in the terminal to exit and
  458. 17:28then we're going to do npm install open
  459. 17:30AI okay and then we're going to set up
  460. 17:32the open AI key can you walk me through
  461. 17:36step number two setting up the
  462. 17:39open key and here I'm not going to chat
  463. 17:43with the entire code base because we
  464. 17:45don't need to we could even do no
  465. 17:47context but it's fine we'll just hit
  466. 17:49enter so that it has the current file as
  467. 17:51context okay so if you don't even have
  468. 17:54an open AI API key it'll walk you
  469. 17:56through it step by step you know you log
  470. 17:57in so you create an account log in
  471. 18:00navigate to API section create a new API
  472. 18:02key once logged in navigate create a new
  473. 18:05API key make sure to copy it immediately
  474. 18:07because you won't see it again and now
  475. 18:09we're going to set up environment
  476. 18:10variable so in the root of this project
  477. 18:13which is over here like where all these
  478. 18:15files are we're going to create a new
  479. 18:17file called n.l okay this file is used
  480. 18:21for local environment variables and is
  481. 18:23automatically ignored by git and then
  482. 18:26copy the open then we're going to add
  483. 18:28our open API key here like this and then
  484. 18:31obviously replace this with the API key
  485. 18:34now that you've done that Let's update.
  486. 18:36ignore so here's dog ignore and just
  487. 18:40make sure you are ignoring it when we
  488. 18:42set up the next JS project it already
  489. 18:45like created this file so we actually
  490. 18:46don't have to do anything which is great
  491. 18:48and then we're going to set up the
  492. 18:49environment variable in our code so go
  493. 18:50to this file and then apply and then
  494. 18:53accept Okay Okay and then verify the
  495. 18:56setup doesn't tell us we need to do
  496. 18:58anything here when it's talking about
  497. 19:00here client side usage but we're not
  498. 19:02we're going to be calling it from the
  499. 19:03server side which is best practice okay
  500. 19:05so verify the setup so here we're going
  501. 19:07to do in the terminal down here npm
  502. 19:09runev okay and then let's just read this
  503. 19:12real quick try generating content using
  504. 19:14your application if it works without any
  505. 19:16authentication errors your API key is
  506. 19:18correctly set up okay so let's go let's
  507. 19:21open it up first okay cool and then I'm
  508. 19:24going to take something from my blog
  509. 19:27let's see this one two minute hack to
  510. 19:28high quality prompts okay so now we're
  511. 19:31going to enter the content here so
  512. 19:33here's the here's the stuff that I'm
  513. 19:35going to repurpose I'm going to select a
  514. 19:37platform like Facebook and also let's
  515. 19:39open the console to see if there's any
  516. 19:41errors so here it's like right click
  517. 19:44then click inspect I like to put mine at
  518. 19:46the bottom over here okay cool and then
  519. 19:49hit console again and here if there are
  520. 19:52errors on the client side you'll see
  521. 19:53like red stuff pop up here and my
  522. 19:55typical workflow will be like oh there's
  523. 19:57an error copy and paste it into cursor
  524. 20:01and then ask cursor how to fix the eror
  525. 20:03okay so but now let's click generate
  526. 20:04content these do look like two separate
  527. 20:07errors like one looks like an API route
  528. 20:09is not found and then the other one
  529. 20:11looks like a parsing issue so let's just
  530. 20:14do one at a time I'm going to open up a
  531. 20:16new file I'm going to say I see this
  532. 20:19error in console log and try to like
  533. 20:22read the error especially if you have a
  534. 20:25technical background even if you haven't
  535. 20:27coded in a while even if you don't code
  536. 20:29full-time like I haven't coded regularly
  537. 20:33in the past decade but I don't mind like
  538. 20:35reading this stuff like this is a post
  539. 20:37request to this route and it says it's
  540. 20:40not found and like the quickest thing
  541. 20:43you could do is just like check if it is
  542. 20:45there so like if we go to API folder
  543. 20:48there is something called generate Das
  544. 20:50content um and that's additional context
  545. 20:53that is helpful to feed in so I could
  546. 20:55say I see this error in console log even
  547. 20:58though
  548. 20:59the
  549. 21:00file API generate content TS exists in
  550. 21:05my project and let's chat with the
  551. 21:08entire codebase so it knows to look for
  552. 21:09that file okay it seems that the API
  553. 21:12route for generating content is not
  554. 21:13being recognized let's troubleshoot this
  555. 21:16step by step ensure that generate
  556. 21:17content. TS file is located in the
  557. 21:20correct directory so it actually wants
  558. 21:22us to rename this file to Route okay
  559. 21:26name slash okay so let's create another
  560. 21:29folder here make sure everything matches
  561. 21:32TS okay then we're going to move this
  562. 21:34into that directory click move always
  563. 21:37update the Imports then we're going to
  564. 21:39rename this to Route that'ss okay let
  565. 21:44click save and then it also says update
  566. 21:46the contents of the file so let's go
  567. 21:48ahead and okay update the import
  568. 21:51statement in content generator okay make
  569. 21:54sure that open AI is over here util
  570. 21:57which it is very ver ify that we have n
  571. 22:00local which we do and then stop the
  572. 22:02current server if running and then run
  573. 22:04again okay so let's try it again click
  574. 22:06this okay I'm going to close the
  575. 22:08previous one okay here let's open
  576. 22:11console log again and click generate
  577. 22:14content okay new error generated content
  578. 22:17is not
  579. 22:19defined okay so let's say unhand this is
  580. 22:23an import error and I do tend to run
  581. 22:25into these errors with cursor especially
  582. 22:27when starting up a project check I see
  583. 22:29this error in console log okay the issue
  584. 22:33is a lack of import so let's look at the
  585. 22:36relevant part of content generator. TSX
  586. 22:39it has used clients however it's not
  587. 22:42importing generated content which is
  588. 22:44also why the file is red I should have
  589. 22:46pointed that out before so click apply
  590. 22:49typically when you see like file names
  591. 22:51that are red and stuff that means there
  592. 22:52is an error in there I just didn't even
  593. 22:54notice okay so this changes the import
  594. 22:57let's try TR out reloaded let me copy
  595. 22:59this again check select Facebook okay
  596. 23:02great and so here's the generated
  597. 23:04content okay great so everything works
  598. 23:07as desired we took a a newsletter post
  599. 23:10clicked generate and then it repurposed
  600. 23:12it with a prompt now obviously this is
  601. 23:14kind of cheesy I don't like that so
  602. 23:17let's go to the prompt library and just
  603. 23:20like select something else yeah this
  604. 23:22this what I use a lot like write a
  605. 23:24LinkedIn post with bullet point so what
  606. 23:25we're going to do here is just click
  607. 23:27copy raw file okay so everything's
  608. 23:29copied then go back to cursor and then
  609. 23:32we really just want to change the prompt
  610. 23:34over here so we're going to click edits
  611. 23:37update the prompt to the following and
  612. 23:41don't leave anything out let's just use
  613. 23:45triple to demarcate okay let's double
  614. 23:48check yeah so here it has all the
  615. 23:50examples and stuff submit edit here
  616. 23:52those are the examples and stuff so
  617. 23:54obviously there like I could have just
  618. 23:57copy and pasted instead of doing this
  619. 23:58but I just wanted to Showcase this is
  620. 24:00what it looks like to change only one
  621. 24:03section of the code because often times
  622. 24:05you don't want to feed in the entire
  623. 24:06codebase or even the entire file you
  624. 24:08want to change just one function for
  625. 24:10example or just one variable or
  626. 24:12something and so that's how you do that
  627. 24:13you kind of just highlight it and then
  628. 24:15press command K and it'll open up Cloud
  629. 24:183.5 sonit where you provide instructions
  630. 24:21in natural language just describe what
  631. 24:23it is that you are trying to do okay all
  632. 24:25right now it's done let's click accept
  633. 24:28check everything there make sure there's
  634. 24:30no errors and I also want to change this
  635. 24:32to GPT 40 usually find that works a lot
  636. 24:36better for writing compared to 3.5 so
  637. 24:39let's go ahead and
  638. 24:41refresh copy that original content okay
  639. 24:45okay and we got an error so let's open
  640. 24:47up console log you see internal server
  641. 24:50error let's see if there's anything in
  642. 24:51the terminal that could be helpful so
  643. 24:54just
  644. 24:54scrolling so here is the error and then
  645. 24:57scrolling up here seems to be a lot more
  646. 24:59information like error generating
  647. 25:00content s unexpected token and is not
  648. 25:03valid Json okay so what that means is
  649. 25:06our code base is expecting valid Jason
  650. 25:08from chat GPT but the response was not
  651. 25:11valid Jason which actually makes sense
  652. 25:13because in this prompt it doesn't ask
  653. 25:15for valid Jason so let's select this
  654. 25:18prompt again so one approach here is to
  655. 25:20just copy paste this error and then ask
  656. 25:23ask cursor here I get this error after I
  657. 25:29clicked the generate content button so
  658. 25:33that's one approach if you have kind of
  659. 25:34a technical background you kind of know
  660. 25:36what the error is again you could just
  661. 25:38feed it just this file or just this
  662. 25:40prompt and ask it to update the prompt
  663. 25:42asking for a valid Jason's output so
  664. 25:45cursor basically explains the error
  665. 25:47occurs because the response is not in
  666. 25:49the expected Json format let's modify
  667. 25:51the function to handle the response is
  668. 25:53plain text instead of Json so yeah
  669. 25:55that's also definitely a valid thing you
  670. 25:57can do I'll hit apply okay okay it
  671. 26:01really just remove the Json Parts since
  672. 26:03the response is not in Json and by the
  673. 26:06way if you don't want to do that like
  674. 26:07you want to keep the Json like you can
  675. 26:09reply to this by clicking here and being
  676. 26:12like no we want to keep the Json like
  677. 26:13I'll out update the prompt so that it
  678. 26:16outputs a valid Json and so again the
  679. 26:19more technical you are like the easier
  680. 26:21this will be to kind of like interact
  681. 26:23back and forth um and I definitely
  682. 26:25recommend thinking through what the
  683. 26:27problem could be and then comparing what
  684. 26:30your suspicion is with what cursor AI
  685. 26:33suggests and that way you can learn
  686. 26:35maybe you maybe you're wrong and cursor
  687. 26:37is right maybe you're right and cursor
  688. 26:39is missing something and that's an
  689. 26:41opportunity for you to provide
  690. 26:42additional context or update the prompt
  691. 26:46okay so here are the key changes now
  692. 26:48let's update the post function okay
  693. 26:50apply let's click accepts okay and then
  694. 26:52these changes should fix the parsing
  695. 26:54error okay so let me copy paste this
  696. 26:57refresh this refresh this original
  697. 27:01content click generates okay cool and
  698. 27:05then here is the generate content I
  699. 27:06don't see any errors let's expand this
  700. 27:08so we can actually read it and now this
  701. 27:10looks much better this looks much closer
  702. 27:12to the style I like right I like it with
  703. 27:14a nice hook questions in the hook and
  704. 27:16then bullet points super easy to read
  705. 27:18like this and so all we did really is
  706. 27:20update the prompt which kind of is the
  707. 27:22fun part right like once I have one
  708. 27:25place where I can do everything like
  709. 27:27most of my time will be spent on
  710. 27:29updating prompts updating my rag like my
  711. 27:32personal knowledge base and and brand
  712. 27:34identity and all that stuff yeah this is
  713. 27:36pretty much our V1 so if we go back to
  714. 27:38the spec like what did we do so we are
  715. 27:41repurposing from one platform to another
  716. 27:43we have kind of the basic UI we're
  717. 27:45calling the open AI chat GPT API for the
  718. 27:48repurposing we display the final
  719. 27:50repurposed content so the one thing
  720. 27:52we're missing is this edit prompt
  721. 27:54functionality to change the prompt which
  722. 27:56I'm going to move to V2 so the next set
  723. 27:58of features we're going to add will be
  724. 28:00the ability to edit each prompt for each
  725. 28:03social media platform and then
  726. 28:05regenerate the output if you edit the
  727. 28:07prompts and this is really useful
  728. 28:09because like I don't use the same
  729. 28:10prompts for each platform like on
  730. 28:12LinkedIn I have a different writing
  731. 28:14style and something on Twitter versus a
  732. 28:16script for Tik Tok like each one is
  733. 28:18going to use a very very different
  734. 28:19prompt and I I personally want a just
  735. 28:22one place where I can experiments with
  736. 28:25each of those prompts easily regenerate
  737. 28:28the one that I'm working on and then see
  738. 28:31everything kind of in one place like the
  739. 28:33prompt and output for LinkedIn versus
  740. 28:35Facebook versus Tik Tok versus Twitter
  741. 28:37so that'll be V2 the next set of
  742. 28:40features we add so yeah hope this was a
  743. 28:42helpful walkthrough of building the
  744. 28:44version one of our larger Vision an AI
  745. 28:47powered remixing repurposing content
  746. 28:49platform and just to walk through recap
  747. 28:52what we've built out we used cursor AI
  748. 28:54to build out the simple UI with a left
  749. 28:57side barar top bar the main content
  750. 28:59creation interface the create screen
  751. 29:02where you can input text content and
  752. 29:04then when you hit the button it calls
  753. 29:06open AI chat GPT to repurpose that
  754. 29:08content in a different format and you
  755. 29:10can edit the content in line so if you
  756. 29:12want to make a couple tweaks before you
  757. 29:14publish it on your social media platform
  758. 29:16you can easily do that and in the next
  759. 29:18video We'll add different prompts for
  760. 29:20each social media platform and being
  761. 29:22able to easily edit the prompt and
  762. 29:24regenerate the output all in one place
  763. 29:26my name is Sabrina ranov hope you are
  764. 29:27enjoying this video series building sass
  765. 29:30with AI if you like this kind of stuff
  766. 29:32hit like hit subscribe drop a comment
  767. 29:34below look forward to hearing from you

About this transcript

This page contains the full transcript of Build SaaS with AI | Part 3 | Create Simple UI and Text Repurposing Flow by Sabrina Ramonov πŸ„, generated from the public captions YouTube serves with the video. The transcript has 5,607 words across 767 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 translate the transcript into 100+ languages.

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, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.