1
00:00:03,990 --> 00:00:04,350
Okay.

2
00:00:04,350 --> 00:00:11,040
So these are some of the materials you are going to have for this lesson.

3
00:00:11,040 --> 00:00:16,170
The most important one is the one you have here in the right side of the screen.

4
00:00:16,170 --> 00:00:22,740
This notebook is extremely detailed and it goes step by step.

5
00:00:23,130 --> 00:00:30,780
Uh, so I think it's the most important tool you are going to have in the lesson.

6
00:00:30,780 --> 00:00:37,500
As always in the slides, we are going to have a quick summary of what we are covering in the notebook.

7
00:00:37,500 --> 00:00:42,540
Then we will also use the code editor uh very soon.

8
00:00:42,540 --> 00:00:51,960
And as, as in, in other occasions you will be able to download the final code from the GitHub repository.

9
00:00:53,190 --> 00:01:03,060
So the goal of this lesson is to understand the complete cycle of full stack web application development.

10
00:01:03,300 --> 00:01:10,770
Remember that when we say full stack web application development, it is the same as if we say full

11
00:01:10,770 --> 00:01:12,390
stack application development.

12
00:01:12,390 --> 00:01:12,960
Why?

13
00:01:12,960 --> 00:01:19,140
Because today 99% 99% of the software applications are web applications.

14
00:01:19,140 --> 00:01:23,940
So our LM applications are mostly going to be web applications.

15
00:01:24,890 --> 00:01:32,030
So the important thing of this lesson is to understand the complete cycle of development.

16
00:01:33,100 --> 00:01:41,800
This is very important and is going to be very valuable for you in your, uh, professional future.

17
00:01:41,830 --> 00:01:42,670
Why?

18
00:01:43,300 --> 00:01:54,550
Because, uh, as you will see, a most software developers are trained in only one side of the full

19
00:01:54,550 --> 00:01:55,240
stack.

20
00:01:55,690 --> 00:02:02,020
So they are trained either on front end development or in back end development.

21
00:02:02,900 --> 00:02:06,410
And this is this is very sad.

22
00:02:06,860 --> 00:02:15,260
Uh, because for one thing, this these professionals are always building health products.

23
00:02:15,320 --> 00:02:23,720
So they, they don't have the satisfaction of building a complete product or to be able to understand,

24
00:02:23,900 --> 00:02:28,070
uh, how to build a complete product is is extremely frustrating.

25
00:02:28,070 --> 00:02:35,120
So think, for example, uh, about this, uh, a, uh.

26
00:02:36,550 --> 00:02:44,440
Manufacturer, a engineer or employee which is building just one door of the car.

27
00:02:44,440 --> 00:02:44,890
Right.

28
00:02:44,890 --> 00:02:56,410
So the only thing he does in 15 years or 20 years working in the, in the in the company is building

29
00:02:56,410 --> 00:02:58,780
the door, the front door of the car.

30
00:02:59,530 --> 00:03:02,980
That's extremely boring and extremely frustrating.

31
00:03:02,980 --> 00:03:10,120
And the problem with this employee is that he cannot be promoted, but because the only thing he he

32
00:03:10,120 --> 00:03:12,910
knows how to do is the front door of the car.

33
00:03:13,780 --> 00:03:21,370
So in the software industry, we have a similar situation with the front end developers and the back

34
00:03:21,370 --> 00:03:22,450
end developers.

35
00:03:22,450 --> 00:03:29,950
They are stuck there, they are frustrated, they are bored, and they hate their jobs.

36
00:03:29,950 --> 00:03:30,670
Right?

37
00:03:30,850 --> 00:03:39,430
But if you study a program like this and instead of, uh, focusing your attention in front end or back

38
00:03:39,430 --> 00:03:46,810
end, you study and understand the full stack development and you are able to understand what is the

39
00:03:46,810 --> 00:03:49,750
front end development and what is the back end development.

40
00:03:49,750 --> 00:03:58,210
You will be able to be promoted to manager of a team because you understand what the front end and the

41
00:03:58,210 --> 00:04:00,520
back end teams are doing.

42
00:04:00,670 --> 00:04:04,480
So this is extremely this is going to be extremely important for you.

43
00:04:05,790 --> 00:04:15,990
So a then see, the second part of this sentence is understand the complete cycle of full stack web

44
00:04:15,990 --> 00:04:23,040
application development to apply it in LM web applications like those analyzing the mind.

45
00:04:23,040 --> 00:04:27,480
So like like the one we have analyzed in second side in the introduction.

46
00:04:27,480 --> 00:04:35,550
So by the way, do you see the second side application that is a Crud application as well.

47
00:04:36,750 --> 00:04:44,070
You see they are creating PDF, they are deleting PDF, they are reading PDF etc..

48
00:04:44,070 --> 00:04:44,670
Right.

49
00:04:44,670 --> 00:04:46,950
So we will talk about that later.

50
00:04:46,950 --> 00:04:48,540
Some recommendations.

51
00:04:49,680 --> 00:04:55,740
The most important thing is to understand the basic concepts.

52
00:04:55,920 --> 00:04:59,610
Code versions can change but concepts remain.

