Loading...
Loading...
Build backends with @alchemy.run/domain (domain-driven design on Effect) - turn requirements into aggregates, commands, events, rejections, views, policies, sagas, projections, streams, queries, external systems and Apis; lay them out in a monorepo (domain / server / web packages, kind-suffixed files); test them with stories; host them on Cloudflare Durable Objects with alchemy; and drive them from a foldkit frontend. Use when designing or changing an @alchemy.run/domain model, adding a building block, wiring hosting or a frontend, or reviewing such code.
npx skill4agent add alchemy-run/alchemy alchemy-domain@alchemy.run/domainexamples/cloudflare-domainMoneyWithdrawn<Verb><Noun>WithdrawMoneyInsufficientFundsdecidevalidateUsernameClaim<Noun>.<kind>.ts.aggregate.command.view.policy.saga.projection.stream.query.external.api.model.middleware.context.rejection<Aggregate>.id.tsMoney.tsTransferExecutionLiveTransferExecution.policy.tsAccount/Transfer/@alchemy.run/domaineffectdecideEffect.fnyield* CurrentActorevolvereplydecides._tag === "Open" ? { ...s, balance: e.balanceAfter } : sdecidebalanceAfterevolverejectsEffect.catchTagDomain.Queryyield* Accountaccounts.get(ref)stream:seqstarttoLayerLayer.mergeAllLayer.provideEffect.providethrowDomain.RejectionSchema.TaggedErrorEffect.annotateCurrentSpanSchema.Redacted<Command>.command.tscommandsdecideevolve{ description }Domain.verify(Model)tsc -b