GPT Pilot ✈️ Build Full Stack Apps with a SINGLE PROMPT (Made for Devs)

Matthew Berman
21 Dec 202317:08

Summary

TLDRThis video script showcases the remarkable capabilities of GPT Pilot, an AI coding assistant that enables engineers to create sophisticated full-stack applications through seamless collaboration with AI. The video demonstrates the step-by-step process of building a complete authentication system, including user registration, login, password reset, and session management, using Node.js, Express, and MongoDB. It highlights the interactive dialogue between the engineer and AI, with the AI providing guidance, generating code, and assisting with debugging and testing. The result is a fully functional application, built in a fraction of the time it would have taken without AI assistance.

Takeaways

  • 🤖 GPT Pilot is an AI-powered tool that allows engineers to create sophisticated full-stack applications by collaborating with AI.
  • 🔌 GPT Pilot has a VSCode plugin that provides a seamless integration for engineers to work with the AI.
  • 🏗️ GPT Pilot guides the user through the entire process of building a full-stack application, from planning to implementation and debugging.
  • 👨‍💻 The AI and the engineer work together in an iterative process, with the AI writing code, asking clarifying questions, and the engineer providing input and verifying the results.
  • 🛠️ GPT Pilot handles tasks like initializing projects, installing dependencies, writing code, and handling errors and debugging.
  • 🔒 The demo application involved building a Node.js app with user registration, login, and session management using JWT tokens and MongoDB.
  • 🤖 The AI was able to write complex code, handle errors, and fix bugs based on the engineer's feedback and input.
  • 🚀 The AI can create a complete application with a front-end, back-end, and database integration, with code generation, testing, and documentation.
  • 🔁 The AI-engineer collaboration allows for easy iteration and the ability to go back to any step in the development process if needed.
  • 📚 GPT Pilot generates comprehensive documentation throughout the development process, making it easier to understand and maintain the application.

Q & A

  • What is GPT Pilot and what does it offer?

    -GPT Pilot is an AI coding assistant that allows engineers and engineering teams to work with AI to create sophisticated, full-stack applications. It offers a VSCode plugin that enables real-time collaboration between a human developer and an AI to build complex applications.

  • What application was built during this demonstration?

    -The demonstration involved building a full-stack Node.js application with authentication features such as user registration, login, and password reset. It also included session management and displayed the logged-in user's first name on the homepage.

  • What were the steps involved in building the application using GPT Pilot?

    -The steps involved providing a detailed description of the application requirements, setting up the local environment, following the AI's action plan for development, reviewing and debugging code, testing functionality, and verifying the application's working state at various stages.

  • How did the AI assist in the development process?

    -The AI generated the project plan, provided instructions for implementing tasks, wrote code snippets, assisted in debugging issues, and guided the overall development process. The human developer collaborated with the AI, providing inputs, verifying functionality, and testing the application along the way.

  • How did the AI handle errors or issues during the development process?

    -When errors or issues arose, the AI prompted the developer to start debugging and provided suggestions to resolve the problems. It also allowed the developer to restart the process from any previous step if needed.

  • What technologies were used in building the application?

    -The application used Node.js, Express.js, Mongoose, MongoDB, JWT tokens, bcrypt for password hashing, EJS for templating, and Bootstrap for styling.

  • How did the AI handle documentation for the application?

    -The AI generated documentation for the application during the development process, including a README file with relevant information about the application's structure and functionality.

  • What was the developer's role in the process, and how did they interact with the AI?

    -The developer's role was to collaborate with the AI, provide inputs and confirmations at various stages, verify functionality by testing the application manually and through the terminal, and debug issues when they arose. The developer interacted with the AI by confirming commands, providing inputs when prompted, and communicating any issues or errors.

  • What features did the final application include?

    -The final application included user registration with password strength requirements, login functionality with JWT tokens, session persistence, and the ability to display the logged-in user's first name on the homepage.

  • How did the AI handle the potential for extending the application's functionality?

    -The AI provided the option for the developer to add new features or make changes to the application after the initial development process was complete. The developer could also restart the process from any previous step if needed, allowing for iterative improvements and extensions to the application.

