Docs
backend/overview

Welcome

Hi ๐Ÿ‘‹, Storecraft is a next generation Commerce As Code javascript backend.

โญ run on any javascript platform (deno, bun, node, workers, aws-lambda, google-functions), serverless / serverful

โญ connect to any database (mongo, sqlite, postgres, mysql, neon, turso, d1, planetscale)

โญ use storage (local, r2, s3 compatible, google and more)

โญ It is extensible and modular

โญ It is event based

โญ Boasts an official Dashboard

โญ Well documented REST-API (can also be found in your /api/reference endpoint)


GET STARTED WITH CLI NOW ๐Ÿ‘‡

npx storecraft create

Storecraft emphesizes modular commerce as code to achieve business logic,

import { App } from '@storecraft/core'
import { NodePlatform } from '@storecraft/core/platform/node'
import { MongoDB, migrateToLatest } from '@storecraft/database-mongodb'
import { R2 } from '@storecraft/storage-s3-compatible'
const app = new App({
auth_admins_emails: ['[email protected]']
})
.withPlatform(new NodePlatform())
.withDatabase(new MongoDB({ db_name: 'test' }))
.withStorage(new R2())
.withPaymentGateways({
'stripe': new Stripe(
{
publishable_key: process.env.STRIPE_PUBLISHABLE_KEY,
secret_key: process.env.STRIPE_SECRET_KEY,
webhook_endpoint_secret: process.env.STRIPE_WEBHOOK_SECRET
}
)
}).on(
'auth/signup',
async (event) => {
const user: Partial<AuthUserType> = event.payload;
// Here you can send an onboarding email for example
}
).on(
'orders/checkout/complete',
async (event) => {
const order_data: OrderData = event.payload;
// Here send an email with order details to customer
}
).init();
await migrateToLatest(app.__show_me_everything.db, false);
http.createServer(app.handler).listen(
8000,
() => { app.print_banner('http://localhost:8000') }
);

Will produce

Ai Chat

Located at /chat

Dashboard

Located at /dashboard

API Reference

Located at /api/reference (powered by Scalar)

CLI (npx storecraft create)

packages

This is a mono repo, where each folder in the packages folder is a package, that is published @npm.

It leverages the workspace feature of npm

To start developing a feature first

npm install

The following is the layout of the packages

Core (@storecraft/core)

The core engine of storecraft

  • core types
  • core API
  • core database types
  • core crypto types
  • core storage types
  • core mailer types
  • core payments types
  • core platform types
  • core VQL types and logic
  • core REST API controller

๐ŸŒ Platforms @storecraft/core/platform

Support for

  • Node
  • Deno
  • Bun
  • Cloudflare workers
  • AWS Lambda
  • Azure Functions
  • Google Functions

๐Ÿ’พ Databases

Support for

๐Ÿ“ฆ Storage

Support for,

๐Ÿ“ง Email Providers

๐Ÿ’ณ Payments

Dashboard

The official dashboard

  • Learn how to use here
  • The code,
    • mount is as a component
    • consume from cdn

sdks

Test Runner

Test your app and database integrations with

@storecraft/core/test-runner

docs

Docs website code

CLI

npx storecraft create

CLI code

Examples Playground

Here

Author: Tomer Shalev (tomer.shalev@gmail.com)

All Rights Reserved, storecraft, (2025)