{"full_name":"tokio-rs/topcoat","owner":"tokio-rs","name":"topcoat","shard":"1","url":"https://github.com/tokio-rs/topcoat","description":"A batteries-included framework for building web apps","homepage":null,"topics":[],"tag_pages":[],"language":"Rust","license":"MIT","avatar":"https://avatars.githubusercontent.com/u/20248544?v=4","created_at":"2026-04-03T14:27:27Z","pushed_at":"2026-11-14T14:25:29Z","metrics":{"stars":7230,"forks":326,"watchers":46,"issues":137,"prs":455,"releases":12,"issues_open":36,"issues_closed":101,"prs_open":28,"prs_closed":59,"prs_merged":368,"discussions":20},"growth":{"day":{"stars":11,"forks":0,"base_day":"2026-11-15"},"week":{"stars":919,"forks":101,"base_day":"2026-11-04"},"month":{"stars":1151,"forks":119,"base_day":"2026-10-17"}},"history":{"dates":["2026-09-06","2026-09-07","2026-09-08","2026-09-09","2026-09-10","2026-09-11","2026-09-12","2026-09-13","2026-09-14","2026-09-15","2026-09-16","2026-09-17","2026-09-18","2026-09-19","2026-09-20","2026-09-21","2026-09-22","2026-09-23","2026-09-24","2026-09-25","2026-09-26","2026-09-27","2026-09-28","2026-09-29","2026-09-30","2026-10-01","2026-10-02","2026-10-03","2026-10-04","2026-10-05","2026-10-06","2026-10-07","2026-10-08","2026-10-09","2026-10-10","2026-10-11","2026-10-12","2026-10-13","2026-10-14","2026-10-15","2026-10-16","2026-10-17","2026-10-18","2026-10-19","2026-10-20","2026-10-21","2026-10-22","2026-10-23","2026-10-24","2026-10-25","2026-10-26","2026-10-27","2026-10-28","2026-10-29","2026-10-30","2026-10-31","2026-11-01","2026-11-02","2026-11-03","2026-11-04","2026-11-11","2026-11-12","2026-11-13","2026-11-14","2026-11-15","2026-11-16"],"stars":[4684,4697,4706,4712,4718,4723,4730,4747,4756,4762,4762,4764,4775,4784,4790,4804,4809,4813,4826,4837,4839,4847,4855,4864,4941,5027,5072,5162,5339,5405,5666,5736,5828,5865,5900,5954,5982,6006,6030,6039,6054,6079,6088,6105,6116,6124,6130,6138,6141,6165,6172,6177,6192,6226,6239,6253,6259,6270,6306,6311,7065,7148,7178,7195,7219,7230],"forks":[166,167,167,167,167,168,169,170,170,170,170,172,172,173,175,175,175,176,176,176,176,177,177,177,178,178,178,179,183,183,187,191,196,198,201,203,204,206,206,206,207,207,209,212,212,213,212,214,215,216,217,217,219,221,221,221,221,222,225,225,315,321,326,326,326,326],"watchers":[35,35,35,35,35,35,36,40,40,40,39,39,39,39,40,40,40,41,40,39,39,39,40,40,39,40,40,40,40,43,43,43,43,43,43,44,43,43,43,43,43,43,44,43,43,43,43,43,43,43,43,43,40,40,40,40,40,40,40,40,43,44,45,46,46,46],"issues_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,34,36,36,36,36,36],"prs_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,24,26,28,28,28,28]},"boards":{"monthly_rate":164},"same_owner":[{"full_name":"tokio-rs/prost","name":"prost","shard":"1","boards":{}},{"full_name":"tokio-rs/tokio","name":"tokio","shard":"1","boards":{}}],"issues":[{"number":275,"title":"Proposal: compile client code from real Rust to JavaScript instead of runtime expressions (working spike + benchmarks)","comments":8,"created_at":"2026-07-31T14:37:37Z"},{"number":517,"title":"`topcoat asset bundle` / `topcoat dev` wipes other apps' bundles when multiple apps share a target directory","comments":5,"created_at":"2026-10-11T22:22:31Z"},{"number":486,"title":"Developer experience pain points","comments":4,"created_at":"2026-10-01T20:04:21Z"},{"number":463,"title":"Stronger types for component children","comments":4,"created_at":"2026-09-28T15:51:54Z"},{"number":578,"title":"add support for 'update' command in topcoat ui cli","comments":3,"created_at":"2026-11-02T02:25:23Z"},{"number":401,"title":"Is topcoat planning to have a styleX-like built-in CSS engine?","comments":3,"created_at":"2026-09-11T07:11:59Z"},{"number":357,"title":"Feature Request: Support loops with await expressions in event handlers","comments":3,"created_at":"2026-08-18T14:54:35Z"},{"number":539,"title":"[RFC] Integrated storybook experience shiped by the CLI","comments":2,"created_at":"2026-10-16T09:07:31Z"}],"discussions":[{"number":572,"title":"Is the sidebar intended only as a top-level layout component?","comments":0,"category":"General","created_at":"2026-10-29T21:48:07Z"},{"number":568,"title":"Is this the intended way to pass procedure to a component?","comments":0,"category":"General","created_at":"2026-10-29T09:41:19Z"},{"number":561,"title":"Validation feature","comments":0,"category":"Ideas","created_at":"2026-10-25T00:18:46Z"},{"number":554,"title":"What is the best way to handle product images for an ecommerce site in topcoat?","comments":1,"category":"Q&A","created_at":"2026-10-22T21:55:14Z"},{"number":552,"title":"Component-scoped CSS: is there a supported approach, or is Tailwind the intended path?","comments":2,"category":"Q&A","created_at":"2026-10-22T15:33:56Z"},{"number":548,"title":"Updating a page's route query, with a signal.","comments":1,"category":"Q&A","created_at":"2026-10-20T22:00:05Z"},{"number":527,"title":"Layout groups for non-module routing","comments":2,"category":"Q&A","created_at":"2026-10-14T18:37:15Z"},{"number":512,"title":"Requirements from a self-hosted business platform admin UI (what would make Topcoat a fit)","comments":1,"category":"Ideas","created_at":"2026-10-10T08:27:20Z"}],"latest_release":{"name":"v0.12.1","tag":"v0.12.1","published_at":"2026-11-10T18:34:42Z","body":"- [OpenAPI](#openapi)\r\n  - [Getting started](#getting-started)\r\n  - [Inherited settings](#inherited-settings)\r\n  - [Parameters, bodies and authentication](#parameters-bodies-and-authentication)\r\n- [Listing routes](#listing-routes)\r\n\r\n## <a id=\"openapi\"></a>OpenAPI\r\n\r\n### <a id=\"getting-started\"></a>Getting started\r\n\r\nEnable the new `openapi` feature and add [schemars](https://docs.rs/schemars), which describes the data in your request and response bodies:\r\n\r\n```sh\r\ncargo add topcoat --features openapi\r\ncargo add schemars\r\n```\r\n\r\nAttach an `Operation` to a route with `with(...)`. Topcoat takes the path, HTTP methods and path parameters from the router, and you add the rest:\r\n\r\n```rust\r\nuse schemars::JsonSchema;\r\nuse serde::{Deserialize, Serialize};\r\nuse topcoat::{\r\n    Result,\r\n    context::Cx,\r\n    openapi::Operation,\r\n    router::{StatusCode, content::Json, route},\r\n};\r\n\r\n#[derive(Deserialize, JsonSchema)]\r\nstruct CreateUser {\r\n    /// The name to show for the user.\r\n    name: String,\r\n}\r\n\r\n#[derive(Serialize, JsonSchema)]\r\nstruct User {\r\n    id: u64,\r\n    name: String,\r\n}\r\n\r\n#[route(POST \"/api/users\", with(\r\n    Operation::new()\r\n        .summary(\"Create a user\")\r\n        .request::<Json<CreateUser>>()\r\n        .response_with::<Json<User>>(StatusCode::CREATED, \"The new user.\")\r\n        .response(StatusCode::CONFLICT, \"The name is taken.\")\r\n))]\r\nasync fn create_user(cx: &Cx, Json(input): Json<CreateUser>) -> Result<(StatusCode, Json<User>)> {\r\n    let user = User { id: 1, name: input.name };\r\n    Ok((StatusCode::CREATED, Json(user)))\r\n}\r\n```\r\n\r\nDoc comments on your types and fields become descriptions in the generated schema.\r\n\r\nUse `OpenApi` to set the title, version and other document settings, then pass it your router. Return the `Document` from a route to serve it as JSON:\r\n\r\n```rust\r\nuse topcoat::openapi::{Document, OpenApi};\r\n\r\n#[route(GET \"/openapi.json\")]\r\nasync fn spec(cx: &Cx) -> Result<Document> {\r\n    Ok(OpenApi::new(\"Acme API\", \"1.0.0\")\r\n        .description(\"Everything you need for tea.\")\r\n        .server(\"https://api.example.com\")\r\n        .generate(&router(cx)))\r\n}\r\n```\r\n\r\nYou can also generate the document outside a request, for example in a test or a command that writes `openapi.json` with `Document::to_json_pretty`.\r\n\r\n### <a id=\"inherited-settings\"></a>Inherited settings\r\n\r\nAn `Operation` on a layer sets defaults for every route under its path. Each of those routes is included in the document and inherits the layer's tags, responses and other settings. A route can override or extend them with its own operation, or leave the document with `.hidden(true)`:\r\n\r\n```rust\r\n#[layer(\"/api\", with(\r\n    Operation::new()\r\n        .tag(\"api\")\r\n        .response(StatusCode::UNAUTHORIZED, \"The token is missing or wrong.\")\r\n))]\r\nasync fn api(cx: &Cx, body: Body, next: Next<'_>) -> Result<Response> {\r\n    next.run(cx, body).await\r\n}\r\n\r\n// Documented through the layer, with its tag and 401 response.\r\n#[route(GET \"/api/health\")]\r\nasync fn health(cx: &Cx) -> Result<&'static str> {\r\n    Ok(\"ok\")\r\n}\r\n\r\n// Left out of the document.\r\n#[route(GET \"/api/debug\", with(Operation::new().hidden(true)))]\r\nasync fn debug(cx: &Cx) -> Result<&'static str> {\r\n    Ok(\"debug\")\r\n}\r\n```\r\n\r\nOperations follow the same rules as route context, so you can also put one on a layout or on the router builder.\r\n\r\n### <a id=\"parameters-bodies-and-authentication\"></a>Parameters, bodies and authentication\r\n\r\n- `Parameter` describes path, query, header and cookie parameters. Path parameters are included automatically as strings; add a `Parameter` to give one a type or a description.\r\n- `Operation::query::<T>()` documents every field of a `#[query_params]` struct that derives `JsonSchema`.\r\n- JSON and form extractors describe their bodies when their data type implements `JsonSchema`. Implement the `Content` trait to describe a custom body type.\r\n- `SecurityScheme` registers an authentication method on the document, and `Operation::security` marks the routes th","is_prerelease":false},"readme":true,"readme_zh":false,"news":[{"title":"Topcoat: The full full-stack framework for Rust","url":"https://github.com/tokio-rs/topcoat","hn":"https://news.ycombinator.com/item?id=48952067","source":"Hacker News","lang":"en","date":"2026-07-17","points":134,"comments":48},{"title":"Tokio releases Topcoat: A batteries-included full-stack Rust framework","url":"https://news.lavx.hu/article/tokio-releases-topcoat-a-batteries-included-full-stack-rust-framework","source":"news.lavx.hu","lang":"en","date":"2026-11-09"},{"title":"Topcoat 0.5.0登場、Rust式をJavaScriptへ変換する「WASM不要」の設計","url":"https://xenospectrum.com/topcoat-rust-fullstack/","source":"xenospectrum","lang":"zh","date":"2026-07-28"},{"title":"开源项目Topcoat.github.com概览与新手指南","url":"https://blog.csdn.net/gitblog_00621/article/details/143553703","source":"blog.csdn","lang":"zh","date":"2024-11-05"},{"title":"Tokio 发布 Topcoat：一个开箱即用的 Rust 全栈框架","url":"https://news.google.com/rss/articles/CBMirAFBVV95cUxPeHVid2NJNDhtdG80MTdocWFSOFRoMXM1UFFFdFdQSjU3OTJ5ckl3dFZ6bDNJRGdOMFROeDNHekZVTl9VemZvTjBWeWxWSFdoVUh4WFl6TWdoR3dQNHdQcUhFUUd3Z3hwNE15eTJBb3VKNkktMUJYSWtUSG53YVlDM19rT1ZKWm5ybWE4WVRMdU5VTjMxSDJkcDQzYjQ2bFUzN0pDMXZkeTNMdVpo?oc=5","source":"news.lavx.hu","lang":"zh","date":"2026-11-09"},{"title":"GIT Coatings launches XGIT‑VORTEX graphene-based propeller coating","url":"https://news.google.com/rss/articles/CBMinAFBVV95cUxQam4tR1N4VG9nS1N3ZFdlOEJuTWNpTHVCS19GX3A3Z2hBOGNyOXhPaEhTWnFDbkd6dlJOY1hUanVWdHdMYW90UE9McHgxa3NYb0RwbFBGSjcxaHZCU3dHQTFNOHcyM3NfM0xIQ3NESER4Q2RSVWNQQTFIcWxwM3pwc1dZRkU5UmFUejVBc1F3ck5iQ2tGLURFcXpfeFY?oc=5","source":"Graphene-Info","lang":"en","date":"2026-06-13"},{"title":"GIT Releases New Coating Product","url":"https://news.google.com/rss/articles/CBMibkFVX3lxTE9NREZkTlpCdTVVRDFPQmZmbXEwQm9wRlpEaEJCMG9FT19YbTNtSFFjQkRGQ0JNQm1kYWRYb0E3ZFoyQW93N1JqeF9RWUhhdFV5by15dmJkaGFaMWNibU9RVGM3OXM2ZVJyTkJGU1hn?oc=5","source":"Entrevestor","lang":"en","date":"2026-06-08"},{"title":"GIT Coatings Launches XGIT-VORTEX Propeller Coating","url":"https://news.google.com/rss/articles/CBMie0FVX3lxTFBCSXZqanNjdzRyVy1hbHB1UzlBYzB1ZUQ4cS1HMVlrSEtLUmxjdjJWQ0NGLU9QVXlNTzlYQko0UEJ5Z0xrMUdBbUZJVnlReDhOazRwLUhIa2RZVTg3M0xJc1J0SVMweEEwQUVZbjhXaWNhRWVtR2I0TThqcw?oc=5","source":"MarineLink","lang":"en","date":"2026-06-04"}],"stale":false,"snapshot_at":"2026-11-16T09:23:14Z","history_start":"2026-09-06"}