@venizia/ignis-docs 0.0.1-1 → 0.0.1-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +102 -0
- package/README.md +459 -0
- package/dist/mcp-server/common/config.d.ts +64 -0
- package/dist/mcp-server/common/config.d.ts.map +1 -0
- package/dist/mcp-server/common/config.js +82 -0
- package/dist/mcp-server/common/config.js.map +1 -0
- package/dist/mcp-server/common/index.d.ts +3 -0
- package/dist/mcp-server/common/index.d.ts.map +1 -0
- package/dist/mcp-server/common/index.js.map +1 -0
- package/dist/mcp-server/common/paths.d.ts.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/common/paths.js +13 -11
- package/dist/mcp-server/common/paths.js.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/helpers/docs.helper.d.ts +5 -5
- package/dist/mcp-server/helpers/docs.helper.d.ts.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/helpers/docs.helper.js +38 -34
- package/dist/mcp-server/helpers/docs.helper.js.map +1 -0
- package/dist/mcp-server/helpers/github.helper.d.ts +37 -0
- package/dist/mcp-server/helpers/github.helper.d.ts.map +1 -0
- package/dist/mcp-server/helpers/github.helper.js +100 -0
- package/dist/mcp-server/helpers/github.helper.js.map +1 -0
- package/dist/mcp-server/helpers/index.d.ts +4 -0
- package/dist/mcp-server/helpers/index.d.ts.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/helpers/index.js +1 -0
- package/dist/mcp-server/helpers/index.js.map +1 -0
- package/dist/mcp-server/helpers/logger.helper.d.ts.map +1 -0
- package/dist/mcp-server/helpers/logger.helper.js.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/index.d.ts.map +1 -1
- package/dist/mcp-server/index.js +90 -0
- package/dist/mcp-server/index.js.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/tools/base.tool.d.ts +8 -12
- package/dist/mcp-server/tools/base.tool.d.ts.map +1 -0
- package/{mcp-server/dist → dist/mcp-server}/tools/base.tool.js +3 -5
- package/dist/mcp-server/tools/base.tool.js.map +1 -0
- package/{mcp-server/dist/tools/get-doc-content.tool.d.ts → dist/mcp-server/tools/docs/get-document-content.tool.d.ts} +13 -17
- package/dist/mcp-server/tools/docs/get-document-content.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools/get-doc-content.tool.js → dist/mcp-server/tools/docs/get-document-content.tool.js} +20 -22
- package/dist/mcp-server/tools/docs/get-document-content.tool.js.map +1 -0
- package/{mcp-server/dist/tools/get-doc-metadata.tool.d.ts → dist/mcp-server/tools/docs/get-document-metadata.tool.d.ts} +21 -25
- package/dist/mcp-server/tools/docs/get-document-metadata.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools/get-doc-metadata.tool.js → dist/mcp-server/tools/docs/get-document-metadata.tool.js} +35 -27
- package/dist/mcp-server/tools/docs/get-document-metadata.tool.js.map +1 -0
- package/dist/mcp-server/tools/docs/get-package-overview.tool.d.ts +50 -0
- package/dist/mcp-server/tools/docs/get-package-overview.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/docs/get-package-overview.tool.js +221 -0
- package/dist/mcp-server/tools/docs/get-package-overview.tool.js.map +1 -0
- package/dist/mcp-server/tools/docs/index.d.ts +7 -0
- package/dist/mcp-server/tools/docs/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/docs/index.js +23 -0
- package/dist/mcp-server/tools/docs/index.js.map +1 -0
- package/{mcp-server/dist/tools → dist/mcp-server/tools/docs}/list-categories.tool.d.ts +3 -3
- package/dist/mcp-server/tools/docs/list-categories.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools → dist/mcp-server/tools/docs}/list-categories.tool.js +10 -9
- package/dist/mcp-server/tools/docs/list-categories.tool.js.map +1 -0
- package/{mcp-server/dist/tools/list-docs.tool.d.ts → dist/mcp-server/tools/docs/list-documents.tool.d.ts} +5 -5
- package/dist/mcp-server/tools/docs/list-documents.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools/list-docs.tool.js → dist/mcp-server/tools/docs/list-documents.tool.js} +15 -14
- package/dist/mcp-server/tools/docs/list-documents.tool.js.map +1 -0
- package/{mcp-server/dist/tools/search-docs.tool.d.ts → dist/mcp-server/tools/docs/search-documents.tool.d.ts} +23 -19
- package/dist/mcp-server/tools/docs/search-documents.tool.d.ts.map +1 -0
- package/{mcp-server/dist/tools/search-docs.tool.js → dist/mcp-server/tools/docs/search-documents.tool.js} +29 -25
- package/dist/mcp-server/tools/docs/search-documents.tool.js.map +1 -0
- package/dist/mcp-server/tools/github/index.d.ts +5 -0
- package/dist/mcp-server/tools/github/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/index.js +21 -0
- package/dist/mcp-server/tools/github/index.js.map +1 -0
- package/dist/mcp-server/tools/github/list-project-files.tool.d.ts +28 -0
- package/dist/mcp-server/tools/github/list-project-files.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/list-project-files.tool.js +98 -0
- package/dist/mcp-server/tools/github/list-project-files.tool.js.map +1 -0
- package/dist/mcp-server/tools/github/search-code.tool.d.ts +42 -0
- package/dist/mcp-server/tools/github/search-code.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/search-code.tool.js +194 -0
- package/dist/mcp-server/tools/github/search-code.tool.js.map +1 -0
- package/dist/mcp-server/tools/github/verify-dependencies.tool.d.ts +55 -0
- package/dist/mcp-server/tools/github/verify-dependencies.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/verify-dependencies.tool.js +167 -0
- package/dist/mcp-server/tools/github/verify-dependencies.tool.js.map +1 -0
- package/dist/mcp-server/tools/github/view-source-file.tool.d.ts +26 -0
- package/dist/mcp-server/tools/github/view-source-file.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/github/view-source-file.tool.js +91 -0
- package/dist/mcp-server/tools/github/view-source-file.tool.js.map +1 -0
- package/dist/mcp-server/tools/index.d.ts +4 -0
- package/dist/mcp-server/tools/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/index.js +22 -0
- package/dist/mcp-server/tools/index.js.map +1 -0
- package/package.json +46 -23
- package/wiki/changelogs/2025-12-16-initial-architecture.md +145 -0
- package/wiki/changelogs/2025-12-16-model-repo-datasource-refactor.md +300 -0
- package/wiki/changelogs/2025-12-17-refactor.md +90 -0
- package/wiki/changelogs/2025-12-18-performance-optimizations.md +130 -0
- package/wiki/changelogs/2025-12-18-repository-validation-security.md +249 -0
- package/wiki/changelogs/index.md +33 -0
- package/wiki/changelogs/planned-transaction-support.md +216 -0
- package/wiki/changelogs/template.md +123 -0
- package/wiki/get-started/5-minute-quickstart.md +1 -1
- package/wiki/get-started/best-practices/api-usage-examples.md +54 -8
- package/wiki/get-started/best-practices/architectural-patterns.md +43 -2
- package/wiki/get-started/best-practices/code-style-standards.md +41 -0
- package/wiki/get-started/best-practices/common-pitfalls.md +5 -3
- package/wiki/get-started/best-practices/contribution-workflow.md +40 -6
- package/wiki/get-started/best-practices/data-modeling.md +177 -0
- package/wiki/get-started/best-practices/security-guidelines.md +3 -1
- package/wiki/get-started/building-a-crud-api.md +63 -78
- package/wiki/get-started/core-concepts/components.md +4 -2
- package/wiki/get-started/core-concepts/controllers.md +14 -14
- package/wiki/get-started/core-concepts/dependency-injection.md +13 -1
- package/wiki/get-started/core-concepts/persistent.md +383 -431
- package/wiki/get-started/core-concepts/services.md +21 -27
- package/wiki/get-started/mcp-docs-server.md +130 -32
- package/wiki/get-started/philosophy.md +198 -25
- package/wiki/get-started/quickstart.md +1 -1
- package/wiki/public/logo.svg +1 -0
- package/wiki/references/base/application.md +5 -5
- package/wiki/references/base/components.md +1 -1
- package/wiki/references/base/controllers.md +43 -17
- package/wiki/references/base/datasources.md +195 -33
- package/wiki/references/base/dependency-injection.md +8 -7
- package/wiki/references/base/models.md +713 -25
- package/wiki/references/base/repositories.md +475 -22
- package/wiki/references/base/services.md +2 -2
- package/wiki/references/components/authentication.md +228 -10
- package/wiki/references/components/health-check.md +1 -1
- package/wiki/references/components/index.md +4 -2
- package/wiki/references/components/static-asset.md +1289 -0
- package/wiki/references/components/swagger.md +1 -1
- package/wiki/references/helpers/error.md +2 -2
- package/wiki/references/helpers/inversion.md +29 -14
- package/wiki/references/helpers/storage.md +538 -11
- package/wiki/references/src-details/core.md +21 -6
- package/wiki/references/src-details/docs.md +19 -9
- package/wiki/references/src-details/inversion.md +4 -4
- package/wiki/references/src-details/mcp-server.md +185 -234
- package/wiki/references/utilities/index.md +1 -1
- package/wiki/references/utilities/request.md +162 -3
- package/mcp-server/dist/common/config.d.ts +0 -27
- package/mcp-server/dist/common/config.d.ts.map +0 -1
- package/mcp-server/dist/common/config.js +0 -27
- package/mcp-server/dist/common/config.js.map +0 -1
- package/mcp-server/dist/common/index.d.ts +0 -3
- package/mcp-server/dist/common/index.d.ts.map +0 -1
- package/mcp-server/dist/common/index.js.map +0 -1
- package/mcp-server/dist/common/paths.d.ts.map +0 -1
- package/mcp-server/dist/common/paths.js.map +0 -1
- package/mcp-server/dist/helpers/docs.helper.d.ts.map +0 -1
- package/mcp-server/dist/helpers/docs.helper.js.map +0 -1
- package/mcp-server/dist/helpers/index.d.ts +0 -3
- package/mcp-server/dist/helpers/index.d.ts.map +0 -1
- package/mcp-server/dist/helpers/index.js.map +0 -1
- package/mcp-server/dist/helpers/logger.helper.d.ts.map +0 -1
- package/mcp-server/dist/helpers/logger.helper.js.map +0 -1
- package/mcp-server/dist/index.js +0 -62
- package/mcp-server/dist/index.js.map +0 -1
- package/mcp-server/dist/tools/base.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/base.tool.js.map +0 -1
- package/mcp-server/dist/tools/get-doc-content.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/get-doc-content.tool.js.map +0 -1
- package/mcp-server/dist/tools/get-doc-metadata.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/get-doc-metadata.tool.js.map +0 -1
- package/mcp-server/dist/tools/index.d.ts +0 -8
- package/mcp-server/dist/tools/index.d.ts.map +0 -1
- package/mcp-server/dist/tools/index.js +0 -18
- package/mcp-server/dist/tools/index.js.map +0 -1
- package/mcp-server/dist/tools/list-categories.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/list-categories.tool.js.map +0 -1
- package/mcp-server/dist/tools/list-docs.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/list-docs.tool.js.map +0 -1
- package/mcp-server/dist/tools/search-docs.tool.d.ts.map +0 -1
- package/mcp-server/dist/tools/search-docs.tool.js.map +0 -1
- /package/{mcp-server/dist → dist/mcp-server}/common/index.js +0 -0
- /package/{mcp-server/dist → dist/mcp-server}/common/paths.d.ts +0 -0
- /package/{mcp-server/dist → dist/mcp-server}/helpers/logger.helper.d.ts +0 -0
- /package/{mcp-server/dist → dist/mcp-server}/helpers/logger.helper.js +0 -0
- /package/{mcp-server/dist → dist/mcp-server}/index.d.ts +0 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Ignis Framework License
|
|
2
|
+
|
|
3
|
+
Ignis is a TypeScript Server Infrastructure framework built on [Hono](https://hono.dev/).
|
|
4
|
+
|
|
5
|
+
## MIT License
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2025 VENIZIA Ltd. Co.
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Packages
|
|
30
|
+
|
|
31
|
+
This monorepo contains the following packages, all licensed under MIT:
|
|
32
|
+
|
|
33
|
+
| Package | Description |
|
|
34
|
+
|---------|-------------|
|
|
35
|
+
| `@venizia/ignis` | Core framework - controllers, services, decorators |
|
|
36
|
+
| `@venizia/ignis-helpers` | Utility helpers - logging, cron, Redis, queues, storage |
|
|
37
|
+
| `@venizia/ignis-inversion` | Dependency Injection & IoC container |
|
|
38
|
+
| `@venizia/dev-configs` | Shared ESLint, Prettier, TypeScript configurations |
|
|
39
|
+
| `@venizia/ignis-docs` | Documentation and MCP Server |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Third-Party Dependencies
|
|
44
|
+
|
|
45
|
+
Ignis uses the following open-source libraries. We are grateful to the authors and contributors of these projects.
|
|
46
|
+
|
|
47
|
+
### Core Dependencies
|
|
48
|
+
|
|
49
|
+
| Library | License | Description |
|
|
50
|
+
|---------|---------|-------------|
|
|
51
|
+
| [Hono](https://github.com/honojs/hono) | MIT | Ultrafast web framework |
|
|
52
|
+
| [Zod](https://github.com/colinhacks/zod) | MIT | TypeScript-first schema validation |
|
|
53
|
+
| [Drizzle ORM](https://github.com/drizzle-team/drizzle-orm) | Apache-2.0 | TypeScript ORM |
|
|
54
|
+
| [Jose](https://github.com/panva/jose) | MIT | JavaScript Object Signing and Encryption |
|
|
55
|
+
|
|
56
|
+
### Helpers Dependencies
|
|
57
|
+
|
|
58
|
+
| Library | License | Description |
|
|
59
|
+
|---------|---------|-------------|
|
|
60
|
+
| [Winston](https://github.com/winstonjs/winston) | MIT | Universal logging library |
|
|
61
|
+
| [BullMQ](https://github.com/taskforcesh/bullmq) | MIT | Message queue and job scheduling |
|
|
62
|
+
| [IORedis](https://github.com/redis/ioredis) | MIT | Redis client for Node.js |
|
|
63
|
+
| [MinIO](https://github.com/minio/minio-js) | Apache-2.0 | S3-compatible object storage client |
|
|
64
|
+
| [Axios](https://github.com/axios/axios) | MIT | HTTP client |
|
|
65
|
+
| [Day.js](https://github.com/iamkun/dayjs) | MIT | Date manipulation library |
|
|
66
|
+
| [Cron](https://github.com/kelektiv/node-cron) | MIT | Cron job scheduler |
|
|
67
|
+
| [Socket.IO](https://github.com/socketio/socket.io) | MIT | Real-time bidirectional communication |
|
|
68
|
+
| [MQTT.js](https://github.com/mqttjs/MQTT.js) | MIT | MQTT client |
|
|
69
|
+
|
|
70
|
+
### Utility Dependencies
|
|
71
|
+
|
|
72
|
+
| Library | License | Description |
|
|
73
|
+
|---------|---------|-------------|
|
|
74
|
+
| [Lodash](https://github.com/lodash/lodash) | MIT | Utility library |
|
|
75
|
+
| [reflect-metadata](https://github.com/rbuckton/reflect-metadata) | Apache-2.0 | Metadata reflection API |
|
|
76
|
+
|
|
77
|
+
### Documentation Dependencies
|
|
78
|
+
|
|
79
|
+
| Library | License | Description |
|
|
80
|
+
|---------|---------|-------------|
|
|
81
|
+
| [VitePress](https://github.com/vuejs/vitepress) | MIT | Static site generator |
|
|
82
|
+
| [Fuse.js](https://github.com/krisk/fuse) | Apache-2.0 | Fuzzy search library |
|
|
83
|
+
| [gray-matter](https://github.com/jonschlinkert/gray-matter) | MIT | Front-matter parser |
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Acknowledgments
|
|
88
|
+
|
|
89
|
+
Ignis Framework is inspired by and built upon the work of many open-source projects:
|
|
90
|
+
|
|
91
|
+
- **[Hono](https://hono.dev/)** by Yusuke Wada - The ultrafast web framework that powers Ignis
|
|
92
|
+
- **[LoopBack 4](https://loopback.io/)** by IBM/StrongLoop - Inspiration for the enterprise architecture patterns
|
|
93
|
+
- **[NestJS](https://nestjs.com/)** by Kamil Mysliwiec - Inspiration for decorator-based controllers
|
|
94
|
+
- **[InversifyJS](https://inversify.io/)** - Inspiration for the IoC container design
|
|
95
|
+
|
|
96
|
+
We thank all the maintainers and contributors of these projects for their excellent work.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Contributing
|
|
101
|
+
|
|
102
|
+
By contributing to Ignis, you agree that your contributions will be licensed under the MIT License.
|
package/README.md
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
1
|
+
# @venizia/ignis-docs
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@venizia/ignis-docs)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
|
|
6
|
+
Documentation and **MCP (Model Context Protocol) Server** for the **Ignis Framework**. The MCP server allows AI assistants to access Ignis documentation in real-time.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
bun add @venizia/ignis-docs
|
|
12
|
+
# or
|
|
13
|
+
npm install @venizia/ignis-docs
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## MCP Server Usage
|
|
17
|
+
|
|
18
|
+
Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"ignis-docs": {
|
|
24
|
+
"command": "bunx",
|
|
25
|
+
"args": ["@venizia/ignis-docs@latest"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
You can also `npx` for alternative
|
|
32
|
+
|
|
33
|
+
## Available MCP Tools
|
|
34
|
+
|
|
35
|
+
| Tool | Description |
|
|
36
|
+
|------|-------------|
|
|
37
|
+
| **search** | Search documentation by keyword |
|
|
38
|
+
| **getDocContent** | Get full content of a document |
|
|
39
|
+
| **listDocs** | List all available documents |
|
|
40
|
+
| **listCategories** | List documentation categories |
|
|
41
|
+
| **getDocMetadata** | Get document metadata |
|
|
42
|
+
|
|
43
|
+
## About Ignis
|
|
44
|
+
|
|
45
|
+
Ignis brings together the structured, enterprise development experience of **LoopBack 4** with the blazing speed and simplicity of **Hono** - giving you the best of both worlds.
|
|
46
|
+
|
|
47
|
+
## Documentation
|
|
48
|
+
|
|
49
|
+
- [Ignis Repository](https://github.com/venizia-ai/ignis)
|
|
50
|
+
- [MCP Server Guide](https://github.com/venizia-ai/ignis/blob/main/packages/docs/wiki/get-started/mcp-docs-server.md)
|
|
51
|
+
- [Main Documentation](https://github.com/venizia-ai/ignis/blob/main/packages/docs/wiki/index.md)
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
MIT
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## MCP Docs Server | PROMP REQUEST:
|
|
60
|
+
|
|
61
|
+
**Question:** With Bun runtime + package management, create a monorepo project, "packages" is root folder of contain another project folder. Inside "packages" have two folder "be" and "fe". Just implement be with best practice ignis framework.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
## Plan: Create Bun Workspace Monorepo with Production-Ready Ignis Backend
|
|
65
|
+
|
|
66
|
+
## User Requirements ✅
|
|
67
|
+
- **Backend Scope**: Production Starter Kit (CRUD API + Authentication + Components)
|
|
68
|
+
- **Components**: Swagger (API Docs), Health Check, Authentication (JWT)
|
|
69
|
+
- **Frontend**: Empty placeholder with basic package.json
|
|
70
|
+
- **Architecture**: Follow Ignis best practices
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Implementation Plan
|
|
75
|
+
|
|
76
|
+
### 1. Root Monorepo Setup
|
|
77
|
+
|
|
78
|
+
**Files to create:**
|
|
79
|
+
- `package.json` - Root workspace configuration
|
|
80
|
+
- `.gitignore` - Ignore node_modules, dist, .env files
|
|
81
|
+
- `README.md` - Project documentation
|
|
82
|
+
|
|
83
|
+
**Root package.json structure:**
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"name": "ignis-monorepo",
|
|
87
|
+
"version": "1.0.0",
|
|
88
|
+
"private": true,
|
|
89
|
+
"workspaces": ["packages/*"],
|
|
90
|
+
"scripts": {
|
|
91
|
+
"be:dev": "bun --cwd packages/be run server:dev",
|
|
92
|
+
"be:build": "bun --cwd packages/be run build",
|
|
93
|
+
"be:lint": "bun --cwd packages/be run lint"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
### 2. Backend Package Structure (`packages/be/`)
|
|
101
|
+
|
|
102
|
+
**Directory structure:**
|
|
103
|
+
```
|
|
104
|
+
packages/be/
|
|
105
|
+
├── package.json
|
|
106
|
+
├── tsconfig.json
|
|
107
|
+
├── .prettierrc.mjs
|
|
108
|
+
├── .prettierignore
|
|
109
|
+
├── eslint.config.mjs
|
|
110
|
+
├── .env.example
|
|
111
|
+
├── scripts/
|
|
112
|
+
│ └── clean.sh
|
|
113
|
+
└── src/
|
|
114
|
+
├── index.ts # Entry point
|
|
115
|
+
├── application.ts # Main application class
|
|
116
|
+
├── migration.ts # Drizzle migration config
|
|
117
|
+
├── controllers/
|
|
118
|
+
│ ├── hello.controller.ts
|
|
119
|
+
│ └── todo.controller.ts
|
|
120
|
+
├── services/
|
|
121
|
+
│ └── authentication.service.ts
|
|
122
|
+
├── repositories/
|
|
123
|
+
│ └── todo.repository.ts
|
|
124
|
+
├── datasources/
|
|
125
|
+
│ └── postgres.datasource.ts
|
|
126
|
+
└── models/
|
|
127
|
+
└── todo.model.ts
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Key decisions:**
|
|
131
|
+
- PostgreSQL for database (as recommended in Ignis docs)
|
|
132
|
+
- Todo CRUD as example implementation
|
|
133
|
+
- JWT authentication with custom AuthenticationService
|
|
134
|
+
- All three components: Swagger, Health Check, Authentication
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
### 3. Backend Dependencies
|
|
139
|
+
|
|
140
|
+
**Production dependencies:**
|
|
141
|
+
```bash
|
|
142
|
+
bun add hono @hono/zod-openapi @scalar/hono-api-reference @venizia/ignis dotenv-flow
|
|
143
|
+
bun add drizzle-orm drizzle-zod pg lodash
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
**Development dependencies:**
|
|
147
|
+
```bash
|
|
148
|
+
bun add -d typescript @types/bun @venizia/dev-configs tsc-alias tsconfig-paths
|
|
149
|
+
bun add -d drizzle-kit @types/pg @types/lodash
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### 4. Configuration Files
|
|
155
|
+
|
|
156
|
+
**tsconfig.json:**
|
|
157
|
+
- Extend from `@venizia/dev-configs/tsconfig.common.json`
|
|
158
|
+
- Configure path aliases: `@/*` → `src/*`
|
|
159
|
+
- Output to `dist/`
|
|
160
|
+
|
|
161
|
+
**.prettierrc.mjs:**
|
|
162
|
+
- Import from `@venizia/dev-configs`
|
|
163
|
+
|
|
164
|
+
**eslint.config.mjs:**
|
|
165
|
+
- Import from `@venizia/dev-configs`
|
|
166
|
+
|
|
167
|
+
**.env.example:**
|
|
168
|
+
```env
|
|
169
|
+
# Application
|
|
170
|
+
HOST=0.0.0.0
|
|
171
|
+
PORT=3000
|
|
172
|
+
APP_ENV_APPLICATION_NAME=ignis-backend
|
|
173
|
+
|
|
174
|
+
# Database
|
|
175
|
+
APP_ENV_POSTGRES_HOST=localhost
|
|
176
|
+
APP_ENV_POSTGRES_PORT=5432
|
|
177
|
+
APP_ENV_POSTGRES_USERNAME=postgres
|
|
178
|
+
APP_ENV_POSTGRES_PASSWORD=your_password
|
|
179
|
+
APP_ENV_POSTGRES_DATABASE=ignis_db
|
|
180
|
+
|
|
181
|
+
# Authentication (REQUIRED - Generate strong secrets!)
|
|
182
|
+
APP_ENV_APPLICATION_SECRET=your-strong-application-secret-here
|
|
183
|
+
APP_ENV_JWT_SECRET=your-strong-jwt-secret-here
|
|
184
|
+
APP_ENV_JWT_EXPIRES_IN=86400
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### 5. Core Implementation Files
|
|
190
|
+
|
|
191
|
+
#### `src/application.ts`
|
|
192
|
+
**Features:**
|
|
193
|
+
- Register PostgresDataSource
|
|
194
|
+
- Register TodoRepository
|
|
195
|
+
- Register TodoController, HelloController
|
|
196
|
+
- Register AuthenticationService
|
|
197
|
+
- Register all 3 components: HealthCheckComponent, SwaggerComponent, AuthenticateComponent
|
|
198
|
+
- Register JWTAuthenticationStrategy
|
|
199
|
+
- Configure app with base path `/api`
|
|
200
|
+
|
|
201
|
+
#### `src/models/todo.model.ts`
|
|
202
|
+
**Schema:**
|
|
203
|
+
- `id` (UUID, auto-generated)
|
|
204
|
+
- `title` (text, required)
|
|
205
|
+
- `description` (text, optional)
|
|
206
|
+
- `isCompleted` (boolean, default false)
|
|
207
|
+
- `createdAt`, `modifiedAt` (timestamps, auto-generated)
|
|
208
|
+
|
|
209
|
+
#### `src/datasources/postgres.datasource.ts`
|
|
210
|
+
**Features:**
|
|
211
|
+
- Connect to PostgreSQL using environment variables
|
|
212
|
+
- Register Todo model schema
|
|
213
|
+
- Implement connect/disconnect lifecycle
|
|
214
|
+
|
|
215
|
+
#### `src/repositories/todo.repository.ts`
|
|
216
|
+
**Features:**
|
|
217
|
+
- Extend `DefaultCRUDRepository<TTodoSchema>`
|
|
218
|
+
- Inject PostgresDataSource
|
|
219
|
+
|
|
220
|
+
#### `src/controllers/todo.controller.ts`
|
|
221
|
+
**Features:**
|
|
222
|
+
- Use `ControllerFactory.defineCrudController()` for auto-generated CRUD endpoints
|
|
223
|
+
- Base path: `/todos`
|
|
224
|
+
- All operations protected by JWT (optional - can be added later)
|
|
225
|
+
|
|
226
|
+
#### `src/controllers/hello.controller.ts`
|
|
227
|
+
**Features:**
|
|
228
|
+
- Simple GET `/hello` endpoint
|
|
229
|
+
- Returns `{ message: "Hello, World!" }`
|
|
230
|
+
- OpenAPI schema with Zod
|
|
231
|
+
|
|
232
|
+
#### `src/services/authentication.service.ts`
|
|
233
|
+
**Features:**
|
|
234
|
+
- Implement `IAuthService` interface
|
|
235
|
+
- `signIn()` method with hardcoded test credentials (test_username / test_password)
|
|
236
|
+
- Generate JWT using JWTTokenService
|
|
237
|
+
- TODO comments for production implementation (database lookup, password hashing)
|
|
238
|
+
|
|
239
|
+
#### `src/migration.ts`
|
|
240
|
+
**Features:**
|
|
241
|
+
- Drizzle Kit configuration
|
|
242
|
+
- Point to todo.model.ts
|
|
243
|
+
- Use PostgreSQL dialect
|
|
244
|
+
- Connection from environment variables
|
|
245
|
+
|
|
246
|
+
#### `src/index.ts`
|
|
247
|
+
**Features:**
|
|
248
|
+
- Import dotenv-flow
|
|
249
|
+
- Create Application instance
|
|
250
|
+
- Start server
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### 6. Frontend Package Structure (`packages/fe/`)
|
|
255
|
+
|
|
256
|
+
**Minimal setup:**
|
|
257
|
+
```
|
|
258
|
+
packages/fe/
|
|
259
|
+
├── package.json
|
|
260
|
+
└── README.md
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**package.json:**
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"name": "@ignis-monorepo/fe",
|
|
267
|
+
"version": "1.0.0",
|
|
268
|
+
"private": true,
|
|
269
|
+
"description": "Frontend application - framework to be determined"
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
**README.md:**
|
|
274
|
+
```markdown
|
|
275
|
+
# Frontend Application
|
|
276
|
+
|
|
277
|
+
This folder is prepared for the frontend application.
|
|
278
|
+
|
|
279
|
+
## Next Steps
|
|
280
|
+
- Choose your framework (React, Vue, Svelte, etc.)
|
|
281
|
+
- Run framework setup command
|
|
282
|
+
- Configure to work with backend at http://localhost:3000/api
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
### 7. Scripts and Utilities
|
|
288
|
+
|
|
289
|
+
**packages/be/scripts/clean.sh:**
|
|
290
|
+
- Remove `dist/`, `*.tsbuildinfo`, `.eslintcache`
|
|
291
|
+
- Remove `artifact.zip`
|
|
292
|
+
|
|
293
|
+
**packages/be/package.json scripts:**
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"lint": "bun run eslint && bun run prettier:cli",
|
|
297
|
+
"lint:fix": "bun run eslint --fix && bun run prettier:fix",
|
|
298
|
+
"prettier:cli": "prettier \"**/*.{js,ts}\" -l",
|
|
299
|
+
"prettier:fix": "bun run prettier:cli --write",
|
|
300
|
+
"eslint": "eslint --report-unused-disable-directives .",
|
|
301
|
+
"build": "tsc -p tsconfig.json && tsc-alias -p tsconfig.json",
|
|
302
|
+
"clean": "sh ./scripts/clean.sh",
|
|
303
|
+
"rebuild": "bun run clean && bun run build",
|
|
304
|
+
"migrate:dev": "NODE_ENV=development drizzle-kit push --config=src/migration.ts",
|
|
305
|
+
"generate-migration:dev": "NODE_ENV=development drizzle-kit generate --config=src/migration.ts",
|
|
306
|
+
"preserver:dev": "bun run rebuild",
|
|
307
|
+
"server:dev": "NODE_ENV=development bun .",
|
|
308
|
+
"server:prod": "NODE_ENV=production bun ."
|
|
309
|
+
}
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
### 8. Post-Setup Instructions
|
|
315
|
+
|
|
316
|
+
**After implementation, user needs to:**
|
|
317
|
+
|
|
318
|
+
1. **Create PostgreSQL database:**
|
|
319
|
+
```bash
|
|
320
|
+
psql -U postgres
|
|
321
|
+
CREATE DATABASE ignis_db;
|
|
322
|
+
\q
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
2. **Copy .env.example to .env and configure:**
|
|
326
|
+
```bash
|
|
327
|
+
cd packages/be
|
|
328
|
+
cp .env.example .env
|
|
329
|
+
# Edit .env with your database credentials and secrets
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
3. **Generate strong secrets:**
|
|
333
|
+
```bash
|
|
334
|
+
# Use these commands to generate secrets:
|
|
335
|
+
openssl rand -base64 32 # For APP_ENV_APPLICATION_SECRET
|
|
336
|
+
openssl rand -base64 32 # For APP_ENV_JWT_SECRET
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
4. **Install dependencies:**
|
|
340
|
+
```bash
|
|
341
|
+
bun install
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
5. **Run database migration:**
|
|
345
|
+
```bash
|
|
346
|
+
bun run be:dev # This will run migration automatically via preserver:dev
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
6. **Test the API:**
|
|
350
|
+
- Health check: `http://localhost:3000/health`
|
|
351
|
+
- API docs: `http://localhost:3000/doc/explorer`
|
|
352
|
+
- Hello endpoint: `http://localhost:3000/api/hello`
|
|
353
|
+
- Sign in: `POST http://localhost:3000/api/auth/sign-in` with `{"identifier": {"value": "test_username"}, "credential": {"value": "test_password"}}`
|
|
354
|
+
- Todos CRUD: `http://localhost:3000/api/todos`
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
### 9. Available Endpoints
|
|
359
|
+
|
|
360
|
+
After setup, the following endpoints will be available:
|
|
361
|
+
|
|
362
|
+
| Method | Path | Description | Auth Required |
|
|
363
|
+
|--------|------|-------------|---------------|
|
|
364
|
+
| `GET` | `/health` | Health check | No |
|
|
365
|
+
| `POST` | `/health/ping` | Ping-pong test | No |
|
|
366
|
+
| `GET` | `/doc/explorer` | Swagger UI (Scalar) | No |
|
|
367
|
+
| `GET` | `/doc/openapi.json` | OpenAPI spec | No |
|
|
368
|
+
| `GET` | `/api/hello` | Hello world | No |
|
|
369
|
+
| `POST` | `/api/auth/sign-in` | JWT login | No |
|
|
370
|
+
| `GET` | `/api/todos` | List todos | No* |
|
|
371
|
+
| `POST` | `/api/todos` | Create todo | No* |
|
|
372
|
+
| `GET` | `/api/todos/:id` | Get todo | No* |
|
|
373
|
+
| `PATCH` | `/api/todos/:id` | Update todo | No* |
|
|
374
|
+
| `DELETE` | `/api/todos/:id` | Delete todo | No* |
|
|
375
|
+
|
|
376
|
+
*Note: Todo endpoints can be easily protected with JWT by adding `authStrategies: [Authentication.STRATEGY_JWT]` to route configs*
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
### 10. Critical Files to Create
|
|
381
|
+
|
|
382
|
+
**Root level:**
|
|
383
|
+
1. `package.json` - Workspace config
|
|
384
|
+
2. `.gitignore` - Git ignore patterns
|
|
385
|
+
3. `README.md` - Project documentation
|
|
386
|
+
|
|
387
|
+
**packages/be/:**
|
|
388
|
+
1. `package.json` - Backend dependencies and scripts
|
|
389
|
+
2. `tsconfig.json` - TypeScript configuration
|
|
390
|
+
3. `.prettierrc.mjs` - Prettier config
|
|
391
|
+
4. `.prettierignore` - Prettier ignore patterns
|
|
392
|
+
5. `eslint.config.mjs` - ESLint config
|
|
393
|
+
6. `.env.example` - Environment variable template
|
|
394
|
+
7. `scripts/clean.sh` - Cleanup script
|
|
395
|
+
8. `src/index.ts` - Entry point
|
|
396
|
+
9. `src/application.ts` - Main application class
|
|
397
|
+
10. `src/migration.ts` - Database migration config
|
|
398
|
+
11. `src/models/todo.model.ts` - Todo model
|
|
399
|
+
12. `src/datasources/postgres.datasource.ts` - Database connection
|
|
400
|
+
13. `src/repositories/todo.repository.ts` - Todo data access
|
|
401
|
+
14. `src/controllers/todo.controller.ts` - Todo API endpoints
|
|
402
|
+
15. `src/controllers/hello.controller.ts` - Hello endpoint
|
|
403
|
+
16. `src/services/authentication.service.ts` - Auth logic
|
|
404
|
+
|
|
405
|
+
**packages/fe/:**
|
|
406
|
+
1. `package.json` - Frontend package placeholder
|
|
407
|
+
2. `README.md` - Frontend setup instructions
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Architecture Summary
|
|
412
|
+
|
|
413
|
+
```
|
|
414
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
415
|
+
│ HTTP Requests │
|
|
416
|
+
└──────────────────────┬──────────────────────────────────────┘
|
|
417
|
+
│
|
|
418
|
+
▼
|
|
419
|
+
┌─────────────────────────┐
|
|
420
|
+
│ Components Layer │
|
|
421
|
+
│ • HealthCheckComponent │
|
|
422
|
+
│ • SwaggerComponent │
|
|
423
|
+
│ • AuthenticateComponent│
|
|
424
|
+
└────────────┬────────────┘
|
|
425
|
+
│
|
|
426
|
+
▼
|
|
427
|
+
┌─────────────────────────┐
|
|
428
|
+
│ Controllers Layer │
|
|
429
|
+
│ • HelloController │
|
|
430
|
+
│ • TodoController │
|
|
431
|
+
│ • (Auth auto-registered)│
|
|
432
|
+
└────────────┬────────────┘
|
|
433
|
+
│
|
|
434
|
+
▼
|
|
435
|
+
┌─────────────────────────┐
|
|
436
|
+
│ Services Layer │
|
|
437
|
+
│ • AuthenticationService│
|
|
438
|
+
│ • (Business logic) │
|
|
439
|
+
└────────────┬────────────┘
|
|
440
|
+
│
|
|
441
|
+
▼
|
|
442
|
+
┌─────────────────────────┐
|
|
443
|
+
│ Repositories Layer │
|
|
444
|
+
│ • TodoRepository │
|
|
445
|
+
└────────────┬────────────┘
|
|
446
|
+
│
|
|
447
|
+
▼
|
|
448
|
+
┌─────────────────────────┐
|
|
449
|
+
│ DataSources Layer │
|
|
450
|
+
│ • PostgresDataSource │
|
|
451
|
+
└────────────┬────────────┘
|
|
452
|
+
│
|
|
453
|
+
▼
|
|
454
|
+
┌─────────────────────────┐
|
|
455
|
+
│ PostgreSQL DB │
|
|
456
|
+
└─────────────────────────┘
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
This follows Ignis layered architecture best practices with clear separation of concerns.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized configuration for the Ignis MCP Documentation Server.
|
|
3
|
+
* All tool constants and settings are defined here for easy maintenance.
|
|
4
|
+
*/
|
|
5
|
+
export declare class MCPConfigs {
|
|
6
|
+
static readonly server: {
|
|
7
|
+
readonly name: "ignis-docs";
|
|
8
|
+
readonly version: "0.0.1";
|
|
9
|
+
};
|
|
10
|
+
/** Runtime-configurable branch (set via CLI argument) */
|
|
11
|
+
private static _branch;
|
|
12
|
+
static readonly github: {
|
|
13
|
+
apiBase: string;
|
|
14
|
+
rawContentBase: string;
|
|
15
|
+
repoOwner: string;
|
|
16
|
+
repoPath: string;
|
|
17
|
+
repoName: string;
|
|
18
|
+
userAgent: string;
|
|
19
|
+
/** Get current branch (configurable at runtime) */
|
|
20
|
+
readonly branch: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Set the GitHub branch to use for fetching source code.
|
|
24
|
+
* Call this before starting the server.
|
|
25
|
+
* @param branch - Branch name (e.g., 'main', 'develop', 'feature/xyz')
|
|
26
|
+
*/
|
|
27
|
+
static setBranch(opts: {
|
|
28
|
+
branch: string;
|
|
29
|
+
}): void;
|
|
30
|
+
static readonly search: {
|
|
31
|
+
/** Maximum characters for content snippet in search results */
|
|
32
|
+
snippetLength: number;
|
|
33
|
+
/** Default number of results to return */
|
|
34
|
+
defaultLimit: number;
|
|
35
|
+
/** Maximum allowed results per search */
|
|
36
|
+
maxLimit: number;
|
|
37
|
+
/** Minimum query length required */
|
|
38
|
+
minQueryLength: number;
|
|
39
|
+
};
|
|
40
|
+
static readonly codeSearch: {
|
|
41
|
+
/** Default number of results to return */
|
|
42
|
+
defaultLimit: number;
|
|
43
|
+
/** Maximum allowed results per search (GitHub API limit) */
|
|
44
|
+
maxLimit: number;
|
|
45
|
+
/** Minimum query length required */
|
|
46
|
+
minQueryLength: number;
|
|
47
|
+
/** Rate limit warning threshold */
|
|
48
|
+
rateLimitWarningThreshold: number;
|
|
49
|
+
};
|
|
50
|
+
static readonly fuse: {
|
|
51
|
+
includeScore: boolean;
|
|
52
|
+
/** Lower threshold = stricter matching (0.0 = exact, 1.0 = match anything) */
|
|
53
|
+
threshold: number;
|
|
54
|
+
minMatchCharLength: number;
|
|
55
|
+
findAllMatches: boolean;
|
|
56
|
+
ignoreLocation: boolean;
|
|
57
|
+
/** Search field weights: title matches are prioritized over content */
|
|
58
|
+
keys: {
|
|
59
|
+
name: string;
|
|
60
|
+
weight: number;
|
|
61
|
+
}[];
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../mcp-server/common/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,UAAU;IAIrB,MAAM,CAAC,QAAQ,CAAC,MAAM;;;MAAqD;IAM3E,yDAAyD;IACzD,OAAO,CAAC,MAAM,CAAC,OAAO,CAAkB;IAExC,MAAM,CAAC,QAAQ,CAAC,MAAM;;;;;;;QAQpB,mDAAmD;yBACrC,MAAM;MAGpB;IAEF;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE;IAOzC,MAAM,CAAC,QAAQ,CAAC,MAAM;QACpB,+DAA+D;;QAE/D,0CAA0C;;QAE1C,yCAAyC;;QAEzC,oCAAoC;;MAEpC;IAKF,MAAM,CAAC,QAAQ,CAAC,UAAU;QACxB,0CAA0C;;QAE1C,4DAA4D;;QAE5D,oCAAoC;;QAEpC,mCAAmC;;MAEnC;IAKF,MAAM,CAAC,QAAQ,CAAC,IAAI;;QAElB,8EAA8E;;;;;QAK9E,uEAAuE;;;;;MAKvE;CACH"}
|