Booster Framework

website·Indexed 32 days ago

https://docs.boosterframework.com/

An event-driven framework for building scalable applications. It provides a CLI for development and deployment, a GraphQL API for interacting with commands and read models, and a system of 'rockets' to add functionality like file uploads, static site deployment, and webhooks. The framework supports multiple infrastructure providers, including AWS, Azure, and Local.

Tokens
38.9K
Snippets
190
Records
246
Agent score
57%

What's inside Booster

  1. Overview of the Booster Framework

    Booster is an open-source, minimalistic TypeScript framework designed for building event-sourced microservices using CQRS (Command Query Responsibility Segregation) and Event Sourcing (ES) semantics. It analyzes the semantics of the developer's code to automatically provision optimal cloud infrastructure and generate a fully-functional GraphQL API, including schemas and resolvers, reducing the amount of boilerplate code required. Booster is free to use and runs directly within the user's own cloud accounts (supporting AWS and Azure), ensuring that data and deployment remain under the user's control via their own CI/CD scripts.
  2. Overview of the Booster Framework

    Booster is a TypeScript-based framework designed for building scalable, reliable, and event-driven applications in the cloud. It utilizes a Domain-Driven Design (DDD) approach and automates infrastructure provisioning, providing a real-time GraphQL API out of the box. The framework is designed to be truly serverless and multicloud, allowing the same application to run across different cloud providers without code changes.
  3. Overview of Booster Rockets

    Rockets are Booster Framework extensions implemented as npm packages that follow public Booster rocket interfaces. They serve two primary purposes:

    1. Infrastructure Extensions: Adding provider-specific resources to the application stack.
    2. Runtime Extensions: Adding new annotations, interfaces, and decorators to implement new abstractions on top of common use cases.
  4. Overview of the Booster Framework component system

    The Booster Framework is introducing a component integration mechanism for power users and contributors to extend applications beyond the capabilities of the standard system. This system shifts from dynamic imports specified in JSON configurations to a model where components are written with explicit interfaces using the Effect library and injected directly into projects. This provides improved type safety, dependency injection, structured logging, and better concurrency management.
  5. Overview of Entities in Booster

    Entities represent the current state of an application, derived by reducing the event stream (the source of truth). For example, while events like AccountCreated and MoneyDeposited track changes, the BankAccount entity stores the current balance and owner. Booster automatically generates entities on the fly and stores snapshots to avoid reducing the entire event stream every time the state is needed. Entities are eventually consistent due to the asynchronous nature of event processing.
  6. Overview of Booster GraphQL API operations

    The Booster GraphQL API is auto-generated based on your commands and read models. It maps standard GraphQL operations to Booster components as follows:

    • Mutations: Used to send commands (modify data).
    • Queries: Used to read read models (retrieve data on-demand).
    • Subscriptions: Used to subscribe to read models (receive real-time updates).
  7. Import types and classes across Booster agents using remote imports

    Booster Framework provides a mechanism to import types and classes from different agents and repositories without using traditional package managers. This is achieved through a combination of a service endpoint and a TypeScript compiler plugin.

    Key components of this system include:

    1. The /inspect Endpoint: A service endpoint that provides direct access to .d.ts files for project components (commands, events, read-models, etc.), organized by agent.
    2. TypeScript Compiler Plugin: A custom transformer that recognizes a specialized import syntax and dynamically fetches the corresponding type definitions from the /inspect endpoint.
  8. Best practices for developing custom Booster providers

    When developing a custom provider, follow these guidelines to streamline the process:

    1. Reference Existing Providers: Review the implementation of existing providers to understand the expected patterns and architecture.
    2. Infrastructure First: Begin implementation with the infrastructure package. Ensuring the infrastructure is deployed first makes subsequent work with the runtime API significantly easier.
    3. Community Support: Use the official Discord channel for technical support and community guidance during development.
  9. Integrate AI Agents into the Booster Framework architecture

    AI agents can be integrated into the framework by following the same structural pattern as traditional agents (containing commands, events, and read-models), but with internal logic powered by Large Language Models (LLMs). This allows AI agents to autonomously handle specific tasks, predictive analytics, or automated decision-making within their designated domain folder while adhering to the framework's standard communication protocols.
  10. Understand Booster framework package architecture

    Booster is a monorepo managed using rush and npm. Code is split into packages based on whether they run separately (e.g., CLI vs Cloud), are shared by multiple packages, or are vendor-specific specializations. All packages are published to npm under the @boostercloud/ prefix.
    rush build
  11. Booster Framework Principles

    Booster operates on several key architectural principles:

    • Convention over Configuration: Minimizes boilerplate and configuration to keep the focus on business logic.
    • Implicit Serverless: Infers the serverless architecture directly from the code, removing the need for manual infrastructure management.
    • Effective Multicloud: Decoupled architecture prevents vendor lock-in and supports multiple cloud providers.
    • Abstraction: Provides semantic abstractions over low-level details like SQL, API design, and authentication.
    • Extensibility via Rockets: Uses "Rockets" (npm packages) as plugins to provide new abstractions, cloud service support, or pre-built functionalities.
  12. Understand default logging behavior in Booster

    By default, Booster uses standard JavaScript console methods based on the configured log level. Logs are typically captured by the cloud provider's default log aggregator (e.g., AWS CloudWatch). The mapping is as follows:

    • Level.debug maps to console.debug
    • Level.info maps to console.info
    • Level.warn maps to console.warn
    • Level.error maps to console.error