Perseid Documentation

website·Indexed 32 days ago

https://perseid.dev

A full-stack development framework featuring a UI component library (@perseid/ui), a state management system (@perseid/store), and a server-side API reference (@perseid/server) with support for Express, Fastify, MySQL, and PostgreSQL.

Tokens
46.3K
Snippets
386
Records
443
Agent score
60%

What's inside Perseid

  1. Overview of the Perseid Logger

    The Perseid logging system is based on Pino. It provides a structured logging interface with support for various log levels, custom destinations (such as files or remote streams), and asynchronous lifecycle management (ready and close states).
  2. Overview of Perseid framework capabilities

    Perseid is a framework designed for building large-scale web applications, providing a set of fundamental building blocks for both backend and user interface development. Key architectural characteristics include:

    • Modular Design: Features independent modules that allow for progressive adoption and integration based on project requirements.
    • TypeScript Integration: Provides out-of-the-box type definitions and documentation to improve developer productivity.
    • Framework Agnostic: Compatible with various frontend and backend frameworks as well as different database choices.
    • Scalability: Promotes consistency and best practices to ensure the codebase remains maintainable as the project grows.
    • Customizability: Supports full customization of components, services, and methods via inheritance, avoiding the need for non-standard workarounds.
  3. Overview of the Perseid Data Model

    The data model in Perseid is an abstract representation of all data an application handles. It provides a database-agnostic abstraction that works across both SQL and noSQL systems. This single definition drives several core packages:

    • @perseid/form: Generates complex dynamic forms from the configuration.
    • @perseid/server: Generates database structures and fully functional REST APIs for CRUD operations.
    • @perseid/client: Automatically builds applications and user interfaces.
  4. Overview of @perseid/dev-kit

    @perseid/dev-kit is a framework-agnostic development toolbox designed to provide a 0-configuration experience for front-end, back-end, and NPM library projects. It eliminates the need to manually manage repetitive configuration files (like .eslintrc, .babelrc, webpack.config.js, and tsconfig.json) across multiple projects by providing an all-included environment with built-in linting, bundling, and testing.
  5. Overview of @perseid/jobs scheduler

    @perseid/jobs is a job scheduler designed to run complex automations and flows on dedicated processes or machines. It is an implementation of @perseid/server and is intended to offload computationally-intensive tasks from API servers to maintain high HTTP request performance.
  6. Overview of the Perseid Framework

    Perseid is a modular JavaScript framework designed to bridge the gap between product discovery (prototyping) and delivery (scalable production). It is agnostic by design, allowing developers to switch databases, UI frameworks, or server engines without a complete codebase overhaul. It supports a 'simple config mode' for rapid prototyping and a class-based, inheritance-driven design for deep customization as a product scales.
  7. Overview of MongoDatabaseClient

    The MongoDatabaseClient is a MongoDB implementation of the database client in @perseid/server. It extends the AbstractDatabaseClient class and provides methods for managing MongoDB database connections, resource creation, and query generation.
  8. Model class overview

    The Model class is used to define and manage data model schemas. It extends BaseModel and allows for the definition of data model types and the generation of public schemas for front-end introspection.
    class Model<
      /** Data model types definitions. */
      DataModel = DefaultDataModel,
    > extends BaseModel<DataModel>
  9. Use the UITooltip component for accessible tooltips

    The UITooltip wrapper displays additional text around child elements on focus, key press, or hover. It is designed for accessibility and is fully supported by screen readers.
  10. MySQLDatabaseClient Overview

    The MySQLDatabaseClient is a MySQL-specific implementation of the database client in @perseid/server, extending the AbstractDatabaseClient class. It manages the connection to MySQL via a mysql.Pool and handles the translation between the application's data model and SQL structures.
  11. Understand @perseid/form core concepts

    @perseid/form is a generic engine that generates complex, input-based UIs (forms, surveys, chatbots, etc.) via a JSON configuration. It supports React, Svelte, and Vue natively, but allows for custom frontend implementations. The structural hierarchy consists of:

    • Form: The top-level container for the process (e.g., a multi-step survey or a single-step profile page).
    • Step: A form consists of one or more steps. The engine automatically determines the next step to load based on previous input values.
    • Field: The most atomic element within a step. Fields can be interactive inputs (text fields, checkboxes), static messages, buttons, or custom components. Changing a submit field triggers the computation of the next step.