System Design
System Design Diagram
Scripti is designed to support complexity without becoming fragile. Rather than forcing everything into a single database or service, Scripti uses a layered architecture where each system has a clear responsibility.
At the interface layer, Scripti uses a lightweight Vue frontend. Core logic lives behind a set of Golang APIs, with Nginx for routing, caching, and access control. This clear separation keeps the interface flexible while allowing the core to evolve deliberately over time.
Under the hood, Scripti deals with many database models. Structured operational data sits in a Postgres relational store, storyline relationships and causal order sit in a Neo4j graph, and semantic recall is handled through a Qdrant vector database. These stores support retrieval-augmented generation and agent-driven workflows.
These agents interact with Scripti as content flow guides. Creator-side agents run in the user’s own environment and query Scripti’s knowledge layers through well-defined gateways. They can explore, retrieve, and synthesize information, but they do not directly mutate core state. This preserves author agency and keeps cognition separate from the systems of record.
Heavy or long-running work - such as embedding generation, re-indexing, and imports - is handled asynchronously through background workers. This keeps the system responsive and ensures that creative work is never blocked by infrastructure concerns.
Access control is a first-class part of the system. Permissions are enforced consistently across the admin interface, APIs, and storage layers, allowing Scripti to support multiple roles, contributors, and long-lived projects without devolving into permission sprawl.
Infrastructure & Delivery
All infrastructure is defined in code using Terraform, allowing the entire environment to be recreated, inspected, or evolved with clarity and confidence on DigitalOcean. This allows for quick and easy disaster recovery or VM os update, as an important aspect when we eventually move to a K8s ecosystem.
Day-to-day operational tasks are handled through a Makefile that abstracts the unglamorous but necessary work such as updating remote .env files, and VM upkeep.
Deployment is handled via GitLab CI/CD with a self-hosted runner. Changes are precise: only the services affected by a given update are refreshed (for example, Nginx or a single backend service). No blanket redeploys, no unnecessary churn.
The result is an infrastructure that is predictable and easy to reason about, quietly supporting Scripti while remaining fully reproducible and legible to anyone who needs to understand it.