📊 How to Build & Launch REAL Web Apps (Google AI + Firebase)

← กลับ⬇ XLSX
FieldValue
TitleHow to Build & Launch REAL Web Apps (Google AI + Firebase)
ChannelMetics Media
Date22 พ.ค. 2569
Duration42:15
Views121,338
Video IDDC4nSUX9pCc
URLhttps://www.youtube.com/watch?v=DC4nSUX9pCc
Segments1236
Tags#ai-studio #firebase #hostinger #no-code #github-deploy #web-app #tutorial
TimeText
0:00This is the complete guide to building
0:02and launching real web applications
0:04using Google AI Studio and Firebase.
0:06Whether you've never used AI Studio
0:08before or you already have a project and
0:11you're not sure what to do next, this
0:12video is for you. Maybe you're building
0:14a website, a web application, or a SaaS
0:17idea you've been thinking about.
0:19Whatever it is, I've got you covered.
0:20And if any of this sounds complicated,
0:23don't worry. I've taken my time building
0:24this tutorial to make sure it's as easy
0:27to follow as possible, even if you've
0:29never done anything like this before.
0:30So, here's the road map for this video.
0:33We'll start by building the app in
0:34Google AI Studio. AI Studio is a free
0:37tool where you describe the app you want
0:38to build and it generates a working
0:40project for you. No coding needed.
0:42During the build, we'll enable Firebase,
0:44which is what gives your app a real
0:46working back end. It manages things like
0:48user accounts, a database, and file
0:50storage. And it's also free to get
0:52started with. From there, we'll make
0:54sure everything is configured properly,
0:55test the app, fix anything that isn't
0:57working, and even set up an admin
0:59dashboard so you can see all of your
1:01users and data in one organized place.
1:04Then, we'll deploy it live on a real
1:05domain using hosting. [music] That's the
1:07one part of the setup that isn't free,
1:09but I'll walk you through a really easy
1:10and affordable setup for this later on.
1:12Now, one of the hardest parts of putting
1:14this video together was figuring out
1:16what app to actually build as the demo.
1:18Because this video isn't about building
1:20a one specific thing. It's a video
1:22that's meant to teach you how to build
1:23your own web application with a working
1:25back end. So, the app I chose to build
1:27in front of you had to be the right one.
1:30It had to be simple enough to follow
1:31along with, but complex enough to teach
1:33you everything you need to know. And
1:35after a lot of thought, here's what I
1:36came up with. This is a web app called
1:38Client Vault. It's a simple file portal
1:40that a freelancer or designer would use
1:43to let their clients log in and upload
1:44files like videos, documents, or images.
1:47And I chose this specific project for a
1:49reason. Let me show you what it can do.
1:51In this app, a user can create an
1:52account with their email and password,
1:54sign in and sign out. So, every user
1:56gets their own private space inside the
1:58app. If they sign out and come back
2:00later, all of their data is still right
2:02there. Nothing ever disappears. They can
2:04upload files, and those files are stored
2:06securely in the cloud. They can view
2:08them, download them, delete them, and
2:10only they have access to their own
2:12stuff. And all of this works together.
2:14» [music]
2:14» Every button, every page, every feature
2:16is talking to the back end behind the
2:18scenes to make it all function. Now,
2:20this isn't just a design or a static
2:22website. This is a real web application.
2:24And everything I just showed you comes
2:26down to four things: user
2:27authentication, a database, file
2:30storage, and connecting it all to the
2:31UI. Those are the four pillars of
2:33building any real web application, and
2:35they're exactly what I'm going to teach
2:37you in this video. We'll set each of
2:39these pillars up one by one, so that by
2:41the end, you have a fully working web
2:43application. And these pillars are
2:44really important to understand because
2:46they apply to everything you build, not
2:48just this one project. That's why I
2:50chose to build Client Vault as the demo
2:52for this tutorial. It's a simple app,
2:54but it relies on all four of these
2:55pillars to function, and it's really the
2:57perfect project to learn the core
2:58concepts behind building any real web
3:00app. So, whether you follow along with
3:02my build or use it as a guide for your
3:04own project, you'll be able to take what
3:06you learn here in this video and apply
3:08it to anything you create next in AI
3:10Studio.
3:12All right, let's go ahead and get
3:13started with building the web app.
3:14First, head over to Google AI Studio. If
3:17you've never used it before, just go to
3:19the link I'll leave in the description
3:20and sign up with your Google account.
3:22It's completely free. So, I'll go to the
3:24top right here and click on get started.
3:28I'll select my Google account right here
3:32and enter my password.
3:36And then once you're signed in, you'll
3:37see the main dashboard right here. All
3:39right, so before I type in my prompt,
3:41let me show you how I like to format it.
3:42Because the way you structure your
3:43prompt makes a huge difference in the
3:45quality of what AI Studio gives you back
3:47on the first try. And this format works
3:49for any project, not just the one I'm
3:51building. I break every prompt down into
3:53four parts. The first part is what it
3:56is.
3:56» This is where you give your app a name
3:58and describe what it does in a sentence
3:59or two. You're giving AI Studio the big
4:01picture so it understands the overall
4:03purpose of what you're building. The
4:05second part is what it needs. This is
4:07where you list out the specific pages
4:08and features your app should have.
4:10Things like a login page, a dashboard,
4:13specific buttons, whatever your app
4:15requires. The more detail you put here,
4:17the better your result is going to be.
4:19The third part is how it looks. This is
4:21where you describe the design, the
4:22colors, the layout, the overall feel.
4:24You don't need to be a designer for
4:26this. Just describe it in plain terms.
4:28AI Studio will take that and turn it
4:30into something that actually looks
4:31really good. And the fourth part is
4:33back-end features. This is where you
4:34tell AI Studio what your app needs to
4:37function behind the scenes. If you
4:38remember the four pillars we talked
4:40about in the intro, this is where they
4:41come in. But if you're just starting out
4:43and you're not totally sure what your
4:45app needs on the back end, that's okay,
4:46[music] too. If you've done a good job
4:48describing your app and its features in
4:50the earlier parts of the prompt, you can
4:52just ask AI Studio to set up a back-end
4:54for you and figure out what your app
4:56needs to function. But whenever you can,
4:57being specific about what you need will
4:59always give you a better result. And by
5:01including this section in your prompt
5:03from the start, AI Studio will set up
5:05Firebase for you automatically. This is
5:07the step that turns your project from
5:09something that just looks good into a
5:11real working web application. All right,
5:13so to recap what we just covered here
5:14before we jump back into AI Studio,
5:16here's the formula for writing any
5:18prompt. First, describe what your
5:19project is, what it needs, how it looks,
5:22and the back-end features that it should
5:24have.
5:24» Structure your prompt just like this for
5:27any project you make in AI Studio, and
5:29it's going to handle the rest for you.
5:31And I want to quickly mention here that
5:32if any of this feels overwhelming, I've
5:34actually gone ahead and created a full
5:36Google AI Studio Firebase guide that's
5:38linked in the video description. So
5:40right now, I'd recommend going down to
5:41the description and opening up that
5:43guide in a new tab. All right, so now
5:45let's switch back over to AI Studio, and
5:47I'll put in my prompt right here.
5:49Then I'll scroll up to the top, and
5:51let's start here at the beginning. I
5:53have the what it is part here. I'm
5:55telling AI Studio that I want to build a
5:56web app called Client Vault. It's a
5:58client file portal where freelancers and
6:00designers can let their clients securely
6:02upload and manage files. So here I'm
6:04giving AI Studio the big picture in just
6:06two sentences. And below this, I have
6:09what my project needs. I'm listing out
6:11all of the essential features. And at
6:12the bottom here, I also include this
6:14line. This says to include any other
6:16features or functionality needed to make
6:18this app work properly that aren't
6:20listed here. I like to include this line
6:22because there's always going to be small
6:24things that you might not think to list,
6:26but AI Studio will know that they're
6:27needed. So you give it the essentials
6:29and let it fill in the gaps. And then
6:31below this, I describe how my app should
6:33look. Here I'm just giving some general
6:35guidance regarding the design of the
6:37project. It doesn't have to be anything
6:38super complicated. And then at the
6:40bottom here, we have a big one. This is
6:42where we list out the back-end features
6:44that we want. Here I'm telling AI Studio
6:46that I need user authentication, a
6:48database, file storage, and security
6:51rules. These are the four pillars we
6:53talked about in the intro. And by
6:54putting them right here in the prompt,
6:56AI Studio knows to set all of this up
6:58for me automatically. So with our prompt
7:00ready to go, I'm going to go to the
7:01bottom right here and click on build.
7:07Now here on the right-hand side is going
7:09to be your preview panel. And then on
7:10the left side here, you'll get a live
7:12look at what's happening regarding the
7:13build of your project. You also may be
7:15asked questions regarding your project
7:17here on the left or on the right. So I'm
7:19going to wait for a moment here and see
7:21what happens next.
7:24So right here we're being asked a
7:25question about how we want the design of
7:27our project to look. We have a few
7:29different options here. I can click on
7:31the arrows to look through each of them.
7:33And I think I'll go for this one right
7:34here. So I'll click on select this
7:36design.
7:37And I'll wait for a few moments and see
7:39if AI Studio needs me for anything else.
7:43Okay, so now at some point during this
7:44process, you'll see this pop up here
7:46that says enable Firebase. This is AI
7:48Studio recognizing that your app needs a
7:50real back end, and it's asking for your
7:52permission to set it up. Go ahead and
7:54click on enable Firebase.
7:58This is going to create your Firebase
7:59project, set up your database, configure
8:01authentication, and connect everything
8:03to your app. All of that happens
8:05automatically just by clicking this one
8:07button. Now, let's wait for a few more
8:08moments here and see what happens next.
8:12And once everything is done, AI Studio
8:14will now give you the initial build of
8:16both your front end and your back end.
8:18And now, you might be tempted here to
8:20jump in and start testing your app and
8:22looking around at the design and all of
8:23the pages, but I'd recommend holding off
8:25on that for now. The first thing we want
8:27to do here is jump into the back end and
8:30verify [music] that everything is set up
8:31and connected properly. AI Studio set up
8:34a front end and a back end for us, but
8:36we want to make sure everything on the
8:37back end side is configured the right
8:39way before we start making any changes
8:41to the front end. That way, once the
8:43back end is established, all of the
8:45changes you make going forward will be
8:47on the final version of your app, and
8:49nothing is going to get overwritten or
8:51broken. So, we'll take care of that
8:52first. Now, to access your back end, you
8:55need to go to the Firebase console,
8:57which is on a separate website. So, let
8:59me show you how to get there and how to
9:00navigate it so you can start making the
9:02changes that we need.
9:03To access our Firebase console, go to
9:06the top and open up a new tab.
9:09And then, you'll go to
9:10console.firebase.google.com.
9:14I'll leave this link in the description
9:15as well. So, I'll go to this link here.
9:19And then, on the right side, you'll see
9:21your project right here. Go ahead and
9:23click into it.
9:27Close out of this.
9:29And here is your Firebase console. This
9:31is where you can see and manage
9:33everything that's happening behind the
9:34scenes of your app. Stuff like your user
9:36accounts, database, file storage,
9:39security rules, all of that lives right
9:41here. Anytime you need to check on
9:42something or make a change to your back
9:44end, this is where you'll go. Now, the
9:46first thing that we need to do here is
9:48check authentication. Let's go over to
9:50the left side right here and hover over
9:52security. Click into authentication.
9:57From here, go to the top and click on
9:59sign-in method.
10:02What you'll see here is a list of
10:03sign-in providers. AI Studio
10:05automatically enabled Google sign-in for
10:07us, which is great. But, if you want
10:09your users to be able to sign up with an
10:10email and password, which most apps
10:12need, we have to turn that on ourselves.
10:14So, over here on the right side, click
10:16on add new provider.
10:19And here, click on email and password.
10:23And we'll enable this right here.
10:26And click save.
10:29And now, with that change made, our
10:31users will be able to sign up on our web
10:32app using their email and password. The
10:35second thing that we'll set up here is
10:36file storage. On the left side menu,
10:38look for databases and storage, then
10:41click into storage here.
10:45When you open this for the first time,
10:47Firebase is going to ask you to upgrade
10:49to the Blaze plan. Don't worry, because
10:51this is completely normal. Firebase
10:53storage requires a billing account to be
10:54on file before you can use it. But,
10:56here's the important thing to
10:57understand. You're not signing up for a
10:59paid subscription. Firebase's Blaze plan
11:02is pay-as-you-go, which means you only
11:04get charged for what you actually use
11:06beyond the free tier. And the free tier
11:08is actually really generous. You get 5
11:10gigs of storage, 1 gig per day of
11:12downloads, and 50,000 read operations
11:15per day. For context, you would have to
11:17be running [music] a pretty active app
11:18to even come close to those numbers. For
11:21learning, building, and testing, you're
11:23most likely not going to pay a cent. So,
11:25let's click on upgrade project.
11:29Then, scroll down and click on create a
11:31cloud billing account.
11:35Click on agree and continue.
11:41And then here you'll need to fill out
11:42your contact information and payment
11:44method.
11:46And once you're done with that, click on
11:48start free.
11:52Now, depending on your payment method,
11:54you might see a pop-up here asking for a
11:56one-time $10 prepayment. This is just
11:58Google verifying your payment method and
12:00it's not a charge for Firebase. Once
12:02it's credited to your account, you'll
12:04also get free trial credits. And if you
12:06ever close your billing account, the $10
12:08is refundable. So, I'll click on okay
12:10right here.
12:14Now, here Firebase will give you an
12:15option to set a billing budget. I'd
12:17recommend setting this to something low.
12:19Something like $5 will work.
12:22That way if your usage ever gets close
12:24to that amount, Firebase is going to
12:26send you an email so there's no
12:27surprises. You can think of this as a
12:29safety net. Let's go down and click on
12:31continue.
12:33And we'll scroll down right here and
12:35click on link cloud billing account.
12:39And here I'll scroll down and click on
12:41done.
12:43Then once everything is set up, it's
12:45going to ask you to set up a default
12:46bucket. A bucket is just where Firebase
12:48stores all of your uploaded files. Think
12:50of it as a folder in the cloud that
12:52holds everything your users upload to
12:54your app. We're going to choose the no
12:56cost location option and go down and
12:58click on continue.
13:01And then here we want to make sure that
13:02we start in production mode and then
13:04click on create.
13:08Okay, so now we just set up our storage
13:10bucket. This is where all of the files
13:12that your users upload are going to be
13:14stored. And if you click on the rules
13:16tab here at the top,
13:18this is where the security rules for
13:20your file storage live. We'll come back
13:22here a little bit later on in the video
13:24and update these once we have a few more
13:25things set up. So, to recap everything
13:28that we just did before we move on, we
13:30successfully set up our storage bucket,
13:32and earlier we enabled email and
13:33password authentication. There are some
13:35other things in the Firebase console
13:37that we need to come back to a little
13:38bit later on in the video, but for now,
13:40these are the two things that we had to
13:42get done here before we can test our
13:44app. Now, let's go ahead and head back
13:45over to AI Studio and let it know what
13:47we just configured here in the Firebase
13:49console. That way you can make sure
13:51everything in our app is properly
13:52connected to the changes that we just
13:54made. So, I'll go ahead and head back
13:55over to AI Studio here.
13:58And I'll go ahead and enter this prompt.
14:01It says, "Here's what I've configured in
14:02the Firebase console. The first thing is
14:04that I enabled email and password
14:06authentication as a sign-in provider,
14:08and second, I set up a Firebase storage
14:10with a default bucket in production
14:12mode." At the bottom here, I say,
14:14"Please make sure the app's file upload
14:16feature is fully connected to Firebase
14:17storage, and that the email password
14:19authentication flow is working correctly
14:21for both sign-up and sign-in." So, here
14:23what we're doing is giving AI Studio the
14:25context of exactly what's changed within
14:28Firebase on the back end. And I would
14:30highly recommend doing this anytime you
14:32change anything within the back end of
14:34your app using Firebase. You just want
14:35to give AI Studio the context of what's
14:37changed. That way it's able to work
14:39through the code for you and make sure
14:41everything is working properly. So,
14:43let's go ahead and send this prompt
14:44here.
14:46And let's wait for a few moments and
14:47make sure everything is updated
14:49properly.
14:51Awesome. Now, as you can see right here,
14:53it appears that everything is good to
14:54go.
14:55All right. So, the next step is for us
14:57to jump in and start testing out our web
14:59app. But first, here's where we are so
15:01far. We now have a front end built. AI
15:03Studio built it all for us. That's our
15:05app's interface, the pages, the buttons,
15:08the layout, everything the user sees and
15:10interacts with. That's done.
15:11» We also have a database set up for our
15:14back end. That was created for us
15:15automatically when we clicked enable
15:17Firebase during the build. The database
15:19is what stores all of your app's data,
15:21user information, file details, and
15:24anything else your app needs to
15:25remember. We have email and password
15:27authentication enabled, so users can
15:29create accounts, log in, and log out,
15:31and we have storage configured, which is
15:33where all of the actual files that users
15:35upload are going to live. And because we
15:38have that database in place, all of
15:39this, every account that gets created,
15:41every file that gets uploaded, every
15:43piece of data your app collects, all of
15:45that is going to be stored and exist
15:47permanently. Now, in the intro, I
15:49mentioned the four pillars of setting up
15:51a real back end for any web app. Here's
15:53where we currently are. The first
15:55[music] three pillars, which are user
15:56authentication, a database, and file
15:58storage, are now set up. We've now
16:01arrived at the last pillar, which is
16:02connecting everything to the UI. And
16:04this one is a little different from the
16:06first three, because it's not something
16:08that you just toggle on and it works. It
16:10changes depending on what you're
16:11building. Every app is different, and
16:14the things that need to be connected and
16:15the problems you might run into will
16:17vary depending on your project. But,
16:19here's the general idea for how this
16:21works with any project. We need to go
16:23into the app, test every feature, and
16:26take note of anything that isn't working
16:28the way it should. In your case, maybe
16:29sign in doesn't work. You can note that
16:31[music] down. Maybe a button isn't doing
16:33what it's supposed to do. You can add
16:35that to your list. Maybe files aren't
16:37uploading or data isn't saving.
16:39» Whatever it is, just make a note of it
16:40as you go. Then, once you've gone
16:42through and tested everything, you go
16:44back to AI Studio and work through your
16:45list one issue at a time. You just
16:48describe the problem, let AI Studio fix
16:50it, test it again, and then move on to
16:52the next one. And you want to keep it to
16:53one issue per prompt, so that way each
16:56fix is clean and doesn't accidentally
16:58break something else. Now, if you run
17:00into something that is completely
17:01blocking you, like you can't even sign
17:03in to your app, you'll want to go ahead
17:05and fix that as a prompt right away, so
17:07you can get past it and keep testing the
17:08rest of your app. You're going to watch
17:10me go through this process for my app.
17:12And the specific problems I run into are
17:15are going to be different from what you
17:16run into, depending on what you're
17:18building. But, the overall approach is
17:20exactly the same. You test things, you
17:22note down what's not working, and you
17:24work through it using prompts with AI
17:26Studio. That's the process, and it's
17:27honestly super easy. All right. So, now
17:30let's go ahead and begin testing our
17:31app. To begin testing our web app, let's
17:33go ahead and maximize the preview panel.
17:36Click on this button right here.
17:39And this is what my app's login screen
17:41looks like. Obviously, yours is going to
17:42look slightly different. In my case, I
17:44don't have an account yet, so I'll click
17:45on create free account.
17:48Now, before you enter anything here, the
17:50first account you create on your app is
17:52going to become your admin account later
17:54on in this video. So, make sure you use
17:56the email and password that you actually
17:58want to use long-term as the owner of
18:00this app. We'll be using this first
18:02account as a regular test account for
18:04now, but later on we'll give this
18:06account admin privileges so you can see
18:08all of your users and all of their data
18:09in one place. So, just keep that in mind
18:11when you're choosing your email and
18:13password here.
18:15I've gone ahead and filled out my
18:16personal information here, so I'll go
18:18down and click on get started.
18:23All right. Now, we're inside of our app.
18:24So, your dashboard is probably going to
18:26look different from mine, depending on
18:28what you built. You'll probably have
18:29different tabs, different features, and
18:31overall a different layout, and that's
18:33totally fine. The important thing is
18:34that you're logged in and you can see
18:36your app's main screen. This right here
18:38is what your users are going to see
18:39every time they use your app. Now, we
18:41want to test every core feature to make
18:43sure it's actually working. For my app,
18:45that means testing file uploads,
18:47downloads, and deletes. For yours, it
18:49might be something different depending
18:51on what your app does, but the process
18:53is the same. Go through each feature one
18:55by one and make sure it does what it's
18:57supposed to do. So, I'll test mine. I'll
18:59start by uploading a file here. I'll
19:01click on browse locally.
19:04And I'll try uploading this file right
19:09I'll scroll down. And right here, you
19:10can see it appears that nothing actually
19:12uploaded. So, here's how we're going to
19:14troubleshoot something like this. I'll
19:15go to the top right and close out of
19:16this.
19:18And we'll go back over to the left side
19:20here. If you find that there's anything
19:21not working within your app, you'll want
19:23to work with AI studio to give it
19:25feedback and have it make those fixes
19:26for you. So, right here I'm going to
19:28say,
19:29"It appears file uploads aren't working.
19:33Troubleshoot
19:34this problem and fix it." Then I'll go
19:37ahead and send this.
19:39And now we'll let AI studio troubleshoot
19:41this problem and fix it for us. So, I'm
19:43going to wait here for a few moments and
19:45wait for those fixes to be done.
19:48All right, so here's what AI studio came
19:49back with. It says that the application
19:51is now fully connected to both Firebase
19:53storage and Firestore, which is going to
19:55allow users to actually upload their
19:56files. In some cases, you may see this
19:58pop up right here, where it says that
20:00there were errors running the code. If
20:01this pops up, just click on fix.
20:05And now we'll wait here for a few more
20:06moments to let those fixes take place.
20:10All right, now as you can see right
20:11here, it says that the fixes have been
20:12completed. So, let's go ahead and try
20:14uploading our files once again. I'll
20:16maximize the window here.
20:18And as you can see right here, we have
20:19one file. So, if I scroll down, it looks
20:21like it actually did get uploaded, but
20:23it just wasn't appearing. So, that's
20:24kind of the whole idea here after you
20:26create your first version of your web
20:28app. You create it, test everything out,
20:30note down anything that's wrong, and
20:32then go through and make those changes
20:33one by one. So, just to make sure
20:35everything is working properly, I'll
20:37click on browse locally again.
20:40I'll try uploading the file again here.
20:44And I'll scroll down.
20:46And there it is. I'll also click on the
20:48download button to make sure that's
20:49working.
20:52And that's working great right here.
20:53I'll close out of this.
20:55And let's also try deleting the file.
20:57I'll click on the trash can icon.
21:00Click on permanently delete.
21:03Awesome. So, that means that everything
21:05is working properly with our database
21:07for file uploads. Now, let's test one
21:09more important thing. In the bottom left
21:11here, I'm going to click on sign out.
21:14And then I'm going to log back into my
21:15account.
21:17Sign back in.
21:20So, we just signed out and signed back
21:22in, and all of our data is still right
21:24here. That means our database is working
21:26and storing data so that it persists for
21:28your users. Authentication is working
21:30because we were able to create an
21:31account, sign out, and sign back in
21:33without any issues. And file uploads are
21:35now working, too. They weren't before,
21:37and that's exactly what the connecting
21:39everything to the UI step is all about.
21:41We had to go in, test things, and find
21:43what wasn't working, and then use AI
21:44Studio to fix it. So, now that
21:46everything on my app is functioning
21:48properly, and the front end and back end
21:50are communicating the way they should,
21:51that means all four pillars are
21:53established. My app now has a real
21:56working back end.
21:57» Now, let's jump into the next step,
21:59which is setting up your admin account.
22:00Okay, so right now every user who logs
22:02into your app sees their own data and
22:04their own files. That's exactly how it
22:06should work for your users. But as the
22:08person who built and runs the app,
22:10you're going to want a way to see
22:11everything. You want to see all of your
22:13users, all of their data, and all of
22:15their activity in one place. And that's
22:17what an admin dashboard is for. This
22:19applies to any app you build. If you're
22:21running a SaaS tool, you'd want to see
22:22all of your customers. If you're running
22:24a course platform, you'd want to see all
22:25of your students. For my app, I want to
22:27be able to log in and see all of my
22:29clients and everything they've uploaded
22:31from one screen. To set this up, we need
22:33to do two things. First, we need to tell
22:35AI Studio which account is the admin.
22:37And second, we'll need it to build a
22:38separate view that only the admin sees.
22:41To find your admin account's user ID, we
22:43have to go back to the Firebase console.
22:45So, I'll open that here at the top.
22:48Then click into authentication.
22:52And then make sure you're in the users
22:54tab. Here you'll see the account that
22:56you created earlier. And then you'll see
22:57the user ID right here. Click on the
22:59copy button.
23:02And then switch back over to AI Studio.
23:06I'll minimize the preview panel here.
23:09And then here we'll send another prompt
23:11to AI Studio. I have a prompt that you
23:13can copy and paste for this that's in
23:14the guide linked in the description. So,
23:16I'm going to copy that over from the
23:17guide.
23:18And then I'll paste that in right here.
23:21I'll scroll to the top here. And right
23:23here I already have my admin user ID
23:25pasted in. But you'll want to replace
23:27this with a user ID that you copied from
23:29Firebase a moment ago. And I also want
23:31to mention here that this prompt for
23:32adding an admin dashboard to your app is
23:35just a starting point. Absolutely feel
23:37free to adjust this prompt. You can
23:39easily just remove or add different
23:41things to it depending on what you want
23:43in your admin dashboard. So, with this
23:44prompt ready to go, I'm going to go
23:46ahead and send it.
23:48And then we'll wait here for a few more
23:49moments and let AI Studio do its thing.
23:54All right, awesome. And now the next
23:55thing that we need to do is head back
23:57over to the Firebase console and make
23:59sure that the security rules were
24:00updated. Let's go back over to the
24:02Firebase console.
24:05And then go down to databases and
24:07storage and find Firestore. We'll click
24:10in right here.
24:13And then click into security.
24:17And then if I scroll down right here,
24:20you'll see this block right here
24:22that says function is admin. And then on
24:24the next line it has my user ID right
24:27here. This is the line that tells
24:28Firebase which account has admin access.
24:31If your user ID is in there, then you're
24:33good to go. Now, in most cases AI Studio
24:35updates these rules automatically when
24:37you send the admin prompt. But if for
24:39some reason you don't see your user ID
24:41in the rules or your admin dashboard
24:43isn't showing all the users, just go
24:45back to AI Studio and tell it to make
24:47sure that the Firestore security rules
24:49were updated. So, for example here, I'll
24:51switch back over to AI Studio.
24:54And then I'll send this prompt.
24:56Make sure the Firebase security rules
25:01are fully updated.
25:03Ensure my user ID
25:06is present, and that I have access to
25:11all data. So, in my case, my security
25:13rules are already updated, but I'll send
25:15this prompt anyways.
25:20Awesome. So, now after setting that
25:21prompt, your security rules should be
25:23good to go. If you want to double-check,
25:25you can always go back into Firestore
25:26and look at the security tab, but AI
25:28Studio should be able to handle
25:29everything for you here. Now, the next
25:31thing we need to do is take care of the
25:33storage rules. These are separate from
25:35the database security rules, and in my
25:36experience, they don't always sync up
25:38automatically the same way. This is
25:40important because the storage rules are
25:42what control who can actually view and
25:44access the files that users upload. So,
25:46if your admin account doesn't have
25:47access in the storage rules, you won't
25:49be able to see other users' files from
25:51the admin dashboard once the app is
25:53deployed. So, we'll update the storage
25:55rules manually just to make sure
25:56everything works properly.
25:58So, let's go back over to our Firebase
26:00console,
26:02click into storage,
26:06then click into rules,
26:09then we'll highlight everything right
26:11here,
26:12and delete this.
26:14And then once again, if you check the
26:16guide linked in the description, I have
26:18copy and paste storage rules that you
26:19can replace right here. So, I'm going to
26:21copy that over from the guide,
26:23then I'll paste it in right here,
26:26and then make sure here at the very end,
26:29you update your user ID right here. So,
26:31just highlight this,
26:34and replace it with your actual user ID.
26:36Once you have that in, click on publish,
26:40then we'll switch back to AI Studio,
26:44and before continuing, wait 1 to 2
26:46minutes for everything to sync up.
26:48Awesome. And now with that done, we know
26:49that the storage rules are set up
26:51correctly, and everything will work
26:53properly when we deploy. Next, let's
26:54take a look at what our admin panel
26:56actually looks like. I'll start by going
26:57to the top here and refreshing this
26:59page.
27:02And then I'll maximize the preview
27:03panel.
27:05And now this is what our admin control
27:06panel looks like. I can see my total
27:08users, the amount of files I have, and
27:11then the server status. And right here
27:12I'm able to see my user account. Now for
27:14my admin control panel, I want to make
27:16sure that it's actually tracking new
27:18users as well. And then I'm able to read
27:20and download their files. So I'm going
27:21to click on sign out in the bottom left.
27:25And I'm going to create another account.
27:27Fill out this info right here.
27:30Then I'll sign up right here.
27:33And now I'm going to upload that test
27:34file again.
27:37Double click on it here.
27:40Then here at the bottom I can see it was
27:42uploaded. So now I'm going to sign out
27:43of this account and log back into my
27:45admin account.
27:50Sign back in here.
27:53And here as you can see, I now have two
27:55users. And I can also see that they
27:57uploaded one file. So if I click on
27:59manage data,
28:01and I'm able to see that test file that
28:03we uploaded to this account. And this is
28:05the power of having an admin console. I
28:07can see all of my users, their emails,
28:09when they signed up, and how many files
28:11each one has uploaded. No matter how
28:13many users sign up for your app, you'll
28:15always have a clear overview of
28:16everything that's happening within your
28:18admin control panel. And also, every one
28:20of your users' experiences stays
28:22completely private. They're only able to
28:23see their own data. And now this means
28:25that our app is fully built and working.
28:28We've got user accounts, a database,
28:30file storage, security rules, and an
28:32admin dashboard. Now we need to get this
28:35thing live on the internet. So now let's
28:37save it to GitHub and deploy it. So I'm
28:39going to minimize this here.
28:42Then click on settings here in the top
28:43right.
28:45Click on this arrow.
28:48And click GitHub.
28:51Click on sign in to GitHub to continue.
28:55And if you have an existing GitHub
28:56account, you can log in right here. But
28:58if you don't have an account yet, you
29:00can sign up down here. In my case, I'll
29:02click on continue with Google.
29:05I'll log in with my account right here.
29:10Here you're able to choose your
29:11username.
29:13You can choose your country or region.
29:18And then scroll down and click on create
29:23Then here just scroll down.
29:25And click install and authorize.
29:31And now here we'll need to create a
29:32repository. A repository is just a place
29:34on GitHub where your website or web app
29:37is going to be stored. We'll use this
29:38later to actually deploy it onto the
29:40internet. So here I'll just say
29:42client vault web app. And then for the
29:45description, I'll just put tutorial web
29:49app. And for the visibility, I'd
29:50recommend just keeping this as private.
29:52Go down and click on create GitHub
29:54repository.
29:59Then you'll scroll down to the bottom
30:01and click stage and commit all changes.
30:06All right, and now we've saved our web
30:08app to GitHub. That means that we're
30:10ready to deploy.
30:11All right, so our project is saved to
30:13GitHub. That's great, [music] but how do
30:14we actually get it on the internet where
30:16people can visit it? Well, we need
30:18hosting. And if you're not familiar with
30:19hosting, it's basically renting space on
30:21a server that stays online 24/7, so your
30:24app is always accessible whenever
30:26someone visits it. This is the one part
30:28of the setup that isn't free, but it's
30:30necessary because without it, your app
30:32doesn't have a home on the internet.
30:33There are many different hosting options
30:35out there, but the easiest way I found
30:37for AI studio projects specifically is
30:39Hostinger. Hostinger connects directly
30:41to GitHub, so every time you push a
30:43change to your project, it automatically
30:45redeploys your app. [music] You don't
30:46have to worry about manually updating
30:48anything. Hostinger also supports the
30:50technology that AI Studio projects run
30:52on right out of the box, [music] so
30:53there's no extra configuration needed on
30:55your end. You'll also get a free domain
30:57name for the first year, so your app
30:59gets a real professional URL instead of
31:01just some random string of characters.
31:03And the pricing is really affordable for
31:05what you're getting. So the next step
31:07here is to sign up for Hostinger. To get
31:09an exclusive discount, go to this link
31:11on screen right here, or click the first
31:13link in the video description. That link
31:15will take you to the correct setup page,
31:17and make sure you're getting the lowest
31:18pricing possible.
31:20All right, so now I'm going to go ahead
31:21and go to that link at the top of the
31:23video description.
31:26And once you go to that link, you'll be
31:27brought to this page right here. Click
31:29on start now.
31:32And then down here, we'll be looking for
31:34the business plan. The reason why we
31:36need this plan specifically is because
31:38if I scroll down here, you'll see it
31:39includes five managed Node.js web apps,
31:42and this is the feature that we'll need.
31:44So let's scroll up here, and click on
31:46choose plan.
31:50Then here, start by choosing your
31:52billing period. By default, this will be
31:54set to 48 months. However, you can
31:56switch this to 24 months, 12 month, and
31:591 month plans as well. For this video,
32:01I'll go with the 12 month option.
32:05As you can see here, we still get plenty
32:06of savings, and also a free domain for
32:08the first year. Down here, you can
32:10choose to type in your domain name, but
32:12I'll do this a little bit later. And
32:13then on the right side right here, you
32:14can review your order. And don't forget
32:16that you can get this additional
32:17discount by using the first link in the
32:19video description. Once you're ready, go
32:21down and click on continue.
32:24And then on this page right here, you
32:26need to sign up for a Hostinger account.
32:28So enter your email address,
32:30and create a password.
32:32And then click register.
32:36And now on this page right here, go
32:38ahead and enter your billing address and
32:39your payment information, go through the
32:41checkout process, and I'll meet you at
32:43the next step.
32:47All right, and once you get to this page
32:48right here, you'll be brought into
32:50Hostinger's onboarding. And depending on
32:51whenever you're watching this video,
32:53this onboarding process may look
32:54slightly different. But even if it is
32:56slightly different, the overall steps
32:57should be the same. So, just follow
32:59along the best you can. For this first
33:00question here, I'm going to say that I'm
33:02creating this website for myself.
33:05I'm looking to create a new site.
33:09In the bottom right here, I'm going to
33:10click on skip personalization.
33:14And then when you get to this page right
33:15here, you'll see three options. You'll
33:17want to scroll down right here, and you
33:19want to look for the option that says a
33:20Node.js web app. This is going to allow
33:22us to deploy via GitHub. So, click on
33:26And then click next.
33:29And then right here, you can claim at
33:30your free domain name for the first
33:32year. So, right here I'm going to type
33:34clientvaulttutorial.com.
33:38And as you can see, this domain is free
33:40for the first year. So, I'll go ahead
33:41and claim this.
33:43And click on next.
33:48And then right here, you'll have to
33:49verify your domain name owner details.
33:52This is who your domain is going to be
33:53registered to. So, confirm all of the
33:55information is correct right here.
33:57And then after you've filled everything
33:59out, click on register.
34:03And here you may get a text message sent
34:05to your phone number.
34:07Go ahead and enter your code right here.
34:11And click verify.
34:16Awesome. Now your domain is ready to go.
34:18Once you get to this screen here, click
34:19on connect with GitHub.
34:23And then on this screen here, you can
34:24choose whether you want to give
34:25Hostinger access to all of your
34:27repositories or only select
34:29repositories. In my case, I'll just go
34:31with all. I'm going to scroll down and
34:33click install and authorize.
34:38And then right here, you should see that
34:39repository that we created in Google AI
34:41Studio a few moments ago. I'll click on
34:44my repository right here
34:46and click on continue.
34:51And then here, the first thing you want
34:52to do is change the framework preset. Go
34:54ahead and click on this
34:56and then scroll all the way to the
34:57bottom. You're looking for this option
34:59right here called Vite. Click on this
35:02and then scroll down this page.
35:04Look for environment variables. Next to
35:06this, click add.
35:09We're going to add in some environment
35:10variables here using an API key. If your
35:13Google AI Studio project uses any AI
35:15features, things like a chatbot, image
35:17generation, or any kind of AI-powered
35:19tool, those features won't work after
35:21deployment unless we add an API key. So,
35:24let's take care of that now. Let's
35:25switch back over to Google AI Studio.
35:29And I'll close out of this.
35:31Click on back to start.
35:34Click into dashboard.
35:38And here you'll land in API keys. On the
35:40right side, click on create API key.
35:44Click on create key.
35:48And then click copy key.
35:51And switch back over to Hostinger.
35:54And then for the first name here, let's
35:56type
35:57Gemini {underscore}
36:00API {underscore} key.
36:03And then paste in the key right here.
36:06Click on add more.
36:08Then for the next name, we'll name this
36:10Google {underscore} API
36:14{underscore}
36:15key. Then paste in the same key again.
36:18And then one more time, click on add
36:20more.
36:21And we'll name this Vite
36:24{underscore} Gemini
36:27API
36:29underscore
36:30key.
36:31And then paste in that same key again.
36:34With that done, click on finish.
36:37And then click deploy.
36:42Perfect. Now your web app is going to be
36:44deployed. I'll wait here for a few
36:45moments and wait for everything to
36:46finish up.
36:49Okay, and as you can see here, the
36:50deployment has completed and our app is
36:52available right here on our custom
36:54domain. So everything is already
36:56connected and good to go. So I'm going
36:58to go to my web app right here by
36:59clicking on this link.
37:02And there we go. Now all the stuff that
37:03we did earlier when we signed up for our
37:05admin account and uploaded files, all
37:07that information should still be here.
37:09So I'm going to go ahead and log in to
37:11my admin account
37:13and click sign in.
37:16Awesome. As you can see here, everything
37:18is the exact same as it was back in AI
37:20Studio. That's because the preview was
37:22connected to the same Firebase backend
37:24the entire time. And this is great
37:26because it means that your database and
37:27your backend were working properly the
37:29whole time. Now if something isn't
37:31working the way you expect or if you
37:33want to make any changes to your app in
37:34the future, here's how you do it. First,
37:37go back over to Google AI Studio
37:40and close out of this.
37:43Click on dashboard.
37:46Click on apps.
37:48Then click into the app that you just
37:50deployed right here.
37:53And then here you'll just make your
37:54changes or tell AI Studio what needs to
37:56be fixed and then just save it to
37:58GitHub. Hostinger is connected to your
38:00GitHub so it'll automatically pick up
38:02the update and redeploy your app. You
38:03don't have to touch anything on the
38:05Hostinger side. You make the change at
38:07AI Studio, push it to GitHub, and it
38:09shows up on your live site. So for
38:10example here, I could make a small
38:12change. I'll say, "Make the red color in
38:16the admin panel green instead." So we'll
38:19just do a small design change like that
38:21right here. I'll go ahead and send this
38:23change.
38:25And then we're going to let AI Studio
38:26work for a minute to change out the
38:27colors.
38:30And now here in the preview mode, you
38:31can see that it's now green. To push
38:33this update to our actual live
38:35deployment, go to the top right and
38:37click on the settings.
38:39Click on the arrow.
38:42Then click on GitHub.
38:46Then we'll scroll down to the bottom.
38:48Click on stage and commit all changes.
38:53And then your changes will be uploaded
38:54to GitHub. And then after that, switch
38:56back over to your web app.
38:59And then refresh the page.
39:03And then as you can see right here,
39:05Hostinger automatically redeployed your
39:07app with those updated changes. And one
39:09small detail you'll notice here at the
39:10top is the actual site name. This right
39:13here is the default name. Every Google
39:15AI Studio web app gets this name. To fix
39:17that and update your site title, you
39:19would do the exact same thing. You'd
39:20switch back over to AI Studio and
39:22request the change. And then you would
39:24commit that change to GitHub. You'll use
39:26the workflow I just showed you to make
39:27any changes or troubleshoot. Now, before
39:30we finish up here, let's switch back
39:31over to Hostinger.
39:33Then let's close out of this.
39:37And then here you'll find your HPanel.
39:39This is where you can manage your
39:40deployment and your hosting. Right here
39:42you may have some items on your to-do
39:43list. And if you click on this here in
39:45the top left,
39:47and then click on websites,
39:51click on Node.js,
39:55you should see your web app listed right
39:56here. Underneath it, click on dashboard.
40:02And then right here, you'll be able to
40:04see all of the information regarding
40:05your deployment. You can access your
40:07settings right here. You'll see your
40:08current deployment and then some other
40:10miscellaneous information down here. You
40:12may see some information regarding your
40:14domain right here. Make sure after this
40:16video, you check the email that your
40:17domain was registered to and you'll find
40:20an email from Hostinger that has a link.
40:22You just click on that and it verifies
40:23your domain. And if you ever need help
40:25with finding something in your Hostinger
40:26dashboard, go to the top right and click
40:29on ask AI.
40:31This is going to open up the Cody AI.
40:33You can ask it any question and it's
40:35super helpful. And if it can't figure
40:36something out for you, it's going to
40:38connect you to a live agent. And from my
40:39experience, it's been super helpful. And
40:41also, let me give you a quick tour of
40:43the Firebase console. So, I'm going to
40:45switch back over to Firebase.
40:48So, at the top here, you have your
40:49project overview. I'll click into it.
40:53This gives you a snapshot of your
40:55project, including what plan you're on
40:57and how many apps you have. Down here,
40:58you can see a quick look at your current
41:01reads and writes. So, if you ever need
41:03to check how your app is performing,
41:04this is the first place to look.
41:05Underneath that, on the left, you have
41:07your settings. This is where you'll find
41:08things like your billing information,
41:10integrations, service accounts, and user
41:12permissions. You probably won't need to
41:14touch this often, but if you ever need
41:16to manage anything on the account level,
41:18it's all right here. Underneath this,
41:20you have what's new. Firebase shows you
41:22new features and updates. Below that,
41:24you'll have your project shortcuts.
41:25These are the tools that we've used
41:27throughout this video. In our case, we
41:28visited Firestore, authentication, and
41:31storage. So, those are showing up here.
41:33You'll visit these three tabs the most
41:34often. And then all the way at the
41:36bottom, you have your product
41:37categories. This includes databases and
41:39storage, security, AI services, hosting
41:42and serverless, devops and engagement,
41:44and analytics. The ones here at the
41:46bottom are more advanced and you'll only
41:48really visit the databases and storage
41:50and security tabs. You just built and
41:52launched a real web application from
41:54scratch, all using Google AI Studio,
41:57Firebase, and Hostinger. And if you
41:59haven't signed up for your hosting plan
42:00yet, go to this link on screen right
42:02here or click the first link in the
42:04video description. Using that link will
42:05make sure you get the lowest pricing
42:07available. If this video helped you out,
42:09make sure to hit like and subscribe for
42:11more tutorials just like this. I'll see
42:13you in the next video.
TimeSectionPoints
0:00–1:121. Intro + Roadmap — เป้าหมายและแผนของคลิปคู่มือฉบับเต็มสร้าง+ปล่อยเว็บแอปจริงด้วย Google AI Studio + Firebase เหมาะทั้งคนไม่เคยใช้และคนมีโปรเจกต์ค้างอยู่ / AI Studio = เครื่องมือฟรี อธิบายแอปที่อยากได้แล้วมันสร้างโปรเจกต์ที่ใช้งานได้ให้ — ไม่ต้องเขียนโค้ด / ระหว่างทางจะเปิด Firebase เพื่อให้แอปมี backend จริง แล้วจบที่ deploy ขึ้นเน็ต
1:12–3:392. Client Vault + 4 เสาหลักของเว็บแอปจริงเลือก demo เป็น "Client Vault" — พอร์ทัลให้ฟรีแลนซ์/ดีไซเนอร์ ให้ลูกค้าล็อกอินแล้วอัปโหลดไฟล์ (วิดีโอ/เอกสาร/รูป) / ทำไมเลือกตัวนี้: ง่ายพอจะตามทัน แต่ครบพอจะสอน "ทุกอย่างที่ต้องรู้" ของเว็บแอปจริง / แก่นบทเรียน: เว็บแอปจริงทุกตัว = 4 เสาหลัก → user authentication, database, file storage, เชื่อมทั้งหมดเข้า UI
3:39–7:433. สูตร Prompt 4 ส่วน + ส่ง prompt แรกโครงสร้าง prompt สำคัญต่อคุณภาพผลลัพธ์ครั้งแรกมาก — แบ่งเป็น 4 ส่วนเสมอ / ① What it is: ชื่อ + แอปทำอะไร (1-2 ประโยค ให้ AI เห็นภาพรวม) ② What it needs: หน้า/ฟีเจอร์ที่ต้องมี (login, dashboard, ปุ่ม...) ยิ่งละเอียดยิ่งดี / ③ How it looks: ดีไซน์ สี ฟอนต์ อารมณ์ ④ The tech: เทคโนโลยี/เฟรมเวิร์กที่ใช้ / ส่ง prompt → AI Studio สร้างโครงแอปทั้งหน้าบ้าน+เตรียมหลังบ้านให้
7:43–10:344. Enable Firebase + Authenticationจะมี popup "Enable Firebase" เด้งขึ้น = AI Studio รู้ว่าแอปต้องมี backend จริง ขออนุญาตตั้งให้ / กดปุ่มเดียว → สร้าง Firebase project + ตั้ง database + ตั้ง authentication + เชื่อมเข้าแอป อัตโนมัติทั้งหมด / คำแนะนำ: อย่ารีบเข้าไปเล่นแอป — เข้า backend (Firebase Console) ไปตรวจ/เปิด Authentication ก่อน
10:34–21:245. File Storage (Blaze) + เชื่อม UI (test & fix)File Storage: เมนู Databases and storage → Storage → Firebase ขอให้อัป Blaze plan (pay-as-you-go ต้องผูกบัตร แต่ free tier 5GB/50k reads ต่อวัน) / เชื่อม UI = เสาที่ต่างจาก 3 อันแรก เพราะไม่ใช่กดเปิดแล้วได้เลย — ขึ้นกับแต่ละแอป / วิธี: เข้าแอป test ทุกฟีเจอร์ จดทุกอย่างที่ยังไม่ทำงาน (ล็อกอินไม่ติด/ปุ่มไม่ทำงาน/อัปโหลดไม่ขึ้น) → กลับ AI Studio บอกแก้ทีละจุด
21:24–28:346. Admin Dashboard + Security Rulesปกติ user เห็นแต่ข้อมูลตัวเอง (ถูกแล้ว) แต่เจ้าของแอปต้องเห็นทุกคน → ต้องมี admin dashboard / ทำ 2 ขั้น: บอก AI Studio ว่า account ไหนเป็น admin + ให้สร้าง view แยกสำหรับ admin เห็น user/ไฟล์/กิจกรรมทุกคน / ตรวจ Security Rules ใน Firebase Console → Firestore → security: ต้องเห็น `function isAdmin` + UID ของเราในกฎ ถ้าไม่มีให้สั่ง AI ใส่ซ้ำ (กฎคุมทั้งความปลอดภัยและการเห็นข้อมูล)
28:34–42:157. Save to GitHub + Deploy Hostinger + Auto-SyncSave to GitHub: Settings → GitHub → sign in → สร้าง repository (ที่เก็บโค้ดแอป) ใช้ deploy ต่อ / Deploy: Hostinger เชื่อม GitHub โดยตรง — connect with GitHub → เลือก repo → framework preset = Vite → ใส่ environment variables (API key) → ผูกโดเมน → deploy / Hostinger รองรับเทคโนโลยีของ AI Studio ออกมาเลย และทุกครั้งที่ push เข้า GitHub มัน redeploy เองอัตโนมัติ / Auto-Sync: แก้แอปที่ AI Studio → save to GitHub → Hostinger หยิบ update ไป redeploy เอง ไม่ต้องแตะฝั่ง Hostinger (demo เปลี่ยนสีแดง→เขียวในแอดมิน)