{"id":21090783,"url":"https://github.com/nortex-dev/modular-dbot-template","last_synced_at":"2025-03-14T06:16:07.053Z","repository":{"id":223050756,"uuid":"759187019","full_name":"NorteX-dev/modular-dbot-template","owner":"NorteX-dev","description":"A fully modular Discord bot template.","archived":false,"fork":false,"pushed_at":"2024-03-11T19:25:49.000Z","size":136,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T01:12:24.516Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/NorteX-dev.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}},"created_at":"2024-02-17T22:09:34.000Z","updated_at":"2024-11-10T06:03:05.000Z","dependencies_parsed_at":"2024-02-17T23:22:38.498Z","dependency_job_id":"71031d05-a3c7-4dfd-aa98-fc50c6d004e8","html_url":"https://github.com/NorteX-dev/modular-dbot-template","commit_stats":null,"previous_names":["nortex-dev/modular-dbot-template"],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NorteX-dev%2Fmodular-dbot-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NorteX-dev%2Fmodular-dbot-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NorteX-dev%2Fmodular-dbot-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NorteX-dev%2Fmodular-dbot-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NorteX-dev","download_url":"https://codeload.github.com/NorteX-dev/modular-dbot-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532556,"owners_count":20306157,"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":[],"created_at":"2024-11-19T21:40:17.570Z","updated_at":"2025-03-14T06:16:07.015Z","avatar_url":"https://github.com/NorteX-dev.png","language":"TypeScript","readme":"# Modular Discord Bot Template\n\n## modular-dbot-template\n\n⭐ A fully modular Discord bot template.\n\nIt is meant to streamline creation of Discord bots in a concern-separation paradigm where you use \"modules\" to structure your app.\n\n## The idea behind it\n\nThe \"core\" is responsible for loading and managing modules.\nIt does not (and should never) have any front-facing functionality, like commands, events, components, API routes, database accesses etc. Core files are located in `/lib`, `index.ts`.\n\n`configShape.ts` and `webserver.ts` are also part of the core, but meant to be editable in the development process.\n\nA module should be removable without causing other modules to break - except those, which depend on it.\n\n### Exceptions\n\nThe only aspect except of this rule is database schema definition.\n\nSince this template uses Prisma as the model definition tool and Prisma uses a single file for schema definition, concern separation in this case is impossible.\nHowever, any database accesses, should nonetheless be streamlined to the concept-separation model.\n\n## Concepts\n\n### Dependency trees\n\nA module can depend on other modules. This means a module will not be loaded if not all of its dependencies are present.\n\nIn the case of a missing dependency, the module will fail to load and will output a warning.\n\n### Configuration\n\nThis template uses a single configuration file available to access from any module. It is stored in YAML and uses a strict validation schema.\n\nModules have access to the whole config. However, semantically, should only access properties nested in the object named by the module id.\n\nFor example, a `ticketing` module should only ever access `config.ticketing.*`.\n\n## The stack\n\nThis template utilises:\n\n- `esmodule` - runs on ES Modules (nodenext); this means that Node v18 is required and module-compatible packages are required\n- `typescript` - provides type safety and better quality code\n- [`discordjs`](https://github.com/discordjs/discord.js) - library for connecting to Discord\n- [`nhandler`](https://github.com/nortex-dev/nhandler) - handler for loading, updating and managing commands, events and component callbacks.\n- [`prisma`](https://github.com/prisma/prisma) - database ORM and query engine\n- [`hono`](https://github.com/honojs/hono) - the next-gen web framework that runs natively on ES modules, and supports cloudflare workers among many others\n\nOptional:\n\n- [`eslint`](https://eslint.org/) - linter for keeping consistency\n- [`prettier`](https://prettier.io/) - opinionated code formatter for keeping constant formatting across the codebase\n\n## Conventions for API Routes\n\nEach module can export a `router` prop in the metadata. This router prop should be an instance of `Hono` and will, by default, be mounted on `/\u003cmodule id\u003e`, for example `/ticketing`.\n\nThis can however be changed. By exporting `routerPrefix` alongside the `router` and specifying a string like `\"/tickets\"` you can rewrite the route prefix.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnortex-dev%2Fmodular-dbot-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnortex-dev%2Fmodular-dbot-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnortex-dev%2Fmodular-dbot-template/lists"}