cartd

About

Built for developers,
not for platforms.

cartd started as a frustration with how commerce tooling forces you into a frontend you didn't choose, a plugin ecosystem you didn't ask for, and a pricing model that takes a cut of every sale. We built the backend we wanted to use.

What it is

cartd is a headless commerce backend — a self-hosted REST API that gives any frontend access to a fully managed commerce layer. Products, variants, inventory, orders, customers, payments, webhooks, media, and emails are all first-class API resources.

You bring the frontend. It can be a Next.js storefront, a React Native app, a Vue SPA, a static site, or an AI-generated UI. The API looks the same regardless.

Why we built it

Shopify forces you into Liquid and their app store. Medusa is excellent but ambitious in scope. WooCommerce is WordPress. Most headless options either charge platform fees or require half of AWS.

We wanted something small, sharp, and fully owned. A single Railway deployment, a Neon Postgres database, a Cloudflare R2 bucket, and a Resend account. That's the entire stack.

What we believe.

01

Developer first

The API is the product. Every decision — schema design, error formats, pagination style — is made from the perspective of the developer consuming it, not a product manager or a BI dashboard.

02

No vendor lock-in

Your data lives in your PostgreSQL database. Your media lives in your R2 bucket. Your email goes through your Resend account. We are infrastructure, not a platform you are trapped in.

03

Boring over clever

REST over GraphQL, Fastify over exotic runtimes, Prisma over raw SQL. Proven tools with good ecosystems win over novelty. You should be able to hire for this stack.

04

Open source

The entire codebase is open source under MIT. Fork it, audit it, modify it, self-host it. Commerce infrastructure should not be a black box.

The stack.
Boring, proven, hirable.

Fastify

API runtime

One of the fastest Node.js HTTP frameworks. Schema-validated routes, plugins, and hooks — a real production server, not a toy.

TypeScript

Language

End-to-end type safety from Prisma schema to API response to SDK types consumed by your frontend.

PostgreSQL · Prisma · Neon

Database layer

Prisma as the ORM, Neon for serverless-friendly Postgres hosting. Your data, your database.

Cloudflare R2

Media storage

S3-compatible object storage with zero egress fees and Cloudflare global CDN. Presigned URLs for direct browser uploads.

BullMQ · Redis

Job queues

Background job processing for webhook dispatch, email delivery, and async tasks. Retry logic built in.

React Email · Resend

Email

Beautiful, maintainable email templates written in React. Bring your own Resend key — we never touch your sender reputation.

Turborepo

Monorepo

apps/api, apps/admin, apps/docs, apps/web; packages/db, packages/types, packages/email, packages/sdk — one repo.

Railway

Hosting

One-click deploy. API, admin, and PostgreSQL run as separate Railway services with automatic redeploys from git.

Monorepo structure.

ecom-baas/
ecom-baas/
├── apps/
│   ├── api/          # Fastify REST API
│   ├── admin/        # React + TanStack Router admin UI
│   ├── docs/         # Docusaurus documentation site
│   └── web/          # This marketing site (Next.js)
├── packages/
│   ├── db/           # Prisma schema + migrations
│   ├── types/        # Shared TypeScript types
│   ├── email/        # React Email templates
│   └── sdk/          # JS/TS client SDK
├── turbo.json
└── package.json

Open source
on GitHub.

MIT license. Fork it, read it, improve it. PRs are welcome.