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)
npx storecraft create
Storecraft emphesizes modular commerce as code to achieve business logic,
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
```text Author: Tomer Shalev ([email protected]) ```