A Blueprint for Production-Ready Web Applications: Leverage industry best practices to create complete web apps with Python, TypeScript, and AWS
- Length: 284 pages
- Edition: 1
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2022-09-23
- ISBN-10: 1803248505
- ISBN-13: 9781803248509
- Sales Rank: #0 (See Top 100 Books)
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.
A Blueprint for Production-Ready Web Applications Contributors About the author About the reviewers Preface Who this book is for What this book covers To get the most out of this book Download the example code files Download the color images Access the Code in Action videos Conventions used Get in touch Share Your Thoughts Part 1 Setting 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 2 Building 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 3 Releasing 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 Why subscribe? Other Books You May Enjoy Packt is searching for authors like you Share Your Thoughts
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: A Blueprint for Production-Ready Web Applications: Leverage industry best practices to create complete web apps with Python, TypeScript, and AWS
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.