14 Integrating and releasing the web application

 

This chapter covers

  • Adding minimum viable authentication
  • Managing code and definition repositories
  • Serving backend and frontend with a single server and base URL

Our PetSitter team has been busy. The two developers created an API definition and coded a first version of their respective parts. During development, they encountered various issues with the API design and resolved them through a change process. Now they’ve reached an exciting point in the project: José wants to start testing the application to see what Max and Nidhi have been doing. To check the workflows for the different roles, he also wants to provide additional test users, both inside and outside the company, access to a small demonstration instance.

The two developers will have to run their backend and frontend together for the first time. Because they used the API design-first approach, they made sure that all changes to the OpenAPI definition were communicated. The modifications we described in chapters 12 and 13 happened in parallel. Now they have all been merged, and we have a common, stable, OpenAPI file in our main branch—the “latest and greatest” version! This contract should ensure that both components work together, and our team is eager to see that promise fulfilled. You can see the merged OpenAPI file at https://designapis.com/ch14/01.yml.

14.1 The problems

14.1.1 Authentication

14.1.2 Organizing code

14.1.3 Serving both components

14.2 Implementing authorization

14.2.1 Creating a security scheme

14.2.2 Adding a “Login” action

14.2.3 Defining operation security

14.3 Managing repositories

14.3.1 Keeping the existing structure

14.3.2 Creating a shared Git repository to implement both components

14.3.3 Combining code and API definition in a repository

14.3.4 Making the choice and refactoring

14.4 Setting up an integrated web server