Outlines

00:00

🤖 Introducing GPT Pilot: A Powerful AI Coding Assistant

The video introduces GPT Pilot, a powerful AI coding assistant that allows engineers and teams to create sophisticated full-stack applications by collaborating with AI. The presenter demonstrates how GPT Pilot's VS Code plugin facilitates the process of building a full-stack application for user authentication, including registration, login, password reset, and session management. The AI guides the user through the development process, asking questions, generating code, and providing instructions to debug and test the application at each step.

05:00

🛠️ Setting Up the Project and Initial Development

The presenter starts by describing the project goals and requirements, including the use of Node.js, Express.js, and MongoDB. GPT Pilot then guides the setup of the local environment and initializes the project, creating the necessary files and directories. The AI generates code for user registration, including password hashing using bcrypt. The presenter tests the user registration functionality and continues with the iterative development process, collaborating with the AI to debug and test along the way.

10:00

🌐 Building the Front-end and Implementing Authentication

GPT Pilot creates the front-end pages using EJS and Bootstrap, including the registration, login, and homepage. The AI implements JWT-based authentication, password strength requirements, and session persistence. The presenter verifies the functionality at each step, working with the AI to debug and fix any issues that arise. The AI also generates documentation for the application.

15:02

🎉 Completing the Full-Stack Application

The presenter successfully logs in to the application through both the terminal and the UI, demonstrating the functional full-stack application built with GPT Pilot's assistance. The AI completes the project, reaching 100% generation and adding final touches to the documentation. The video concludes by highlighting the impressive capabilities of GPT Pilot in building sophisticated applications through collaboration with AI, and encourages viewers to explore further features and join the GPT Pilot Discord community.

Mindmap

Keywords

💡GPT Pilot

GPT Pilot is described as a sophisticated AI coding assistant designed specifically for engineers and engineering teams. It integrates with development environments such as VS Code to facilitate the creation of full-stack applications. The mention of GPT Pilot as a sponsor and its capability to work in tandem with engineers to produce complex software solutions underscores its significance in automating and enhancing the software development process. For example, the video demonstrates using GPT Pilot to build an application with user authentication features, showcasing its advanced AI-driven development capabilities.

💡VS Code Plugin

The VS Code Plugin for GPT Pilot is a tool that allows developers to access the functionalities of GPT Pilot directly within the Visual Studio Code (VS Code) Integrated Development Environment (IDE). This plugin simplifies the process of creating and managing software projects by providing an interface to interact with GPT Pilot's AI capabilities. The script mentions the installation and utilization of this plugin, illustrating how it enables seamless integration of AI into the development workflow.

💡Full Stack Application

A Full Stack Application refers to a software solution that includes both frontend (client-side) and backend (server-side) components. The video script outlines the creation of such an application, emphasizing the comprehensive nature of development tasks that GPT Pilot can assist with. Examples from the script include building authentication features, user registration, and session management, demonstrating the AI's ability to handle a wide range of development tasks across the full technology stack.

💡Authentication

Authentication in the context of the video is the process of verifying the identity of a user attempting to gain access to an application. The script details the development of authentication features such as login, registration, and password resetting. This showcases GPT Pilot's capability to implement security measures within an application, a critical component of modern software development.

💡JWT Tokens

JWT (JSON Web Tokens) Tokens are a method for securely transmitting information between parties as a JSON object. The video script mentions choosing JWT tokens as the method for handling the login and registration process. This choice highlights the importance of secure authentication mechanisms in application development and the AI's ability to incorporate such security protocols.

💡Node.js

Node.js is a runtime environment that allows for the execution of JavaScript code server-side. The video script discusses creating a Node.js application, indicating the technology's role in building the backend of the full-stack application. This exemplifies how GPT Pilot can assist with setting up and configuring server-side components using popular and modern technologies.

💡Mongoose

