PURISTA Quickstart

In this guide you will scaffold a project, create a service, and build synchronous and asynchronous business flows. By the end you will have a running application with a command, a subscription, a stream, and a queue-powered background worker.

What you will build

flowchart TB
    B["Browser / Client"] -->|POST /api/sign-up| H["HTTP Server"]
    H -->|command| EB["Event Bridge"]
    EB -->|userSignUp| US["User Service"]
    US -->|success event| EB
    EB -->|newUserRegistered| ES["Email Service"]
    ES -->|subscription| SEND["sendWelcomeEmail"]
    US -->|stream| STR["real-time progress"]
    US -->|enqueue| Q["Queue: processJobs"]
    Q -->|worker| W["Background Worker"]
ArtifactWhat it doesPattern
userSignUp commandRegisters a user and returns a user IDRequest/response
sendWelcomeEmail subscriptionSends an email when a user is createdEvent-driven
userSearch streamReturns incremental results over SSELive updates
processJobs queue + workerHandles background tasks asynchronouslyPull-based async

Requirements

  • Node.js LTS (or Bun)
  • A code editor (VS Code, Zed, or similar)
  • A terminal
  • Optional for existing projects: install the PURISTA AI skill. New projects include agent guidance and PURISTA skill links by default.

The steps

StepActionTime
1Set up the project2 min
2Create a service2 min
3Add your first command3 min
4Add your first subscription3 min

After the core flow, explore streams, queues, and HTTP exposure in the Building Business Logic section.

  1. Quickstart (this section) — get something running
  2. Concept — understand the mental model
  3. Building Business Logic — deep dive into builders, schemas, and patterns
  4. From Zero to Production — plan your deployment path

Before you start

PURISTA is a message-driven framework. If you are coming from Express, Fastify, or NestJS, the mental shift is:

TraditionalPURISTA
HTTP handler calls service directlyHTTP server sends a command message
Services import each otherServices are decoupled; they send messages
State in memoryState in external stores
Scaling means faster codeScaling means more instances

This pays off in observability, testability, and deployment flexibility. Let’s build something.