{"id":15591642,"url":"https://github.com/starptech/go-web","last_synced_at":"2025-04-07T07:17:59.772Z","repository":{"id":24275178,"uuid":"100993898","full_name":"StarpTech/go-web","owner":"StarpTech","description":"Modern Web Application with Golang","archived":false,"fork":false,"pushed_at":"2023-04-30T03:04:21.000Z","size":9128,"stargazers_count":304,"open_issues_count":9,"forks_count":60,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-31T06:05:31.202Z","etag":null,"topics":["custom-elements","go","gorm","starter-kit"],"latest_commit_sha":null,"homepage":null,"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/StarpTech.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2017-08-21T21:25:49.000Z","updated_at":"2025-02-27T10:14:00.000Z","dependencies_parsed_at":"2024-01-22T04:50:42.359Z","dependency_job_id":null,"html_url":"https://github.com/StarpTech/go-web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarpTech%2Fgo-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarpTech%2Fgo-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarpTech%2Fgo-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StarpTech%2Fgo-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StarpTech","download_url":"https://codeload.github.com/StarpTech/go-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608160,"owners_count":20965953,"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":["custom-elements","go","gorm","starter-kit"],"created_at":"2024-10-02T23:42:12.581Z","updated_at":"2025-04-07T07:17:59.749Z","avatar_url":"https://github.com/StarpTech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![big-gopher](big-gopher.png)\n\n[![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)\n[![Build Status](https://github.com/StarpTech/go-web/workflows/Go/badge.svg)](https://github.com/StarpTech/go-web/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/StarpTech/go-web)](https://goreportcard.com/report/github.com/StarpTech/go-web)\n\n# Go-Web\n\nModern Web Application with Golang \"Keep it simple, stupid\"\n\n# Stack\n\n## Backend\n\n- HTTP Middleware [Echo](https://echo.labstack.com/)\n- ORM library [gorm](https://github.com/jinzhu/gorm)\n- Configuration [env](https://github.com/caarlos0/env)\n- Load ENV variables from .env file [godotenv](https://github.com/joho/godotenv)\n- Payload validation [validator](https://github.com/go-playground/validator)\n- Cache [Redis](https://github.com/go-redis/redis)\n- Localization [gotext](https://github.com/leonelquinteros/gotext)\n- Database [CockroachDB](https://github.com/cockroachdb/cockroach)\n- Releasing [goreleaser](https://github.com/goreleaser/goreleaser)\n\n## Frontend\n\n- Server side templating [Go Templates](https://golang.org/pkg/text/template/)\n- Module Bundler [Parcel bundler](https://github.com/parcel-bundler/parcel)\n- Javascript UI library [React](https://github.com/facebook/react)\n\n# Getting Started\n\n## Project structure\n\nFollows https://github.com/golang-standards/project-layout\n\n## Building From Source\n\nThis project requires Go +1.13 and Go module support.\n\nTo build the project run:\n\n```\nmake\n```\n\n## Bootstrap infrastructure and run application\n\nThis project requires docker and docker compose to run the required services.\n\n1. To run the services:\n\n```\ndocker-compose up\n```\n\n2. To create database\n\n```\ndocker run --network=\"host\" -it cockroachdb/cockroach:v19.2.1 sql --insecure -e \"$(cat ./scripts/create.db.sql)\"\n```\n\n3. Build [web application](ui/README.md)\n\n4. Start server\n\n```\ngo run main.go\n```\n\n5. Navigate to users list [page](http://127.0.0.1/users)\n\n## CI and Static Analysis\n\n### CI\n\nAll pull requests will run through CI, which is currently hosted by Github-CI.\nCommunity contributors should be able to see the outcome of this process by looking at the checks on their PR.\nPlease fix any issues to ensure a prompt review from members of the team.\n\n### Static Analysis\n\nThis project uses the following static analysis tools.\nFailure during the running of any of these tools results in a failed build.\nGenerally, code must be adjusted to satisfy these tools, though there are exceptions.\n\n- [go vet](https://golang.org/cmd/vet/) checks for Go code that should be considered incorrect.\n- [go fmt](https://golang.org/cmd/gofmt/) checks that Go code is correctly formatted.\n- [golangci-lint](https://github.com/golangci/golangci-lintt) checks for things like: unused code, code that can be simplified, code that is incorrect and code that will have performance issues.\n- [go mod tidy](https://tip.golang.org/cmd/go/#hdr-Add_missing_and_remove_unused_modules) ensures that the source code and go.mod agree.\n\n# Releasing\n\nWhen a new tag is pushed, the version is released with [goreleaser](https://github.com/goreleaser/goreleaser).\n\n```\n$ git tag -a v0.1.0 -m \"First release\"\n$ git push origin v0.1.0 # =\u003e want to release v0.1.0\n```\n\n# Tooling\n\n- IDE plugin [vscode-go](https://github.com/Microsoft/vscode-go)\n- Administration of cockroachdb [DBeaver](https://dbeaver.io/)\n- REST client [Postman](https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en)\n- Go testing in the browser [go-convey](https://github.com/smartystreets/goconvey)\n- Benchmarking [bombardier](http://github.com/codesenberg/bombardier)\n\n# Documentation\n\n```\n$ godoc github.com/starptech/go-web/pkg/controller\n$ godoc -http=:6060\n```\n\nVisit localhost:6060 and search for `go-web`\n\n# Benchmarking\n\n```\n$ bombardier -c 10 -n 10000 http://localhost:8080/users\n```\n\n# Cockroachdb Cluster overview\n\nhttp://localhost:8111/\n\n## Deploy on Heroku\n\n[![Heroku Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/StarpTech/go-web)\n\n# Further reading\n\n- http://www.alexedwards.net/blog/organising-database-access\n- https://12factor.net/\n- https://dev.otto.de/2015/09/30/on-monoliths-and-microservices/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarptech%2Fgo-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarptech%2Fgo-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarptech%2Fgo-web/lists"}