53
00:04:59,610 --> 00:05:03,270
So I have told you several times that.

54
00:05:04,170 --> 00:05:11,130
If we teach you one particular technique, this technique is going to be obsolete in three six months.

55
00:05:11,130 --> 00:05:17,820
But if we teach you a way of working that is going to stay with you forever.

56
00:05:18,750 --> 00:05:28,410
So in this lesson, the most important thing for you is to understand the high level picture, the big

57
00:05:28,410 --> 00:05:31,380
picture of the full stack development.

58
00:05:32,160 --> 00:05:36,060
So we are going to see through a lot of different things.

59
00:05:36,090 --> 00:05:38,880
Don't get distracted by the details.

60
00:05:38,880 --> 00:05:41,730
Just, you know, keep a high level view.

61
00:05:41,730 --> 00:05:51,360
And remember that the artificial intelligence engineer doesn't know everything about everything.

62
00:05:51,930 --> 00:06:01,500
He understands the big picture and he knows where to go whenever he needs to solve a question, solve

63
00:06:01,500 --> 00:06:04,950
a problem, or go deeper into one particular technique.

64
00:06:04,950 --> 00:06:05,550
Okay.

65
00:06:05,550 --> 00:06:07,170
So this is very important.

66
00:06:07,800 --> 00:06:14,550
And this is also crucial in order for you to avoid being overwhelmed because we are going to see a lot

67
00:06:14,550 --> 00:06:15,060
of things.

68
00:06:15,060 --> 00:06:17,820
So don't worry step by step.

69
00:06:17,970 --> 00:06:21,690
Uh, just uh, understand the big picture.

70
00:06:21,690 --> 00:06:26,730
And then you will go, you know, uh, one by one, uh, if it is necessary.

71
00:06:26,940 --> 00:06:28,620
Second recommendation.

72
00:06:29,590 --> 00:06:30,610
You don't lean.

73
00:06:30,610 --> 00:06:36,340
You don't need to learn everything about Python fast API.

74
00:06:36,880 --> 00:06:37,870
Postgres.

75
00:06:38,790 --> 00:06:39,300
Is correct.

76
00:06:39,300 --> 00:06:45,060
This Postgres is just with ones Next.js, Vercel and Fender.com.

77
00:06:45,060 --> 00:06:53,610
Just learn the basic techniques and then keep learning as needed for each project you do.

78
00:06:54,000 --> 00:06:55,830
Keep an eye on the big picture.

79
00:06:55,830 --> 00:06:58,350
Don't lose focus on small details now.

80
00:06:58,350 --> 00:07:06,600
So I am going to tell you what I did many years ago when I was starting in Fullstack.

81
00:07:06,630 --> 00:07:07,560
The development.

82
00:07:07,680 --> 00:07:17,520
Since I have this background, I needed to understand everything about everything before starting to

83
00:07:17,520 --> 00:07:18,630
build a project.

84
00:07:18,630 --> 00:07:27,510
So before going into my first project I tried to understand everything about Python, fast API, Postgres

85
00:07:27,510 --> 00:07:29,550
next, Vercel and render.

86
00:07:29,550 --> 00:07:39,750
And that's a total waste of time and an absolute a mistake in a way of doing things.

87
00:07:40,950 --> 00:07:48,540
A if you do that, you are going to get frustrated because you are not going to memorize everything

88
00:07:48,540 --> 00:07:57,660
about all these different frameworks and devices and tools, and you are not going to apply 95% of the

89
00:07:57,660 --> 00:08:01,020
things you learn in that learning round.

90
00:08:01,710 --> 00:08:03,630
So don't go there.

91
00:08:03,630 --> 00:08:12,240
Instead, a follow the project, understand the basic techniques and then.

92
00:08:14,130 --> 00:08:17,490
As needed for each of the projects you do.

93
00:08:17,670 --> 00:08:18,450
Keep learning.

94
00:08:19,870 --> 00:08:31,450
So to do that is going to require for you some comfort level around a being uncomfortable.

95
00:08:32,169 --> 00:08:40,900
Excuse me for for the the the way of wording that what I mean is that since you are not going to study,

96
00:08:40,990 --> 00:08:47,980
uh, everything about everything before, and you are going to start looking at one living project,

97
00:08:47,980 --> 00:08:55,780
you know, finished project, you are going to have a an important degree of discomfort, right?

98
00:08:55,780 --> 00:08:59,770
Because you are not familiar with the things we are talking about.

99
00:08:59,770 --> 00:09:01,840
You have a lot of new things.

100
00:09:01,840 --> 00:09:08,560
You are going to listen and read about words you don't understand, frameworks you don't understand,

101
00:09:08,560 --> 00:09:09,160
you don't know.

102
00:09:09,160 --> 00:09:13,660
And this is a moment of truth for you.

103
00:09:14,140 --> 00:09:23,740
Uh, this is the moment where you are going to decide if you are an, uh, an artificial intelligence

104
00:09:23,740 --> 00:09:28,000
engineer in the making, or you are just a.

