Strucsta LogoStrucsta/Documentation

Chapter 1: Getting Started

Welcome to Strucsta

Target Audience: New users trying to understand the mental model of the platform.

Welcome to Strucsta. We built this platform to solve a specific problem: transforming raw, unstructured data into pixel-perfect, highly structured PDFs using AI.

Whether you are a creator generating personalized keto meal plans or a business automating strict legal compliance documents, the mental model of Strucsta remains exactly the same.

Strucsta is an Intelligent Document Orchestration Engine. It acts as a specialized backend service that executes a Directed Acyclic Graph (DAG) to process your information.

The Core Pipeline

Every document generated in Strucsta follows a strict three-step pipeline: $Ingest \to Reason \to Render$.

  • Ingest: Data enters the system. This can happen via an auto-generated Strucsta web form, a webhook from an external CRM, or an API call. Because Strucsta is designed for short workflows, incoming data is merged flatly to create a cumulative context.
  • Reason: The AI logic step. This is where your expertise is applied. You provide the system prompt, and our engine uses OpenAI's Strict Outputs (enforced via zodResponseFormat) to guarantee the AI returns reliably structured JSON.
  • Render: The visual step. The structured JSON from the reasoning step is injected into your custom JSONC (JSON with comments) template. The pdfmaker engine recursively processes your templates, handles dynamic logic, and outputs a pixel-perfect PDF.

Execution and the "Run"

When data triggers a workflow (e.g., a user submits a form), Strucsta creates a Run.

A Run is a complete execution of your pipeline. Crucially, the system maintains a strict Audit Trail for every run. We log the exact input data, the specific AI prompts used, the resulting JSON output, and exact timestamps. This ensures that even when using AI, your document generation is traceable and legally sound.

Human-in-the-Loop

We know that AI is not flawless. If an AI-generated clause in a contract needs a slight adjustment, you don't need to start over.

Strucsta features Step Replay. You can edit the intermediate JSON data and replay just the generation step. This allows you to rapidly tweak your layouts and refine your outputs without having to re-run the entire, costly AI workflow.