A Blueprint for Production-Ready Web Applications: Leverage industry best practices to create complete web apps with Python, TypeScript, and AWS
β Scribed by Dr. Philip Jones
- Publisher
- Packt Publishing
- Year
- 2022
- Tongue
- English
- Leaves
- 285
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Go from setting up your production environment, to building an app, to deploying it to the web using industry best practices along the way
Key Features
- Follow a blueprint to build production-ready apps that can be adapted and tailored to your requirements
- Learn how to combine a React frontend with a Quart backend, and run them in Docker on AWS
- Adopt industry best practices that can be used in your personal as well as work projects
Book Description
A Blueprint for Production-Ready Web Applications will help you expand upon your coding knowledge and teach you how to create a complete web application. Unlike other guides that focus solely on a singular technology or process, this book shows you how to combine different technologies and processes as needed to meet industry standards.
You'll begin by learning how to set up your development environment, and use Quart and React to create the backend and frontend, respectively. This book then helps you get to grips with managing and validating accounts, structuring relational tables, and creating forms to manage data. As you progress through the chapters, you'll gain a comprehensive understanding of web application development by creating a to-do app, which can be used as a base for your future projects. Finally, you'll find out how to deploy and monitor your application, along with discovering advanced concepts such as managing database migrations and adding multifactor authentication.
By the end of this web development book, you'll be able to apply the lessons and industry best practices that you've learned to both your personal and work projects, allowing you to further develop your coding portfolio.
What you will learn
- Set up an optimum development environment for building web apps
- Create a working backend Quart app that can be tailored to suit your needs
- Build a user management system with passwords and authentication
- Build a single-page application with React Router and Formik
- Deploy your app to AWS and understand the importance of monitoring
- Discover advanced concepts such as managing database migrations
Who this book is for
This book is for software engineers like recent computer science or bootcamp graduates who already know how to program and want to learn how to build an app by following standard industry processes such as continuous integration and continuous deployment (CI/CD). Working knowledge of TypeScript/JavaScript, Python, HTML, CSS, and SQL is needed. You don't, however, need prior experience with Quart, React, AWS, and all other specific technologies and processes, as they will be introduced in the book.
Table of Contents
- Setting Up Our System for Development
- Creating a Reusable Backend with Quart
- Building the API
- Creating a Reusable Frontend with React
- Building the Single-Page App
- Deploying and Monitoring Your Application
- Securing and Packaging the App
β¦ Table of Contents
Cover
Title Page
Copyright and Credits
Contributors
Table of Contents
Preface
Part 1Setting Up Our System
Chapter 1: Setting Up Our System for Development
Technical requirements
Aiming for fast development
Auto-formatting the code
Linting the code
Testing the code
Setting up our system
Managing the code
Rebasing rather than merging
Installing Python for backend development
Formatting the code
Linting the code
Testing the code
Scripting the commands
Installing NodeJS for frontend development
Formatting the code
Linting the code
Testing the code
Analyzing the bundle
Scripting the commands
Installing Terraform for infrastructure development
Managing secrets
Formatting, linting, and testing the code
Installing PostgreSQL for database development
Adopting a collaborative development process using GitHub
Adding continuous integration
Adding CI for the infrastructure code
Adding CI for the backend code
Adding CI for the frontend code
Summary
Further reading
Part 2Building a To-Do App
Chapter 2: Creating a Reusable Backend with Quart
Technical requirements
Creating a basic Quart app
Testing the ping route
Using blueprints for clearer code
Configuring the app
Ensuring error responses are JSON
Including user accounts
Securely storing passwords
Ensuring passwords are strong
Allowing password-less authentication
Protecting the app
Adding rate limiting
Ensuring all routes have rate limits
Adding request and response validation
Connecting to the database
Sending emails
Rendering emails
Sending emails
Testing that emails are sent
Summary
Further reading
Chapter 3: Building the API
Technical requirements
Creating the database schema and models
Creating the member schema and model
Creating the to-do schema and model
Running the first migration
Adding test and development data
Building the session API
Creating the blueprint
Adding login functionality
Adding logout functionality
Adding status functionality
Testing the routes
Building the member API
Creating the members blueprint
Creating a member
Confirming the email address
Changing passwords
Requesting a password reset
Resetting the password
Testing the routes
Building the To-Do API
Creating the blueprint
Creating a to-do
Reading a to-do
Reading the to-dos
Updating a to-do
Deleting a to-do
Testing the routes
Summary
Further reading
Chapter 4: Creating a Reusable Frontend with React
Technical requirements
Enhancing the basic React app
Styling the app
Adding page titles
Adding an authentication context
Adding routing
Requiring authentication
Resetting scrolling on navigation
Enabling data entry
Implementing a styled checkbox field
Implementing a styled date field
Implementing a styled email field
Implementing a styled text field
Implementing a styled password field
Implementing a styled password strength field
Implementing styled form actions
Managing the app state
Communicating with the backend
Supporting toast feedback
Summary
Further reading
Chapter 5: Building the Single-Page App
Technical requirements
Adding navigation
Adding user authentication pages
Registration
Email confirmation
Logging in
Adding password management pages
Changing a password
Forgotten passwords
Resetting a password
Adding to-do pages
Showing to-dos
Creating to-dos
Editing to-dos
Summary
Further reading
Part 3Releasing a Production-Ready App
Chapter 6: Deploying and Monitoring Your Application
Technical requirements
Making the app production-ready
Serving the frontend
Serving the backend
Containerizing the app
Deploying to AWS
Designing the production system
Setting up the networking
Adding a database
Running the cluster
Adding continuous deployment
Serving on a domain
Securing the connection
Sending production emails
Monitoring production
Monitoring the backend
Monitoring the frontend
Displaying an error page
Summary
Chapter 7: Securing and Packaging the App
Technical requirements
Securing the app
Adding secure headers
Protecting against account enumeration
Protecting against spam accounts
Updating packages
Periodically checking for vulnerabilities
A system for monthly updates
Adding multifactor authentication
Updating the database and models
Activating MFA
Logging in with MFA
Recovering and inactivating MFA
Converting to a Progressive Web App
Summary
Further reading
Index
Other Books You May Enjoy
π SIMILAR VOLUMES
<p><span>Dive in and discover how to build awesome React web apps that you can scale and maintain using design patterns and the latest industry insights</span></p><p><span> Purchase of the print or Kindle book includes a free PDF eBook</span></p><h4><span>Key Features</span></h4><ul><li><span><span>
<p><span>A hands-on guide to help you develop skills and confidence in building and structuring React applications in a well-organized way using the best tools in the React ecosystem</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Discover solutions to complex problems faced while cr
<p><span>A hands-on guide to help you develop skills and confidence in building and structuring React applications in a well-organized way using the best tools in the React ecosystem</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Discover solutions to complex problems faced while cr
<p><span>Dive in and discover how to build awesome React web apps that you can scale and maintain using design patterns and the latest industry insights.</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Discover and unpack the latest React 18 and Node 19 features in this updated fourt
Build modular React web apps that are scalable, maintainable and powerful using design patterns and insightful practices Key Features Get familiar with design patterns in React like Render props and Controlled/uncontrolled inputs Learn about class/ functional, style and high order components wi