How shuttle-hq/synth works
Project Type and Purpose
• This is an open-source, declarative data-generation tool (“Synth”) implemented in Rust.
• It provides a CLI for importing schemas (from Postgres/MySQL/Mongo), inferring/generating data, and exporting to stdout or databases.
• It also includes support libraries, test harnesses, examples, a Docusaurus-based documentation site, and a Next.js “www” marketing site.
File-Structure Analysis
• Top-level Rust crates:
• core/ : the heart of schema compilation, graph representations, and inference logic
• gen/ : data-serialization, code generation utilities
• synth/: the CLI binary, command parsing, import/export commands, driver modules
• test_macros/: custom procedural macros for testing
• Support directories:
• examples/ : sample schemas and code
• docs/ : Docusaurus-based static documentation
• www/ : Next.js marketing & install site
• dist/playground/ : packaged playground example
• synth/testing_harness/: end-to-end tests against live databases
• DevOps/config:
• .github/workflows/, nix/, tools/: CI, packaging scripts, reproducible builds
Key Insights from README
• Synth is database-agnostic, supports import from SQL/NoSQL, and outputs realistic, constraint-based synthetic data.
• Core features: declarative schema, data inference, multi-database drivers, semantically rich types.
• Built in Rust for performance and safety.