Mongoose is a MongoDB object modeling tool designed to work in an asynchronous environment. The script's mention of using Mongoose for database interactions signifies the incorporation of database management tasks in the application development process, showcasing GPT Pilot's ability to handle database schemas and data interactions efficiently.

💡bcrypt

bcrypt is a password-hashing function that enhances security by transforming passwords into a secure format before storing them in a database. The script references the use of bcrypt for hashing passwords in the user registration backend logic, illustrating GPT Pilot's support for implementing essential security practices in application development.

💡EJS

EJS (Embedded JavaScript) is a templating language used to generate HTML markup with plain JavaScript. The script mentions using EJS along with Bootstrap for the frontend development, highlighting the AI's capability to manage frontend technologies and integrate them with backend services to create dynamic web pages.

💡Debugging

Debugging refers to the process of identifying and removing errors or bugs from software. The video script includes instances where the developer works with GPT Pilot to debug issues encountered during the development process. This illustrates the interactive and iterative nature of working with an AI coding assistant, where the AI provides support in troubleshooting and refining the application.

Highlights

GPT pilot allows you to work with AI to create sophisticated, full stack applications.

The level of complexity and sophistication that you can build into a full stack application simply by working with AI with GPT pilot is incredible.

GPT pilot is made for engineers and engineering teams.

You can save your progress along the way if you build a complex enough application it could take a few hours to do in collaboration with the AI but a few hours is nothing compared to potentially weeks of work that it would have taken without this.

We're going to create a node.js app that enables users to register and log into the app on the front end create only three pages one that enables users to log in the other that enables users to register and the third one shows the data of the logged in User make sure that after registration or login the user is kept logged in in a session so that when you visit the homepage you could see the login user and we're going to be using MongoDB for the database.

Now it's asking me all the clarifying questions that it needs and it's giving me a project summary as you can see here.

Now it already stopped and it's waiting for an input from me so please set up your local environment so that the Technologies listed can be utilized, when you're done write done so I can either write done or I can simply click this done button.

Now it's creating the action plan for development and the nice thing is as you're developing you're going to run into bugs just like any developer would and you can work with the AI to debug things to test things along the way and to make sure that you're ironing out things as you go and this iterative process between an engineer and an AI is really what distinguishes GPT pilot.

Now it paused and it says can I execute the command npm init Dy and it gives you a timeout window that it can execute that within so can I execute this yes yes you can and the nice thing is as it's building we're actually going to see the code being written over here on the left side all the files being created and if it ever needs input on a specific line of code it actually pulls up that file highlights the line of code and asks you for that input so here we go.

GPT Pilot is asking me to verify that it's working so let's do that so we just click again start the app we have some depre warnings and these are all warnings so that should be fine server is running on Port 3002 mongodb connected okay so we're going to grab this curl request going to copy it switch over to terminal paste it in hit enter user successfully created let's try it again just to make sure we get an error warning now because this user is already created perfect user already exists okay now that's it we just click continue.

Now it's asking if it could do npm start sure, next it's going to ask me to test if the password strength requirements are correctly implemented and it's giving me the code to do that.

Now we're going to test the login functionality so let's click start app, grab that command I'm going to paste in the command they gave me and I'm actually going to use a user that I already know is registered so back up here for my previous commands copy that, all right and then I'm going to use the password of password 1 2 3 and hit enter, logged in successfully perfect and it responded with a token awesome all right, back here continue and now we are 2/3 done congratulations 66.67% of your project generation.

We're done congratulations you've reached 100% of your project generation, so now we have a full stack application, front end back end a way to log in a a way to store that login information in the database we have a JWT secret protocol set up completely done for us by AI by GPT pilot it is super impressive.

Now it's asking me if I want to add any features or changes and so for now I'm just going to click enter for no but of course you can continue to extend this application and as I mentioned before if I click this little back arrow right here I select an app off me you can select any of these major steps so I'm going to say coding and then you can also select a development step so you can start over from any of these steps, and these steps are referencing the different steps that we went through to build this application if you run into any problems jump in their Discord the two Founders are great they're super helpful they'll help you out I'll drop the Discord Link in the description below if you liked this video please consider giving a like And subscribe and I'll see you in the next one.

