{"id":18508242,"url":"https://github.com/tqmvt/yolo-backend","last_synced_at":"2026-04-16T18:02:39.823Z","repository":{"id":205286161,"uuid":"713688344","full_name":"tqmvt/yolo-backend","owner":"tqmvt","description":"YOLO API using Go, Gin, Gorm, Logrus","archived":false,"fork":false,"pushed_at":"2023-11-10T13:23:04.000Z","size":61,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T09:51:32.963Z","etag":null,"topics":["api","game","gin","go","golang","gorm","logrus","p2e","postgresql","rest-api","yolo"],"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/tqmvt.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-03T03:13:27.000Z","updated_at":"2024-05-03T11:37:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"43d4f81d-ef95-4143-a850-2a8f2c774fa3","html_url":"https://github.com/tqmvt/yolo-backend","commit_stats":null,"previous_names":["tqmvt/saas","tqmvt/yolo-backend"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tqmvt/yolo-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqmvt%2Fyolo-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqmvt%2Fyolo-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqmvt%2Fyolo-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqmvt%2Fyolo-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tqmvt","download_url":"https://codeload.github.com/tqmvt/yolo-backend/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqmvt%2Fyolo-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31897870,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T17:33:00.867Z","status":"ssl_error","status_checked_at":"2026-04-16T17:32:57.401Z","response_time":69,"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":["api","game","gin","go","golang","gorm","logrus","p2e","postgresql","rest-api","yolo"],"created_at":"2024-11-06T15:13:48.778Z","updated_at":"2026-04-16T18:02:39.806Z","avatar_url":"https://github.com/tqmvt.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YOLO Backend\n\nWritten in Golang with Gin Framework and Gorm\n\n### Motivation\n\nWrite restful API for [YOLO](https://looksrare.org/yolo) game with fast development and developer friendly\n\n## Table of Contents\n\n- [Motivation](#motivation)\n- [Configuration Manage](#configuration-manage)\n  - [ENV Manage](#env-manage)\n  - [Server Configuration](#server-configuration)\n  - [Database Configuration](#database-configuration)\n  - [PgAdmin](#pg-admin)\n- [Installation](#installation)\n  - [Local Setup Instruction](#local-setup-instruction)\n  - [Develop Application in Docker with Live Reload](#develop-application-in-docker-with-live-reload)\n- [Deployment](#deployment)\n  - [Container Development Build](#container-development-build)\n  - [Container Production Build and Up](#container-production-build-and-up)\n- [Useful Commands](#useful-commands)\n- [ENV YAML Configure](#env-yaml-configure)\n- [Use Packages](#use-packages)\n\n### Configuration Manage\n\n#### ENV Manage\n\n- Default ENV Configuration Manage from `.env`. sample file `.env.example`\n\n```text\n# Server Configuration\nSECRET=h9wt*pasj6796j##w(w8=xaje8tpi6h*r\u0026hzgrz065u\u0026ed+k2)\nDEBUG=True # `False` in Production\nALLOWED_HOSTS=0.0.0.0\nSERVER_HOST=0.0.0.0\nSERVER_PORT=8000\n\n# Database Configuration\nMASTER_DB_NAME=test_pg_go\nMASTER_DB_USER=mamun\nMASTER_DB_PASSWORD=123\nMASTER_DB_HOST=postgres_db\nMASTER_DB_PORT=5432\nMASTER_DB_LOG_MODE=True # `False` in Production\nMASTER_SSL_MODE=disable\n\nREPLICA_DB_NAME=test_pg_go\nREPLICA_DB_USER=mamun\nREPLICA_DB_PASSWORD=123\nREPLICA_DB_HOST=localhost\nREPLICA_DB_PORT=5432\nREPLICA_DB_LOG_MODE=True # `False` in Production\nREPLICA_SSL_MODE=disable\n```\n\n- Server `DEBUG` set `False` in Production\n- Database Logger `MASTER_DB_LOG_MODE` and `REPLICA_DB_LOG_MODE` set `False` in production\n- If ENV Manage from YAML file add a config.yml file and configuration [db.go](config/db.go) and [server.go](config/server.go). See More [ENV YAML Configure](#env-yaml-configure)\n\n#### Server Configuration\n\n- Use [Gin](https://github.com/gin-gonic/gin) Web Framework\n\n#### Database Configuration\n\n- Use [GORM](https://github.com/go-gorm/gorm) as an ORM\n- Use database `MASTER_DB_HOST` value set as `localhost` for local development, and use `postgres_db` for docker development\n\n#### PG Admin\n\n- Check PG Admin on [http://0.0.0.0:5050/browser/](http://0.0.0.0:5050/browser/)\n- Login with Credential Email `admin@admin.com` Password `root`\n- Connect Database Host as `postgres_db`, DB Username and Password as per `.env` set\n- Note: if not configure `.env`, default Username `mamun` and password `123`\n\n### Installation\n\n#### Local Setup Instruction\n\nFollow these steps:\n\n- Copy [.env.example](.env.example) as `.env` and configure necessary values\n- To add all dependencies for a package in your module `go get .` in the current directory\n- Locally run `go run main.go` or `go build main.go` and run `./main`. or run `air` to host with hot reloading\n- Check Application health available on [0.0.0.0:8000/health](http://0.0.0.0:8000/health)\n\n#### Develop Application in Docker with Live Reload\n\nFollow these steps:\n\n- Make sure install the latest version of docker and docker-compose\n- Docker Installation for your desire OS https://docs.docker.com/engine/install/ubuntu/\n- Docker Composer Installation https://docs.docker.com/compose/install/\n- Run and Develop `make dev`\n- Check Application health available on [0.0.0.0:8000/health](http://0.0.0.0:8000/health)\n\n### Deployment\n\n#### Container Development Build\n\n- Run `make build`\n\n#### Container Production Build and Up\n\n- Run `make production`\n\n#### ENV Yaml Configure\n\n```yaml\ndatabase:\n  driver: \"postgres\"\n  dbname: \"test_pg_go\"\n  username: \"mamun\"\n  password: \"123\"\n  host: \"postgres_db\" # use `localhost` for local development\n  port: \"5432\"\n  ssl_mode: disable\n  log_mode: false\n\nserver:\n  host: \"0.0.0.0\"\n  port: \"8000\"\n  secret: \"secret\"\n  allow_hosts: \"localhost\"\n  debug: false #use `false` in production\n  request:\n    timeout: 100\n```\n\n- [Server Config](config/server.go)\n\n```go\nfunc ServerConfig() string {\nviper.SetDefault(\"server.host\", \"0.0.0.0\")\nviper.SetDefault(\"server.port\", \"8000\")\nappServer := fmt.Sprintf(\"%s:%s\", viper.GetString(\"server.host\"), viper.GetString(\"server.port\"))\nreturn appServer\n}\n```\n\n- [DB Config](config/db.go)\n\n```go\nfunc DbConfiguration() string {\n\ndbname := viper.GetString(\"database.dbname\")\nusername := viper.GetString(\"database.username\")\npassword := viper.GetString(\"database.password\")\nhost := viper.GetString(\"database.host\")\nport := viper.GetString(\"database.port\")\nsslMode := viper.GetString(\"database.ssl_mode\")\n\ndsn := fmt.Sprintf(\"host=%s user=%s password=%s dbname=%s port=%s sslmode=%s\",\nhost, username, password, dbname, port, sslMode)\nreturn dsn\n}\n```\n\n### Useful Commands\n\n- `make dev`: make dev for development work\n- `make build`: make build container\n- `make production`: docker production build and up\n- `clean`: clean for all clear docker images\n\n### Use Packages\n\n- [Viper](https://github.com/spf13/viper) - Go configuration with fangs.\n- [Gorm](https://github.com/go-gorm/gorm) - The fantastic ORM library for Golang\n- [Logger](https://github.com/sirupsen/logrus) - Structured, pluggable logging for Go.\n- [Air](https://github.com/cosmtrek/air) - Live reload for Go apps (Docker Development)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftqmvt%2Fyolo-backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftqmvt%2Fyolo-backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftqmvt%2Fyolo-backend/lists"}