{"id":29475374,"url":"https://github.com/whisperpine/tt","last_synced_at":"2026-04-09T20:36:51.830Z","repository":{"id":301935050,"uuid":"1010619266","full_name":"whisperpine/tt","owner":"whisperpine","description":"An OpenAPI driven rust server.","archived":false,"fork":false,"pushed_at":"2025-07-10T22:09:00.000Z","size":87,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-11T00:44:00.284Z","etag":null,"topics":["axum","docker","openapi","openapi-generator","postgresql","redoc","server"],"latest_commit_sha":null,"homepage":"https://whisperpine.github.io/tt/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whisperpine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-29T13:11:11.000Z","updated_at":"2025-07-10T22:09:03.000Z","dependencies_parsed_at":"2025-06-29T17:45:22.886Z","dependency_job_id":"f2bb3e3c-e2d4-495f-9d1a-4cfc223947a3","html_url":"https://github.com/whisperpine/tt","commit_stats":null,"previous_names":["whisperpine/tt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/whisperpine/tt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whisperpine%2Ftt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whisperpine%2Ftt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whisperpine%2Ftt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whisperpine%2Ftt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whisperpine","download_url":"https://codeload.github.com/whisperpine/tt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whisperpine%2Ftt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265314824,"owners_count":23745355,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["axum","docker","openapi","openapi-generator","postgresql","redoc","server"],"created_at":"2025-07-14T16:08:28.517Z","updated_at":"2026-04-09T20:36:51.820Z","avatar_url":"https://github.com/whisperpine.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- markdownlint-disable MD033 --\u003e\n\u003ch1 align=\"center\"\u003ett\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![license](https://img.shields.io/badge/license-MIT-blue)](https://github.com/whisperpine/tt/blob/main/LICENSE)\n[![checks](https://img.shields.io/github/actions/workflow/status/whisperpine/tt/checks.yml?logo=github\u0026label=checks)](https://github.com/whisperpine/tt/actions/workflows/checks.yml)\n[![build](https://img.shields.io/github/actions/workflow/status/whisperpine/tt/build.yml?logo=github\u0026label=build)](https://github.com/whisperpine/tt/actions/workflows/build.yml)\n[![release](https://img.shields.io/github/v/release/whisperpine/tt?logo=github)](https://github.com/whisperpine/tt/releases)\n[![openapi-docs](https://img.shields.io/github/deployments/whisperpine/tt/openapi-docs?label=openapi-docs)](https://github.com/whisperpine/tt/deployments/openapi-docs)\n\nGenerate rust server stubs based on OpenAPI Specifications,\nreduce boilerplates and ensure consistency.\n\n\u003c/div\u003e\n\n## Background\n\nWith OpenAPI design finalized upfront, we can achieve:\n\n- Efficiency:\n  save development time by automatically generate server stubs and client SDKs.\n- Consistency:\n  ensure server and client code align with a predefined contract, reducing mismatches.\n- Maintainability:\n  make changes to the API in the specification first,\n  work on auto-generated code later.\n\n## How It Works\n\nOAS files under [./openapi](./openapi/) work as the *Single Source of Truth*:\n\n- Design and write OAS ([OpenAPI Specifications](https://www.openapis.org/)) files.\n- Generate server stubs (axum is used in this repo) by [openapi-generator-cli](https://github.com/OpenAPITools/openapi-generator).\n- Lint OAS files by [redocly](https://github.com/Redocly/redocly-cli)\n  and generated HTML which is deploy on [GitHub Pages](https://whisperpine.github.io/tt/).\n- Run contract tests by [Arazzo](https://www.openapis.org/arazzo-specification),\n  generated by [redocly](https://github.com/Redocly/redocly-cli)\n  according to OpenAPI Specifications.\n\n```mermaid\nflowchart LR\n  oas(OpenAPI\u003cbr\u003eSpecifications):::red_stroke\n  ttopen(\"tt-openapi\u003cbr\u003e(Server Stubs)\")\n  ttcore(\"tt-http-core\u003cbr\u003e(Server Impl)\")\n  csdk(\"Client SDK\")\n  cc(\"Client App\")\n  arazzo(\"Arazzo Configurations\")\n  web(\"API Web Page\")\n\n  oas --\u003e|openapi-generator| ttopen\n  ttopen --\u003e ttcore\n  ttcore --\u003e ttapp\n  oas --\u003e|openapi-generator| csdk\n  csdk --\u003e cc\n  cc -.-\u003e ttapp\n  oas --\u003e|redocly| arazzo\n  arazzo -.-\u003e|contract tests| ttapp\n  oas --\u003e|redocly| web\n\n  subgraph services\n    ttapp(\"tt-http-app\u003cbr\u003e(The App)\")\n\n  end\n\n  db(\"DB\")\n  ttapp --- db\n\n  classDef red_stroke stroke: #f66\n  style csdk stroke-dasharray: 2\n  style cc stroke-dasharray: 2\n```\n\n## Prerequisites\n\nDev environment is managed by [nix-direnv](https://github.com/nix-community/nix-direnv),\nwhich stitches nix flakes and [direnv](https://github.com/direnv/direnv).\nIt automatically sets up environment variables and runs `nix develop` every time\nyou `cd` into the project directory.\n\n```sh\n# You only need to run `dirnev allow` ONCE after git clone.\n# Then every time you `cd`, the dev environment will be loaded automatically.\ncd THIS_REPO \u0026\u0026 dirnev allow\n```\n\n## Get Started\n\nHost the service locally by docker and run OpenAPI contract tests:\n\n```sh\ngit clone THIS_REPO \u0026\u0026 cd THIS_REPO\n\n# Setup dev environment described in the \"Prerequisites\" above,\n# or at least install these tools: just, redocly, rust toolchain.\n\n# Run the backend application and dependent services.\njust spin-up\n# Run OpenAPI contract tests by Arazzo (in ANOTHER terminal).\njust arazzo\n```\n\n## Explore\n\nRun `just -l` to see commonly used commands in this repo:\n\n```txt\nAvailable recipes:\n    [OpenAPI]\n    arazzo  # run OpenAPI contract tests by Arazzo\n    bundle  # bundle OpenAPI Specifications in to a single file\n    doc     # generate API documentation as an HTML file\n    lint    # lint OpenAPI Specifications\n\n    [Rust]\n    gen     # generate server stubs with rust-axum generator\n    run     # run the openapi server in debug mode\n    spin-up # spin up docker compose services and run the backend app\n\n    [SQL]\n    fix     # fix SQL linting errors found by sqlfluff\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhisperpine%2Ftt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhisperpine%2Ftt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhisperpine%2Ftt/lists"}