E-Book, Englisch, 508 Seiten
Bugl Modern Full-Stack React Projects
1. Auflage 2024
ISBN: 978-1-83763-275-6
Verlag: De Gruyter
Format: PDF
Kopierschutz: 1 - PDF Watermark
Build, maintain, and deploy modern web apps using MongoDB, Express, React, and Node.js
E-Book, Englisch, 508 Seiten
ISBN: 978-1-83763-275-6
Verlag: De Gruyter
Format: PDF
Kopierschutz: 1 - PDF Watermark
Recent trends show deeper integration between the two, opening numerous possibilities for building real-world web applications, through server-side technologies like Node.js, Express, and MongoDB.
Written by the author of Learning Redux and Learn React Hooks, and CEO of TouchLay, Modern Full-Stack React Projects will guide you through the entire process of advancing from a frontend developer to a full-stack developer. Starting with how to set up robust projects that can be maintained for a long time, you'll then progress toward developing a backend system and integrating it with the frontend. Throughout the book, you'll learn how to build, test, and deploy a blog application and a chat application. You'll also explore MongoDB, Express, React, Node.js (MERN) stack, best practices for frontend and backend development, different full-stack architectures, unit and end-to-end testing, and deployment of full-stack web applications. Once you get to grips with the essential concepts, you'll progress to learn how to use Next.js, an enterprise-grade full-stack web framework for React.
By the end, you'll be well-versed in the MERN stack and all set to create performant and scalable full-stack web applications.
*Email sign-up and proof of purchase required
Autoren/Hrsg.
Fachgebiete
Weitere Infos & Material
Table of Contents - Preparing For Full-Stack Development
- Getting to Know Node.js, NPM, and MongoDB
- Implementing a Backend Service Using Express, Mongoose ODM, and Jest
- Integrating Frontend with the Backend Using React and TanStack Query
- Deploying the Application with Docker and CI/CD
- Adding Authentication and Roles with JSON Web Tokens
- Improving the Load Time Using Server-Side Rendering
- Making Sure Customers Find You with Search Engine Optimization
- Implementing End-to-End Tests Using Playwright
- Aggregating and Visualizing Statistics Using MongoDB and Victory
- Building a Backend with a GraphQL API
- Interfacing with GraphQL on the Frontend Using Apollo Client
- Building a Backend Based on Event-Driven Architecture Using Express and Socket.IO
- Creating a Frontend to Consume and Send Events
- Adding Persistence Using MongoDB
- Scaling the Application by Deploying Multiple Instances with Docker Compose
- Creating Multiple Backend Services in a Microservice Architecture
- Making a Frontend That Consumes Multiple Backend Services
- Deploying a Next.js App
- Diving Deeper Into Full-Stack Development
Preface
Hi there – I am Daniel, an entrepreneur, technical advisor, and full-stack developer with a focus on technologies in the React ecosystem.
In my time as a technical advisor and developer for enterprises and the public sector, I have noticed that more and more companies look to reduce the gap between frontend and backend developers. Their business requirements often result in the need for a so-called “backend for frontend,” where data is fetched from different backend systems and prepared in a way that can be easily displayed in the frontend.
As an entrepreneur, I also have experience with starting new projects with smaller teams, where it is essential that every developer on your team can do everything, not just the frontend or the backend. In such cases, it often makes sense to develop the backend and frontend in the same language, which is often JavaScript (or TypeScript), because there is a big ecosystem and a large number of developers available.
In both cases, becoming a full-stack developer is getting increasingly more important. I have been coaching developers to learn more about full-stack development for a long time and have noticed that there are common issues and misunderstandings that most developers encounter when learning full-stack development. In this book, I want to summarize all my learnings and teachings about full-stack development, giving you pointers on where and how to learn more about the ever-growing ecosystem of full-stack development in JavaScript.
Nowadays, many companies use a stack consisting of MongoDB, Express, React, and Node.js, called the MERN stack. In this book, I will teach you how to build modern full-stack React applications by using these technologies. I will teach these technologies from the ground up, using as few libraries as possible, so that you can learn the essential concepts. This will allow you to adapt to new technologies for years to come, even when the specific tools used in this book become outdated. Additionally, I will teach about the deployment of apps and DevOps, as I found that this sector is often neglected and there are not enough developers who know about it. In the last part of the book, I will introduce Next.js as a full-stack framework and give an outlook on new developments in this sector, such as React Server Components and Server Actions.
I hope you enjoy reading this book. If you have any questions or feedback, feel free to reach out to me!
Who this book is for
This book is for developers who already have experience with React and want to learn how to create, integrate, and deploy various backend systems to become a full-stack developer. You should already have a good understanding of JavaScript and React, but do not need to have any prior knowledge of the development, creation, integration, and deployment of backend systems. If you face one of the following challenges, this book will be perfect for you:
- You know how to make a frontend with React but have no idea how to properly integrate it with a backend
- You want to create a full-stack project from scratch but do not know how to
- You want to learn more about the deployment of apps and DevOps
- You want to learn more about modern React development, such as React Server Components, Server Actions, and Next.js
This book will provide you with real-world projects and includes all the steps needed to become a full-stack developer, including but not limited to backend development, frontend development, testing (unit tests and end-to-end tests), and deployment.
What this book covers
, , gives a brief overview of the contents of the book and teaches you how to set up a project that will be used as a basis for the development of your full-stack projects.
, , provides information on how to write and run scripts with Node.js. Then, it explains how to use Docker to set up a database service. It also introduces MongoDB, a document database, and how to access the MongoDB database via Node.js.
, , puts into practice what you learned in by creating a backend service. Express is used to provide a REST API, Mongoose ODM to interface with MongoDB, and Jest to write unit tests for the backend code.
, , provides instructions on how to create a frontend that interfaces with the previously created backend service. It uses Vite to set up a React project, in which we create a basic user interface. Then, it teaches you how to use TanStack Query, a data-fetching library, to handle backend state and integrate the backend API with the frontend.
, , deep-dives into DevOps by teaching you about Docker and how to package an app with it. Then, it provides instructions on how to deploy an app to a cloud provider and how to configure CI/CD to automate the deployment.
, , teaches you about JSON Web Tokens, a way to add authentication to web applications. It also provides instructions on how to set up multiple routes using React Router.
, , covers benchmarking an application and teaches you about Web Vitals. Then, it gives instructions on how to implement a way to render React components on a server from scratch and how to pre-fetch data on the server.
, , focuses on how to optimize an app to be found by search engines, such as Google or Bing. Additionally, it provides information on how to create meta tags for easier integration with various social media sites.
, , introduces Playwright as a tool for writing end-to-end tests, which automatically performs actions in an app to find out whether your code still runs as designed after making changes. It also covers how to run Playwright in CI using GitHub Actions.
, , provides instructions on how to collect events in an app. Then, it teaches you how to aggregate data with MongoDB to generate summary statistics, such as the number of views or session duration. Finally, it covers creating graphs to visualize those aggregated statistics using the Victory library.
, , introduces GraphQL as an alternative to REST APIs, and you will learn when it is useful to use and how to implement it in a backend.
, , teaches you how to use Apollo Client on the frontend to interface with the previously implemented GraphQL backend.
, , introduces an event-based architecture, which is useful for apps that deal with real-time data, such as collaborative applications (Google Docs or an online whiteboard) or financial applications (Kraken crypto exchange). It teaches you about WebSockets and how to use Socket.IO to implement an event-based backend.
, , implements a frontend for the previously created event-based backend and interfaces with it using Socket.IO.
, , teaches you how to properly integrate a database into an event-based app to persist (and later replay) events.
, , introduces Next.js as an enterprise-ready full-stack web application framework for React. It highlights the differences between using a framework and a simple bundler such as Vite. It also teaches you about the Next.js App Router, a new paradigm for defining routes and pages.
, , teaches you about a new concept in React, Server Components, allowing you to directly integrate React apps with a database without needing a REST or GraphQL API. Additionally, it teaches you about Server Actions, which allow you to call functions on the server via the frontend.
, , dives deeper into the Next.js framework, providing information on how caching works in Next.js and how it can be used to optimize applications. It also teaches you about defining API routes in Next.js and how to add metadata for search engine optimization. Lastly, it teaches you how to...




