This repository was archived by the owner on Jul 29, 2022. It is now read-only.
RFC: checkout
and checkout-app
merger
#137
typeofweb
started this conversation in
RFC / ideas
Replies: 4 comments 12 replies
-
I definitely agree that single Next app is a way into easier deployment and maintenance. However, I'd consider following concerns:
|
Beta Was this translation helpful? Give feedback.
4 replies
-
So it seems the consensus is to keep
|
Beta Was this translation helpful? Give feedback.
8 replies
-
PR, posting for transparency, it's work in progress: #146 |
Beta Was this translation helpful? Give feedback.
0 replies
-
Merged. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Objective
Merge
checkout
andcheckout-app
intocheckout-app
Next.js application.Goals:
Non-goals:
Motivation
Currently, in order to deploy Saleor Checkout, one needs to:
saleor-checkout
checkout-app
to Vercelcheckout
to VercelBy merging
checkout
andcheckout-app
into a single app, we’ll be able to drop the last step.This is particularly important because, as our onboarding experience shows, the existence of two apps and their similar names are confusing to our users.
Things to keep in mind
Why the apps were divided
These two apps were divided in order to make it easier for our users to keep track of remote changes in their forks of
saleor-checkout
. The idea was for them to easily pull changes intocheckout-app
while being able to modifycheckout
without any concerns.Unfortunately, this goal is not really met right now: users still face merge conflicts in
checkout
when they pull from the upstream repository to updatecheckout-app
.checkout
is an SPAcheckout-app
is a Next.js application whilecheckout
is a Single Page Application based on CRA. This distinction was introduced in order to make it easier for our users to reusecheckout
, host on static hostings or embed it inside existing applications simply by using a component.Design Proposal
Merge
checkout
intocheckout-app
.We’ll keep the structure of
checkout-app
as is but create a separate directory just forcheckout
:We’ll add one new page to
checkout-app/pages
folder – it’ll only render the<Root />
components frompackages/checkout-storefront
.Why?
This way, users have a way to use checkout SPA without Next.js if they need to:
<Root />
componentnext export
to get a static website (I was able to get this working by using some hacks in Next.js – see below)It’s also way simpler to deploy to Vercel and develop: there’s just a single application to deploy.
Example
next.config.js
Beta Was this translation helpful? Give feedback.
All reactions