Your Next Store is a modern, ultra-fast commerce storefront with Stripe as the backend, using shadcn UI components.
https://github.com/user-attachments/assets/64197310-29bd-4dd3-a736-1494340e20e8
We officially support the current LTS version – 20 at the time of writing. YNS should work on versions 18, 20, and 22. If you're using one of those versions and encounter a problem, please report it!
Installing Node.jsFollow the instructions for your operating system found here: nodejs.org/en/download
We officially support pnpm version 9, but we will do our best to keep it compatible with npm and yarn.
Installing pnpmThe easiest way to install pnpm is via Node.js Corepack. Inside the folder with YNS, run these commands:
corepack enablecorepack install
Alternatively, follow the instructions for your operating system found here: pnpm.io/installation
YNS is tightly integrated with Stripe, so you need a Stripe account to use Your Next Store. Follow the instructions from Stripe to create an account.
It's important to remember that Stripe works in two different modes: Test Mode and Production Mode. For local development and testing purposes, you should use the Test Mode. This way, Stripe will never charge real money, and you can use special test credentials such as credit card numbers and BLIK numbers to complete payments. For more detailed information, please refer to the Stripe documentation at docs.stripe.com/testing.
Once you're ready to sell your products to real customers, you must switch Test Mode to Production Mode in Stripe and generate new credentials.
[!TIP] This step will require additional verification from Stripe, so we suggest you start the process immediately.
For YNS to work, you'll need to define a few environmental variables. For local development and testing, you may create an empty
.env
.env.example
To set env variables in production, you'll need to consult the documentation of your chosen hosting provider.
ENABLE_EXPERIMENTAL_COREPACK
1
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
STRIPE_SECRET_KEY
STRIPE_CURRENCY
usd
NEXT_PUBLIC_URL
https://demo.yournextstore.com
http://localhost:3000
https://github.com/yournextstore/.github/assets/200613/01d27f69-00dc-446e-bc81-5dea2587f346
NEXT_PUBLIC_UMAMI_WEBSITE_ID
NEXT_PUBLIC_NEWSLETTER_ENDPOINT
{ email: string }
{ status: number }
STRIPE_WEBHOOK_SECRET
ENABLE_STRIPE_TAX
1
NEXT_PUBLIC_LANGUAGE
en-US
After following the above steps, run
pnpm install
pnpm dev
Your Next Store gets all the products, prices, descriptions, and categories from Stripe. So, if you know Stripe already, you'll feel right at home!
You need to add products to the Stripe Dashboard to show in YNS. After logging in, click More in the left sidebar and select Product catalogue. You may also use the direct link:
Then, click on Add product and fill in all the required information:
Additionally, Your Next Store uses product metadata to provide more context information about the products. You can specify the following metadata fields:
Field | Required | Description |
---|---|---|
| Yes | The product slug is used for URLs. Needs to be unique except for variants. |
| No | The product category used for grouping products. |
| No | The product order used for sorting products. Lower numbers are displayed first. |
| No | The product variant slug. Read below for details. |
Now you should see all added products in Your Next Store.
Your Next Store supports simple product variants. To create a product with variants, you must add multiple products to Stripe with the same
slug
variant
slug
t-shirt
variant
small
medium
large
Variants are displayed on the product page. Variants can have different prices, descriptions, and images. It's important to note that the
category
[!NOTE] In the future, we plan to add the possibility of editing products and variants inside a built-in admin dashboard. If you have any ideas or suggestions, please let us know!
Your Next Store uses Stripe Webhooks to handle events from Stripe. Currently, the endpoint is used to automatically revalidate cart page and to create tax transaction (if enabled). To set up Webhooks, follow the Stripe docs. The exact steps depend on whether you've activated Stripe Workbench in your Stripe account: docs.stripe.com/webhooks#add-a-webhook-endpoint.
The endpoint for the webhook is
https://{YOUR_DOMAIN}/api/stripe-webhook
payment_intent.succeeded
STRIPE_WEBHOOK_SECRET
[!NOTE] In the future, we plan to add more events to the webhook to improve the user experience.
Your Next Store comes with a preview of Stripe Tax support. To enable it, set the
ENABLE_STRIPE_TAX
1
For this feature to work, you must set your Tax settings in Stripe Dashboard: dashboard.stripe.com/register/tax. When enabled and configured, taxes will be automatically calculated and added to the total price of the product based on:
[!WARNING] This feature is still in the early stage, and there could be edge cases that are not supported. We're actively working on it, so if you encounter any problems or have any suggestions, please let us know!
To deploy on Vercel, click the following button, set up your GitHub repository and environment variables, and click Deploy. Make sure to set the
ENABLE_EXPERIMENTAL_COREPACK
1
Description coming soon.
To deploy on Docker, follow these steps:
pnpm run docker:build
pnpm run docker:run
YNS evolves each day, and we actively seek feedback on what to improve. If you have any questions or problems, don't hesitate to get in touch with us on our Discord Server.
structuredClone
Only certain types of data can be passed from the server to the client directly. Data from Stripe SDK often contains class instances. To work around this, we use
structuredClone
Your Next Store is a modern, ultra-fast commerce storefront with Stripe as the backend, using shadcn UI components.
https://github.com/user-attachments/assets/64197310-29bd-4dd3-a736-1494340e20e8
We officially support the current LTS version – 20 at the time of writing. YNS should work on versions 18, 20, and 22. If you're using one of those versions and encounter a problem, please report it!
Installing Node.jsFollow the instructions for your operating system found here: nodejs.org/en/download
We officially support pnpm version 9, but we will do our best to keep it compatible with npm and yarn.
Installing pnpmThe easiest way to install pnpm is via Node.js Corepack. Inside the folder with YNS, run these commands:
corepack enablecorepack install
Alternatively, follow the instructions for your operating system found here: pnpm.io/installation
YNS is tightly integrated with Stripe, so you need a Stripe account to use Your Next Store. Follow the instructions from Stripe to create an account.
It's important to remember that Stripe works in two different modes: Test Mode and Production Mode. For local development and testing purposes, you should use the Test Mode. This way, Stripe will never charge real money, and you can use special test credentials such as credit card numbers and BLIK numbers to complete payments. For more detailed information, please refer to the Stripe documentation at docs.stripe.com/testing.
Once you're ready to sell your products to real customers, you must switch Test Mode to Production Mode in Stripe and generate new credentials.
[!TIP] This step will require additional verification from Stripe, so we suggest you start the process immediately.
For YNS to work, you'll need to define a few environmental variables. For local development and testing, you may create an empty
.env
.env.example
To set env variables in production, you'll need to consult the documentation of your chosen hosting provider.
ENABLE_EXPERIMENTAL_COREPACK
1
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY
STRIPE_SECRET_KEY
STRIPE_CURRENCY
usd
NEXT_PUBLIC_URL
https://demo.yournextstore.com
http://localhost:3000
https://github.com/yournextstore/.github/assets/200613/01d27f69-00dc-446e-bc81-5dea2587f346
NEXT_PUBLIC_UMAMI_WEBSITE_ID
NEXT_PUBLIC_NEWSLETTER_ENDPOINT
{ email: string }
{ status: number }
STRIPE_WEBHOOK_SECRET
ENABLE_STRIPE_TAX
1
NEXT_PUBLIC_LANGUAGE
en-US
After following the above steps, run
pnpm install
pnpm dev
Your Next Store gets all the products, prices, descriptions, and categories from Stripe. So, if you know Stripe already, you'll feel right at home!
You need to add products to the Stripe Dashboard to show in YNS. After logging in, click More in the left sidebar and select Product catalogue. You may also use the direct link:
Then, click on Add product and fill in all the required information:
Additionally, Your Next Store uses product metadata to provide more context information about the products. You can specify the following metadata fields:
Field | Required | Description |
---|---|---|
| Yes | The product slug is used for URLs. Needs to be unique except for variants. |
| No | The product category used for grouping products. |
| No | The product order used for sorting products. Lower numbers are displayed first. |
| No | The product variant slug. Read below for details. |
Now you should see all added products in Your Next Store.
Your Next Store supports simple product variants. To create a product with variants, you must add multiple products to Stripe with the same
slug
variant
slug
t-shirt
variant
small
medium
large
Variants are displayed on the product page. Variants can have different prices, descriptions, and images. It's important to note that the
category
[!NOTE] In the future, we plan to add the possibility of editing products and variants inside a built-in admin dashboard. If you have any ideas or suggestions, please let us know!
Your Next Store uses Stripe Webhooks to handle events from Stripe. Currently, the endpoint is used to automatically revalidate cart page and to create tax transaction (if enabled). To set up Webhooks, follow the Stripe docs. The exact steps depend on whether you've activated Stripe Workbench in your Stripe account: docs.stripe.com/webhooks#add-a-webhook-endpoint.
The endpoint for the webhook is
https://{YOUR_DOMAIN}/api/stripe-webhook
payment_intent.succeeded
STRIPE_WEBHOOK_SECRET
[!NOTE] In the future, we plan to add more events to the webhook to improve the user experience.
Your Next Store comes with a preview of Stripe Tax support. To enable it, set the
ENABLE_STRIPE_TAX
1
For this feature to work, you must set your Tax settings in Stripe Dashboard: dashboard.stripe.com/register/tax. When enabled and configured, taxes will be automatically calculated and added to the total price of the product based on:
[!WARNING] This feature is still in the early stage, and there could be edge cases that are not supported. We're actively working on it, so if you encounter any problems or have any suggestions, please let us know!
To deploy on Vercel, click the following button, set up your GitHub repository and environment variables, and click Deploy. Make sure to set the
ENABLE_EXPERIMENTAL_COREPACK
1
Description coming soon.
To deploy on Docker, follow these steps:
pnpm run docker:build
pnpm run docker:run
YNS evolves each day, and we actively seek feedback on what to improve. If you have any questions or problems, don't hesitate to get in touch with us on our Discord Server.
structuredClone
Only certain types of data can be passed from the server to the client directly. Data from Stripe SDK often contains class instances. To work around this, we use
structuredClone