Navigator at a glance

A one-page tour of what's in this repository.

What Navigator is

One Swift package with three product surfaces:

  1. A legal-standards libraryNavigatorRules, NavigatorDAL, NavigatorOIDCMiddleware, NavigatorDatabaseService, NavigatorElementary, NavigatorWeb. Reusable pieces for linting markdown notations, modeling people, entities, and notations, walking questionnaires, and rendering shared UI.
  2. A public website — the NavigatorApp executable, a Vapor app that serves the Foundation site (home, blog, workshops, about, contact, privacy, terms).
  3. A CLI — the navigator command for linting, importing, and generating notations from templates.

The thesis: questionnaires + workflows + templates = computable contracts.

The stack

ConcernChoice
LanguageSwift 6.3
ServerVapor 4 (with vapor-elementary for HTML)
HTTP/runtimeSwiftNIO, AsyncHTTPClient
ORMFluent + FluentKit + SQLKit
Database (prod)PostgreSQL via fluent-postgres-driver
Database (tests/CLI)SQLite (in-memory) via fluent-sqlite-driver
Object storageGoogle Cloud Storage
EmailSMTP
APIOpenAPI-first with swift-openapi-generator; spec served at GET /openapi.yaml
AuthOIDC PKCE, JWT verification (jwt-kit), RBAC roles client/staff/admin
HTMLElementary — type-safe HTML-as-Swift
Markdownswift-markdown
Configswift-configuration
Cryptoswift-crypto
Jobsvapor/queues
ValidationNavigatorRules engine (F101/F102, S101, M001–M060)
TestsSwift Testing
ContainerDistroless cc-debian13:nonroot, static Swift stdlib

Yes — Vapor and Postgres. Object storage is GCS. Hummingbird ships in the graph too, but only as the host for the NavigatorElementary shared-UI module.

ERD at a glance

The database is grouped into six clusters:

  • IdentityPerson, User (linked by OIDC sub), UserRoleAudit.
  • GovernanceJurisdiction, EntityType, Entity, PersonEntityRole, ShareClass, ShareIssuance.
  • WorkflowTemplate, Question, Answer, Notation, Project, PersonProjectRole, Retainer, RetainerProject.
  • DocumentsBlob, Document, Letter, EmailMessage, EmailAttachment.
  • Mail and addressMailroom, Address (XOR person_id/entity_id), Letter.
  • BillingEntityBillingProfile, Invoice, InvoiceLineItem.
  • ProvenanceGitRepository, Disclosure, RelationshipLog.

Every Fluent model carries id (UUID), inserted_at, updated_at. Validation lives in Swift, not in DB constraints — Fluent best practice. The full Mermaid diagram is in Sources/NavigatorDAL/ERD.md in the repository.

Stack comparison

ConcernNavigator (Swift/Vapor)RailsPhoenixNode (TS)
Routing (HTML)Vapor app.get + Elementary viewsroutes.rb + ERBrouter.ex + HEExExpress + JSX/EJS
Routing (JSON API)swift-openapi-generatormanual + serializersmanual + JSON viewsmanual + Zod
ORMFluentActiveRecordEctoPrisma / Drizzle
ValidationSwift code + NavigatorRulesModel validationsEcto changesetsZod / class-validator
TemplatingElementary (typed)ERBHEExJSX / EJS
Background jobsvapor/queuesSidekiq / Solid QueueObanBullMQ
ConcurrencyActors + structured concurrencyThreads + GVLBEAM processesEvent loop
Type safetyCompile-time, totalRuntimeCompile-time + dialyzerCompile-time (opt-in)
Deploy artifactStatic binary in distroless imageRuby + bundler imageMix releaseNode + node_modules

What to look for first

  1. Package.swift — the module graph is the table of contents.
  2. Sources/NavigatorWeb/openapi.yaml — the API contract.
  3. Sources/NavigatorDAL/Models/ and Sources/NavigatorDAL/Migrations/ — the domain.
  4. Sources/NavigatorApp/routes.swift — the website surface.
  5. Sources/NavigatorRules/ — the validation seam other CLIs extend.

That's Navigator on one page.

← Back to blog