Enchanted is built on a robust technical foundation that prioritizes privacy, performance, and extensibility.

Core Architecture

Enchanted consists of a Go backend and an Electron frontend.

Go Backend

The technical stack:
  • Temporal - workflow execution engine
  • nats - Pub/sub messaging
  • gqlgen - GraphQL API
  • sqlite - Local database
  • onnx - Inference engine for embeddings
  • llama.cpp - Inference engine for anonymizer model
The codebase heavily relies on code generation. The transport layer for the backend is generated using gqlgen. The repository layer is generated using sqlc.

Codebases

  • enchanted-twin: The main open-source codebase for Enchanted, containing the Go backend, Electron frontend, workflow logic, and all core features.
  • enchanted-proxy: A privacy-focused proxy that routes requests to closed-source LLMs through a trusted execution environment, ensuring user data remains private.
  • attestation-proxy: A service that exposes cryptographic attestation documents generated by the AWS Nitro Hypervisor, enabling verification of trusted enclave execution for privacy guarantees.