PRIYANKA VERGADIA: Hi.
I'm Priyanka Vergadia, a developer advocate
for Google Cloud.
And in this video, I'll show you how
to create an e-commerce website with Google Cloud.
There are multiple ways to create a retail website.
In this video, I'll walk you through one such approach
called headless commerce.
Headless commerce is where you decouple
the frontend, your mobile app, your CMS, from your backend
or your commerce layer.
This approach provides flexibility
to your marketing teams to quickly alter
frontend elements to run campaigns and promotions
and create the most advanced customer experience
for any frontend device.
By the end of this video, you will
understand the basics of how to build a headless commerce
application.
You will see a frontend experience deployed
on Cloud Run in Google Cloud, and integrate it
with commerce backend from Google Cloud Marketplace
offering partner, Commerce Tools.
All right.
Let's get started.
First things first.
If you logged into the console for the first time,
create a project.
A project is required to use Google Cloud
and forms the basis of creating, enabling, and using
all the Google Cloud services.
I'm going to be using this one for our demo today.
On the left navigation, select Billing
and link your billing account.
Go to billing any time for an accurate,
up to date picture of your Cloud spending.
You can view all products and learn more about them,
read documentation, work on a quick start,
and even navigate to individual products.
If you prefer to use the command line interface,
from the top right corner, you can activate Cloud Shell,
which is an online terminal preloaded
with utilities such as the GCloud, Command Line
Tool, QCTL, and more.
Now that you know how to navigate through the console,
let's look into the headless commerce project.
Here you have the Cloud Run instance
for our e-commerce frontend.
It is built on [INAUDIBLE] storefront
and deployed in a serverless container.
If you are wondering why we are using Cloud Run here,
it's because it allows you to deploy serverless containers.
You don't need to worry about scaling
up or down as traffic patterns change.
Once the service is deployed, you
can see it in the Cloud Run Service Details page.
And here is what the service looks like.
In order for this to work, we need to plug into a backend.
So let's talk about the backend now.
We could just create a backend ourselves.
But that would require us to create
all the microservices for products, orders, cards, et
cetera.
And we have an example for that here.
Creating your own backend can be a lot of work
and can be time consuming, time which your development team can
spend elsewhere, which is why, in this solution,
we are using a headless approach, a faster way
to connect with pre-built backend APIs.
The benefit of this approach is that you
can update the frontend without having to touch the backend.
This separation also makes it easier
to update the frontend while maintaining compliance
with security and other standards for the backend.
It also helps with maintaining consistent performance
for the end-to-end client experience
as you apply updates to your frontend.
All right.
So how do we actually do this?
We have Google Cloud Marketplace,
which offers quick deploy software solutions.
The partners such as Commerce Tools on Marketplace
allows you to create this integration
right inside the console.
After setting up a trial account on Commerce Tools
and logging in, I created an API client
to connect the frontend with the Commerce Tools back end, which
offers products, categories, customers, orders,
and other services.
After both the frontend and backend are set up,
we can deploy the website and see that it works.
And as we saw at the beginning of this tutorial,
the storefront on Cloud Run can be
accessed at the deployed URL.
You can also see the logs and metrics in the Cloud Run
deployed service with request count, latency,
billable instance time, and other utilization metrics.
You just learned how to build a headless commerce application
with frontend experience deployed
on Cloud Run and backend APIs on Commerce Tools in Google Cloud
Marketplace.
Thanks for watching.
I encourage you to sign up for a free trial
and follow this tutorial yourself.
[MUSIC PLAYING]