{"id":28480209,"url":"https://github.com/impulse-sw/cc-services","last_synced_at":"2025-07-03T18:31:33.678Z","repository":{"id":281142803,"uuid":"938383964","full_name":"impulse-sw/cc-services","owner":"impulse-sw","description":"Web services and tools for Impulse","archived":false,"fork":false,"pushed_at":"2025-06-28T22:27:04.000Z","size":314,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"stable","last_synced_at":"2025-06-28T23:26:27.400Z","etag":null,"topics":["dsl-interpreter","http3","json-simd","leptos","msgpack","openapi","opentelemetry","salvo","static-server","web-development","yaml-configuration"],"latest_commit_sha":null,"homepage":"","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/impulse-sw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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,"zenodo":null}},"created_at":"2025-02-24T21:44:29.000Z","updated_at":"2025-06-20T23:50:28.000Z","dependencies_parsed_at":"2025-04-06T13:23:10.938Z","dependency_job_id":"e5a03f02-e8b7-4288-a725-ec721fcdcc9a","html_url":"https://github.com/impulse-sw/cc-services","commit_stats":null,"previous_names":["impulse-sw/cc-services"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/impulse-sw/cc-services","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impulse-sw%2Fcc-services","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impulse-sw%2Fcc-services/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impulse-sw%2Fcc-services/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impulse-sw%2Fcc-services/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/impulse-sw","download_url":"https://codeload.github.com/impulse-sw/cc-services/tar.gz/refs/heads/stable","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impulse-sw%2Fcc-services/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263379098,"owners_count":23457796,"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":["dsl-interpreter","http3","json-simd","leptos","msgpack","openapi","opentelemetry","salvo","static-server","web-development","yaml-configuration"],"created_at":"2025-06-07T19:00:32.551Z","updated_at":"2025-07-03T18:31:33.669Z","avatar_url":"https://github.com/impulse-sw.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cc-services\n\nCollection of Rust libraries, frameworks and programs to build better Internet.\n\n## Overview\n\n### CC Server Kit\n\nServer Kit is a simply configurable backend framework based on [Salvo](https://github.com/salvo-rs/salvo). It is simple enough and powerful.\n\n[Server Kit Documentation](./cc-server-kit/README.md)\n\n### CC Server Kit DSL\n\nServer Kit provides DSL-to-API prototype translator to simplify development:\n\n- automated version bumping on breaking changes\n- automated OpenAPI spec generation\n- automated OpenTelemetry instrumenting.\n\n[SK DSL Documentation](./cc-server-kit-dsl/README.md)\n\n### CC Static Server\n\nStatic Server is simple frontend-to-client provider built with Server Kit. You can edit `static-server.yaml` to specify Server Kit parameters.\n\nOn its own, Static Server serves all files from one of distribution folders:\n\n- `/usr/local/frontend-dist`\n- `{CURRENT_EXE_PATH}/dist`\n\nAnd more! It internally redirects all requests without file extension to `index.html`, and your SPA apps can run smoothly.\n\nAlso, you can use Static Server as a library to include frontend router to your backend application:\n\n```rust\n  let router = cc_server_kit::get_root_router(\u0026state)\n    .hoop(\n      affix_state::inject(state.clone())\n        .inject(setup.clone())\n        .inject(connect_sea_orm().await?)\n        .inject(auth_cli),\n    )\n    .push(crate::api::auth_router())\n    .push(crate::api::chat_router())\n    .push(cc_static_server::frontend_router()); // include it in the end for correct redirects\n```\n\nAlso, you can specify distribution path:\n\n```rust\n  ...\n    .push(cc_static_server::frontend_router_from_given_dist(\u0026PathBuf::from(\"/any/other/folder\")));\n```\n\n[Static Server Documentation](./cc-static-server/README.md)\n\n### `cc-utils`\n\n`cc-utils` is a bunch of fullstack utils:\n\n- common error types: `ServerError`, `CliError` and `ErrorResponse`\n- unified result types: `MResult\u003cT\u003e = Result\u003cT, ServerError\u003e` and `CResult\u003cT\u003e = Result\u003cT, CliError\u003e`\n- backend response types for Salvo and Server Kit: `ok!()`, `plain!(str)`, `html!(str)`, `file_upload!(pathbuf, filename)`, `json!(ser)` and `msgpack!(ser)`\n- `ExplicitServerWrite` backend trait which uses only `\u0026mut Response` to respond unlike `ServerResponseWriter::write(self, req, depot, res)`\n- MsgPack extraction traits for `reqwest::Response` and `salvo::Request`\n- MsgPack send trait for `reqwest::RequestBuilder`\n- SIMD JSON support\n\nIn a way, `cc-utils` is useful in many cases such as error handling and response writing.\n\n[`cc-utils` Documentation](./cc-utils/README.md)\n\n### CC UI Kit\n\nUI Kit is just superstructure above Leptos and ThawUI frameworks. It provides:\n\n- simple application entrypoint\n- logging support with `log`\n- automated light/dark themes (with Tailwind support)\n- utils to perform request to the backend (`cc_ui_kit::router::endpoint` and `cc_ui_kit::router::redirect` functions)\n\nStartup example:\n\n```rust\nfn main() {\n  cc_ui_kit::setup_app(log::Level::Info, Box::new(move || { view! { \u003cApp /\u003e }.into_any() }))\n}\n```\n\n[CC UI Kit Documentation](./cc-ui-kit/README.md)\n\n[CC UI Kit Example](https://github.com/impulse-sw/cc-ui-kit-example)\n\n## Rust Toolchain\n\n**This repository actively uses `nightly` toolchain.** While these frameworks and libraries are battle-tested anyway, consider not to choose `cc-services` to use if you are not aware of `nightly` toolchain.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpulse-sw%2Fcc-services","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimpulse-sw%2Fcc-services","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpulse-sw%2Fcc-services/lists"}