What this book covers
Chapter 1, Web Development and the FARM Stack, provides a deep understanding of the web development landscape by giving you a quick walk-through of the widely used technologies available. It introduces the most popular option—the FARM stack. It highlights the benefits of FARM stack components, how they relate to each other, and why this particular set of technologies is a great fit for web apps.
Chapter 2, Setting Up the Database with MongoDB, provides an overview of MongoDB, and then shows how to set up the data storage layer for a FARM application. It helps with exploring the basics of creating, updating, and deleting documents. Furthermore, this chapter details the aggregation pipeline framework—a strong analytic tool.
Chapter 3, Python Type Hints and Pydantic, includes examples that teach you about more web-specific aspects of FastAPI and how to blend data seamlessly between MongoDB, Python data structures, and JSON.
Chapter 4, Getting Started with FastAPI, focuses on introducing the FastAPI framework, along with the standard REST API practices and how they are implemented in FastAPI. It covers very simple examples of how FastAPI achieves the most common REST API tasks and the way it can help you by leveraging modern Python features and libraries such as Pydantic.
Chapter 5, Setting Up a React Workflow, shows how to design a simple application with a few components using the React framework. It discusses the tools needed to be able to explore React and its various functionalities.
Chapter 6, Authentication and Authorization, details a simple yet robust and extensible setup for your FastAPI backend, based on JSON Web Tokens (JWTs). It demonstrates the integration of JWT-based authentication methods into React, leveraging some of React’s powerful features—namely, Hooks, Context, and React Router.
Chapter 7, Building a Backend with FastAPI, helps in working on a simple business requirement and turning it into a fully functional API deployed on the internet. It shows how to define the Pydantic models, perform CRUD operations, build your FastAPI backend, and connect to MongoDB.
Chapter 8, Building the Frontend of the Application, illustrates the steps for building the frontend of a full stack FARM application. It shows how to create a React application using a modern Vite setup and implement the basic functionalities.
Chapter 9, Third-Party Services Integration with FastAPI and Beanie, gives the basics of Beanie, a popular ODM library for MongoDB, built on top of Motor and Pydantic. It shows how to define models and Beanie documents that map to MongoDB collections. You’ll see how to build another FastAPI application and integrate third-party services with the help of background tasks.
Chapter 10, Web Development with Next.js 14, gives a walk-through of important Next.js concepts, such as Server Actions, form handling, and cookies to help in creating a new Next.js project. You’ll also learn how to deploy your Next.js application on Netlify.
Chapter 11, Useful Resources and Project Ideas, provides some practical advice when working with the FARM stack, along with project ideas where the FARM stack, or very similar stacks, could be applicable and helpful.