Setup a PURISTA project
In this quickstart step, you create a new project from the official blueprint templates.
Create a new project
Run one of the following commands:
bash
npm create purista@latestbash
bun create purista@latestbash
yarn create purista@latestbash
pnpm create purista@latestChoose the blueprint options that fit your runtime/deployment setup.
After setup, generate services and business artifacts with the CLI:
purista add servicepurista add commandpurista add subscriptionpurista add streampurista add queuepurista add queue-workerpurista add agent
Recommended scaffold order for new projects:
purista add serviceand firstpurista add commandpurista add streamif you need push/live updatespurista add queue+purista add queue-workerfor background jobspurista add agentwhen you need LLM-powered workloads
Rule of thumb:
- commands = request/response entrypoints
- streams = live outbound updates
- queues/workers = durable async processing
- agents = AI workloads invoked directly or from commands/queues/subscriptions
See also:
If your app uses AI agents, add the package:
bash
npm install @purista/aibash
pnpm add @purista/aibash
bun add @purista/aibash
yarn add @purista/aiProject structure
The blueprint creates a folder structure expected by PURISTA tooling and code generation.
text
|-config/
|-script/
|-src/
| |-services/
| | |- ServiceEvent.enum.ts
| | |- [serviceName]/
| | |- [serviceName]ServiceInfo.ts
| | |- v1/
| | |- [serviceName]ServiceBuilder.ts
| | |- [serviceName]ServiceBuilder.test.ts
| | |- [serviceName]ServiceConfig.ts
| | |- [serviceName]Service.ts
| | |- command/
| | | |- [commandName]CommandBuilder.ts
| | | |- [commandName]CommandBuilder.test.ts
| | | |- schema.ts
| | | |- types.ts
| | |- subscription/
| | | |- [subscriptionName]SubscriptionBuilder.ts
| | | |- [subscriptionName]SubscriptionBuilder.test.ts
| | | |- schema.ts
| | | |- types.ts
| | |- stream/
| | | |- [streamName]StreamBuilder.ts
| | | |- [streamName]StreamBuilder.test.ts
| | | |- schema.ts
| | | |- types.ts
| | |- queue/
| | | |- [queueName]/
| | | |- [queueName]QueueBuilder.ts
| | | |- [queueName]QueueBuilder.test.ts
| | | |- schema.ts
| | | |- types.ts
| | |- queue-worker/
| | |- [workerName]/
| | |- [workerName]QueueWorkerBuilder.ts
| | |- [workerName]QueueWorkerBuilder.test.ts
| |-agents/
| | |- [agentName]/
| | |- v1/
| | |- [agentName].ts
| | |- [agentName].test.ts
| |- store/
| | |- config/
| | |- state/
| | |- secret/
| |- eventbridge/
|- package.json
|- package-lock.json / bun.lockb
|- tsconfig.json
|- .gitignore
|- readme.mdThe CLI expects this structure for automated updates and type-safe wiring.
