
No Comments Yet
Be the first to share your thoughts and start the conversation.
In this backend course lesson, we focus on architecting the backend system before diving into coding.
Be the first to share your thoughts and start the conversation.
How did you manage to remove the blur property and reach here?
Upgrading gives you access to quizzes so you can test your knowledge, track progress, and improve your skills.
By logging in, you'll unlock full access to this and other free tutorials on JSM Pro.
Why? Logging in lets us personalize your learning experience, track your progress, and keep you in the loop with new workshops, coding tips, and platform updates.
You'll also be the first to know about upcoming launches, events, and exclusive discounts.
No spam—just helpful content to level up your skills.
If that sounds fair, go ahead and log in to continue →
Enter your name and email to get instant access
In this lesson, we explore the critical thought processes behind architecting a backend system. Rather than immediately diving into code, we emphasize understanding the high-level and low-level architecture of the application at hand.
00:00:02 Welcome to the backend part of the course.
00:00:04 In this lesson, I wanted to take some of your time to discuss how we'll approach developing the backend, or rather thinking about architecting it.
00:00:14 Not immediately diving into code like a coding monkey, but rather think about the both high-level and low-level architecture of your backend system.
00:00:23 First things first, you need to define the requirements.
00:00:26 Let's discuss this illustration right here.
00:00:28 We have a client which talks to a web server, which talks to the application server, which then talks to the database, and vice versa.
00:00:36 In typical applications, you would have a client which would be, for example, a React applications, which only works on the client side.
00:00:44 Then you would have an API, which would act as some kind of a server that you talk to, which then makes requests to a database.
00:00:51 In Next.js applications, we are automatically covering both the client as well as the backend side, because it allows us to do both through server actions.
00:01:01 And in a way, we're also covering the database with the Next.js as we have such an easy way to make a connection to it and immediately extract what we want.
00:01:10 It's super convenient.
00:01:12 And once we dive into it, you'll start to love it.
00:01:14 But now let's talk specifically about setting up our backend and database architecture.
00:01:20 But first you have to ask yourself, what is the main goal of the application?
00:01:24 You have to define the requirements.
00:01:27 And you can do that by determining what your application needs.
00:01:31 And the first way to do that is to identify the main goal.
00:01:36 Is the application a content-based app, maybe a blog or something?
00:01:41 Is it an e-commerce platform or a social media application?
00:01:46 What actions will users perform?
00:01:49 Maybe some social application actions like post, comment, or like.
00:01:53 Or maybe some e-commerce actions like create user accounts, manage product catalogs, and deal with payment systems.
00:02:01 And finally, you have to identify data requirements.
00:02:04 Do we have to store images and files?
00:02:06 Do we have to store user-generated content?
00:02:09 Or maybe transaction histories?
00:02:11 It's important to answer all of these questions to form a proper data flow between your server and your database.
00:02:19 You have to plan how the data will move within your system.
00:02:24 This means figuring out the core entities in our application, such as collections in MongoDB.
00:02:30 We're going to have a collection for users.
00:02:33 We're going to have a collection for maybe products or orders, or maybe for questions within our Stack Overflow application.
00:02:41 You have to define and think about the structure of our application, and also, take a look at this, define the relationships between those structures.
00:02:51 For example, a user might have multiple posts, but each post belongs to only one user.
00:02:58 And you'll also have to think about scalability and performance from the start.
00:03:03 Always make sure that you build your applications in a scalable way so that you can scale to more users, more posts, and more data incrementally.
00:03:12 I know that this was a very high level overview of how to think in backend, but immediately in the next lesson, we'll dive into the practical setup of
00:03:21 MongoDB and Mongoose.
00:03:22 And then later on, we'll dive deeper into explaining the database structure of our specific application.
00:03:28 I hope you're excited.
00:03:29 Let's go ahead and set up that backend.