105
00:09:29,140 --> 00:09:36,760
Person that is overwhelmed with new things and is going to throw the towel is going to abandon the the

106
00:09:36,760 --> 00:09:37,390
the program.

107
00:09:37,390 --> 00:09:38,710
Don't do that.

108
00:09:38,710 --> 00:09:40,210
Don't do that.

109
00:09:40,210 --> 00:09:47,530
I tell you that the first feeling, this feeling of discomfort, this feeling of getting lost, this

110
00:09:47,530 --> 00:09:50,830
feeling of getting overwhelmed is totally normal.

111
00:09:50,830 --> 00:09:53,050
This is the way you should feel.

112
00:09:53,050 --> 00:09:54,640
So don't worry about that.

113
00:09:55,090 --> 00:10:04,990
And you are going to see that on every repetition, on every next round you perform about each of these

114
00:10:04,990 --> 00:10:14,710
subsections, you are going to feel more comfortable, more a wise, more you are going to have more

115
00:10:14,710 --> 00:10:24,340
understanding of things, etc., etc. so don't worry, your level of discomfort is going to, uh, be

116
00:10:24,340 --> 00:10:32,980
reduced uh, by your repetition practice this and study okay, so bear with me.

117
00:10:33,310 --> 00:10:34,450
Stay there.

118
00:10:34,450 --> 00:10:35,920
This is normal.

119
00:10:35,920 --> 00:10:37,270
You are going to make it.

120
00:10:37,270 --> 00:10:42,250
There is no secret in becoming an artificial intelligence engineer.

121
00:10:42,250 --> 00:10:43,480
This is not rocket.

122
00:10:43,480 --> 00:10:44,710
Rocket science.

123
00:10:44,770 --> 00:10:46,810
Everybody can do it.

124
00:10:46,810 --> 00:10:51,910
The only secret is perseverance, practice and study.

125
00:10:52,510 --> 00:10:56,410
For some people, this lesson is going to take four hours.

126
00:10:56,410 --> 00:10:59,380
For some others it's going to take 80 hours.

127
00:10:59,380 --> 00:11:00,880
Don't worry about it.

128
00:11:00,880 --> 00:11:06,250
The important thing for you is you overcome it with success.

129
00:11:06,250 --> 00:11:13,360
Understanding the basic concepts and understanding where to go whenever you need to solve problems or

130
00:11:13,360 --> 00:11:15,940
questions about these techniques.

131
00:11:16,180 --> 00:11:16,930
Okay.

132
00:11:18,350 --> 00:11:19,790
There a point?

133
00:11:19,790 --> 00:11:26,300
Remember, no software engineer knows everything needed to develop a project beforehand.

134
00:11:26,860 --> 00:11:32,860
They have basic knowledge and progress from there according to the needs of each project.

135
00:11:32,890 --> 00:11:34,090
Okay, so don't worry.

136
00:11:34,090 --> 00:11:40,990
This is the the the this is the daily routine of an artificial intelligence engineer.

137
00:11:41,770 --> 00:11:51,460
Uh, we never start a day in our lives feeling comfortable about knowing everything we need for the

138
00:11:51,460 --> 00:11:52,000
day.

139
00:11:52,480 --> 00:11:53,860
That's not the case.

140
00:11:53,860 --> 00:12:01,600
We are always sure that every day we are going to find areas of discomfort where we don't know things,

141
00:12:01,600 --> 00:12:05,740
where we need to learn and we need to to to practice, etc., etc..

142
00:12:07,000 --> 00:12:09,250
So the most important thing here is the last one.

143
00:12:09,250 --> 00:12:14,890
Remember where to find answers in case of doubt or error.

144
00:12:14,890 --> 00:12:24,370
You are extremely lucky because ten years ago, 15 years ago, when we started the bootcamps, we didn't

145
00:12:24,370 --> 00:12:26,860
have a personal assistant like you do.

146
00:12:26,860 --> 00:12:30,280
So you have 24 seven.

147
00:12:30,340 --> 00:12:36,910
A personal assistant you can use, which is ChatGPT four, which is going to answer whatever questions

148
00:12:36,910 --> 00:12:37,780
you may have.

149
00:12:38,320 --> 00:12:42,460
It's going to explain you whatever code you copy there.

150
00:12:42,460 --> 00:12:46,960
It's going to solve the problems you may have during an exercise.

151
00:12:46,960 --> 00:12:51,940
It's going to tell you where to find more information, where to keep learning, etc., etc. so you

152
00:12:51,940 --> 00:12:59,740
are super lucky and it is going to be so much easier for you than for the people that started a bootcamp

153
00:12:59,740 --> 00:13:01,330
1015 years ago.

154
00:13:01,330 --> 00:13:06,520
Okay, so don't worry, you have there a personal assistant is going to be okay.

155
00:13:06,520 --> 00:13:11,620
And remember, apart from ChatGPT, especially ChatGPT four, you also have Google.

156
00:13:11,620 --> 00:13:14,530
You also have forums like StackOverflow etc..

157
00:13:14,560 --> 00:13:15,130
Okay.

158
00:13:16,310 --> 00:13:27,350
So about the backend A we want to create a Crud application that responds to five instructions.

