🔑 Key points
- You need to fork the jwt-pizza repository.
- Become intimately familiar with the JWT Pizza frontend code.
- Many projects revolve around your manipulating this project.
The JWT Pizza application team has finally finished their work on the website and has given you access to the frontend application code so that you can start testing and deploying it.
Now that you have the frontend application you can run the full JWT Pizza stack in your development environment. This includes the frontend (jwt-pizza), backend (jwt-pizza-service), and the database. The only piece that you do not actually manage is the service provided by JWT Headquarters that creates the JWT tokens representing a completed pizza order. Instead, your deployment of the JWT service will simply call the factory service that the JWT Headquarters provides.
graph LR;
subgraph Development environment
jwtPizza-->jwtPizzaService
jwtPizzaService-->database
end
subgraph JWT Headquarters
jwtPizzaService-->jwtPizzaFactory
end
Later in the course you will deploy the full JWT Pizza stack to a production environment using AWS.
To get started you need to fork the code to your GitHub account, run it locally and study how it works. This will get you comfortable with the code so that you are ready to start putting on your QA and DevOps hat.
Here are the steps to take:
-
Navigate your browser over to the jwt-pizza repository on GitHub and select the option to
Forkthe repository. -
Create the fork by pressing the
Create forkbutton. You must leave the name of the repositoryjwt-pizzaso that the TAs can easily review your work. -
Copy the URL for your fork of the repository.
-
Use the URL to clone the repository from your account to your development environment.
git clone https://github.com/youraccountnamehere/jwt-pizza.git
- Change directory into the newly clone repository and install the NPM package dependencies.
cd jwt-pizza npm install - Launch the frontend code in development mode using NPM. Press
o ⏎to open your browser.npm run dev
As the application team makes changes to the frontend code you will need to sync your fork of the repository. As long as you are only adding tests and not changing the core code, you shouldn't have to merge any code.
To sync your fork, navigate to your account's fork of the jwt-pizza repository. It will display if your fork is out of date. Press the Sync fork button and confirm the action.
Note
Do not press the Discard commits button if it is available, or you will lose any code that you have added to your fork such as tests you have written.
You will then need to pull the changes down to your development environment.
cd jwt-pizza
git pullThe following is the sitemap for JWT Pizza as provided by the application team. Note that while JWT Pizza is a fairly simple website, it has a significant amount of components and views that will require testing.
graph TB;
Home-->Login
Home-->Logout
Home-->Register
Home-->History
Home-->About
Home-->Menu
Home-->AdminDashboard
Home-->FranchiseDashboard
Register<-->Login
AdminDashboard-->CreateFranchise
AdminDashboard-->CloseFranchise
AdminDashboard-->CloseStore
FranchiseDashboard-->CreateStore
FranchiseDashboard-->CloseStore
Home-->DinnerDashboard
DinnerDashboard-->Menu
Menu-->Payment
Payment-->Login
Payment-->Delivery
Delivery-->Verify
Delivery-->Menu
Make sure you spend reasonable time both playing with the interface and also exploring the code. This will be a key factor in your success for both testing and deploying the application.
Following the above instruction you should have already forked and cloned the jwt-pizza repository to your development environment. Your copy of the JWT Pizza repo URL should look something like this:
https://github.com/youraccountnamehere/jwt-pizza
Now you can build and start up the JWT pizza frontend in your development environment and learn the code.
- Build and explore the application code.
cd jwt-pizza npm install - Start up the JWT Pizza backend by following the JTW Pizza Service instruction.
- Start up the JWT Pizza frontend by running
npm run dev. You should be able to access the application in your browser using the URLlocalhost:5173.
Open the browser's dev tools, set breakpoints and begin learning the code. Make sure you do at least the following:






