{"id":22741703,"url":"https://github.com/youka/api-snap","last_synced_at":"2026-05-03T18:34:09.929Z","repository":{"id":224283305,"uuid":"726779759","full_name":"Youka/api-snap","owner":"Youka","description":"An application which collects API documents by kubernetes service discovery and displays them in a web interface.","archived":false,"fork":false,"pushed_at":"2024-03-18T08:06:12.000Z","size":399,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T04:14:04.564Z","etag":null,"topics":["asyncapi","documentation","graphql","kubernetes","openapi"],"latest_commit_sha":null,"homepage":"https://api-snap.youka.dev","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Youka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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}},"created_at":"2023-12-03T11:34:38.000Z","updated_at":"2024-09-05T04:30:34.000Z","dependencies_parsed_at":"2024-03-16T17:44:57.877Z","dependency_job_id":"bc2ce6b0-28d7-472b-89a2-8e8709aadc89","html_url":"https://github.com/Youka/api-snap","commit_stats":null,"previous_names":["youka/api-snap"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Youka/api-snap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youka%2Fapi-snap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youka%2Fapi-snap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youka%2Fapi-snap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youka%2Fapi-snap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Youka","download_url":"https://codeload.github.com/Youka/api-snap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Youka%2Fapi-snap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32579901,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["asyncapi","documentation","graphql","kubernetes","openapi"],"created_at":"2024-12-11T00:15:53.876Z","updated_at":"2026-05-03T18:34:09.888Z","avatar_url":"https://github.com/Youka.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Snap\n\n| ![Logo](docs/logo.svg) | An application which collects API documents by kubernetes service discovery and displays them in a web interface. |\n|---|---|\n\n[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/youkadev)](https://artifacthub.io/packages/helm/youkadev/api-snap/)\n[![Docker Size](https://badgen.net/docker/size/youkadev/api-snap?icon=docker\u0026label=Docker%20Size)](https://hub.docker.com/r/youkadev/api-snap)\n[![GitHub Latest Tag](https://badgen.net/github/tag/youka/api-snap?icon=github\u0026label=Latest%20Tag\u0026color=black)](https://github.com/youka/api-snap/tags)  \n[![GitHub License](https://badgen.net/github/license/youka/api-snap?icon=github\u0026label=License\u0026color=green)](./LICENSE)\n[![GitHub Last Commit](https://badgen.net/github/last-commit/youka/api-snap?icon=github\u0026label=Last%20Commit)](https://github.com/Youka/api-snap/commits)\n[![GitHub Actions](https://github.com/youka/api-snap/actions/workflows/main.yml/badge.svg)](https://github.com/Youka/api-snap/actions)\n[![codecov](https://codecov.io/github/Youka/api-snap/graph/badge.svg?token=H8DLDKIYI7)](https://codecov.io/github/Youka/api-snap)\n\n**ToC:**\n* [Quickstart](#quickstart)\n* [Usage](#usage)\n  * [User interfaces](#user-interfaces)\n  * [Runtime configuration](#runtime-configuration)\n  * [Kubernetes setup](#kubernetes-setup)\n* [Development](#development)\n  * [Tools](#tools)\n  * [Commands](#commands)\n* [Deployment](#deployment)\n* [Contributung](#contributing)\n* [License](#license)\n* [Changelog](#changelog)\n\n\n## Quickstart\n_API Snap is mainly used by kubernetes cluster administrators. Experience is expected._  \nSee [ArtifactHUB](https://artifacthub.io/packages/helm/youkadev/api-snap/) how to add the helm repository and customize chart installations.\n\nFor a simple installation just two commands are required:\n```sh\nhelm repo add youkadev https://charts.youka.dev\nhelm upgrade latest youkadev/api-snap --namespace=api-snap --create-namespace --install --atomic\n```\n\n## Usage\n\n### User interfaces\nAPI Snap provides endpoints with graphical user interfaces which are commonly visit by end users. Those are an index listing other endpoints and one page for every supported api.\n\n#### Index\nThe start page by path `/`.  \nShows an overview what API Snap has to offer.\n\n**Preview:**  \n![Index](./docs/preview_index.png)\n\n#### Swagger UI\nSwagger UI by path `/swagger-ui`.  \nDisplays found openapi documents (=specifications).\n\n**Preview:**  \n![Swagger UI](./docs/preview_swaggerui.png)\n\n#### AsyncAPI\nAsyncAPI (React) by path `/asyncapi`.  \nDisplays found asyncapi documents (=specifications).\n\n**Preview:**  \n![Async API](./docs/preview_asyncapi.png)\n\n#### GraphQL\nGraphQL (PrismJS) by path `/graphql`.  \nDisplays found graphql documents (=schemas).\n\n**Preview:**  \n![GraphQL](./docs/preview_graphql.png)\n\n### Runtime configuration\nConfiguring the runtime behaviour of API Snap is possible by **environment variables**.  \nDefault values are mostly optimal but logging should be set fitting to the deployment environment.\n\n#### Server address\n* **Environment variable:** `API_SNAP_ADDRESS`\n* **Default value:** `127.0.0.1`\n* **Description:** Address of the internal web server to listen. Set to `0.0.0.0` for external access.\n\n#### Server port\n* **Environment variable:** `API_SNAP_PORT`\n* **Default value:** `8080`\n* **Description:** Port of the internal web server to listen. Traffic is always http (unsecured) so ports like `80` or `8080` are recommended values.\n\n#### Client timeout\n* **Environment variable:** `API_SNAP_CLIENT_TIMEOUT`\n* **Default value:** `30`\n* **Description:** Timeout in seconds until a client cancels a connection try. Set a low value so the application threads aren't blocked for long when fetching content but high enough to give slow servers some time.\n\n#### Cache lifespan\n* **Environment variable:** `API_SNAP_CACHE_LIFESPAN`\n* **Default value:** `10`\n* **Description:** Duration in seconds until a cache refreshes. Set a low value so users don't get old content delivered but high enough to reduce client load.\n\n#### Logging\n* **Environment variable:** `RUST_LOG`\n* **Default value:** _undefined_\n* **Description:** Define logging level, target, etc. See [env_logger](https://docs.rs/env_logger/latest/env_logger/).\n\n#### Kubernetes client configuration\n* **Environment variable:** `KUBECONFIG`\n* **Default value:** _undefined_\n* **Description:** Set the path to the kubernetes client configuration file. See [the kubernetes concept](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#the-kubeconfig-environment-variable).\n\n### Kubernetes setup\nSee [Kubernetes setup](./docs/kubernetes_setup.md) (also available in the application).\n\n## Development\nAPI Snap is a [rust](https://www.rust-lang.org/) project with **web assets** and **kubernetes clusters** as target.  \nThis document mentions basic tooling and major commands to work with it.\n\n### Tools\n* [VSCode](https://code.visualstudio.com/)  \n  The recommended IDE (but optional). Also install **recommended plugins**.\n* [Rust](https://www.rust-lang.org/tools/install)  \n  Install the rust toolchain with **rustup** including the component `clippy`.\n* [Docker Desktop](https://www.docker.com/products/docker-desktop/)  \n  For containerization and kubernetes install this convenient toolkit.\n* [Helm](https://helm.sh/)  \n  Install this small tool to apply \u0026 package charts for kubernetes deployment.\n\n### Commands\n\n#### Quality Assurance\n* Lint code:  \n  `cargo clippy`\n* Prepare test environment:  \n  ```sh\n  kubectl apply -f tests/k8s_test_namespaces.yml\n  kubectl apply -f tests/k8s_test_resources.yml\n  ```\n* Run tests:  \n  `cargo test`\n* Install code coverage tool:  \n  `cargo install cargo-tarpaulin`\n* Report code coverage:  \n  `cargo tarpaulin --out html --output-dir target --engine llvm`\n* Render chart templates:  \n  `helm template deploy/helm`\n\n#### Build\n* Update dependencies:  \n  `cargo update`\n* Run application:  \n  `cargo run`\n* Build application (optimized):  \n  `cargo build --release --no-default-features --locked`\n\n## Deployment\nSee [Deployment](./docs/deployment.md).\n\n## Contributing\nSee [CONTRIBUTING](./CONTRIBUTING.md).\n\n## License\nSee [LICENSE](./LICENSE).\n\n## Changelog\nSee [CHANGELOG](./CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouka%2Fapi-snap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyouka%2Fapi-snap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyouka%2Fapi-snap/lists"}