159
00:13:27,500 --> 00:13:35,150
This is what you are going to, uh, find from your manager if you start working as a junior back end

160
00:13:35,150 --> 00:13:35,960
developer.

161
00:13:35,990 --> 00:13:36,380
Okay.

162
00:13:36,380 --> 00:13:43,010
So your manager is going to tell you, okay, please create a Crud application that does these five

163
00:13:43,010 --> 00:13:43,640
things.

164
00:13:44,180 --> 00:13:49,010
We create an item and store the item in our database.

165
00:13:49,040 --> 00:13:51,380
We saw all items in the database.

166
00:13:51,380 --> 00:13:56,240
We saw one item for from the database located by its ID.

167
00:13:56,420 --> 00:14:02,390
We update an item in the database located by this ID and delete the Crud application.

168
00:14:02,390 --> 00:14:12,950
Okay, each time one of these instructions is ordered, a Python function that carries out the selected

169
00:14:12,950 --> 00:14:14,960
Crud action is executed.

170
00:14:14,990 --> 00:14:17,240
Okay, so remember.

171
00:14:17,870 --> 00:14:24,380
We are going to use the Python language to build our backend.

172
00:14:25,570 --> 00:14:32,890
And you will see that the you are going to be bilingual in this program.

173
00:14:33,370 --> 00:14:43,540
So it's like in the morning you are going to speak with your, uh, German engineers, and in the afternoon

174
00:14:43,540 --> 00:14:49,300
you are going to speak with your English speaking colleagues or Spanish speaking colleagues.

175
00:14:49,330 --> 00:14:49,750
Okay.

176
00:14:49,750 --> 00:14:52,390
So you are going to be bilingual in this project.

177
00:14:52,390 --> 00:14:57,520
In the back end, we are going to work with Python, and in the front end we are going to work with

178
00:14:57,520 --> 00:14:58,240
JavaScript.

179
00:14:58,240 --> 00:14:58,720
Okay.

180
00:14:58,720 --> 00:15:00,880
So these are going to be our main languages.

181
00:15:00,880 --> 00:15:13,120
And these are the languages that eh um ah eh eh that we use for the frameworks we are going to use in

182
00:15:13,120 --> 00:15:14,800
the back end and in the front end.

183
00:15:14,800 --> 00:15:16,780
You will see more about that later.

184
00:15:17,680 --> 00:15:25,690
So in this slide you have a summary of the detailed steps we have here in the notebook.

185
00:15:25,690 --> 00:15:29,260
These are super good notebook super good notebook.

186
00:15:29,260 --> 00:15:35,530
So I encourage you to learn this and practice this many times okay.

187
00:15:35,530 --> 00:15:37,120
Until you feel comfortable.

188
00:15:37,420 --> 00:15:38,320
So.

189
00:15:39,140 --> 00:15:41,510
What are the things we are going to do?

190
00:15:41,510 --> 00:15:44,750
Uh, for this initial part.

191
00:15:45,200 --> 00:15:50,900
We are going to, uh, have the initial setup of our project.

192
00:15:50,900 --> 00:15:56,840
We are going to prepare the database, which is going to be a Postgres database.

193
00:15:56,840 --> 00:16:02,150
We are going to build the main functionality of the backend application.

194
00:16:02,970 --> 00:16:10,410
And we are going to start the backend application in our computer, what we call a local server.

195
00:16:10,410 --> 00:16:13,620
Every time you see local means in your computer.

196
00:16:13,620 --> 00:16:16,920
Okay, so this is the opposite of in the cloud.

197
00:16:16,920 --> 00:16:23,910
So in the first part of this project we are going to start this application in our computer.

198
00:16:23,940 --> 00:16:25,740
This means locally.

199
00:16:25,740 --> 00:16:32,430
And in the second part of this lesson we will start the application in the cloud okay.

200
00:16:32,430 --> 00:16:34,860
Remotely locally remotely.

201
00:16:35,570 --> 00:16:39,710
So let's go to the notebook.

202
00:16:41,630 --> 00:16:45,980
The full stack application with fast API and Vercel.

203
00:16:46,010 --> 00:16:54,680
Well, we can say with fast API and Next.js because fast API is a network and Vercel is a server.

204
00:16:54,680 --> 00:17:00,770
So we can say fast API, a framework, and Next.js a framework as well.

205
00:17:01,560 --> 00:17:07,740
We will create an application that manages a to do list, a list of tasks that you want to complete.

206
00:17:07,740 --> 00:17:09,780
You already saw the demo.

207
00:17:10,490 --> 00:17:11,630
The first thing.

208
00:17:11,630 --> 00:17:17,420
As always, it is recommended to create a virtual environment.

209
00:17:17,420 --> 00:17:20,839
You know how to create a virtual environment with pimp.

210
00:17:20,839 --> 00:17:24,470
Okay, so now it's a good time to do that.

211
00:17:25,160 --> 00:17:32,690
Hey, when you work in professional projects, it is very important to create virtual environments.

212
00:17:32,690 --> 00:17:41,150
If you are a working like in this program with many small exercises like we did in the in the previous,

