Simple, branded, mobile‑first storefront for selling one‑time and subscription products with Dodo Payments. Built with Next.js App Router, TypeScript, shadcn/ui, Radix UI, and Tailwind CSS.
The Storefront lets you publish products from your Dodo Payments dashboard without building a full website. Customers can browse products and purchase via Dodo’s secure checkout.
For full product docs, see the Storefront guide: docs.dodopayments.com/features/storefront.
- Branded storefront: Store name, logo, and cover image
- Product segregation: One‑time vs subscription sections
- Simple checkout: "Buy Now" redirects to Dodo checkout
- Publish/unpublish: Control what’s visible from the dashboard
- No extra CMS: Manage products where you already set pricing and details
- Mobile‑friendly: Responsive layout for all devices
- Test Mode: Separate test and live storefronts
- Runtime: Next.js 15 (App Router), React 19
- Language: TypeScript
- UI: shadcn/ui, Radix UI, Tailwind CSS
- State/Utils: Redux Toolkit, zod, date‑fns
-
Install dependencies
npm install
-
Start the development server
npm run dev
-
Create a storefront
Set up a new storefront in your Dodo Payments dashboard. -
Access your storefront
Open http://localhost:3000/[slug], replacing[slug]with your storefront's slug from the dashboard.
npm run dev: Start dev servernpm run build: Create production buildnpm run start: Start production servernpm run lint: Lint codebase
This app uses Lingo.dev Compiler to localize UI text at build time without changing components. The compiler extracts strings from src/app/, generates dictionaries under lingo/, and injects translations during build.
- API key: Obtain from Lingo.dev Engine and set the environment variable before running builds/dev:
export LINGO_API_KEY="<your_api_key>"- Locales: Source locale is
en. Target locales configured innext.config.tsaredeandesfor this PR.
- Development:
npm run dev- Production build:
npm run build
npm startThe compiler will create/update dictionaries in the lingo/ directory and use them to render localized content.
- The current locale is read from the
lingo-localecookie (defaults toen). You can switch locales by setting this cookie in the browser DevTools Application tab, or via a simple link/action that sets the cookie on the server usingsetUserLocale(locale)fromsrc/lib/i18n-helper.ts.
Examples:
- Set to German:
lingo-locale=de - Set to Spanish:
lingo-locale=es
Reload the page after changing the cookie.
- Dictionaries are versioned by content fingerprint; only changed strings retranslate.
- If you see missing translations during development, rebuild or refresh once the dictionary updates.
Key folders:
src/app: Next.js App Router pages, layouts, and route handlerssrc/components: UI components (custom, product, and shadcn‑based primitives)src/libandsrc/constants: Utilities and constantspublic: Static assets (logos, banners, images)
Example brand assets used in docs/social embeds live under public/images/brand-assets/.
This repository focuses on the customer‑facing storefront. Product data, pricing, and publish/unpublish are managed in your Dodo Payments dashboard. Customers select quantity and proceed to secure checkout on Dodo. After payment, Dodo shows confirmation and can optionally redirect back to your storefront.
Refer to the Storefront documentation for end‑to‑end setup and merchant workflows: docs.dodopayments.com/features/storefront.
Contributions are welcome! Please read CONTRIBUTING.md for local setup, coding style, and pull request guidelines. For issue/PR authoring, use the templates in .github/.
We take inspiration for structure and DX from the Billing SDK project: dodopayments/billingsdk.
If you discover a vulnerability, please review SECURITY.md for our coordinated disclosure process.
Licensed under the GPL‑3.0. See LICENSE for details.
