Hi 👋, Storecraft
empowers developers to rapidly build AI-powered, Headless e-commerce backends with TypeScript and Javascript.
⭐ AI first, agentic, chat endpoint and similarity search that can serve your customers, and your team. We Supports most of the popular LLMs, and vector stores for similarity search.
⭐ Manage products, collections, orders, customers, auth, emails and more with a powerful programmable api code, REST API, VQL (Virtual Query Language) for powerful queries and similarity search.
⭐ Built in chat endpoint with an agent that serves customers with carts, checkouts and more with PayPal and Stripe.
⭐ Runs on any javascript platform (deno, bun, node, cloudflare workers, aws-lambda, google-functions), serverless / serverful
⭐ Connects to any database (mongo, libsql, sqlite, postgres, mysql, neon, turso, d1, planetscale)
⭐ Uses 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)
npx storecraft create
This is all the code you need to get started with your own storecraft app.
const app = new App({
auth_admins_emails: ['[email protected]'],
general_store_name: 'Wush Wush Games',
// ... MORE Mandatory CONFIG
})
.withPlatform(new NodePlatform())
.withDatabase(new LibSQL())
.withStorage(new NodeLocalStorage('storage'))
.withMailer(new Resend())
.withPaymentGateways({
paypal: new Paypal({ env: 'test' }),
stripe: new Stripe(),
dummy_payments: new DummyPayments(),
})
.withExtensions({
postman: new PostmanExtension(),
})
.withAI(
new OpenAI({ model: 'gpt-4o-mini'})
)
.withVectorStore(
new LibSQLVectorStore({
embedder: new OpenAIEmbedder(),
})
)
.withAuthProviders({
google: new GoogleAuth(),
})
.on(
'order/checkout/complete',
async (event) => {
// send a team slack message
}
).init();
await migrateToLatest(app._.db, false);
await app._.vector_store?.createVectorIndex();
http
.createServer(app.handler)
.listen(
8000,
() => {
app.print_banner('http://localhost:8000');
}
);
Will produce a server
Located at /chat
Located at /dashboard
Located at /api
(powered by Scalar)
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
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 / Libsql (Local and Cloud Sqlite, @storecraft/database-turso)
- D1 (Cloud Sqlite, @storecraft/database-cloudflare-d1)
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)
- Http Mail services @storecraft/mailer-providers-http
- mailchimp support
- mailgun support
- resend support
- sendgrid support
- node smtp support @storecraft/mailer-smtp
- Stripe @storecraft/payments-stripe
- Paypal @storecraft/payments-paypal
- You can roll your own (guide here)
The official dashboard
The official Chat
- Universal (front/back) Javascript SDK, @storecraft/sdk
- React Hooks SDK, @storecraft/sdk-react-hooks
Test your app, database, storage and more integrations with
Docs website code
npx storecraft create
CLI code
The source of truth for the versioning and publishing is the mono-repo version. All the published packages are synced to the mono-repo version. Packages in the mono-repo source code might have different versions but it doesn't matter for the published packages.
All versions are synced to the mono-repo version, and are published to npm. Each of the commands:
npm run release:version:patch
npm run release:version:minor
npm run release:version:major
Will,
- Only update the version of the mono-repo.
- Add a git tag of the version.
When running the command:
npm run release:publish
It will,
- Update the version of all the packages in the mono-repo to the same version as the mono-repo.
- Publish all the packages to
npm
with the same version as the mono-repo.
This can be done in a CI/CD pipeline, or manually.
Author: Tomer Shalev ([email protected])