213
00:17:41,150 --> 00:17:47,570
uh, blogs of the, of the program, you know, with the toy demos and the, the toy two level two applications,

214
00:17:47,570 --> 00:17:48,260
etc..

215
00:17:48,590 --> 00:17:55,190
Well, you could create a virtual environment every time, but usually we don't do that.

216
00:17:55,190 --> 00:18:02,540
You know, we just create a virtual environment and we prepare all the level one exercises and we prepare

217
00:18:02,540 --> 00:18:04,850
another one and we create the level two, etc..

218
00:18:04,850 --> 00:18:08,840
So in this case we have created a different virtual environment.

219
00:18:09,230 --> 00:18:12,230
In our case, we haven't used pimp.

220
00:18:12,230 --> 00:18:14,750
In this case we have used a different approach.

221
00:18:14,750 --> 00:18:16,160
But don't worry about it.

222
00:18:16,160 --> 00:18:17,840
You can use a pimp.

223
00:18:17,870 --> 00:18:21,350
You have many different ways of creating virtual environments.

224
00:18:21,350 --> 00:18:25,370
By F by M is the is the most basic one, the most simple.

225
00:18:25,370 --> 00:18:27,350
And we recommend you to do that.

226
00:18:27,860 --> 00:18:32,090
So first create a virtual environment and then.

227
00:18:32,680 --> 00:18:40,840
You and go to your terminal and create the folder for your application.

228
00:18:40,840 --> 00:18:48,040
So remember in the in the lesson we talk about the terminal a most common operations.

229
00:18:48,040 --> 00:18:53,530
One of these operations was how to create a new folder or new directory.

230
00:18:53,530 --> 00:18:54,160
Right.

231
00:18:54,340 --> 00:18:56,020
Probably you don't remember.

232
00:18:56,290 --> 00:19:05,260
So but I am going to invite you to do is go to ChatGPT four and ask ChatGPT, how do I create a new

233
00:19:05,260 --> 00:19:08,890
directory in my terminal?

234
00:19:09,040 --> 00:19:11,350
And you will see it's going to tell you make there.

235
00:19:11,560 --> 00:19:13,510
It will tell you how to do that.

236
00:19:13,510 --> 00:19:14,470
Very easy.

237
00:19:14,470 --> 00:19:18,550
But I think it's good for you to ask your personal assistant.

238
00:19:18,970 --> 00:19:27,400
Then inside this folder, go inside this folder in the terminal and you create the back end folder.

239
00:19:27,400 --> 00:19:27,730
Okay.

240
00:19:27,730 --> 00:19:34,990
So inside the main folder of the application we are going to have two folders, one for the back end

241
00:19:34,990 --> 00:19:37,120
and another for the front end.

242
00:19:37,120 --> 00:19:37,810
Okay.

243
00:19:37,810 --> 00:19:46,540
In our case we call the back end folder 001 and the front end folder 002 front end or something like

244
00:19:46,540 --> 00:19:46,840
that.

245
00:19:46,840 --> 00:19:51,850
You will see that in the in the code in our GitHub repository.

246
00:19:51,850 --> 00:19:59,230
I think in this project we have um, uh, three folders, one for the backup, the back end, one for

247
00:19:59,230 --> 00:20:03,430
the front end, and another one which is a duplicated of the front end.

248
00:20:03,430 --> 00:20:04,930
So disregard the last one.

249
00:20:04,930 --> 00:20:10,450
Just use the first one, the number 1001 and 002 okay.

250
00:20:10,750 --> 00:20:21,460
So once you have created the app folder and the back end folder, you will need to have a the Postgres

251
00:20:21,460 --> 00:20:25,660
database package install in your computer.

252
00:20:25,660 --> 00:20:26,170
Okay.

253
00:20:26,170 --> 00:20:28,810
So we are going to create a database.

254
00:20:28,810 --> 00:20:34,690
And there are different packages you can use to create a database.

255
00:20:34,690 --> 00:20:36,820
You can use MySQL.

256
00:20:36,820 --> 00:20:38,380
You can use MongoDB.

257
00:20:38,410 --> 00:20:41,170
You can use many possible databases.

258
00:20:41,170 --> 00:20:48,100
But in our case we are going to use Postgres which is right now I would say the most popular uh, among

259
00:20:48,100 --> 00:20:51,190
the LM application developers community.

260
00:20:51,190 --> 00:20:56,560
So in order to install Postgres in your computer.

261
00:20:57,500 --> 00:21:00,740
This is what you have to do if you are using a mac computer.

262
00:21:00,740 --> 00:21:04,790
If you are using a PC, go to ChatGPT four and ask there.

263
00:21:04,820 --> 00:21:05,780
Remember one thing.

264
00:21:05,780 --> 00:21:07,370
This is a very important thing.

265
00:21:07,520 --> 00:21:14,570
When we give you code here in the notebook, you need to remove the pound sign.

266
00:21:14,570 --> 00:21:22,460
So you copy this line without the pound sign and execute it in your terminal.

267
00:21:22,760 --> 00:21:30,260
Okay, so the pound sign is here because we don't want to execute these lines of code in the notebook

