Build SaaS with AI | Part 5 | User Authentication, Firestore, & Prompts Management β Transcript
Full transcript
- 0:00my name is Sabrina ramov and this is
- 0:02part five of my series build SAS with AI
- 0:05where I'm going from idea to MVP using
- 0:08Aid driven coding and in particular I'm
- 0:10using cursor AI with Claude 3.5 Sonet so
- 0:14in the last part we added Firebase
- 0:16integration and also crud routes to be
- 0:18able to create read update and delete
- 0:21prompts that belong to your user and in
- 0:23this post we're going to continue along
- 0:25the same vein we're going to use
- 0:26Firebase authentication to create the
- 0:28whole user sign up log in log out flow
- 0:32and then also add a new screen called
- 0:34prompts which shows all of the users
- 0:36prompts and it'll have a table where the
- 0:38user can create additional prompts edit
- 0:40existing prompts or delete prompts um as
- 0:43part of this you will need to log into
- 0:45your Firebase console to create what's
- 0:47called fire store which is the Firebase
- 0:50uh database and so just have that handy
- 0:52and before we get started I want to say
- 0:54thank you to some YouTube viewers who
- 0:55pointed out a new cursor beta feature
- 0:58called composer which is supposed to be
- 1:01able to autogenerate new files that need
- 1:03to be created which if you've seen my
- 1:04past videos it's kind of been a paino
- 1:07with cursor AI so to enable this just go
- 1:10over here to cursor settings cursor
- 1:13settings and then click beta and then
- 1:15composer I've already enabled it here
- 1:18and then these were the default options
- 1:19that were selected so I didn't touch
- 1:22them okay so the first thing we want to
- 1:24do is set up Firebase authentication so
- 1:26to do that go into your console console.
- 1:29firebase.com google.com and then select
- 1:31your Firebase project in my case it's
- 1:33called remix I'm already dreading when
- 1:36I'm going to change to the name of
- 1:38everything because I did an SEO search
- 1:40for remix and there's just so many
- 1:42things called remix it's it's probably
- 1:44going to be hard to rank with that name
- 1:46so I'm going to have to change the
- 1:47project name um get a new domain and
- 1:50everything but anyway so on the left
- 1:52side bar go to build authentication and
- 1:54then here click get started so what
- 1:56we're doing here is using Firebase for
- 1:58authentication and there's a bunch of
- 2:00different options for now I'm just going
- 2:01to use email password allow users to
- 2:04sign up using their email address and
- 2:05password sweets um you could also do
- 2:08this but I think it requires an extra
- 2:10step yeah so we're just not going to do
- 2:12that for now but it's cool that Firebase
- 2:14handles it all and then if you want to
- 2:16add a new provider Google off let's call
- 2:18this project remix and then my support
- 2:21email and then just click save okay so
- 2:23now we have two signin methods email and
- 2:26password kind of the traditional and
- 2:28then Google signin so now the next thing
- 2:29we want to do is actually build the
- 2:31whole authentication process and that
- 2:33includes the signup screen the login
- 2:35screen possibly a button to log out as
- 2:37well and so this here might look a
- 2:39really long prompt but it's a lot of
- 2:41boilerplate that we've used in the past
- 2:43so everything up here is kind of just
- 2:45stuff we've used in the past I include
- 2:47it in every major prompt request just
- 2:49because I noticed if I include it in
- 2:51cursor AI rules sometimes it works
- 2:54sometimes it doesn't work um so here my
- 2:56rules for AI are pretty generic and then
- 2:59for really important stuff what
- 3:00libraries and Frameworks we're using
- 3:02standards we want to conform by put it
- 3:04at the beginning of the major prompt
- 3:06request I just copy pasted this from
- 3:09from previous requests if you're not
- 3:10keeping track of the prompts you can
- 3:12always go up here to previous chats and
- 3:15you can see all of the chats you've had
- 3:16with cursor Ai and you can copy paste
- 3:18from there and then here's the actual
- 3:20task right so it's it's actually pretty
- 3:21small when you break down this kind of
- 3:24large intimidating looking spec um so
- 3:26your task is to create the signup screen
- 3:28login screen and use a authentication
- 3:30process we're going to use Firebase
- 3:32authentication so basically if a user is
- 3:34not signed in they should not see
- 3:36anything in the app not the top bar
- 3:38sidebar any other screen except for the
- 3:40sign up and login screens immediately
- 3:43after authenticating the user should be
- 3:44redirected to the main page and see the
- 3:46create screen and in the future of
- 3:48course you'll want to optimize that
- 3:50you'll probably have an onboarding flow
- 3:52with videos explaining how everything
- 3:54works but again this is just a V1 and
- 3:57then I wanted to add a log out Link at
- 3:59the bottom of the sidebar component just
- 4:01so I can test things I just want to
- 4:02easily log out try creating a new user
- 4:05Make sure each user has their own
- 4:07separate prompts I just want that to
- 4:09make that super easy and then when that
- 4:12log out button is clicked obviously it
- 4:13should log out the current user and then
- 4:15we append this at the end I've used you
- 4:17know some variation this for every
- 4:18single major prompt so here I'm saying
- 4:21as an expert in nextjs and Firebase
- 4:23since we're using Firebase
- 4:24authentication ask me clarifying
- 4:26questions until you're confident you can
- 4:27complete the task I was looking over for
- 4:30previous videos and past errors
- 4:32definitely use clients that issue comes
- 4:34up a lot even though I say it here right
- 4:37use client for components that cor
- 4:39clients I said sometimes it still
- 4:41doesn't do it so immediately after it
- 4:43gives me a bunch of code I'll I'll ask
- 4:45it to check the following things check
- 4:47use client typo check all Import pths in
- 4:50files that have been edited or created
- 4:52and fix any broken packs this is kind of
- 4:54a Holy Grail I don't think this one is
- 4:56very useful but that's okay we'll leave
- 4:59it in for now
- 5:00okay and by the way this is just my
- 5:02companion blog post that's going to
- 5:04accompany this
- 5:06video so yeah again just want to
- 5:08emphasize even though this looks really
- 5:10long this paragraph here is really the
- 5:13only thing that's new all this other
- 5:14stuff is kind of just boiler plate best
- 5:17practice that I want to make sure cursor
- 5:20abides by these same things okay so
- 5:23let's copy this okay and let's chat with
- 5:25the entire code base so do you have a
- 5:27Firebase project yes yes
- 5:30simple sign up and login screens with
- 5:33modern UI for
- 5:36relation all form fields are required
- 5:41yes reset
- 5:43password not right now don't want to
- 5:46implement Google sign in yet after log
- 5:49out should the user be redirected to the
- 5:50login screen after log out redirect user
- 5:54to login screen show all error messages
- 5:58and success notifications to user okay
- 6:02and then let's go ahead and chat with
- 6:03the entire code base okay and here's the
- 6:05plan for implementing the authentication
- 6:07so create a new file app components off
- 6:11provider. CSX okay apply the changes
- 6:15create sign up and login screen so it
- 6:18didn't indicate the path for the sign up
- 6:20and login screens it did indicate a
- 6:23bunch of other things so so I'm going to
- 6:25apply the other code changes first and
- 6:27then go back and ask it to clarify what
- 6:30files we should create what should the
- 6:31file paths be do I have to create any
- 6:33new directories or whatever let's just
- 6:35apply the rest of the changes first and
- 6:37then I'll go back to number two update
- 6:40and you can click on this when it's blue
- 6:42and also if it already has this here
- 6:44then it's it's already going to be
- 6:46applied to that file so you don't
- 6:48actually have to open the file okay dat
- 6:51see here page that TX okay update layout
- 6:55okay okay well actually here are the
- 6:58file paths so I didn't even need to ask
- 7:00a follow-up question so it's app SL
- 7:03login okay and then the file is page.
- 7:07TSX and then new folder sign up and the
- 7:11file is page. TSX let's go back to step
- 7:16number two to implement that so create
- 7:18sign up and login screens this is called
- 7:21signup screen so we're going to do that
- 7:24here that's weird it didn't apply it to
- 7:26the screen so I just closed the screen
- 7:28and I'm reopening it I don't know why
- 7:30it's not actually applying this change
- 7:32that's kind of a weird cursor bug so I'm
- 7:34just going to copy it and paste it over
- 7:36here and then this is the login screen
- 7:39so it's over here yeah I see some
- 7:41message AI did not predict an origin
- 7:43file for this I can't read the rest so
- 7:46again we'll just copy it and then paste
- 7:48it here let's test it out all right the
- 7:50Ed client thing I forgot to do the
- 7:52followup so that's why I did that okay
- 7:55so let's copy paste I probably should
- 7:58limit the context to the files that were
- 8:01created that would be better it says all
- 8:03components that require cents that
- 8:04already have used client one potential
- 8:06issue in
- 8:07[Music]
- 8:10sidebar in the layout component we
- 8:12should import the sidebar yeah okay so
- 8:16in both the login and sign up pages so
- 8:20this one is for the login screen it is
- 8:22linked to the login screen though so if
- 8:23you actually click this it already knows
- 8:25which file to change okay same here so
- 8:29this will be the signup ph. TSX that's a
- 8:32good idea add error handling and logging
- 8:35so I just hope it doesn't break anything
- 8:36else though that's the thing also add a
- 8:39state for error handling okay and then
- 8:41add a error message all right and these
- 8:43changes improve airor handling and
- 8:46provide better feedback to the user when
- 8:48content generation fails okay so let's
- 8:50go back here let's try restarting this
- 8:53and we're still getting this error right
- 8:55so it's probably something super simple
- 8:58let's copy this I'm trying to run the
- 9:01but I see this error in terminal and
- 9:04let's add context here so it's Firebase
- 9:06provider.
- 9:07CSX and it's trying to access layout.
- 9:11TSX I'm just scanning the error message
- 9:13for any other files it actually mentions
- 9:16okay so instead of chatting with the
- 9:17entire code PR I'm just going to click
- 9:19enter so it focuses on these two files
- 9:21as context okay so update Firebase
- 9:24provider yeah so oh okay great hang on
- 9:28update app layout
- 9:30and here are the main changes so it
- 9:31added use client so that's why that's
- 9:33why I try to do that thing where I say
- 9:35check use client but even that didn't
- 9:37really work unfortunately um export
- 9:40Firebase provider blah blah blah okay
- 9:43try running the app again see get loaded
- 9:45since I just saw the screen so first we
- 9:48need to sign up we don't even have an
- 9:50account test at
- 9:53AOL.com okay great yes super weird it
- 9:57just made everything black back okay so
- 10:00we have a problem here even though
- 10:02everything loaded uh user authentication
- 10:04seemed to work the top bar and Side Bar
- 10:06disappeared so so I'm literally just
- 10:09going to take a screenshot and also why
- 10:11did it turn black like that's strange
- 10:14the UI style turned Dark theme I want to
- 10:20always keep everything theme navig I
- 10:23don't see the top bar or sidebar
- 10:28components
- 10:30should be persistent in the app in the
- 10:33in the app
- 10:34after there is and then let's mention
- 10:38them so probably want layout top bar
- 10:42sidebar whatever it's using for CS yeah
- 10:45the create screen okay so hit enter to
- 10:48feed in that context okay Global that
- 10:51CSS for step one give me the full file
- 10:57with the edit so I can easily apply yeah
- 11:01it kind of just told me what to do but I
- 11:02wanted to just give me all the code so
- 11:06update the root
- 11:07layout here okay appli that oh here's a
- 11:11global okay okay jeez that was a bit
- 11:15scary all right so now we're in let's
- 11:17check the log out button just works so
- 11:20if I click log out okay I'm redirected
- 11:21to log in should not be able to access
- 11:24the create screen so here I'm redirected
- 11:26so let me purposely put in a wrong
- 11:28password yeah so that's good and then
- 11:30let me put in the correct password okay
- 11:33perfect all right that's pretty much it
- 11:35for implementing the user authentication
- 11:37part of it and again we used Firebase
- 11:39authentication I truly have no idea why
- 11:41it just changed the UI from light to
- 11:43dark theme a little alarming uh
- 11:45thankfully we do all the styling stuff
- 11:47at the end that's my usual process
- 11:49anyway okay so now what we're going to
- 11:51do is create the prompts table the
- 11:52workflow I'm envisioning for the first
- 11:54version and is I'll have my organized
- 11:57library of prompts and then for each
- 11:59remix or repurposing flow I I want to
- 12:02choose the prompt that I want to I want
- 12:04to choose a prompt for each platform so
- 12:06I might have a set of prompts that work
- 12:08really well for LinkedIn a set of
- 12:10prompts that work really well for
- 12:11Twitter there might be some prompts that
- 12:13work well for multiple platforms and so
- 12:15I kind of just want my organized library
- 12:17of prompts where I can create prompts
- 12:19edit prompts delete them add a
- 12:21description on them that kind of stuff
- 12:23the next feature after implementing the
- 12:25table will be when I go to remix cont
- 12:29content I pasted my original content and
- 12:31then I want to select for Facebook use
- 12:34this prompt for Twitter use this prompt
- 12:36okay so before we do that we need to
- 12:38create what's called a fire store and
- 12:40that's basically just your Firebase
- 12:42database and by the way cursor AI can
- 12:44walk you through how to do this also if
- 12:46you want more detail then I'll have in
- 12:48my newsletter just ask cursor AI how do
- 12:50I set up a fire
- 12:52store go to build then look for fire
- 12:55store database create database okay
- 12:58secure rules I'm going to start in
- 13:00production mode cuz I'm going to forget
- 13:02to update it within 30 days and I don't
- 13:04really know the details of fir store
- 13:06rules that's not something I'm super
- 13:08familiar with so I'm actually just going
- 13:09to ask cursor how would you update the
- 13:12Firebase fire store rule so that users
- 13:14can create edit and delete prompts
- 13:15belonging to them uh and it it doesn't
- 13:17really need any context yeah I don't how
- 13:19to remove this fireless context it is
- 13:21not relevant at all okay so here I'm
- 13:24starting here to update the fir store
- 13:26rules so we need to ensure that only
- 13:28authenticated us users can create
- 13:29prompts yes users should be able to crud
- 13:32their own prompts yes we'll assume
- 13:34there's a prompts collection where each
- 13:37document represents a prompt yes and I
- 13:39think we did that in the previous video
- 13:41yeah when we created the crud routes for
- 13:43prompts each prompt document should have
- 13:45a user ID field so here's the pseudo
- 13:47code for fire store rules okay allow
- 13:49update and delete BL now let's Implement
- 13:51these rules in the yeah this is the main
- 13:53thing I'm looking for so I can copy
- 13:55paste here I don't know if I can change
- 13:57this okay I guess I'll create it for and
- 13:59then change it oh sweet and it actually
- 14:01tells you what to do click on the rules
- 14:02tab replace the existing rules and click
- 14:04publish so and handy so here's the rules
- 14:07tab here's the current rules and then I
- 14:11just copy and pasted it and then yeah
- 14:14changes can take a minute to propagate
- 14:17so just keep that in mind if you're
- 14:18testing and now here's the next feature
- 14:20we want to implement so again this looks
- 14:22a lot but all this stuff at the top is
- 14:24the same boiler plate that we used for
- 14:26implementing the authentication flow
- 14:29this section really is what's new what
- 14:31the spec is for this feature and then
- 14:34down here just before I ask cursor AI to
- 14:37ask me clarifying questions and then
- 14:39this is the context that I'm going to
- 14:41feed in so complete the following task
- 14:44we want to create a new screen called
- 14:45prompts that has a table of all of your
- 14:49prompts and you can create update and
- 14:51delete prompts as needed and obviously
- 14:53you can only see the screen if you're
- 14:55logged in um I do want basic form
- 14:58validation so you shouldn't be able to
- 14:59create a prompt that's empty or update a
- 15:02prompt and then it's empty and then in
- 15:04the sidebar we want a prompts link so we
- 15:07can go see the prompt screen and then I
- 15:09just gave it an example which is always
- 15:11a best practice if you want to follow
- 15:13the same kind of a directory structure
- 15:15or whatever best practice just give it
- 15:17an example and feed it in as context so
- 15:19I did that here I just fed in the
- 15:21dashboard directory and then when a new
- 15:23user signs up I want them to have
- 15:25default prompts already that belong to
- 15:27them so that you know they don't go to
- 15:29the prompts library and it's completely
- 15:31empty so that they can just immediately
- 15:33start using the remix functionality
- 15:35without having to create new prompts um
- 15:37and then when the user goes to the
- 15:39prompt screen for the first time they
- 15:40should actually see those three prompts
- 15:42in the table be able to edit them and
- 15:44stuff so that way they're not starting
- 15:46from scratch and don't know what to do
- 15:48okay so we're going to copy paste this
- 15:51and let's start a new chats and this is
- 15:54cool it actually already Auto tagged
- 15:56most of these files except for all yeah
- 15:59let's do auth provider the three
- 16:01Firebase files prompt service remember
- 16:03from the last video that's all our crud
- 16:06routes for prompts dashboard I'm feeding
- 16:08in in as example sidebar CU I wanted to
- 16:10add a link and then the provider is
- 16:13there anything else related to that it
- 16:15should add no guess not okay so let's do
- 16:19this feed this in as context I just hit
- 16:21enter instead of command enter okay so
- 16:23then let's answer the questions to the
- 16:25best of our ability so should the prompt
- 16:27screen be a new routes under the app
- 16:29directory similar to the dashboard yes
- 16:33okay for the table of prompts what
- 16:34specific information should be displayed
- 16:37let's do yes title contents creation
- 16:42dates updated ads I forgot if there's
- 16:46description I forget did we add that
- 16:48field these are the fields in the
- 16:51collection of a pron so it has title
- 16:53content so it doesn't have a description
- 16:55so we should probably add that later so
- 16:56how should the create update and delete
- 16:58functional Val implemented so for
- 17:00example let's say I want to update an
- 17:02existing prompt should I be redirected
- 17:04to a separate page or as models within
- 17:06the promp screen models with promp
- 17:10screen okay regarding form
- 17:12validation yes show all error
- 17:16messages for the default prompts should
- 17:19we add this functionality to the
- 17:20existing off process or create a
- 17:22separate function to check add to
- 17:26existing appication process specific
- 17:29design requirements and with a modern
- 17:33clean
- 17:35UI of yes sorting and filtering do we
- 17:38need to add any additional error
- 17:40handling or loading States for the
- 17:42prompt screen I don't think so I think
- 17:44it'll load pretty quickly I'll just say
- 17:47it's always good to include robust
- 17:50logging to help troubleshoot issues okay
- 17:54then click enter so we're going to
- 17:56create a prompts page so apps slash
- 18:00prompts new file page TSX oops let me
- 18:04change the name of that yeah oh hang on
- 18:07you can actually play this now no never
- 18:09mind I'm actually not sure how I'm
- 18:12supposed to use composer I just started
- 18:14doing the default thing so I don't know
- 18:16why it's not creating will this create
- 18:19it if I press PR yeah I don't think it's
- 18:21going to create it because it says apply
- 18:23to current file so yeah I need to look
- 18:25at the documentation for how to use
- 18:27composer cuz I thought would just create
- 18:30files for me but that's okay whatever so
- 18:33create the prompts page so this is the
- 18:35page oh hang on so before I do all this
- 18:38I actually should have committed totally
- 18:41forgot so we added Firebase
- 18:44authentication I just also committed all
- 18:47the prompt stuff but these are all empty
- 18:49so it's fine I just want to create a
- 18:51saving point in case we needs to roll
- 18:53back okay so now let's go ahead and
- 18:56create the promps and yeah just not
- 18:59working really well for these new files
- 19:01so ended up copy pasting the file create
- 19:04the prompts table component that's this
- 19:06one yeah I don't know what's going on I
- 19:08I mean I updated cursor right before
- 19:10this video and then enabled the composer
- 19:13and now it's just not applying these
- 19:15changes to the file to the new files
- 19:17yeah I'm literally just copy pasting
- 19:19them create prompt modal okay update
- 19:22prompt
- 19:23modal the delete prompt model create the
- 19:27use prompts hook for step six specify
- 19:31the file name and file path for the use
- 19:35prompts Hook app SL hooks sluse proms
- 19:40okay that time it worked in a new file
- 19:42do you need to implement anything else
- 19:46before I start testing this new feature
- 19:51okay few more things so update the
- 19:53sidebar components so add the following
- 19:56code okay in the sidebar modify the Au
- 19:59process to create default prompts for
- 20:01new users yeah update the signup
- 20:03function in your off service I don't
- 20:05know why it's guessing where it is
- 20:07though apps services oh I don't have it
- 20:10off service let say I don't service TS
- 20:14file update your answer starting let's
- 20:19say analyze my base structure and files
- 20:24then update dur so here I'm going to
- 20:26feed in the entire code base just to
- 20:27make sure picks up whatever files it
- 20:30needs to I I don't know which file I
- 20:34should update for step two be explicit I
- 20:39really just wanted to tell me which file
- 20:41should I update so I'm kind of confused
- 20:42why it's not doing that okay update the
- 20:45app SL sign okay I'm there add the
- 20:48import for the top of the file okay then
- 20:52update the handle sign up function okay
- 20:55let's test that out npm runev open the
- 20:57console log and then what I want to do
- 21:00is log out and then I actually want to
- 21:02try creating a new account oh we're
- 21:04getting a warning here yeah attempted
- 21:07import that sounds important okay okay
- 21:11trying to test but I see this error in
- 21:14terminal and console Lo okay so go to
- 21:17this part add the export the imports and
- 21:20exports are pretty painful if anyone has
- 21:23tips on how to do that better I would
- 21:25happily include that in my newsletter
- 21:27Okay so refresh go to the sign up page
- 21:30test to okay okay sign up then go to
- 21:34prompts okay so now here's the fun part
- 21:37oh I tried to navigate to this page and
- 21:39this was the error message me when I
- 21:43navigate to dash page I see the
- 21:47following error message in terminal and
- 21:50okay let's specify the context I'm
- 21:53trying to go to SL
- 21:55page and then can't resolve update
- 21:58prompt modal table can't resolve prompts
- 22:03table create prompt modal update prompt
- 22:08modal and delete okay yeah I remember
- 22:12when I made that typo I thought I
- 22:14changed it though F's currently name O I
- 22:17forgot that
- 22:18TSX oh no okay well that was a human
- 22:22error okay is there anything else so now
- 22:25I'm refreshing okay good so at least
- 22:28it's not there error now it's Firebase
- 22:30error so failed to fetch prompts and
- 22:31this is usually because it requires an
- 22:33index actually literally tells you here
- 22:36but let's just suppose we don't know
- 22:39what this means so let's go here say
- 22:42okay that fix work to fire because it
- 22:44literally says Firebase error so here
- 22:47and the fix for this is e you actually
- 22:49just go to your Firebase console and
- 22:51create an index so that query can run
- 22:53beautiful thing again with AI it's it's
- 22:55going to explain all that so if this is
- 22:57your first time with Firebase or first
- 22:58time using fir store it's going to
- 23:00explain what does this mean what is
- 23:02required so fir store requires an index
- 23:03for certain types of queries especially
- 23:05when you're combining filtering and
- 23:06ordering remember when I sneakily
- 23:08increase the spec sure let's add
- 23:10filtering and sorting why not so this is
- 23:12what happens in this case I was a little
- 23:15greedy there but I really do want
- 23:16filtering and sorting so okay let's go
- 23:19do it click on the link provided in the
- 23:21aor message so let's go do that and then
- 23:23you basically create a new index after
- 23:25creating the index Firebase will take
- 23:26some time to build it I think it can
- 23:28take a couple minutes okay so here I
- 23:31clicked the link that came up in the
- 23:33console log error and it already
- 23:35recommends what the index should be so
- 23:37I'm just going to hit save and we'll
- 23:39start with that and just keep in mind
- 23:40this does take several minutes it's done
- 23:43uh so let's go back to our app and see
- 23:46if it can fetch the prompts oh okay
- 23:49sweet so I just refreshed the page and
- 23:51now you can see so I think I'm logged in
- 23:53as test2 aol.com and these are the three
- 23:55prompts that were created as default and
- 23:57you can actually check check the data so
- 23:59here if you go to cloudfire store data
- 24:01tab you can see the terminology is a
- 24:04collection of prompts and then each
- 24:06prompt is represented as a document so
- 24:09this is one prompt graph a concise and
- 24:10attentionally grabbing tweet that
- 24:12conveys blah blah blah here's the title
- 24:14and then here's the user ID that this
- 24:16prompt corresponds to because remember
- 24:19when we implemented Firebase
- 24:20authentication I used test aol.com we
- 24:23just implemented functionality where
- 24:25when a new user signs up it creates
- 24:27three default prompts assigned to that
- 24:29user so we only created one user which
- 24:31is test one
- 24:33aol.com okay so yeah that's working as
- 24:35expected now let's see can I create a
- 24:38new prompt let's call it bullet points
- 24:41create a five bullet point list
- 24:46summarizing the inputs something simple
- 24:49so create okay it's here can I edit it
- 24:52can I say seven bullet point list okay
- 24:55and then what I'm going to do is log out
- 24:58back back in and just make sure it's
- 25:00still there I mean it should be okay
- 25:03okay there create a seven so we created
- 25:04a new prompt edit it and I'm sure this
- 25:07deletes it as well so that wraps up the
- 25:09prompts table and this is going to be
- 25:10really powerful because I know prompts
- 25:12organization is actually a really big
- 25:14pain Point people are kind of hacking
- 25:16together Google Sheets or Google doc or
- 25:19notion um in my case I have the GitHub
- 25:21repo containing prompts it's kind of all
- 25:24over the place and so part of my vision
- 25:26for this is it helps you organize the
- 25:28prompts that you're actually going to
- 25:29use and that you've significantly
- 25:31fine-tuned and improved specifically for
- 25:34Content creation and content repurposing
- 25:36what you're going to see too eventually
- 25:37as we add analytics in V 100 you know
- 25:41you'll be able to see analytics by the
- 25:43post what the original content was what
- 25:46prompt was used in the repurposing
- 25:48there's a lot of room in that road map
- 25:50for many cool things you could do but
- 25:53trying to just launch a version one
- 25:56right now the next feature we want to
- 25:57implement and probably the last thing
- 25:59I'll close out this video on is
- 26:01selecting The Prompt for each platform
- 26:03so now we have our Li library of prompts
- 26:06where we can create edit and delete
- 26:08prompts now when I go to repurpose
- 26:10content I want to choose the prompt that
- 26:13I want to use for each platform because
- 26:15I probably will want to use a different
- 26:17prompt for Facebook versus LinkedIn
- 26:18versus Twitter um so again all this
- 26:21stuff in the beginning is our boiler
- 26:23plates up here and the actual spec is
- 26:26over here so basically I want to update
- 26:29the create screen in the section over
- 26:32here where where it says select
- 26:35platforms so in that section select
- 26:37platforms insert a drop-down selector so
- 26:39that the user must select a prompt for
- 26:42each platform selected it's kind of a
- 26:44mouthful then I want to position the
- 26:47platform checkbox right here
- 26:50horizontally next to the prompt dropdown
- 26:54selector another way to do this if this
- 26:56wording is confusing you could probably
- 26:57drop draw a little mockup and feed it in
- 27:00as an image that's another approach I
- 27:01just tend to be very word oriented so if
- 27:04I had a preference between the two I'd
- 27:06rather describe it in words because I'm
- 27:08not actually very visually oriented and
- 27:11then each user should have the three
- 27:12prompts that were created when they
- 27:14signed up and then prompts are not
- 27:16specific to a platform so users can
- 27:18select any prompt to use for any
- 27:20platform um so for example I can easily
- 27:23Imagine One prompt being used for both
- 27:25LinkedIn and Facebook but it would be
- 27:27hard to imagine that same prompt being
- 27:29used for Twitter but the point is that
- 27:31the prompt itself is not platform
- 27:33specific you can choose any prompts you
- 27:35want for any platform if a user selected
- 27:37two platforms let's say Facebook and
- 27:39Twitter then you need to use one prompt
- 27:42then you need to select one prompt for
- 27:43Facebook and one prompt for Twitter the
- 27:45user does not need to select a prompt
- 27:47for LinkedIn because the user did not
- 27:49select it as a platform I don't know if
- 27:52it was necessary to say all this but I
- 27:54just wanted to be super clear and then I
- 27:56also wanted to remove this Edit Pro
- 27:58button since we don't need that anymore
- 28:00okay and then as usual here I just
- 28:03removed the act as an expert in Firebase
- 28:05here I just said act as an expert nextjs
- 28:07and ask me clarifying questions so let's
- 28:09go ahead and copy that create a new chat
- 28:14and then let's add in the auth related
- 28:17file so off provider think through any
- 28:19file so prompt service that's the crud
- 28:21route so you'll need to get all of the
- 28:23users prompts to populate the drop down
- 28:25the creates I just fed in the whole
- 28:28directories content generator where it's
- 28:30going to generate the content then off
- 28:32the provider um
- 29:14let's feed in the hook use promps too
- 29:17just in case let's use that okay and
- 29:19then feed this in as context hit enter
- 29:21instead of command enter Oh and before I
- 29:24answer its questions I almost always
- 29:27forget to commit so we added prompts
- 29:30screen and prompts table okay great so
- 29:36let's answer the questions as best as we
- 29:37can should the drop down select for
- 29:39prompts be populated with all the users
- 29:42prompts yes all the users prompts do we
- 29:45need to modify the use prompts hook or
- 29:47the prompt service to fetch all prompts
- 29:50or up to you should we update the handle
- 29:53generated content to use the selected
- 29:55yes use the selected
- 29:59prompts for each platform do we need to
- 30:01add any new state variables so I'll say
- 30:04up to you should we add any
- 30:07validation yes a prompt must be selected
- 30:12for each chosen platform before allowing
- 30:15content generation six are there any
- 30:18specific styling
- 30:19requirements just make it look good
- 30:23clean and modern seven do we need to
- 30:26update any types or inter faces to
- 30:28accommodate the changes in the component
- 30:30state or bronze to you should we add any
- 30:34new eror handling or user
- 30:36feedback yes yes show user feedback so
- 30:41that users know they need to select a
- 30:44prompt if they've selected a platform
- 30:51okay so update the used prompts hook oh
- 30:55we don't need then it said we don't need
- 30:57to modify this file because it already
- 30:59fetches all the prompts okay so content
- 31:02generator click apply accept oh okay so
- 31:06this updated content generator component
- 31:07includes drop down selectors State
- 31:09Management validation and then using the
- 31:12selected prompts and adding user
- 31:14feedback from prompt selection with a
- 31:16simple alert okay let's try it out it's
- 31:19probably going to be a bug and that's
- 31:20okay okay content purer and then what
- 31:23I'm going to do is I'm going to actually
- 31:24open one of my blog posts so yesterday I
- 31:27launched a Tik Tok Playbook basically
- 31:30consolidating everything I've learned
- 31:32growing to 100,000 followers in 60 days
- 31:34I'm just going to copy paste initial
- 31:36portion not the whole thing okay so copy
- 31:38paste here this is the original content
- 31:41select these two okay let's say for
- 31:44Facebook I want my bullet points which
- 31:45is the new prompt we created and then
- 31:47edited and then let's just use this
- 31:49Twitter tweet prompt it's kind of a
- 31:51weird styling it's hard to tell it's a
- 31:53drop down there's just a carrot here I'm
- 31:55not super concerned with styling until
- 31:56the very end okay oh sweet okay yeah so
- 32:00you can tell this is a bullet point list
- 32:03and it is a summary of my blog post just
- 32:06eyeballing here and then this one used
- 32:08the Twitter tweet which is great and so
- 32:11yeah I mean that's pretty much yeah the
- 32:12feature that we wanted to implement we
- 32:14just wanted to be able to to manage our
- 32:16prompts in our prompts Library over here
- 32:19and then in the create screen that's
- 32:21where we can choose the prompts we want
- 32:23to use for each repurposing flow and
- 32:26then also what I envision is saving this
- 32:29as a default right let's say you want to
- 32:31repurpose a specific type of YouTube
- 32:33video it's a technical step-by-step
- 32:35tutorial for that kind of video you
- 32:37might have one set of prompts for each
- 32:39of these platforms versus a YouTube
- 32:41video that's about breaking trending
- 32:43news that might use a different set of
- 32:46prompts for each platform versus
- 32:48repurposing tweet thread that could
- 32:50potentially use a different set of
- 32:52prompts for each platform and so I
- 32:54Envision you being able to kind of save
- 32:57these pre presets so depending on the
- 32:59type of content you want to purpose
- 33:01apply this presets of prompts for each
- 33:03platform so yeah just for good measure
- 33:05let's try it again with a different set
- 33:07of prompts I do Wonder can I if I copy
- 33:10paste the whole thing make it a little
- 33:11bigger not do that so let's say for
- 33:14LinkedIn I want to use my LinkedIn
- 33:16article and then here I want to do
- 33:18Facebook post so here I actually copy
- 33:20pasted my entire blog post and let's
- 33:22click generate content okay and here's
- 33:24the final content that took a little bit
- 33:26longer because the blog post itself is
- 33:28pretty long it's 4,000 words or
- 33:30something so here this is the LinkedIn
- 33:32post I think it's marked on impra the
- 33:34learning curve prioritized content
- 33:36quality over sensationalism find your
- 33:38Niche this is definitely a pretty
- 33:40accurate recap of my newsletter which is
- 33:43great and then here's the Facebook post
- 33:46and for the Facebook post I'm just kind
- 33:47of using the default Facebook prompt
- 33:50that chat GPT created with absolutely no
- 33:53input from us too many emojis but still
- 33:56not bad this is actually pretty good for
- 33:58a Facebook post cuz I used to help my
- 34:00cousin run Facebook ads for their
- 34:03digital marketing agency and if you
- 34:05ignore all of the Emojis this is
- 34:07actually a pretty solid format that is
- 34:09recommended for Facebook ad post for
- 34:12example uh this is a weak hook but still
- 34:15it's your hook and then kind of a
- 34:17promise related to your hook and then
- 34:20bullet point list and then just a
- 34:22reminder I did it all without blah blah
- 34:24blah and then drill it home here's the
- 34:27CTA trying to encourage engagement this
- 34:30part part at the end i' I'd probably
- 34:32remove but yeah no it's actually this
- 34:35actually does follow a bunch of Facebook
- 34:37post best practices just a little cheesy
- 34:39with all the Emojis and stuff so I would
- 34:41tweak that but it's a great start so our
- 34:43MVP is really starting to shape up
- 34:46basically you can paste text here the
- 34:48platforms you want to repurpose it to
- 34:50select the prompt you want to use for
- 34:52each platform and then in one click
- 34:54it'll generate all this content edit it
- 34:56in line here add your unique point of
- 34:58view your perspective your value ad and
- 35:01then you can copy paste this directly
- 35:03into LinkedIn or Facebook or if you have
- 35:05a social media scheduler buffer then you
- 35:07would copy paste it into there so the
- 35:09app is definitely starting to shape up
- 35:11some of the next things we want to do
- 35:13probably connect the social media
- 35:15accounts generate images as well if you
- 35:17want to do a Facebook post with images
- 35:19or a LinkedIn post with images we'll
- 35:21also want to think about here we have
- 35:22this edit prompt button to regenerate
- 35:25the output in one click and I'm guessing
- 35:28it doesn't work anymore since in a
- 35:29previous prompt we said to remove the
- 35:31edit prompt button what should it do so
- 35:33should you edit this prompt regenerate
- 35:36it should that overwrite the existing
- 35:38prompt should you save it as a new
- 35:39prompt those are the kinds of details we
- 35:41want to think through connecting your
- 35:43social media accounts adding more social
- 35:45platforms adding image and potentially
- 35:47video generation and also just
- 35:50optimizing the UI I don't love I have to
- 35:53scroll all the way down I might switch
- 35:55it to a two column layout where I see
- 35:56the original content on the left and
- 35:58then the generated content on the right
- 36:00that kind of thing but this is getting
- 36:02kind of to the fun part now that we've
- 36:04put a lot of infrastructure in place and
- 36:06you've learned how to set up Firebase
- 36:08effectively creates a new feature how to
- 36:11you know interact with cursor AI to fix
- 36:14things so now we're getting to the fun
- 36:15part of playing around with the MVP and
- 36:17seeing what feels good what's the user
- 36:20experience that we want what are
- 36:21additional things we want to add that
- 36:23would really really help streamline this
- 36:25process for someone who doesn't want to
- 36:27spend hours putting together zapier
- 36:29make.com automations so yeah hope this
- 36:31video is helpful hope this series is
- 36:33helpful my name is Sabrina Romanov hit
- 36:35follow drop a comment below subscribe to
- 36:37my channel
About this transcript
This page contains the full transcript of Build SaaS with AI | Part 5 | User Authentication, Firestore, & Prompts Management by Sabrina Ramonov π, generated from the public captions YouTube serves with the video. The transcript has 6,555 words across 911 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.