8000 GitHub - bermooda/bermooda: Own your ecommerce stack · GitHub
[go: up one dir, main page]

Skip to content
bermoodaPublic

About

Own your ecommerce stack

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

545 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bermooda

Beta: bermooda is currently in active beta development. APIs, schemas, and CLI behavior may change before a stable 1.0 release.

Own your ecommerce stack. bermooda is an open-source ecommerce platform that runs as a single deployable app: themed storefront, merchant admin, and REST API—together.

Clone it, scaffold a shop in minutes, and ship real catalog, cart, checkout, orders, and staff tools without bolting together a half-dozen SaaS products. Domain logic lives in one place (app/core/*), so you can read, change, and extend the engine like any other Node app.

If you want a full shop you can fork, understand, and grow—welcome.

Why engineers try it

  • One service, three surfaces — storefront, admin, and public/admin REST APIs in a single app (a Remix v3 server, migrating from React Router)
  • Real commerce primitives — catalog, cart, checkout, payments, shipping, customers, discounts, inventory, and more under app/core/*
  • Themes & plugins — swap storefront UI under app/themes/*; extend behavior with hook-based plugins under app/plugins/*
  • Local-first — SQLite for development, PostgreSQL when you need it; no Docker or external DB required to start
  • CLI-first setup — bermooda install scaffolds deps, env, database, admin user, and store name for you

Stack

Layer Choice
Runtime Node.js ≥ 24.3
App framework React Router (SSR, loaders, actions)
UI React, Tailwind CSS
Build Vite
Data Prisma · SQLite (local) · PostgreSQL (production-ready)
Auth better-auth (separate admin/staff and customer sessions)
Payments Stripe
Email Resend (+ React Email templates)
Deploy Plain Node / Docker
Quality Vitest, oxlint, oxfmt

Quick start (recommended)

Scaffold a shop with the global CLI:

npm i -g @bermooda/cli@latest

bermooda install --local --dir ./my-shop -y \
  --admin-email admin@example.com \
  --admin-password 'TestPass123!' \
  --store-name 'Demo Shop'

cd my-shop
bermooda dev

Open http://localhost:3000. Admin is typically at /admin.

Install the CLI

npm i -g @bermooda/cli@latest

Requires Node.js ≥ 24.3. After install, the bermooda binary is available globally.

CLI commands (overview)

Command What it does
bermooda install [--local|--server] Download app, install deps, configure env & DB, create admin + store
bermooda dev Start the dev server (no 1Password wrapper)
bermooda start Run production server (builds if needed)
bermooda update Update the shop to the latest app version
bermooda plugin … Add / update / remove / list plugins
bermooda theme … Add / update / remove / list themes
bermooda version Show CLI and shop versions
bermooda upgrade Upgrade the CLI itself
bermooda help [command] Built-in help

Full command reference, flags, and design notes: see the @bermooda/cli README and DESIGN.md. In-repo product checklist: docs/cli-specs.md.

Offline install from a local checkout of this repo:

bermooda install --local --source /path/to/bermooda --dir ./my-shop -y \
  --admin-email admin@example.com \
  --admin-password 'TestPass123!' \
  --store-name 'Demo Shop'

Working from this repository

Useful if you are contributing to the platform itself:

npm install
npm run setup          # .env + config + prisma generate/migrate + default theme
npm run seed           # optional demo catalog + admin

Development

# Default local script (wraps env with 1Password CLI if you use it):
npm run dev

# Plain env file (no 1Password):
npm run dev:server     # PORT=4000 npm run dev:server for another port
# or, with the CLI installed:
bermooda dev

App: http://localhost:3000

Common scripts

Task Command
Full local setup npm run setup
Seed demo data npm run seed
Install default theme npm run extensions:install
Install extension deps npm run extensions:install-deps
Tests npm run test
Lint npm run lint
Format npm run fmt
Production build npm run build
New migration npm run prisma:migrate -- --name <name>

Reset local SQLite: delete prisma/dev.db and re-run npm run setup.

Architecture (at a glance)

app/
  core/       # Domain workflows (catalog, cart, orders, payments, …)
  libs/       # Infrastructure (auth, Prisma, queue, alerting, SDKs)
  routes/     # Storefront, admin, API, webhooks, auth
  themes/     # Storefront themes (active theme renders the shop)
  plugins/    # Hook-based extensions (blocks, admin pages, providers)
  components/ # Shared admin / auth / UI primitives
  • Routes stay thin: loaders/actions call app/core/*.
  • Themes receive data via props/loaders; they do not import server core modules.
  • Plugins register hooks, providers, and optional admin/storefront UI.

Deeper reading:

Configuration

Copy .env.example to .env (or run npm run setup, which creates it when missing). Placeholder values are enough to boot the app; wire real keys when you need payments, email, OAuth, or object storage.

Notable variables:

Variable Purpose
DATABASE_URL SQLite (file:./prisma/dev.db) or PostgreSQL connection string
BETTER_AUTH_SECRET Auth secret; also encrypts plugin password settings at rest
STRIPE_* Payments
GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET Optional Google OAuth
STORAGE_* S3-compatible object storage (AWS S3, MinIO, R2, etc.)

Google OAuth (optional)

  1. Create a project in the Google Cloud Console
  2. Create OAuth client credentials (Web application)
  3. Authorized redirect URIs:
    • Development: http://localhost:3000/auth/callback/google
    • Production: https://your-domain/auth/callback/google
  4. Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET in .env

Production

Build

npm run build
npm start   # or: bermooda start

Build output:

build/
  client/   # Static assets
  server/   # React Router server bundle

npm start runs server.js with Node (≥ 24.3) from source: it loads app/core, app/libs, app/utils, app/emails, bermooda.config.js and the installed themes and plugins (with their node_modules) directly, and the React Router bundle from build/server. Deploy the whole checkout, not only build/. .env is read when present.

Docker

docker build -t bermooda .
docker run -p 3000:3000 bermooda

# With env file and SQLite path (example):
docker run -p 3000:3000 --env-file .env \
  -e DATABASE_URL=file:/data/sqlite.db bermooda

Behind a reverse proxy

Production deployments usually sit behind a TLS-terminating proxy or load balancer:

  • Set TRUST_PROXY to the number of proxies in front of the app (default 1). Rate limits use the client IP the outermost trusted proxy appended to X-Forwarded-For, so clients can't dodge them by sending their own header. Without a proxy, set TRUST_PROXY=0: rate limits then key on the socket address.
  • Forward the original Host header (for nginx, proxy_set_header Host $host;). Sales-channel domains and absolute SEO URLs (canonical, hreflang, sitemap, robots.txt) use it. X-Forwarded-Host and X-Forwarded-Proto are ignored, and the URL scheme comes from baseUrl in bermooda.config.js.

See docs/storage.md and docs/postgres.md when you move beyond local SQLite.

Contributing

Issues and PRs that improve the commerce core, themes, plugins, docs, or DX are welcome. Prefer small, focused changes that match patterns in nearby files. Project conventions live in AGENTS.md / Claude.md.

npm run test
npm run lint

About

Own your ecommerce stack

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0