268
00:21:30,260 --> 00:21:30,620
okay.

269
00:21:30,620 --> 00:21:33,080
So this this is called comment.

270
00:21:33,410 --> 00:21:34,910
And then the line.

271
00:21:34,910 --> 00:21:36,560
So you comment one line.

272
00:21:36,560 --> 00:21:39,710
It is not going to be executed in the notebook.

273
00:21:39,710 --> 00:21:42,800
The same thing with a code editor you will see later.

274
00:21:42,800 --> 00:21:48,440
So you install progress postgres SL cube the this package.

275
00:21:48,440 --> 00:21:54,800
And then you say this is home brew with this uninstaller we use and don't worry about that, just use

276
00:21:54,800 --> 00:21:55,940
it and then that's it.

277
00:21:55,940 --> 00:22:00,950
You don't have homebrew installed in your computer and you have an error message or whatever.

278
00:22:00,950 --> 00:22:04,790
Go to ChatGPT four and ask how to solve the problem.

279
00:22:04,790 --> 00:22:05,450
Okay.

280
00:22:05,450 --> 00:22:16,790
So a then second line in order to install the Postgres database package, then we are going to install

281
00:22:16,790 --> 00:22:22,100
the necessary packages to build our backend.

282
00:22:22,100 --> 00:22:22,670
Okay.

283
00:22:23,060 --> 00:22:29,270
So you will see here that we are installing fast API, which as you know is the main framework we are

284
00:22:29,270 --> 00:22:30,950
going to use for backend.

285
00:22:30,950 --> 00:22:35,240
And then we are going to use a local server and other packages.

286
00:22:35,240 --> 00:22:36,680
Not many packages okay.

287
00:22:36,680 --> 00:22:40,610
So just write this line in your a terminal.

288
00:22:40,610 --> 00:22:42,920
Enter boom and the packages are there.

289
00:22:43,550 --> 00:22:44,900
Then a.

290
00:22:44,900 --> 00:22:54,500
This is an interesting step in order to create a file in your backend folder called requirements.txt

291
00:22:54,590 --> 00:22:59,390
that includes the data of all the packages that you have installed.

292
00:22:59,390 --> 00:23:06,170
You can write this line okay, don't worry, you don't need to understand everything we are doing right

293
00:23:06,170 --> 00:23:06,650
now.

294
00:23:06,650 --> 00:23:08,120
Remember what I told you.

295
00:23:08,120 --> 00:23:11,990
So these are these are not important details right now.

296
00:23:12,350 --> 00:23:13,880
Just bear with me.

297
00:23:13,880 --> 00:23:19,130
In this initial round of the subsection, you just.

298
00:23:19,940 --> 00:23:21,470
Pay attention, you know.

299
00:23:21,470 --> 00:23:22,730
See what we are doing.

300
00:23:22,730 --> 00:23:31,430
Then you will download the code, play around with the code in your computer and repeat and repeat all

301
00:23:31,430 --> 00:23:37,670
the operations we are doing in this subsection until you feel comfortable and only then you go to the

302
00:23:37,670 --> 00:23:38,150
next.

303
00:23:38,150 --> 00:23:38,510
Okay.

304
00:23:38,510 --> 00:23:41,300
But right now just relax and and see.

305
00:23:41,960 --> 00:23:50,360
So we, uh, execute this line in order to create the requirements.txt file, which is I'm going to

306
00:23:50,360 --> 00:23:51,260
show you.

307
00:23:52,500 --> 00:23:58,110
This is the the code of the application in my computer.

308
00:23:58,110 --> 00:23:58,710
Okay.

309
00:23:58,710 --> 00:24:01,230
So this is Visual Studio Code.

310
00:24:01,380 --> 00:24:06,090
This is the most popular editor right now.

311
00:24:06,090 --> 00:24:11,310
Uh, and as you can see we have the main folder of the application which is called todo app.

312
00:24:11,310 --> 00:24:13,440
And here we have two folders.

313
00:24:13,440 --> 00:24:15,090
The 001 is the back end.

314
00:24:15,090 --> 00:24:17,520
And the 002 is the front end.

315
00:24:17,520 --> 00:24:18,030
Okay.

316
00:24:18,030 --> 00:24:24,960
So in the 002 we have another folder uh which is called todo app.

317
00:24:24,960 --> 00:24:25,680
Okay.

318
00:24:26,040 --> 00:24:29,580
So this is not the front end uh folder.

319
00:24:29,580 --> 00:24:31,500
This is the front end folder.

320
00:24:31,500 --> 00:24:33,960
The one which is inside of the 002.

321
00:24:33,960 --> 00:24:34,500
Okay.

322
00:24:34,500 --> 00:24:36,720
But we are working right now in the back end.

323
00:24:36,720 --> 00:24:44,220
So this is the code you are going to see when you download the code from the GitHub repository.

324
00:24:44,220 --> 00:24:47,520
So this is the final code okay.

325
00:24:47,520 --> 00:24:59,940
So uh I am going to uh go to walk step by step with you with this notebook as we look at the final code.

