{"id":15984288,"url":"https://github.com/natewong1313/go-react-ssr","last_synced_at":"2026-01-12T07:38:21.127Z","repository":{"id":193379255,"uuid":"688665797","full_name":"natewong1313/go-react-ssr","owner":"natewong1313","description":"Build full-stack web apps with Go \u0026 React. End to end type-safety and lightning fast ⚡️","archived":false,"fork":false,"pushed_at":"2024-03-10T16:18:50.000Z","size":2480,"stargazers_count":155,"open_issues_count":12,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-02T07:51:11.200Z","etag":null,"topics":["golang","reactjs","typescript"],"latest_commit_sha":null,"homepage":"","language":"Go","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/natewong1313.png","metadata":{"files":{"readme":".github/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}},"created_at":"2023-09-07T20:51:47.000Z","updated_at":"2025-04-01T14:09:12.000Z","dependencies_parsed_at":"2023-09-15T06:23:38.418Z","dependency_job_id":"b6a8d1cc-f7a1-46ef-9ca4-6f9f0253e750","html_url":"https://github.com/natewong1313/go-react-ssr","commit_stats":{"total_commits":151,"total_committers":2,"mean_commits":75.5,"dds":0.4304635761589404,"last_synced_commit":"960cd71be1380bf0428d790d111df29e5916e9d4"},"previous_names":["natewong1313/golang-react-ssr","natewong1313/go-react-ssr"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/natewong1313/go-react-ssr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natewong1313%2Fgo-react-ssr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natewong1313%2Fgo-react-ssr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natewong1313%2Fgo-react-ssr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natewong1313%2Fgo-react-ssr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/natewong1313","download_url":"https://codeload.github.com/natewong1313/go-react-ssr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/natewong1313%2Fgo-react-ssr/sbom","scorecard":{"id":675347,"data":{"date":"2025-08-11","repo":{"name":"github.com/natewong1313/go-react-ssr","commit":"960cd71be1380bf0428d790d111df29e5916e9d4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/run-tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/natewong1313/go-react-ssr/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/natewong1313/go-react-ssr/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/natewong1313/go-react-ssr/run-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/natewong1313/go-react-ssr/run-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/natewong1313/go-react-ssr/run-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/natewong1313/go-react-ssr/run-tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/run-tests.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/natewong1313/go-react-ssr/run-tests.yml/master?enable=pin","Warn: containerImage not pinned by hash: examples/echo/Dockerfile:1","Warn: containerImage not pinned by hash: examples/echo/Dockerfile:6: pin your Docker image by updating golang:1.21-alpine to golang:1.21-alpine@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94","Warn: containerImage not pinned by hash: examples/fiber/Dockerfile:1","Warn: containerImage not pinned by hash: examples/fiber/Dockerfile:6: pin your Docker image by updating golang:1.21-alpine to golang:1.21-alpine@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94","Warn: containerImage not pinned by hash: examples/gin/Dockerfile:1","Warn: containerImage not pinned by hash: examples/gin/Dockerfile:6: pin your Docker image by updating golang:1.21-alpine to golang:1.21-alpine@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94","Warn: npmCommand not pinned by hash: examples/echo/Dockerfile:4","Warn: goCommand not pinned by hash: examples/echo/Dockerfile:13","Warn: npmCommand not pinned by hash: examples/fiber/Dockerfile:4","Warn: goCommand not pinned by hash: examples/fiber/Dockerfile:13","Warn: npmCommand not pinned by hash: examples/gin/Dockerfile:4","Warn: goCommand not pinned by hash: examples/gin/Dockerfile:13","Warn: npmCommand not pinned by hash: .github/workflows/run-tests.yml:28","Warn: npmCommand not pinned by hash: .github/workflows/run-tests.yml:35","Warn: npmCommand not pinned by hash: .github/workflows/run-tests.yml:42","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   6 containerImage dependencies pinned","Info:   0 out of   6 npmCommand dependencies pinned","Info:   1 out of   4 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"23 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw","Warn: Project is vulnerable to: GO-2023-2115 / GHSA-94w9-97p3-p368","Warn: Project is vulnerable to: GO-2023-2116 / GHSA-mv73-f69x-444p","Warn: Project is vulnerable to: GO-2024-2574 / GHSA-fmg4-x8pw-hjhg","Warn: Project is vulnerable to: GO-2024-2959 / GHSA-98j2-3j3p-fw2v","Warn: Project is vulnerable to: GO-2025-3845 / GHSA-qx2q-88mx-vhg7","Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GO-2024-2611 / GHSA-8r3f-844c-mc37"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T21:16:26.072Z","repository_id":193379255,"created_at":"2025-08-21T21:16:26.073Z","updated_at":"2025-08-21T21:16:26.073Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336612,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["golang","reactjs","typescript"],"created_at":"2024-10-08T02:06:19.455Z","updated_at":"2026-01-12T07:38:21.104Z","avatar_url":"https://github.com/natewong1313.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- # Go React SSR --\u003e\n\n\u003c!-- Build Go powered React web apps with end to end type-safety --\u003e\n\u003cimg src=\"https://i.imgur.com/zrKSrny.png\" height=\"72\"\u003e\n\n---\n\n\u003cp\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/natewong1313/go-react-ssr\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/natewong1313/go-react-ssr\" alt=\"Go Report\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/natewong1313/go-react-ssr?tab=doc\"\u003e\u003cimg src=\"http://img.shields.io/badge/GoDoc-Reference-blue.svg\" alt=\"GoDoc\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/natewong1313/go-react-ssr/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT%202.0-blue.svg\" alt=\"MIT License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nGo-SSR is a drop in plugin to **any** existing Go web framework to allow **server rendering** [React](https://react.dev/). It's powered by [esbuild](https://esbuild.github.io/) and allows for passing props from Go to React with **type safety**.\n\n\u003c!--\n# 💡 Overview --\u003e\n\nGo-SSR was developed due to a lack of an existing product in the Go ecosystem that made it easy to build full-stack React apps. At the time, most Go web app projects were either built with a static React frontend with lots of client-side logic or html templates. I envisioned creating a new solution that would allow you to create full-stack Go apps with React but with logic being moved to the server and being able to pass that logic down with type-safe props. This project was inspired by [Remix](https://remix.run/) and [Next.JS](https://nextjs.org/), but aims to be a plugin and not a framework.\n\n# 📜 Features\n\n- Lightning fast compiling\n- Auto generated Typescript structs for props\n- Hot reloading\n- Simple error reporting\n- Production optimized\n- Drop in to any existing Go web server\n\n\u003c!-- _View more examples [here](github.com/natewong1313/go-react_old-ssr/examples)_ --\u003e\n\n# 🛠️ Getting Started\n\nGo-SSR was designed with the idea of being dead simple to install. Below are 2 easy ways of setting it up:\n\n## ⚡️ Using the CLI tool\n\n\u003cimg src=\"https://i.imgur.com/mygp5BT.png\" height=\"400\" /\u003e\n\nThe easiest way to get a project up and running is by using the command line tool. Install it with the following command\n\n```console\n$ go install github.com/natewong1313/go-react-ssr/gossr-cli@latest\n```\n\nThen you can call the following command to create a project\n\n```console\n$ gossr-cli create\n```\n\nYou'll be prompted the path to place the project, what web framework you want to use, and whether or not you want to use Tailwind\n\n## 📝 Add to existing web server\n\nTo add Go-SSR to an existing Go web server, take a look at the [examples](/examples) folder to get an idea of what a project looks like. In general, you'll want to follow these commands:\n\n```console\n$ go get -u github.com/natewong1313/go-react-ssr\n```\n\nThen, add imports into your main file\n\n```go\nimport (\n\t...\n\tgossr \"github.com/natewong1313/go-react-ssr\"\n)\n```\n\nIn your main function, initialize the plugin. Create a folder for your structs that hold your props to go, which is called `models` in the below example. You'll also want to create a folder for your React code (called `frontend` in this example) inside your project and specifiy the paths in the config. You may want to clone the [example folder](/examples/frontend/) and use that.\n\n```go\nengine, err := gossr.New(gossr.Config{\n    AssetRoute:         \"/assets\",\n    FrontendDir:        \"./frontend/src\",\n    GeneratedTypesPath: \"./frontend/src/generated.d.ts\",\n    PropsStructsPath:   \"./models/props.go\",\n})\n```\n\nOnce the plugin has been initialized, you can call the `engine.RenderRoute` function to compile your React file to a string\n\n```go\ng.GET(\"/\", func(c *gin.Context) {\n\trenderedResponse := engine.RenderRoute(gossr.RenderConfig{\n\t\tFile:  \"Home.tsx\", \n\t\tTitle: \"Example app\", \n\t\tMetaTags: map[string]string{\n\t\t\t\"og:title\":    \"Example app\", \n\t\t\t\"description\": \"Hello world!\",\n\t\t}, \n\t\tProps: \u0026models.IndexRouteProps{\n\t\t\tInitialCount: rand.Intn(100),\n\t\t},\n\t})\n\tc.Writer.Write(renderedResponse)\n})\n```\n\n# 🚀 Deploying to production\n\nAll of the examples come with a Dockerfile that you can use to deploy to production. You can also use the [gossr-cli](#-using-the-cli-tool) to create a project with a Dockerfile.\nBelow is an example Dockerfile\n\n```Dockerfile\nFROM golang:1.21-alpine as build-backend\nRUN apk add git\nADD .. /build\nWORKDIR /build\n\nRUN go mod download\nRUN go get -u github.com/natewong1313/go-react-ssr\nRUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags \"-w -X main.APP_ENV=production\" -a -o main\n\n\nFROM node:16-alpine as build-frontend\n\nADD ./frontend /frontend\nWORKDIR /frontend\n\nRUN npm install\n\n# if tailwind is enabled, use \"FROM node:16-alpine\" instead\nFROM alpine:latest\nCOPY --from=build-backend /build/main ./app/main\nCOPY --from=build-frontend /frontend ./app/frontend\n\nWORKDIR /app\nRUN chmod +x ./main\nEXPOSE 8080\nCMD [\"./main\"]\n```\n\nGo SSR has been tested and deployed on the following platforms:\n\n- [Fly.io](https://fly.io/) - [example app](https://sparkling-smoke-7627.fly.dev/)\n- [Render](https://render.com/) - [example app](https://my-gossr-test.onrender.com/)\n- [Hop.io](https://hop.io/) - [example app](https://my-gossr-test.hop.sh/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatewong1313%2Fgo-react-ssr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnatewong1313%2Fgo-react-ssr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnatewong1313%2Fgo-react-ssr/lists"}