Transcripts

play00:00

user password entered log in there we go

play00:03

you are logged in so it fixed itself how

play00:05

impressive is that GPT pilot allows you

play00:08

to work with AI to create sophisticated

play00:11

full stack applications I know I've

play00:13

reviewed a few other AI coding

play00:14

assistants but GPT pilot really stands

play00:17

alone the level of complexity and

play00:19

sophistication that you can build into a

play00:21

full stack application simply by working

play00:23

with AI with GPT pilot is incredible and

play00:27

GPT pilot is made for engineers and

play00:30

engineering teams so I'm going to show

play00:31

you how to use it today they're the

play00:33

sponsor of today's video and they have

play00:35

an amazing VSS code plug-in that just

play00:37

came out so let's use that let's go so

play00:40

with vs code open I'm going to go over

play00:43

to my extensions right here and I'm just

play00:45

going to type in GPT pilot and there it

play00:47

is GPT pilot Alpha so you're going to

play00:49

click this and I already have it

play00:51

installed so go ahead and click install

play00:53

and once you have it installed you're

play00:54

going to see this little tab right here

play00:56

on the left side click that we click

play00:58

open GPT pilot and since since I've

play01:00

already done this it's a little

play01:01

different but the first thing you're

play01:02

going to be greeted with is asking for

play01:04

your gp4 API key once you do that click

play01:07

create new app and the really nice thing

play01:09

is you can save your progress along the

play01:11

way if you build a complex enough

play01:13

application it could take a few hours to

play01:16

do in collaboration with the AI but a

play01:19

few hours is nothing compared to

play01:22

potentially weeks of work that it would

play01:24

have taken without this and what we're

play01:26

going to be building today is a full

play01:28

stack application that allows for

play01:30

authentication so logging in resetting

play01:33

the password registering Everything full

play01:36

stack so what is the project name off me

play01:38

hit enter describe your app in as much

play01:40

detail as possible so we're going to

play01:42

create a node.js app that enables users

play01:45

to register and log into the app on the

play01:48

front end create only three pages one

play01:50

that enables users to log in the other

play01:52

that enables users to register and the

play01:54

third one shows the data of the logged

play01:56

in User make sure that after

play01:58

registration or login the user is kept

play02:00

logged in in a session so that when you

play02:02

visit the homepage you could see the

play02:03

login user and we're going to be using

play02:05

for the database now you can build

play02:07

anything here okay now that we have this

play02:09

described go ahead and push send and

play02:11

it's going to start asking me questions

play02:13

so again this is an engineer working

play02:16

with the AI together to create an

play02:18

amazing application what authentication

play02:21

method should we use for the login and

play02:23

registration process if you don't care

play02:25

you could just say I don't care choose

play02:27

whatever you want but I'm going to say

play02:29

JWT tokens should the user verification

play02:32

process require email confirmation no do

play02:35

we need password strength requirements

play02:37

or complexity validation for the user

play02:38

registration yes but you can decide what

play02:41

that is should the homepage display any

play02:43

specific user data besides the username

play02:45

or email just the first name all right

play02:47

now it's ask me all the clarifying

play02:49

questions that it needs and it's giving

play02:50

me a project summary as you can see here

play02:52

I'm going to make this screen a little

play02:53

bit bigger so now it is doing planning

play02:56

and it's saying here are all the

play02:58

technologies that you're going to be

play02:59

using now it already stopped and it's

play03:01

waiting for an input from me so please

play03:03

set up your local environment so that

play03:05

the Technologies listed can be utilized

play03:07

when you're done write done so I can

play03:09

either write done or I can simply click

play03:11

this done button I'll click the done

play03:12

button I already have installed

play03:14

some of these things it can actually

play03:16

install itself but I like to just take a

play03:18