326
00:24:59,940 --> 00:25:09,240
So this code is, is, is the code that, uh, you have after you complete all these steps.

327
00:25:09,240 --> 00:25:09,570
Okay.

328
00:25:09,570 --> 00:25:16,770
So when you have a second round of this project and you start from scratch, you can start without having

329
00:25:16,770 --> 00:25:19,590
all these things here, uh, already for you.

330
00:25:19,590 --> 00:25:20,040
Right.

331
00:25:20,040 --> 00:25:25,560
So this thing, this line has created this file.

332
00:25:25,890 --> 00:25:26,640
Okay.

333
00:25:26,640 --> 00:25:29,430
And see how many packages are here.

334
00:25:29,430 --> 00:25:34,800
Why are so many packages here if we only install, uh, half a dozen?

335
00:25:34,800 --> 00:25:43,050
Because many of these, uh, packages have a lot of packages, uh, are built on top of a lot of packages.

336
00:25:43,050 --> 00:25:47,850
Okay, so we are loading, uh, all of them there just with this line.

337
00:25:47,850 --> 00:25:58,800
So next thing we need to do is to once we have installed the Postgres package in our computer, we need

338
00:25:58,800 --> 00:26:03,810
to create the database we are going to use for this application.

339
00:26:03,810 --> 00:26:11,400
For our Crud application, remember that the tasks you are going to load in your application are going

340
00:26:11,400 --> 00:26:13,320
to be stored in a database.

341
00:26:13,710 --> 00:26:22,650
Okay, so this is what it gives a this is what gives what we call persistence to your application.

342
00:26:22,650 --> 00:26:28,890
So if you close your application today and you close your computer and open your computer to tomorrow,

343
00:26:28,890 --> 00:26:36,390
and you take a look at the tasks, they are still there because the tasks are in the in the database.

344
00:26:36,390 --> 00:26:38,130
They are stored in the database.

345
00:26:38,130 --> 00:26:38,580
Okay.

346
00:26:38,580 --> 00:26:41,520
So we are with this, uh, instruction.

347
00:26:41,520 --> 00:26:45,180
We are creating a database called my database.

348
00:26:45,180 --> 00:26:45,480
Okay.

349
00:26:45,480 --> 00:26:47,730
You can call your database whatever you want.

350
00:26:47,730 --> 00:26:51,600
But the name we are using is my database.

351
00:26:51,600 --> 00:26:52,350
Okay.

352
00:26:52,830 --> 00:27:01,110
And then a we are going to create the dot m file which is here.

353
00:27:01,230 --> 00:27:08,010
And in this dot m file which as you know is going to store our credentials okay.

354
00:27:08,010 --> 00:27:14,550
So secret credentials, we are going to uh enter the DB credentials.

355
00:27:14,550 --> 00:27:15,450
Right now.

356
00:27:15,450 --> 00:27:19,560
You don't have a user and you don't have a password yet.

357
00:27:19,560 --> 00:27:26,700
So this is going to be a this and this is going to be empty for you.

358
00:27:26,700 --> 00:27:29,160
Don't write Postgres here okay.

359
00:27:30,800 --> 00:27:36,800
And then the name of the app is going to be full stack to app.

360
00:27:36,800 --> 00:27:37,460
Okay.

361
00:27:38,000 --> 00:27:44,330
So one important thing about this dot env file this is a secret file.

362
00:27:44,330 --> 00:27:50,600
We don't want to load this file when we load this code to the GitHub repository.

363
00:27:51,680 --> 00:28:01,040
How do we do that with this file here the git ignore a is the file that prevents.

364
00:28:01,710 --> 00:28:10,530
Us to load secret files when we load this, uh, this, uh, folder into a GitHub repository.

365
00:28:10,530 --> 00:28:14,040
So we already told you about that.

366
00:28:14,040 --> 00:28:15,960
But just a quick reminder in this.

367
00:28:15,960 --> 00:28:22,830
Gitignore file, we have the dot m file as the file we don't want to load to GitHub.

368
00:28:22,920 --> 00:28:31,560
This is this is a we can show this this dot m file because there is no confidential information here.

369
00:28:31,560 --> 00:28:32,040
Right.

370
00:28:32,040 --> 00:28:35,130
But you don't show this to anyone.

371
00:28:35,130 --> 00:28:36,720
And normally okay.

372
00:28:36,720 --> 00:28:43,830
Because normally you are going to find here like your API keys of OpenAI or whatever other secret keys

373
00:28:43,830 --> 00:28:48,600
that if you lose it, if you put it in the wrong hands, it can cause you a lot of money.

374
00:28:48,600 --> 00:28:49,740
So don't do it.

375
00:28:49,920 --> 00:28:56,400
Okay, so in the dot m file you enter the database credentials okay.

376
00:28:57,090 --> 00:29:00,510
And then you create a config.

377
00:29:00,540 --> 00:29:02,280
Py file.

378
00:29:02,610 --> 00:29:16,950
And in this config file file we are going to a tell our application the types of data we want for this

379
00:29:16,950 --> 00:29:18,360
uh dot m file.

