Nimara Documentation
website·Indexed 32 days ago
https://docs.nimara.storeDeveloper guides for setting up and managing Nimara storefronts, including local development with Docker, Saleor CMS configuration, Stripe and Universal Commerce Protocol (UCP) integrations, and deployment via Terraform to Vercel.
What's inside Nimara
- Nimara provides a serverless TypeScript-based Stripe integration built with Next.js, designed for deployment on Vercel. It integrates with Saleor to support Stripe Payment Intents, multi-channel Stripe configurations, Stripe Tax calculations, and automated webhook setup via Stripe keys.
Overview of Universal Commerce Protocol (UCP) in Nimara
Nimara implements the Universal Commerce Protocol (UCP) version2026-04-08, an open standard for agentic commerce. This allows AI agents and platforms to interact with the storefront for product discovery, cart management, checkout, and order retrieval via a shared REST API. All UCP endpoints are served under the path/api/ucp/{channelSlug}/.Introduction to Nimara Headless E-commerce
Nimara is a modern, performant headless e-commerce storefront built on top of Saleor. It is developed using Next.js, TypeScript, and React Server Components.Understand the Nimara automated release process
Releases are triggered automatically after a push to
mainpasses the full CI workflow. The process follows these steps:- The Release workflow checks out the successful commit and runs
semantic-releaseto determine if a new version, tag, or GitHub release is required based on Conventional Commit history. - Vercel independently builds affected applications from
mainand updates production domains upon success. - Documentation is published from the same commit after the Release workflow succeeds.
There are no separate release branches or promotion merges.
- The Release workflow checks out the successful commit and runs
Understand Nimara storefront i18n architecture
The storefront utilizes a shared i18n package and message composition system. It identifies itself by passingapp: "storefront"to the@nimara/i18n'screateRequestConfigmethod. This configuration ensures the storefront receives bothcommonandstorefrontmessage bundles, including any locale-specific overrides.Understand Nimara i18n architecture and file structure
Nimara uses a shared i18n package with feature-based message files and locale overrides. Base English messages are the source of truth, and regional overrides only contain keys that differ from the base English version to ensure key stability across locales.
File Locations:
- Base English Messages:
packages/i18n/src/messages/en/ - Regional Overrides:
packages/i18n/src/messages/<locale>/(e.g.,en-GB)
Message File Mapping:
common.json: Contains shared namespaces such ascommon,errors,form-validation, andstock-errors.storefront.json: Contains storefront-specific namespaces such ashome,cart,checkout,auth,account, andorder.marketplace.json: Contains marketplace-specific namespaces (e.g.,marketplace.*, vendor products, orders, collections).
- Base English Messages:
Create and manage Static Pages
Static pages are used for standalone content like "About Us" or "Contact" pages and do not require attributes.
Step 1: Define the Static Page Type
- Go to Saleor dashboard → Configuration → Content Management → Page Types.
- Click Create page type, enter the name
Static page, and save.
Step 2: Create a Static Page instance
- Go to Saleor dashboard → Content → Create content.
- Select
Static pageas the page type. - Provide the following details:
- Title: The page title (e.g., "About Us").
- Slug: The URL path (e.g.,
/about-us). - Content: Use the rich text editor for text, images, and links.
Understand Nimara's layered architecture
Nimara uses a layered monorepo where each layer only depends on layers below it. This ensures that external integrations (like CMS or Search) can be swapped without affecting the UI or business logic.Implement daily development workflow at Nimara
Nimara utilizes trunk-based development wheremainis the sole long-lived branch and the source for all releases and Vercel production deployments. Every commit tomainmust be safe to release. Developers should start changes from the latestmain, keep branches focused on a single releasable change, and aim to merge within two working days. For larger tasks, use backward-compatible slices, feature flags (default-off), or branch by abstraction.git switch main git pull --ff-only origin main git switch -c feat/my-new-featureConfigure storefront navigation and footer menus
Manage the links for your website's header and footer using the Navigation settings:
- Navigate to Saleor dashboard → Configuration → Miscellaneous → Navigation.
- Click Create menu to create the following specific menus:
navbar: Manages links displayed in the website's header navigation.footer: Manages links displayed in the footer section.
- To add links, select a menu and click Create new item. Menu items can link to:
- Categories
- Collections
- Static Pages (created in the Content section)
- External or internal URLs
Run the Nimara Stripe App locally
Because Saleor pushes payment webhooks to the app, the app must be reachable via a public URL. Use a tunneling service (like ngrok, cloudflared, or untun) to expose port 4000 to the internet.# Start the dev server pnpm dev:stripe # In another shell, expose port 4000 via your chosen tunnel # Example: ngrok http 4000Submit a Pull Request to Nimara
To contribute changes to Nimara, push your branch and open a PR against the
mainbranch. Requirements for merging include:- A Conventional Commit title.
- Included testing evidence.
- Passing status for
Linters & Tests. - Passing status for all four Vercel projects:
nimara-docs,nimara-ecommerce,nimara-ecommerce-stripe, andnimara-marketplace.