look and if I don't notice anything that

play03:21

I clearly don't have I go forward and

play03:23

click done and now it's creating the

play03:24

action plan for development and the nice

play03:26

thing is as you're developing you're

play03:28

going to run into bu just like any

play03:31

developer would and you can work with

play03:33

the AI to debug things to test things

play03:35

along the way and to make sure that

play03:37

you're ironing out things as you go and

play03:40

this iterative process between an

play03:42

engineer and an AI is really what

play03:45

distinguishes GPT pilot okay so let's

play03:47

take a look at some of the descriptions

play03:48

of what it's going to be building

play03:49

Implement user registration backend

play03:51

logic and we have the programmatic goal

play03:53

we have the user review goal here's

play03:55

another one create the registration page

play03:57

so it's saying exactly what it's going

play03:59

to be building now for the actual

play04:00

development implementation task one

play04:03

initialize a nodejs project with

play04:04

express.js and set up a basic server so

play04:07

here we go it says here to implement

play04:09

task one you'll need to follow these

play04:11

steps but that just means that it's

play04:13

going to run it for me and you'll see

play04:14

that in a minute so here you can see

play04:16

it's planning all the commands that it's

play04:18

going to have to write out okay here we

play04:20

go so now it paused and it says can I

play04:22

execute the command npm init Dy and it

play04:25

gives you a timeout window that it can

play04:27

execute that within so can I execute

play04:29

this yes yes you can and the nice thing

play04:32

is as it's building we're actually going

play04:33

to see the code being written over here

play04:35

on the left side all the files being

play04:37

created and if it ever needs input on a

play04:39

specific line of code it actually pulls

play04:41

up that file highlights the line of code

play04:43

and asks you for that input so here we

play04:45

go can I execute the command npm install

play04:48

Express yes you can okay so here's the

play04:51

first good example so I'm going to move

play04:53

that over a little bit and what we see

play04:55

here is that it ask me for input please

play04:57

open the file server.js and on line

play05:00

three check it out so here we go input

play05:02

required decide on a fallback port

play05:04

number other than 3,000 if necessary so

play05:07

it is highlighted for me I'll fall back

play05:09

to 3002 and that's it you just save the

play05:13

file and you continue and we keep going

play05:16

just like this so can I execute the

play05:18

command node

play05:20

server.js yes server is running on Port

play05:23

3002 great and now what we're going to

play05:25

be doing is testing whether the server

play05:27

is spun up correctly so it's saying okay

play05:29

I'm going to spin up the server then

play05:31

you're going to run this curl command to

play05:32

just make sure it's up and running and

play05:34

it's also telling me what to look for if

play05:36

it did work properly okay so stopped

play05:38

we're going to click start app now the

play05:40

app is running on Port 3002 scroll up a

play05:43

little bit we're going to grab this curl

play05:44

command and it ask me to Ping Port 3000

play05:46

but I believe it's 3002 so I'm just

play05:48

going to change that hit enter and there

play05:51

we go it's alive so we can either stop

play05:53

the app or we can just continue and I

play05:55

will continue now it's going to install

play05:57

packages task two and so now you're

play06:00

starting to get the feel of the kind of

play06:01

pingpong back and forth between myself

play06:04

and the AI building this application

play06:06

okay so we got to another stopping point

play06:08

can I execute the command npm install

play06:10

Mongoose yes so all I really have to do

play06:13

while it's sitting here building things

play06:14

is just confirm and make sure it's

play06:16

working so here we can see user.js just

play06:18

got built out and now we have a pause

play06:21

open the file. MV and online one check

play06:24

out the required input okay let's see so

play06:27

it just says replace with your mongod DB

play06:29

connection string if you're not using

play06:30

the default local but we are so we just

play06:33

delete that comment save and continue

play06:36

and yes you can do npm start okay so we

play06:39

have our first error so it says can't

play06:41

find module. MV and that's because we

play06:44

don't have it installed so can I start

play06:46

debugging this issue yes so here we go