380
00:29:18,360 --> 00:29:27,930
So we are telling and the application a you know what this data uh we are going to use here a settings.

381
00:29:27,930 --> 00:29:31,380
They need to be in one particular format.

382
00:29:31,380 --> 00:29:36,030
So the name of the database has to be a string like a text.

383
00:29:36,030 --> 00:29:41,910
And the name of the database, the database port is going to be an integer a C number etc..

384
00:29:42,210 --> 00:29:43,800
This is not very important.

385
00:29:43,800 --> 00:29:49,320
It's just we are just preparing our application in order to work with a database.

386
00:29:49,320 --> 00:29:57,120
So don't worry by now with this, later when you go to this notebook for the second time, third time,

387
00:29:57,120 --> 00:30:03,330
fourth time, whatever time you need, and if you have any doubts about what is this, what is do,

388
00:30:03,630 --> 00:30:11,820
what is it doing, etc. just, you know, copy this code and paste it in GPT four and say, hey, GPT

389
00:30:11,820 --> 00:30:13,530
four, what is this doing?

390
00:30:13,620 --> 00:30:19,920
Explain this to me or this line, or where can I study more about pedantic etc. etc.?

391
00:30:19,920 --> 00:30:23,010
Okay, you will see by now, don't worry about it.

392
00:30:23,220 --> 00:30:30,870
Then we are going to start working in the main file of the application.

393
00:30:31,530 --> 00:30:32,790
So we will create.

394
00:30:32,790 --> 00:30:38,160
You will create a file called main dot pi okay.

395
00:30:38,250 --> 00:30:46,530
If you are working with a with a code editor like we recommend especially Visual Studio Code which is

396
00:30:46,530 --> 00:30:53,370
free, you can download for free, etc. you can create a file or a folder here very easily using this.

397
00:30:53,370 --> 00:30:57,930
And then you can you can copy and paste code whatever you see.

398
00:30:57,930 --> 00:31:00,810
You see here these lines with a pound sign.

399
00:31:00,810 --> 00:31:02,070
These are comments.

400
00:31:02,070 --> 00:31:09,030
So if you enter this sign before any line it will it will comment it out.

401
00:31:09,030 --> 00:31:12,360
It will change the color to this green.

402
00:31:12,360 --> 00:31:16,530
And the computer is not going to read this line of code.

403
00:31:16,530 --> 00:31:18,690
It's not going to execute this line of code.

404
00:31:18,690 --> 00:31:22,530
So in some cases like for example right now.

405
00:31:23,400 --> 00:31:28,320
We are going to comment out this line.

406
00:31:29,030 --> 00:31:30,500
And also this line.

407
00:31:30,500 --> 00:31:39,800
So you you are going to write a pound sign here and here because these are referring to a part of the

408
00:31:39,800 --> 00:31:42,800
application that we still don't have.

409
00:31:42,800 --> 00:31:48,170
So if you don't enter here the pound sign you are going to have an error message.

410
00:31:48,170 --> 00:31:48,920
Right.

411
00:31:48,920 --> 00:31:54,440
So the rest of the content you see in this file is explained here.

412
00:31:54,440 --> 00:31:59,990
What we are doing is we are creating a fast API application.

413
00:31:59,990 --> 00:32:07,490
We are entering what we call the course configuration, which is something we will learn for uh, we

414
00:32:07,490 --> 00:32:09,590
will learn about later.

415
00:32:09,590 --> 00:32:12,890
And we are entering a couple of other things.

416
00:32:12,890 --> 00:32:20,900
First, the global Https exception handle, uh, handler to handle errors and then a couple of endpoints

417
00:32:20,900 --> 00:32:24,890
just to test this backend application okay.

418
00:32:26,050 --> 00:32:34,750
So in order to start server to, to to start the backend, uh, the, the backend application in, in

419
00:32:34,750 --> 00:32:43,570
your local server, in your terminal, you have to write this, uh, uh, instructions.

420
00:32:43,570 --> 00:32:45,400
Uvicorn is our local server.

421
00:32:45,400 --> 00:32:52,210
And with doing this we are telling him, okay, open this backend application.

422
00:32:52,510 --> 00:32:54,130
Uh, now.

423
00:32:54,130 --> 00:33:02,800
So start this application now and then once you have done this, if you go to this, uh, URL address,

424
00:33:02,800 --> 00:33:10,210
you will see the back end application, which is nothing spectacular right now because we don't have

425
00:33:10,210 --> 00:33:10,660
anything.

426
00:33:10,660 --> 00:33:14,800
But just for you to understand that the local server is working.

427
00:33:14,800 --> 00:33:15,250
Okay.

428
00:33:15,250 --> 00:33:23,170
And in the terminal after you click enter, after this line you will see the name of the application.

429
00:33:23,170 --> 00:33:23,890
Okay.

430
00:33:23,890 --> 00:33:26,350
Uh, printed there just to, to check.

431
00:33:26,350 --> 00:33:31,690
So we are going to stop the video now because it's a little bit, uh, too long.

432
00:33:31,690 --> 00:33:39,310
And then we will continue with this, uh, with this uh, the second part of this subsection.

