{"id":15355625,"url":"https://github.com/songquanpeng/gin-template","last_synced_at":"2025-04-12T06:13:32.873Z","repository":{"id":56871204,"uuid":"526800150","full_name":"songquanpeng/gin-template","owner":"songquanpeng","description":"用于 Gin \u0026 React 项目的模板. Template for Gin \u0026 React projects.","archived":false,"fork":false,"pushed_at":"2024-12-27T13:15:42.000Z","size":608,"stargazers_count":313,"open_issues_count":4,"forks_count":70,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-12T06:13:25.194Z","etag":null,"topics":["gin","go","react","semantic-ui","template"],"latest_commit_sha":null,"homepage":"https://gin-template.vercel.app","language":"JavaScript","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/songquanpeng.png","metadata":{"files":{"readme":"README.en.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":"2022-08-20T01:55:05.000Z","updated_at":"2025-04-11T10:30:33.000Z","dependencies_parsed_at":"2024-06-21T01:07:18.092Z","dependency_job_id":"c2dc2896-8179-40e2-a1d5-453a8a9a767e","html_url":"https://github.com/songquanpeng/gin-template","commit_stats":{"total_commits":203,"total_committers":3,"mean_commits":67.66666666666667,"dds":"0.40394088669950734","last_synced_commit":"97bb848f65d59aff49c081eb75508fb391f6faee"},"previous_names":[],"tags_count":37,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songquanpeng%2Fgin-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songquanpeng%2Fgin-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songquanpeng%2Fgin-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/songquanpeng%2Fgin-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/songquanpeng","download_url":"https://codeload.github.com/songquanpeng/gin-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525138,"owners_count":21118619,"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":["gin","go","react","semantic-ui","template"],"created_at":"2024-10-01T12:24:59.355Z","updated_at":"2025-04-12T06:13:32.850Z","avatar_url":"https://github.com/songquanpeng.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"right\"\u003e\n    \u003ca href=\"./README.md\"\u003e中文\u003c/a\u003e | \u003cstrong\u003eEnglish\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/songquanpeng/gin-template\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/songquanpeng/gin-template/main/web/public/logo.png\" width=\"150\" height=\"150\" alt=\"gin-template logo\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n# Gin Template\n\n_✨ Template for Gin \u0026 React projects ✨_\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://raw.githubusercontent.com/songquanpeng/gin-template/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/songquanpeng/gin-template?color=brightgreen\" alt=\"license\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/songquanpeng/gin-template/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/v/release/songquanpeng/gin-template?color=brightgreen\u0026include_prereleases\" alt=\"release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://hub.docker.com/repository/docker/justsong/gin-template\"\u003e\n    \u003cimg src=\"https://img.shields.io/docker/pulls/justsong/gin-template?color=brightgreen\" alt=\"docker pull\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/songquanpeng/gin-template/releases/latest\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/downloads/songquanpeng/gin-template/total?color=brightgreen\u0026include_prereleases\" alt=\"release\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/songquanpeng/go-file\"\u003e\n    \u003cimg src=\"https://goreportcard.com/badge/github.com/songquanpeng/gin-template\" alt=\"GoReportCard\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/songquanpeng/gin-template/releases\"\u003eDownload\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/songquanpeng/gin-template/blob/main/README.en.md#deployment\"\u003eTutorial\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/songquanpeng/gin-template/issues\"\u003eFeedback\u003c/a\u003e\n  ·\n  \u003ca href=\"https://gin-template.vercel.app/\"\u003eDemo\u003c/a\u003e\n\u003c/p\u003e\n\n## Features\n+ [x] Built-in user management.\n+ [x] Built-in file management.\n+ [x] [GitHub OAuth](https://github.com/settings/applications/new).\n+ [x] WeChat official account authorization (need [wechat-server](https://github.com/songquanpeng/wechat-server)).\n+ [x] Email verification \u0026 password reset.\n+ [x] Request rate limiting.\n+ [x] Static files caching.\n+ [x] Mobile friendly UI.\n+ [x] Token based authorization.\n+ [x] Use GitHub Actions to build releases \u0026 Docker images.\n+ [x] Cloudflare Turnstile user validation.\n\n## Deployment\n### Manual deployment\n1. Download built binary from [GitHub Releases](https://github.com/songquanpeng/gin-template/releases/latest) or build from source:\n   ```shell\n   git clone https://github.com/songquanpeng/gin-template.git\n   go mod download\n   go build -ldflags \"-s -w\" -o gin-template\n   ````\n2. Run it:\n   ```shell\n   chmod u+x gin-template\n   ./gin-template --port 3000 --log-dir ./logs\n   ```\n3. Visit [http://localhost:3000/](http://localhost:3000/) and login. The username for the initial account is `root` and the password is `123456`.\n\n### Deploy with Docker\nExecute: `docker run -d --restart always -p 3000:3000 -v /home/ubuntu/data/gin-template:/data -v /etc/ssl/certs:/etc/ssl/certs:ro justsong/gin-template`\n\nData will be saved in `/home/ubuntu/data/gin-template`.\n\n## Configurations\nThe system works out of the box.\n\nYou can configure the system by set environment variables or specify command line arguments.\n\nAfter the system starts, use `root` user to log in to the system and do further configuration.\n\n### Environment Variables\n1. `REDIS_CONN_STRING`: when set, Redis will be used as the storage for request rate limitation instead of memory storage.\n   + Example: `REDIS_CONN_STRING=redis://default:redispw@localhost:49153`\n2. `SESSION_SECRET`: when set, a fixed session key will be used so that the logged-in users' cookie remains valid across system reboots.\n   + Example: `SESSION_SECRET=random_string`\n3. `SQL_DSN`: when set, the target SQL database will be used instead of SQLite.\n   + Example: `SQL_DSN=root:123456@tcp(localhost:3306)/gin-template`\n\n### Command line Arguments\n1. `--port \u003cport_number\u003e`: specify the port number, the default value is `3000`.\n   + Example: `--port 3000`\n2. `--log-dir \u003clog_dir\u003e`: specify the log dir, if not set, the log won't be saved.\n   + Example: `--log-dir ./logs`\n3. `--version`: print the version and exit.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsongquanpeng%2Fgin-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsongquanpeng%2Fgin-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsongquanpeng%2Fgin-template/lists"}