play06:48

the error message indicates that M

play06:50

package is not there can I install it

play06:52

now it's asking me to install it yes you

play06:54

can npm start again and that seems like

play06:57

it worked we have two warnings which is

play06:59

what we're seeing here but that's okay

play07:00

now we've reached a point where it's

play07:02

asking me to make sure everything's

play07:03

working again so start app okay these

play07:05

are all warnings that's okay and mongod

play07:07

DB connected so it looks like it's

play07:09

working so we're just going to click

play07:11

continue now it's going to be

play07:12

implementing user registration backend

play07:14

logic with password hashing using bcrypt

play07:16

all right we got another one npm install

play07:18

bcrypt yes okay now it's gotten to the

play07:21

point where it actually wants me to test

play07:23

user functionality so I'm going to try

play07:24

to register a new user for the app so

play07:26

we'll go ahead and click start app and

play07:28

then we're going to run this request to

play07:30

just make sure that the user

play07:31

registration works now I could also do

play07:34

this through the browser no problem all

play07:36

right so I pasted in the code let's see

play07:37

if it works user created successfully

play07:40

amazing okay so now that we know it

play07:42

works we're going to come back here and

play07:43

we're just going to click continue and

play07:45

it's going to keep building it's that

play07:46

simple and it looks like we're about a

play07:48

third of the way done so here we go now

play07:50

it's creating a bunch of new pages it's

play07:52

also adding to the readme which is

play07:54

really cool so it's actually creating a

play07:56

readme as well okay so now it needs to

play07:58

install ejs and bootstrap go ahead and

play08:01

now it's going to start doing the front

play08:02

end I think so now it is asking me if I

play08:05

want to do something can I execute the

play08:07

command make directory yes I need human

play08:10

intervention copy the bootstrap CSS and

play08:13

JS files into the public SL CSS and

play08:16

public sljs directories respectively

play08:19

okay so it does seem like I need to do

play08:21

this part manually so let's go download

play08:23

those libraries so I go to get

play08:28

bootstrap.css it told me to and here it

play08:30

is so let's unzip it and there we go CSS

play08:34

and Js those are the two things I need

play08:36

so I am simply going to replace what I

play08:39

have in there there we go I'll delete

play08:42

these and now it should be good to go

play08:44

let's just make sure yep there's

play08:46

everything all right that was very easy

play08:48

next let's start the app just to make

play08:50

sure it works we have some warnings but

play08:52

otherwise it seems like it works so

play08:54

continue can I execute the command node

play08:57

server.js yes okay so we have a little

play09:00

error got incorrect CLI response it's a

play09:03

deprecation warning so this is a warning

play09:05

we shouldn't have got the error but

play09:06

let's see go ahead and debug it and it

play09:08

might just say hey this is actually a

play09:10

warning no big deal yeah the deprecation

play09:12

warnings are not critical and should not

play09:14

prevent the server from starting okay so

play09:16

it might try to fix it anyways no

play09:18

debugging appears to be necessary Okay

play09:20

so we've gotten to another point where

play09:22

GPT Pilot is asking me to verify that

play09:24

it's working so let's do that so we just

play09:26

click again start the app we have some

play09:28

depre warnings and these are all

play09:30

warnings so that should be fine server

play09:32

is running on Port 3002 mongodb

play09:34

connected okay so we're going to grab

play09:36

this curl request going to copy it

play09:38

switch over to terminal paste it in hit

play09:41

enter user successfully created let's

play09:43

try it again just to make sure we get an

play09:45

error warning now because this user is

play09:47

already created perfect user already

play09:49

exists okay now that's it we just click

play09:51

continue implementing task five

play09:54

Implement password strength requirements

play09:56

as a middleware in the registration

play09:58

route so now it's writing out the plan

play10:00

to put in stronger password requirements

play10:03

and now it's actually coding it okay

play10:04

there it made the changes okay now it's

play10:06

asking if it could do npm start sure

play10:09

next it's going to ask me to test if the

play10:11

