Skip to main content

Knowledge Base

In-depth guides to how EverShop works: architecture, routing, GraphQL, database queries, middleware, events, cron jobs, translations and more.

Architecture Overview

EverShop's architecture explained: a modular monolith on Node.js, the module system, request and bootstrap lifecycles, extension points and the build.

Configuration Guide

Configure an EverShop store: configuration layers, environment variables, reading config in code, and a reference of the core settings.

Command-Line Interface

EverShop CLI reference: commands to install, develop, debug, build and start your store, seed demo data and manage themes, with what each one does.

Store Settings

How EverShop stores merchant-editable settings in the setting table, the sync and async getter family, and how to migrate extension code from config keys to setting getters.

The Routing System

How routing works in EverShop: file-based routes for pages and APIs, route.json, route IDs, URL generation, admin and locale prefixes, and URL rewrites.

The Middleware System

How middleware works in EverShop: middleware types, the core middleware that runs first, adding or removing middleware on a route, and dependency order.

Registry and Processors

The Registry and Processor system is EverShop's primary mechanism for extending and transforming data across modules without modifying core code.

Pages

Create pages in EverShop: the pages folder structure, admin vs storefront pages, single-page folders, file naming and SEO-friendly URL rewrites.

RESTful API Routes

Build REST API endpoints in EverShop: folder structure, route definitions, authentication, request validation, middleware and built-in rate limiting.

GraphQL

How GraphQL works in EverShop: how types and resolvers are organized, how to add new types, extend existing ones, and define admin-only types.

Data Fetching

Fetch server data for React components in EverShop with GraphQL queries: how server-side data fetching works, plus client-side fetching.

Events and Subscribers

Use EverShop's event system: emit events, subscribe to one or all events, send events to external systems, and write type-safe subscribers.

Cron Jobs

Schedule recurring tasks in EverShop with cron jobs: create a job, set its schedule, use the bootstrap context, and change or remove built-in jobs.

Product Recommendations

EverShop ships rule-based related products and data-driven frequently-bought-together recommendations, with global, category, and product-level configuration and two storefront widgets.

The Database

Query PostgreSQL in EverShop: connect, build type-safe SELECT, INSERT, UPDATE, DELETE and upsert queries, run raw SQL and manage transactions.

Database Migration

Learn how to use migration scripts to upgrade your database schema

Static File Serving

Learn how EverShop serves static files like images from the public directory and how to properly reference them in your code.

File Storage

How EverShop stores uploaded media, the four-processor registry seam that swaps storage backends, the built-in S3, Azure Blob and Google Cloud Storage providers, and how to write your own.

Payment Method Development

Learn how to create a custom payment method for EverShop, from registration and the capture, void and refund handlers to order placement.

Email System

Learn how EverShop sends emails, how to register a custom email service provider, and how to customize email templates and data.

Order Status Management

Understand how EverShop manages order, payment, and shipment statuses, including state transitions and custom status definitions.

Cart Field System

Learn how EverShop's cart field system works and how to add custom fields to carts and cart items.

Address Formats

How EverShop decides which address fields a country collects, validates them, prints them, and how extensions add countries, regions and fields without a migration.

Zero-Total Checkout

How EverShop places orders whose grand total is zero, the reserved zero_checkout payment method, and what it breaks for existing payment extensions.

Shipping Provider Development

Build a custom shipping provider for EverShop — register it at bootstrap, implement getMethods, and return live rates to the checkout.

Carrier Development

Build a carrier integration for EverShop — register it at bootstrap, implement optional label, tracking and pickup capabilities, and drive shipment status from carrier events.

Multi-Shipment and Fulfillment

How EverShop models many shipments per order, how per-shipment phases roll up into the order-level shipment status, and the service APIs extension authors must use.

Multi-Language Stores

How EverShop enables multiple storefront languages, resolves a locale per request, prefixes URLs, and exposes the active locale to themes and resolvers.

Fast Refresh

Fast Refresh is an EverShop feature that gives you instantaneous update on edits made to your code. It is enabled by default in the development mode.

Translation

Translate EverShop with CSV dictionaries loaded at runtime: file locations, how files merge, translate() on the server and _() on the client.

Sitemap & robots.txt

EverShop automatically generates and serves a search-engine sitemap (sitemap.xml) and a robots.txt, including hreflang alternates for multi-language stores.

URL Redirects

How EverShop keeps old entity URLs alive after a url_key or category change — the url_redirect table, where redirects are captured, chain collapse, and the bare-slug fallback.

Metafields

Metafields let you attach typed, validated custom data to EverShop entities — products, categories, customers, orders, and more — store it in a JSONB column, and read it back through GraphQL.

Blog

How EverShop's core blog module works — storefront routes and friendly URLs, the database schema, the GraphQL surface, comment moderation, reactions, reading time, the featured blogs widget, blog URNs, metafields, and sitemap collectors.

Page Builder

How the EverShop page builder works under the hood — the draft changeset model, the preview overlay, publish and scheduled rollouts, and how to make your own storefront route page-builder-editable.

Large-Catalog Performance

What breaks when an EverShop catalog reaches hundreds of thousands of products, the query patterns that cause it, and the fixes shipped in 2.2.1.

Checkout Settings

The guest-checkout toggle, where it is enforced, the shipping-note option, and how to add your own pre-order validation rules.

Package Management

The package (parcel sizing) entity added in EverShop 2.2.1 — schema, dimension snapshots, tare weight, the packing strategy, and how carriers receive parcels.

Error Handling and Degradation

How EverShop 2.2.1 fails — SSR render errors, partial GraphQL results, the root error boundary — and what that means for component and resolver authors.

Webhooks

Send EverShop store events (orders, shipments, products, categories, customers) to your own URLs. Covers admin setup, the request format, signature verification, automatic retries, the delivery log, security rules, and how extensions add events.