Preface

The aim of this book is to show you how to develop a web application using industry best practices and place it in a running production environment. We’ll do this by creating a working to-do app. This app is live at tozo.dev, and all the code for it is available under the MIT license at github.com/pgjones/tozo.

The development blueprint presented in this book is based on one I’ve used to successfully build apps before, including for my own start-up a few years ago. The technology used here has been chosen because of its popularity in the industry, with Python, NodeJS, and Terraform being popular tools for full-stack development, and AWS being a popular cloud infrastructure provider.

I started writing this book as the guide I wish I’d had when I started my full-stack engineering career. I’ve tried to answer as many of the questions that I had when I started and introduce much of the vocabulary I was missing. Over the past year, I’ve been refining and using this blueprint to help guide and develop junior engineers in their first industrial jobs. I hope it helps you to build great apps too!

Who this book is for

This book is for software engineers who already know how to program (such as recent computer science or bootcamp graduates) and want to learn how to build an app following industry processes (for example, using continuous integration and deployment).

You will need a working knowledge of TypeScript/JavaScript, Python, HTML, CSS, and SQL. Apart from that, you are expected to be new to Quart, React, AWS, and all other specific technologies and processes introduced in the book.

What this book covers

In Chapter 1, Setting Up Our System for Development, we’ll set up everything needed to develop the app. This includes installing Python, Node.js, Terraform, and Git, along with the associated tooling for each.

In Chapter 2, Creating a Reusable Backend with Quart, we’ll build a backend that can be used for any app, introducing elements such as authentication, protection, database connections, and email.

In Chapter 3, Building the API, we’ll build a to-do tracking RESTful CRUD API that includes member and session management.

In Chapter 4, Creating a Reusable Frontend with React, we’ll build a frontend that can be used for any app, while discussing routing, styled data entry (forms), state management, and toast feedback.

In Chapter 5, Building the Single-Page App, we’ll build a to-do tracking user interface by creating pages that allow users to register and log in to our app, as well as to change and manage their passwords.

In Chapter 6, Deploying and Monitoring Your Application, we’ll deploy the app to AWS running in Docker. Here, we will discuss how to set up a domain name, employ HTTPS, and monitor the app for errors.

In Chapter 7, Securing and Packaging the App, we’ll adopt industry best practices to secure the app and package it for the app stores, which includes adding multi-factor authentication and meeting the requirements to be a progressive web app.

To get the most out of this book

You will need to be able to read and understand basic Python, TypeScript, HTML, and SQL. Everything else will be introduced in the book.

All the installation instructions are present in the book.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

Download the example code files

You can download the example code files for this book from GitHub at https://github.com/pgjones/tozo. If there’s an update to the code, it will be updated in the GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots and diagrams used in this book. You can download it here: https://packt.link/18OWu.

Access the Code in Action videos

You can find the CiA videos for this book here: https://bit.ly/3PBCd6r.

Conventions used

There are a number of text conventions used throughout this book.

Code in text: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “The reminderName string is a string that uniquely identifies the reminder within the scope of the contextual grain.”

A block of code is set as follows:

class APIError(Exception):
    def __init__(self, status_code: int, code: str) -> None:
        self.status_code = status_code
        self.code = code

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public interface IHotelGrain : IGrainWithStringKey
    {
        <<Code removed for brevity>>
        public Task Subscribe(IObserver observer);
        public Task UnSubscribe(IObserver observer);

Any command-line input or output is written as follows:

az monitor app-insights component create --app ai-distel-prod --location westus  --resource-group rg-distel-prod

Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “The Client System sends the batches of messages to the Dispatcher Grain, which enumerates through the batch of messages to dispatch the messages to each target grain.”

Tips or Important Notes

Appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: If you have questions about any aspect of this book, email us at [email protected] and mention the book title in the subject of your message.

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/support/errata and fill in the form.

Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Share Your Thoughts

Once you’ve read A Blueprint for Production-Ready Web Applications, we’d love to hear your thoughts! Please click here to go straight to the Amazon review page for this book and share your feedback.

Your review is important to us and the tech community and will help us make sure we’re delivering excellent quality content.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset