Skip to content

tesserato/Tect

Repository files navigation

Tect is a minimal (only 6 keywords), type-safe language for software architecture with rich tooling. Define variables, constants, errors and functions declaratively, catch cycles and starvation early through simulation, and generate interactive diagrams directly from your source.

Demo

Features

  • Architecture as Code: Define systems using a minimal, declarative syntax with only 6 keywords (constant, variable, error, group, function, import).
  • Flow Simulation: The engine simulates token consumption and production to verify that every function has the required inputs and every error is handled.
  • Live Visualization: Interactive force-directed graphs to explore complex systems.
  • Universal Export: Generate artifacts for any use case:
    • HTML: Interactive web graph with physics controls.
    • Mermaid/DOT: For embedding in Markdown/Wikis.
    • LaTeX (TikZ): For academic papers and publication-quality PDFs.
    • JSON: For programmatic analysis.

Quick Start

Warning

Early-stage project. Tect is very new and still evolving, so you may encounter rough edges, breaking changes, or incomplete features. Feedback and contributions are highly welcome — feel free to open issues, submit pull requests, or share ideas to help shape the project.

1. Installation

VS Code Extension

For the best experience, install the Tect extension for VS Code. It provides:

  • Syntax highlighting and snippets.
  • Go-to-definition (supports files and symbols).
  • Real-time error reporting.

Live architecture preview Open a .tect file and click the "Open Chart" icon in the editor title bar to open the live architecture preview (Command Tect: Open Architecture Preview).

Extension button

Alternatively, install the CLI via crates.io

cargo install Tect

2. Define Architecture (system.tect)

# Define artifacts
constant Config
variable UserData
error DbError

# Define groups
group Database
group API

# Define contracts
Database function LoadUser Config
    > UserData
    | DbError

API function Serve UserData
    > Response

3. CLI Usage

# Verify logic (check for cycles, starvation, unused symbols)
tect check system.tect

# Format code
tect fmt system.tect

# Generate interactive HTML graph
tect build system.tect -o architecture.html

# Generate LaTeX/TikZ for PDF
tect build system.tect -o architecture.tex

4. Examples

Some examples are available in the Examples folder.

About

A (meta) programming language for designing/reasoning about code.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published