Lesson Description

The "Wrapping Up" Lesson is part of the full, Build a Fullstack App with Vanilla JS and Go course featured in this preview video. Here's what you'd learn in this lesson:

Maximiliano wraps up the course by discussing future feature ideas like account deletion, OTP email confirmation, better password resets, error handling, similar movies, actor pages, and using Go for email.

Preview
Close

Transcript from the "Wrapping Up" Lesson

[00:00:00]
>> Maximiliano Firtman: So I have some homework for you, in case you wanna continue working on this project and see if you have learned something and you are able to modify the project. First, you can add delete account. So in that case, the user can delete its own account, and for that you can do it in two ways.

[00:00:20]
You can do a physical deletion, that is, you can remove from the database the record, or if you look at the users table, you already have one particular field that is actually deleted with a timestamp, that's for a logical deletion. So you can try both, in that case, if you keep the user, but you add a flag saying this user has been deleted.

[00:00:43]
So in that case, you still keep the history, sometimes you have to do that even for legal reasons, it depends on the project, right? But in some countries, you have some legal reasons, you have to store user data even if the user is deleting the account, okay. You can also add confirmation for the account, sending an OTP that's a one-time password by email.

[00:01:04]
Right now we are not verifying if the email actually exists or not, so we can send an email to the user, creating an OTP. And then we need another web service to receive that OTP so you can try to see if you can work with that, forget the password.

[00:01:22]
Also, in that case we have our password is hashed server-side, so we cannot send the password by email, things like that, but we can reset the password. Also sending an OTP go to email, you can try to follow that flow. You can also check if a movie is already a favorite or in watch list, because right now, it's always letting you add to favorite on watch list.

[00:01:46]
So you can add that so you need another web service that will let you know if the current user has that movie in the collection, and then update the UI. So that's a little nice exercise to do. Remove from watches and favorites, that's also pretty simple actually. It's just adding another web service, another API web service that will just delete that record from the table.

[00:02:11]
Add more validations, error control that never ends. Okay, there are a lot of other validations and error control that you can do, actually, I encourage you to try to hack the system, try to open the terminal, try to send instead of an ID letter, and see what happens.

[00:02:29]
And see if your server is reacting properly and sending the right error, okay, so try that. Find Similar movies, the data set is ready for you to do that. So when you're in a movie, you could create a web service that returns similar movies, based for example on keywords.

[00:02:50]
So then you make a query, SQL query, another you can reated and to change a little bit your data repository, to make that work, but you make a Query, okay? And on that query, you will get similar movies. And then you suggest at the bottom, similar movies, okay, that's a pretty good exercise as well.

[00:03:09]
Then you can also create an actors page so you can get into the details of an actor, or you can search actors as well and then see all the movies by actor. Okay, the data set is ready for you to do that, so we have already seen the steps for you to actually go and do this.

[00:03:30]
So you're ready to actually create all these new sections in the project. Okay, any final question?
>> Speaker 2: Does GO have a email client or has some TMP or, I can't remember?
>> Maximiliano Firtman: So, yeah, SMTP?
>> Speaker 2: Yeah.
>> Maximiliano Firtman: Simple Mail Transfer Protocol. So actually, the answer is, it's not directly related to GO, because it applies to every language.

[00:03:58]
So you may have an SMTP client or not, it doesn't matter. So because if you have it or not, if you don't have it, you can use a community-based one. So forget about that. But why I'm not directly answering your questions in a straight way? Because today, if you want that to work, to send emails and those emails to go through and get to users' inboxes, probably you don't wanna use your own SMTP server.

[00:04:28]
That doesn't work anymore like 10 years ago. And the best way to do that is to use a cloud-based provider for email sending. And there are some that they have even a free tire in It depends on how many emails you wanna send. So in that case, you don't care about the SMTP email sending protocol, it's just a cloud API call, okay.

[00:04:48]
You just do a get with a key, and that's the email, that's the address, and that's the recipient. Because if not today, mostly on Gmail or Microsoft business account or even Yahoo accounts that most people are using. The email will not go through because of a spam. And there are filters they have that it's very difficult.

[00:05:09]
I mean, it's not impossible, but it's very difficult for you to create your own. You have your own SMTP server, set it up properly. You have to do a lot of stuff, type of security and privacy and handshaking with the servers to actually make those emails go through the inbox.

[00:05:28]
So I suggest you to go directly with the provider, with a cloud-based provider that will help you with that. Well, then our full stack project with Vanilla JavaScript and GO is ready. So, thank you.
>> [APPLAUSE].

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now