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({}).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
- MongoDB (@storecraft/database-mongo-node)
- SQLite (@storecraft/database-sqlite)
- Postgres (@storecraft/database-postgres)
- MySQL (@storecraft/database-mysql)
- SQL Base (@storecraft/database-sql-base)
- Neon (Cloud Postgres, @storecraft/database-neon)
- PlanetScale (Cloud Mysql, @storecraft/database-planetscale)
- Turso (Cloud Sqlite, @storecraft/database-turso)
- D1 (Cloud Sqlite, @storecraft/database-cloudflare-d1)
๐ฆ Storage
Support for,
- Local storage (Node, Bun, Deno), @storecraft/core/storage
- S3 Compatible (@storecraft/storage-s3-compatible)
- Cloudflare R2
- AWS S3
- DigitalOcean Spaces
- MinIO
- Google Storage (@storecraft/storage-google)
๐ง Email Providers
- node smtp support @storecraft/mailer-smtp
- Http Mail services @storecraft/mailer-providers-http
- mailchimp support
- mailgun support
- resend support
- sendgrid support
๐ณ Payments
- Stripe @storecraft/payments-stripe
- Paypal @storecraft/payments-paypal
- You can roll your own (guide here)
Dashboard
The official dashboard
sdks
- Universal (front/back) Javascript SDK, @storecraft/sdk
- React Hooks SDK, @storecraft/sdk-react-hooks
Test Runner
Test your app and database integrations with
docs
Docs website code
CLI
npx storecraft create
CLI code
Examples Playground
Author: Tomer Shalev (tomer.shalev@gmail.com)
All Rights Reserved, storecraft, (2025)