{"id":20509410,"url":"https://github.com/bastean/dsgo","last_synced_at":"2026-05-03T21:35:21.286Z","repository":{"id":249766868,"uuid":"820696803","full_name":"bastean/dsgo","owner":"bastean","description":"Discord Got.","archived":false,"fork":false,"pushed_at":"2024-07-24T03:30:37.000Z","size":2291,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T06:05:52.060Z","etag":null,"topics":["discordgo","dsgo","fiber","fomantic-ui","go","gorm","mysql","sqlite","templ"],"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/bastean.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-06-27T02:11:33.000Z","updated_at":"2024-07-24T03:26:03.000Z","dependencies_parsed_at":"2024-11-15T20:26:59.114Z","dependency_job_id":"5253cae7-2504-4e06-94a8-6ad13e25e57e","html_url":"https://github.com/bastean/dsgo","commit_stats":null,"previous_names":["bastean/dsgo"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/bastean/dsgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastean%2Fdsgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastean%2Fdsgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastean%2Fdsgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastean%2Fdsgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bastean","download_url":"https://codeload.github.com/bastean/dsgo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bastean%2Fdsgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32586187,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["discordgo","dsgo","fiber","fomantic-ui","go","gorm","mysql","sqlite","templ"],"created_at":"2024-11-15T20:24:36.341Z","updated_at":"2026-05-03T21:35:21.271Z","avatar_url":"https://github.com/bastean.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\n\u003c!-- [![logo readme](https://raw.githubusercontent.com/bastean/dsgo/main/assets/readme/logo.png)](https://github.com/bastean) --\u003e\n\n[![logo readme](assets/readme/logo.png)](https://github.com/bastean/dsgo)\n\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n\u003e Example of interoperability between a Web App and a Discord Bot using a layered architecture.\n\n\u003c/div\u003e\n\n\u003e [!IMPORTANT]\n\u003e\n\u003e - `dsGO` is still in the early stages of development.\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![license MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![go report card](https://goreportcard.com/badge/github.com/bastean/dsgo)](https://goreportcard.com/report/github.com/bastean/dsgo)\n[![commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://github.com/commitizen/cz-cli)\n[![release it](https://img.shields.io/badge/%F0%9F%93%A6%F0%9F%9A%80-release--it-orange.svg)](https://github.com/release-it/release-it)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![upgrade workflow](https://github.com/bastean/dsgo/actions/workflows/upgrade.yml/badge.svg)](https://github.com/bastean/dsgo/actions/workflows/upgrade.yml)\n[![ci workflow](https://github.com/bastean/dsgo/actions/workflows/ci.yml/badge.svg)](https://github.com/bastean/dsgo/actions/workflows/ci.yml)\n[![release workflow](https://github.com/bastean/dsgo/actions/workflows/release.yml/badge.svg)](https://github.com/bastean/dsgo/actions/workflows/release.yml)\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![go reference](https://pkg.go.dev/badge/github.com/bastean/dsgo.svg)](https://pkg.go.dev/github.com/bastean/dsgo)\n[![github release](https://img.shields.io/github/v/release/bastean/dsgo.svg)](https://github.com/bastean/dsgo/releases)\n\n\u003c/div\u003e\n\n## Showcase\n\n\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"assets/readme/desktop-home.png\" /\u003e\n\n\u003c/div\u003e\n\n## CLI\n\n### Installation\n\n```bash\ngo install github.com/bastean/dsgo/cmd/dsgo@latest\n```\n\n### Usage\n\n\u003e [!NOTE]\n\u003e\n\u003e - We can follow this guide [\"Building your first Discord app\"](https://discord.com/developers/docs/quick-start/getting-started#step-1-creating-an-app) to create a new app in case we do not have one already created.\n\u003e - SQLite will be used as the default database instead of MySQL.\n\n```bash\ndsgo -h\n```\n\n```text\nUsage: dsgo [OPTIONS]\n\nExample of interoperability between a Web App and a Discord Bot using a layered architecture.\n\n  -app string\n        Discord App Id Token (required)\n  -database string\n        SQLite database file path (default \"In-Memory\")\n  -guild string\n        Discord Test Guild Id (optional)\n  -port string\n        Fiber Server Port (optional)\n  -token string\n        Discord Bot Token (required)\n```\n\n## Docker (Demo)\n\n### Usage\n\n\u003e [!NOTE]\n\u003e\n\u003e - [System Requirements](#locally)\n\u003e - We must define our own **Discord** configuration in the file [.env.demo](deployments/.env.demo) by modifying the variables `DSGO_BOT_DISCORD_*`.\n\u003e   - The required values are `DSGO_BOT_DISCORD_APP_ID` and `DSGO_BOT_DISCORD_APP_TOKEN`, the other values are optional.\n\u003e   - We can follow this guide [\"Building your first Discord app\"](https://discord.com/developers/docs/quick-start/getting-started#step-1-creating-an-app) to create a new app in case we do not have one already created.\n\u003e - MySQL will be used as the default database, SQLite will only be used in case there is a connection problem with MySQL.\n\n```bash\nmake demo\n```\n\n## Workflow\n\n### Functionality\n\nIt is a simple monolith where CRUD operations are performed from the Web App and the Discord Bot to the same database, this allows us to manage users from different applications (presentations).\n\n### Folders\n\n1. `pkg/context`\n\n   - It is the logical core that contains all the necessary functionalities that are independent of any presentation (application).\n\n2. `internal/pkg/service`\n\n   - It is responsible for initializing all “context” functionalities so that they are ready for use, as well as for “mapping” certain values to centralize all imports of presentations (applications) in a single place.\n\n3. `internal/app/(bot|server)`\n\n   - These applications will be used as “presentations” in order to serve the functionalities to an end user.\n\n## First Steps\n\n### Clone\n\n#### HTTPS\n\n```bash\ngit clone https://github.com/bastean/dsgo.git \u0026\u0026 cd dsgo\n```\n\n#### SSH\n\n```bash\ngit clone git@github.com:bastean/dsgo.git \u0026\u0026 cd dsgo\n```\n\n### Initialize\n\n#### Dev Container (recommended)\n\n1. System Requirements\n\n   - [Docker](https://docs.docker.com/get-docker)\n\n     - [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)\n\n2. Start VS Code\n\n   ```bash\n   code .\n   ```\n\n3. Open Command Palette\n\n   - Ctrl+Shift+P\n\n4. Run\n\n   ```txt\n   Dev Containers: Reopen in Container\n   ```\n\n#### Locally\n\n1. System Requirements\n\n   - [Go](https://go.dev/doc/install)\n   - [Node](https://nodejs.org/en/download)\n   - [Make](https://www.gnu.org/software/make)\n   - [Docker](https://docs.docker.com/get-docker)\n\n2. Run\n\n   ```bash\n   make init\n   ```\n\n#### ZIP\n\n1. [System Requirements](#locally)\n\n2. Run\n\n   ```bash\n   make init-zero\n   ```\n\n### Run\n\n#### ENVs\n\n\u003e [!IMPORTANT]\n\u003e Before running it, we must initialize the following environment variable files:\n\u003e\n\u003e - [.env.example](deployments/.env.example)\n\u003e   - We will have to create a `.env.(dev|test|prod)` for each runtime environment.\n\u003e   - In the [.env.example.demo](deployments/.env.example.demo) file, we can see the values that can be used.\n\u003e\n\u003e In case we only want to run the **Integration** or **Acceptance** tests, in addition to having the `.env.test` file, we must have the following files created:\n\u003e\n\u003e - [.env.example.test.integration](deployments/.env.example.test.integration)\n\u003e   - Rename the file to `.env.test.integration`.\n\u003e - [.env.example.test.acceptance](deployments/.env.example.test.acceptance)\n\u003e   - Rename the file to `.env.test.acceptance`.\n\n#### Development\n\n```bash\nmake compose-dev\n```\n\n#### Tests\n\n##### Unit\n\n```bash\nmake test-unit\n```\n\n##### Integration\n\n```bash\nmake compose-test-integration\n```\n\n##### Acceptance\n\n```bash\nmake compose-test-acceptance\n```\n\n##### Unit/Integration/Acceptance\n\n```bash\nmake compose-tests\n```\n\n#### Production\n\n```bash\nmake compose-prod\n```\n\n## Tech Stack\n\n#### Base\n\n- [Go](https://go.dev)\n- [Fiber](https://docs.gofiber.io)\n- [DiscordGo](https://github.com/bwmarrin/discordgo)\n- [templ](https://templ.guide)\n  - [Fomantic-UI](https://fomantic-ui.com)\n- [GORM](https://gorm.io)\n  - [MySQL](https://www.mysql.com)\n  - [SQLite](https://www.sqlite.org)\n\n#### Please see\n\n- [go.mod](go.mod)\n- [package.json](package.json)\n\n## Contributing\n\n- Contributions and Feedback are always welcome!\n  - [Open a new issue](https://github.com/bastean/dsgo/issues/new/choose)\n\n## License\n\n- [MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastean%2Fdsgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbastean%2Fdsgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbastean%2Fdsgo/lists"}