{"id":17233475,"url":"https://github.com/chrismckenzie/canoe","last_synced_at":"2025-07-01T07:05:48.664Z","repository":{"id":82940346,"uuid":"50757967","full_name":"ChrisMcKenzie/canoe","owner":"ChrisMcKenzie","description":"Front-end microservice pipeline platform","archived":false,"fork":false,"pushed_at":"2017-05-22T05:45:40.000Z","size":44,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-01T07:05:47.546Z","etag":null,"topics":["canoe","canoeing","framework","front-end","frontend","http","http2","http2-push","microservice","pipeline","platform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChrisMcKenzie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-01-31T04:00:14.000Z","updated_at":"2019-04-19T09:34:22.000Z","dependencies_parsed_at":"2024-01-16T18:57:53.348Z","dependency_job_id":"fa9daaba-0b04-4be4-80d9-de4c6319d89b","html_url":"https://github.com/ChrisMcKenzie/canoe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ChrisMcKenzie/canoe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisMcKenzie%2Fcanoe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisMcKenzie%2Fcanoe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisMcKenzie%2Fcanoe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisMcKenzie%2Fcanoe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChrisMcKenzie","download_url":"https://codeload.github.com/ChrisMcKenzie/canoe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisMcKenzie%2Fcanoe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262916618,"owners_count":23383885,"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":["canoe","canoeing","framework","front-end","frontend","http","http2","http2-push","microservice","pipeline","platform"],"created_at":"2024-10-15T05:03:27.258Z","updated_at":"2025-07-01T07:05:48.630Z","avatar_url":"https://github.com/ChrisMcKenzie.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Canoe\n=====\n\nCanoe is a Web Application serving platform for front-end microservice architectures allowing development teams to create small \"fragments\" of ui that can then be rendered client-side via a pipelining system that uses HTTP2 Server Push\n\n![](canoe.png)\n\n## Basic Server Setup\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/chrismckenzie/canoe\"\n)\n\nfunc main() {\n\tc := canoe.NewMemoryCache()\n\tr := canoe.NewHTTPFragmentResolver(http.DefaultClient, c)\n\n\thttp.Handle(\"/static/\", http.StripPrefix(\"/static/\", http.FileServer(http.Dir(\"static\"))))\n\thttp.Handle(\"/fragments/\", canoe.NewFragmentHandler(canoe.WithHTTPResolver(r)))\n\thttp.Handle(\"/\", canoe.NewHandler(\"/fragments/\", http.Dir(\"examples\"), c))\n\n\terr := http.ListenAndServeTLS(\":18443\", \"server.crt\", \"server.key\", nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\n## Creating An App Frame\n\nAn app frame is an html file that contains `canoe-fragment` elements in places when canoe will render a fragment.\n\n```html\n\u003chtml\u003e\n  \u003chead\u003e\n    \u003ctitle\u003e testing canoe \u003c/title\u003e\n  \u003c/head\u003e\n\n  \u003cbody\u003e\n    \u003ch2\u003e hello World \u003c/h2\u003e\n\n    \u003ccanoe-fragment href=\"https://my-nav-header-service:8080/\"\u003e\u003c/canoe-fragment\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n\nThe `canoe-fragment` tag is an html custom element that will be in charge of loading and managing the state of the fragment.\n\n## Creating A Fragment\n\nA fragment is a piece of html wrapped in a html [`template`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/template) tag\nthat is served as a microservice for you frontend application by dividing applications\nup into these fragments each portion of a web app can be developed independently from other\nportions of the app. to create a fragment simply serve up and html file that looks like this.\n\n```html\n\u003ctemplate\u003e\n\u003cstyle scoped\u003e\n  h2 {\n    color: red;\n  }\n\u003c/style\u003e\n\u003ch2\u003e My super awesome fragment. \u003c/h2\u003e\n\u003c/template\u003e\n```\n\nthe `canoe-fragment` element will clone this bit of dom and place it into an\nisolated shadow dom where it have its own javascript and css that are scoped to\nthe fragment.\n\n## Security\n\nCanoe strives to be a secure way to bring microservice architecture to the front-end\nit achieve this by never exposing you backend fragment services to the client.\n\nFor Example when you write this.\n\n```html\n\u003ccanoe-fragment href=\"http://my-private-backend-fragment-server:8080/\"\u003e\u003c/canoe-fragment\u003e\n```\ncanoe automatically converts this element into a client ready version which is\ngiven an id that points to the fragment in th canoe cache canoe then carries out \nthe retrieval of the fragment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrismckenzie%2Fcanoe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrismckenzie%2Fcanoe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrismckenzie%2Fcanoe/lists"}