password strength requirements are

play10:13

correctly implemented and it's giving me

play10:15

the code to do that so here it says

play10:17

password week and it's going to ask me

play10:19

to spin up the server again and try it

play10:21

again manually so there it is so I just

play10:24

click start app again I can scroll up

play10:26

grab this Command right here switch over

play10:28

to to my terminal paste it in hit enter

play10:31

and there we go password does not meet

play10:33

strength requirements perfect okay so I

play10:36

click continue we keep going now it's

play10:38

writing the JWT secret code okay so it

play10:40

wrote a bunch of code now it's asking me

play10:42

to install a few things go ahead okay

play10:44

and I can tell that it is asking me to

play10:47

verify something so anytime you see code

play10:49

highlighted like this it's asking to

play10:51

verify so let's look at it add a secure

play10:54

JWT secret key so I'm just going to add

play10:56

super secure it doesn't really matter

play10:57

for this test I'll save it open this

play11:00

back up and continue now we have another

play11:02

one session secret key and it'll be

play11:04

super duper secure and continue all

play11:07

right now we're going to test the login

play11:09

functionality so let's click start app

play11:11

grab that command I'm going to paste in

play11:13

the command they gave me and I'm

play11:14

actually going to use a user that I

play11:16

already know is registered so back up

play11:18

here for my previous commands copy that

play11:20

all right and then I'm going to use the

play11:22

password of password 1 2 3 and hit enter

play11:27

logged in successfully perfect and it

play11:29

responded with a token awesome all right

play11:32

back here continue and now we are 2/3

play11:34

done congratulations 66.67% of your

play11:38

project generation and before continuing

play11:40

it's actually creating documentation

play11:42

which I absolutely love very cool and

play11:45

here's the documentation on the left

play11:46

side bunch of information about how this

play11:49

is built now Implement task 7 create

play11:51

login page using EGS and bootstrap and

play11:54

handle successful login by redirecting

play11:56

to the homepage and here's some of the

play11:57

code and we're on dev step 116 now and

play12:01

another really nice thing is that you

play12:03

can always go back if you have any

play12:04

problems you can go back to any step in

play12:06

this entire process all 116 steps you

play12:09

can restart from there and go forward in

play12:12

different directions if you choose so if

play12:14

you don't like the way something came

play12:15

out or if you run into any bugs simply

play12:17

go back to a step and restart it from

play12:19

there all right npm start again yes it's

play12:22

just making sure that it's working and

play12:24

look how much code has been written

play12:25

already I mean there's so many different

play12:27

files all right Dev step 121 to test if

play12:30

the task was completed successfully the

play12:32

user can follow these steps so now it's

play12:34

asking me to do it and now I'm actually

play12:35

going to use the web login to see if it

play12:37

worked and when it's done it's going to

play12:39

give me the little message to start the

play12:41

app yep so go ahead and click Start I'm

play12:43

going to grab the login URL right there

play12:45

and here we are so let's make sure that

play12:47

we can log in so I'm going to grab the

play12:49

same user that I just logged in through

play12:51

the terminal paste it in and then I'm

play12:52

going to grab the password as well paste

play12:54

it in login invalid email or password

play12:58

okay okay okay so let's make sure we can

play13:00

still log in with this found redirecting

play13:04

to home all right so it does work

play13:06

through the console but it's not working

play13:08

through the interface okay so we're

play13:09

going to debug this now so it says right

play13:11

here if something is wrong tell me so

play13:13

I'm going to tell it right away okay so

play13:15

I'm going to say through the terminal it

play13:16

works fine but when I try to log in

play13:18

using the same credentials through the

play13:19

UI I get this error and then I pasted it

play13:22

in we're going to click submit and

play13:24

hopefully it's going to be able to fix

play13:25

it okay so given the information

play13:27

provided by your colleague it appears

play13:28

that the isue lies in integrating the

play13:29

front-end login form with the backend

play13:31

loog login Logic the fact that the login

play13:34

Works through the terminal but not

play13:35

through the UI suggests that there might

play13:36

be a problem with the form submission

play13:38

okay perfect so it's going to try to fix

play13:40

it now let's see what it does all right

play13:42

now it's asking for some user input

play13:43

input required line 62 of users. JS so

play13:48

we're already there let's go to line 62

play13:51

there it is and it says add the required

play13:53

input so add server logic to handle

play13:56

incorrect email password and redirect

play13:58

direct with an error message okay that's

play14:01

fine and same thing here that's fine

play14:04

okay so we're going to save and continue

play14:06

type y to continue okay submit all right

play14:09

now we're going to test it again start

play14:11

app grab this URL right here okay let's

play14:13

try it again all right user password

play14:15

entered log in there we go you are

play14:17

logged in so it fixed itself how

play14:20

impressive is that very cool switch back

play14:22

to the app and continue so it's asking

play14:25

to do npm start again yes great can I

play14:27

start debugging the issue so we have a

play14:30

deprecation warning so it probably

play14:32

doesn't need to do anything with that

play14:34

but it's asking to anyway so go ahead

play14:36

yeah so the deprecation warnings are

play14:38

likely not a cause of critical failure

play14:40

but may require attention in future

play14:42

updates so it's still going to try to

play14:43

fix it and do it a little bit better

play14:44

remove the deprecated Mongoose warnings

play14:47

now it's asking to run node Trace

play14:49

deprecation yes you can now it says

play14:52

manually verify that session persistence

play14:54

works by logging in restarting the

play14:56

server and verifying that the session

play14:58

remains remains active Okay start now

play15:01

here I'm logged in refresh the page I'm

play15:03

still logged in I'm going to stop the

play15:05

server I'm going to restart the server

play15:07

go back refresh and I'm still logged in

play15:10

perfect all right implementing task

play15:12

number nine build the homepage to

play15:13

display the logged in user's first name

play15:15

using the data retriev from the JWT

play15:18

payload okay here we go npm start again

play15:21

yes testing everything is working great

play15:23

moving on to the next step okay now it's

play15:25

going to ask me to do something so again

play15:28

log in then I'm going to be redirected

play15:30

to the homepage verify that the page

play15:32

displays my name and for a more

play15:34

automated way to test the implementation

play15:35

from the terminal using curl we can do

play15:38

that but I'm going to do it the manual

play15:40

way so I'm going to click Start I'm

play15:41

going to go over here welcome test

play15:43

refresh and I'm still logged in and it

play15:45

still says welcome test so perfect all

play15:48

right we're done congratulations you've

play15:49

reached 100% of your project generation

play15:52

so now we have a full stack application

play15:55

front end back end a way to log in a a

play15:58

way to store that login information in

play16:00

the database we have a JWT secret

play16:03

protocol set up completely done for us

play16:06

by AI by GPT pilot it is super

play16:09

impressive now I worked with it step by

play16:12

step throughout the process to verify

play16:13

that it worked I ran into some issues

play16:16

and I fixed it with the help of AI and

play16:18

finally now it's writing more

play16:19

information in the readme file the app

play16:21

is done now you can use it wonderful

play16:23

look at all that beautiful code written

play16:25

now it's asking me if I want to add any

play16:27

features or changes and so for now I'm

play16:29

just going to click enter for no but of

play16:31

course you can continue to extend this

play16:33

application and as I mentioned before if

play16:36

I click this little back arrow right

play16:37

here I select an app off me you can

play16:40

select any of these major steps so I'm

play16:43

going to say coding and then you can

play16:45

also select a development step so you

play16:47

can start over from any of these steps

play16:49

and these steps are referencing the

play16:51

different steps that we went through to

play16:53

build this application if you run into

play16:55

any problems jump in their Discord the

play16:57

two Founders are great they're super

play16:59

helpful they'll help you out I'll drop

play17:01

the Discord Link in the description

play17:03

below if you liked this video please

play17:05

consider giving a like And subscribe and

play17:07

I'll see you in the next one