@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
|
@@ -12,7 +12,7 @@ Detailed breakdown of the core framework directory structure.
|
|
|
12
12
|
|-----------|---------------|----------------|
|
|
13
13
|
| **`base`** | Core architecture | Applications, Controllers, Repositories, Services, Models |
|
|
14
14
|
| **`components`** | Pluggable features | Auth, Swagger, HealthCheck, SocketIO |
|
|
15
|
-
| **`helpers`** | Utilities | Re-exports from `@venizia/ignis-helpers` |
|
|
15
|
+
| **`helpers`** | Utilities | DI (extended), Re-exports from `@venizia/ignis-helpers` |
|
|
16
16
|
| **`common`** | Shared code | Constants, bindings, types, environments |
|
|
17
17
|
| **`utilities`** | Pure functions | Crypto, date, parse, performance, schema |
|
|
18
18
|
| **`__tests__`** | Tests | Integration and E2E tests |
|
|
@@ -27,7 +27,7 @@ Top-level breakdown of the `src` directory:
|
|
|
27
27
|
| **`base`** | The core building blocks and abstract classes of the framework. This is where the fundamental architecture is defined. |
|
|
28
28
|
| **`common`** | A directory for code that is shared and used across the entire framework. |
|
|
29
29
|
| **`components`** | A collection of ready-to-use, high-level components that can be plugged into an Ignis application. |
|
|
30
|
-
| **`helpers`** |
|
|
30
|
+
| **`helpers`** | Contains core extensions (like Inversion) and re-exports from `@venizia/ignis-helpers`. |
|
|
31
31
|
| **`utilities`** | A collection of pure, standalone utility functions. |
|
|
32
32
|
|
|
33
33
|
---
|
|
@@ -117,7 +117,21 @@ Contains mixins to extend the functionality of core classes, particularly `Abstr
|
|
|
117
117
|
| `controller.mixin.ts` | Adds `controller()` and `registerControllers()` methods. |
|
|
118
118
|
| `repository.mixin.ts` | Adds `dataSource()` and `repository()` methods. |
|
|
119
119
|
| `service.mixin.ts` | Adds `service()` method. |
|
|
120
|
-
| `types.ts` | Defines interfaces
|
|
120
|
+
| `types.ts` | Defines interfaces and types (`TMixinOpts`, `IComponentMixin`, `IControllerMixin`, etc.). |
|
|
121
|
+
|
|
122
|
+
All registration methods accept an optional `opts?: TMixinOpts` parameter for custom binding configuration:
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
type TMixinOpts<Args extends AnyObject = any> = {
|
|
126
|
+
binding: { namespace: string; key: string };
|
|
127
|
+
args?: Args;
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// Example: Custom binding key
|
|
131
|
+
this.controller(UserController, {
|
|
132
|
+
binding: { namespace: 'controllers', key: 'CustomUserController' }
|
|
133
|
+
});
|
|
134
|
+
```
|
|
121
135
|
|
|
122
136
|
#### `base/models`
|
|
123
137
|
|
|
@@ -223,11 +237,12 @@ Generates interactive OpenAPI documentation.
|
|
|
223
237
|
|
|
224
238
|
### `helpers`
|
|
225
239
|
|
|
226
|
-
|
|
240
|
+
Contains framework extensions and utilities.
|
|
227
241
|
|
|
228
242
|
| File/Folder | Purpose/Key Details |
|
|
229
243
|
| :---------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
230
|
-
| `
|
|
244
|
+
| `inversion/`| **Framework DI Extension**: Extends `@venizia/ignis-inversion` to provide application-aware dependency injection with logging and enhanced metadata support. |
|
|
245
|
+
| `index.ts` | Re-exports extensions and utilities from `@venizia/ignis-helpers`. |
|
|
231
246
|
|
|
232
247
|
### `utilities`
|
|
233
248
|
|
|
@@ -246,4 +261,4 @@ This directory contains pure, standalone utility functions that perform common,
|
|
|
246
261
|
|
|
247
262
|
---
|
|
248
263
|
|
|
249
|
-
This detailed breakdown illustrates the modular and layered design of the Ignis framework, emphasizing its extensibility and adherence to robust architectural patterns.
|
|
264
|
+
This detailed breakdown illustrates the modular and layered design of the Ignis framework, emphasizing its extensibility and adherence to robust architectural patterns.
|
|
@@ -23,24 +23,34 @@ Documentation package housing guides, references, and MCP server for the Ignis f
|
|
|
23
23
|
|
|
24
24
|
## Project Structure Overview
|
|
25
25
|
|
|
26
|
-
Top-level breakdown of the
|
|
26
|
+
Top-level breakdown of the `packages/docs/` directory:
|
|
27
27
|
|
|
28
|
-
| Folder
|
|
29
|
-
|
|
|
30
|
-
| **`mcp`**
|
|
31
|
-
| **`wiki`**
|
|
28
|
+
| Folder | Purpose |
|
|
29
|
+
| :--------------- | :--------------------------------------------------------------------------------- |
|
|
30
|
+
| **`mcp-server`** | Contains the Model Context Protocol (MCP) server implementation for documentation and code search. |
|
|
31
|
+
| **`wiki`** | The main documentation content, built using VitePress. |
|
|
32
32
|
|
|
33
33
|
---
|
|
34
34
|
|
|
35
35
|
## Detailed Sections
|
|
36
36
|
|
|
37
|
-
### `mcp`
|
|
37
|
+
### `mcp-server`
|
|
38
38
|
|
|
39
|
-
This directory contains the implementation of a Model Context Protocol (MCP) server, which allows external tools to discover and read documentation resources.
|
|
39
|
+
This directory contains the implementation of a Model Context Protocol (MCP) server, which allows external tools (AI assistants) to discover and read documentation resources, as well as search the source code.
|
|
40
40
|
|
|
41
|
-
| File/Folder | Purpose/Key Details
|
|
42
|
-
| :---------- |
|
|
41
|
+
| File/Folder | Purpose/Key Details |
|
|
42
|
+
| :---------- | :------------------ |
|
|
43
|
+
| `index.ts` | Server entry point, tool registration, and CLI argument parsing |
|
|
44
|
+
| `common/config.ts` | `MCPConfigs` class with server, GitHub, search, and Fuse.js settings |
|
|
45
|
+
| `common/paths.ts` | Path resolution for wiki directory |
|
|
46
|
+
| `helpers/docs.helper.ts` | `DocsHelper` for documentation loading, caching, and Fuse.js search |
|
|
47
|
+
| `helpers/github.helper.ts` | `GithubHelper` for GitHub API integration (code search, file fetching) |
|
|
48
|
+
| `helpers/logger.helper.ts` | Logging utilities |
|
|
49
|
+
| `tools/base.tool.ts` | Abstract `BaseTool` class for all MCP tools |
|
|
50
|
+
| `tools/docs/` | Documentation tools: `searchDocs`, `getDocContent`, `listDocs`, `listCategories`, `getDocMetadata`, `getPackageOverview` |
|
|
51
|
+
| `tools/github/` | Code/project tools: `searchCode`, `listProjectFiles`, `viewSourceFile`, `verifyDependencies` |
|
|
43
52
|
|
|
53
|
+
For detailed MCP server documentation, see [MCP Server Deep Dive](./mcp-server.md).
|
|
44
54
|
|
|
45
55
|
### `wiki`
|
|
46
56
|
|
|
@@ -309,22 +309,22 @@ if (cache) {
|
|
|
309
309
|
|
|
310
310
|
---
|
|
311
311
|
|
|
312
|
-
##
|
|
312
|
+
## Integration with Framework
|
|
313
313
|
|
|
314
|
-
The `@venizia/ignis
|
|
314
|
+
The core `@venizia/ignis` package extends this base inversion package with:
|
|
315
315
|
|
|
316
316
|
- **ApplicationLogger integration**: Container with structured logging
|
|
317
317
|
- **Framework-specific metadata**: Controllers, models, repositories, data sources
|
|
318
318
|
- **Decorator implementations**: `@inject`, `@controller`, `@service`, etc.
|
|
319
319
|
|
|
320
|
-
For framework usage, import from `@venizia/ignis
|
|
320
|
+
For framework usage, import from `@venizia/ignis`. For standalone DI container usage, import directly from `@venizia/ignis-inversion`.
|
|
321
321
|
|
|
322
322
|
```typescript
|
|
323
323
|
// Standalone usage
|
|
324
324
|
import { Container, Binding } from '@venizia/ignis-inversion';
|
|
325
325
|
|
|
326
326
|
// Framework usage (includes logging and framework metadata)
|
|
327
|
-
import { Container, inject, service } from '@venizia/ignis
|
|
327
|
+
import { Container, inject, service } from '@venizia/ignis';
|
|
328
328
|
```
|
|
329
329
|
|
|
330
330
|
---
|
|
@@ -12,23 +12,40 @@ This document provides a detailed look into the architecture, features, and inte
|
|
|
12
12
|
graph TB
|
|
13
13
|
AI[AI Assistant / MCP Client]
|
|
14
14
|
MCP[MCPServer Entry Point]
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
|
|
16
|
+
subgraph ToolLayer [Tools Layer]
|
|
17
|
+
DocsTools[Documentation Tools]
|
|
18
|
+
CodeTools[Code & Project Tools]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
subgraph LogicLayer [Business Logic Layer]
|
|
22
|
+
DocsHelper[Docs Helper]
|
|
23
|
+
GitHubHelper[GitHub Helper]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
subgraph DataLayer [Data Sources]
|
|
27
|
+
FS[File System / Wiki Docs]
|
|
28
|
+
GitHubAPI[GitHub API]
|
|
29
|
+
end
|
|
19
30
|
|
|
20
31
|
AI -->|MCP Protocol| MCP
|
|
21
|
-
MCP -->
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
32
|
+
MCP --> DocsTools
|
|
33
|
+
MCP --> CodeTools
|
|
34
|
+
|
|
35
|
+
DocsTools --> DocsHelper
|
|
36
|
+
CodeTools --> GitHubHelper
|
|
37
|
+
|
|
38
|
+
DocsHelper --> FS
|
|
39
|
+
GitHubHelper --> GitHubAPI
|
|
25
40
|
|
|
26
41
|
style AI fill:#e1f5ff
|
|
27
42
|
style MCP fill:#fff4e1
|
|
28
|
-
style
|
|
29
|
-
style
|
|
30
|
-
style
|
|
43
|
+
style DocsTools fill:#f0f0f0
|
|
44
|
+
style CodeTools fill:#f0f0f0
|
|
45
|
+
style DocsHelper fill:#e8f5e9
|
|
46
|
+
style GitHubHelper fill:#e8f5e9
|
|
31
47
|
style FS fill:#f3e5f5
|
|
48
|
+
style GitHubAPI fill:#e3f2fd
|
|
32
49
|
```
|
|
33
50
|
|
|
34
51
|
### Component Responsibilities
|
|
@@ -36,15 +53,16 @@ graph TB
|
|
|
36
53
|
| Component | Responsibility | Key Features |
|
|
37
54
|
|-----------|---------------|--------------|
|
|
38
55
|
| **MCP Server** | Protocol handling, request routing | Stdio transport, tool registration |
|
|
39
|
-
| **Tools
|
|
40
|
-
| **
|
|
41
|
-
| **
|
|
56
|
+
| **Docs Tools** | Wiki documentation access | Search, content retrieval, metadata |
|
|
57
|
+
| **Code Tools** | Source code analysis | Code search, file listing, dependency check |
|
|
58
|
+
| **DocsHelper** | Docs logic, search, caching | Fuse.js search, memory cache |
|
|
59
|
+
| **GitHubHelper** | GitHub API integration | Repository search, content fetching |
|
|
42
60
|
|
|
43
61
|
---
|
|
44
62
|
|
|
45
63
|
## Data Flow
|
|
46
64
|
|
|
47
|
-
### Search
|
|
65
|
+
### Documentation Search Flow
|
|
48
66
|
|
|
49
67
|
```mermaid
|
|
50
68
|
sequenceDiagram
|
|
@@ -52,230 +70,124 @@ sequenceDiagram
|
|
|
52
70
|
participant MCP as MCP Server
|
|
53
71
|
participant Tool as SearchDocsTool
|
|
54
72
|
participant Helper as DocsHelper
|
|
55
|
-
participant Cache as Memory Cache
|
|
56
73
|
participant FS as File System
|
|
57
74
|
|
|
58
75
|
AI->>MCP: searchDocs("dependency injection")
|
|
59
76
|
MCP->>Tool: Route to tool handler
|
|
60
|
-
Tool->>
|
|
61
|
-
Tool->>Helper: DocsHelper.searchDocs()
|
|
77
|
+
Tool->>Helper: DocsHelper.searchDocuments()
|
|
62
78
|
|
|
63
79
|
alt Cache Empty (First Call)
|
|
64
80
|
Helper->>FS: Load all .md files
|
|
65
81
|
FS-->>Helper: Raw markdown files
|
|
66
|
-
Helper->>Helper: Parse frontmatter
|
|
67
82
|
Helper->>Helper: Build Fuse.js index
|
|
68
|
-
Helper->>Cache: Store docs + index
|
|
69
83
|
end
|
|
70
84
|
|
|
71
|
-
Helper->>
|
|
72
|
-
Cache-->>Helper: Matching documents
|
|
73
|
-
Helper->>Helper: Generate smart snippets
|
|
85
|
+
Helper->>Helper: Query Fuse.js index
|
|
74
86
|
Helper-->>Tool: Search results
|
|
75
|
-
Tool->>Tool: Validate output with Zod
|
|
76
87
|
Tool-->>MCP: Formatted response
|
|
77
88
|
MCP-->>AI: JSON results
|
|
78
89
|
```
|
|
79
90
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
## Tools Reference
|
|
83
|
-
|
|
84
|
-
### Tool Comparison Table
|
|
85
|
-
|
|
86
|
-
| Tool | Purpose | Input Complexity | Use Case |
|
|
87
|
-
|------|---------|------------------|----------|
|
|
88
|
-
| `searchDocs` | Find docs by keyword | Simple (query + limit) | "How do I use Redis?" |
|
|
89
|
-
| `getDocContent` | Get full document | Simple (id only) | Retrieve specific guide |
|
|
90
|
-
| `listDocs` | Browse all docs | Simple (optional filter) | Explore documentation |
|
|
91
|
-
| `listCategories` | List all categories | None | Understand structure |
|
|
92
|
-
| `getDocMetadata` | Get doc stats | Simple (id only) | Check length before reading |
|
|
93
|
-
|
|
94
|
-
### 1. searchDocs
|
|
95
|
-
|
|
96
|
-
**What it does:** Fuzzy searches across all documentation titles and content.
|
|
97
|
-
|
|
98
|
-
**Parameters:**
|
|
99
|
-
|
|
100
|
-
| Parameter | Type | Required | Default | Description |
|
|
101
|
-
|-----------|------|----------|---------|-------------|
|
|
102
|
-
| `query` | string | Yes | - | Search keywords (min 2 chars) |
|
|
103
|
-
| `limit` | number | No | 10 | Max results (1-50) |
|
|
104
|
-
|
|
105
|
-
**Returns:**
|
|
106
|
-
|
|
107
|
-
```typescript
|
|
108
|
-
Array<{
|
|
109
|
-
id: string; // "get-started/intro.md"
|
|
110
|
-
title: string; // "Introduction to Ignis"
|
|
111
|
-
category: string; // "Getting Started"
|
|
112
|
-
snippet: string; // First 300 chars preview
|
|
113
|
-
score: number; // 0-1 relevance (lower = better)
|
|
114
|
-
}>
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**Example Request:**
|
|
118
|
-
|
|
119
|
-
```json
|
|
120
|
-
{
|
|
121
|
-
"query": "dependency injection",
|
|
122
|
-
"limit": 5
|
|
123
|
-
}
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
**Example Response:**
|
|
127
|
-
|
|
128
|
-
```json
|
|
129
|
-
[
|
|
130
|
-
{
|
|
131
|
-
"id": "core-concepts/dependency-injection.md",
|
|
132
|
-
"title": "Dependency Injection",
|
|
133
|
-
"category": "Core Concepts",
|
|
134
|
-
"snippet": "Ignis uses a powerful dependency injection system that allows you to...",
|
|
135
|
-
"score": 0.12
|
|
136
|
-
}
|
|
137
|
-
]
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
### 2. getDocContent
|
|
143
|
-
|
|
144
|
-
**What it does:** Retrieves the full markdown content of a specific document.
|
|
145
|
-
|
|
146
|
-
**Parameters:**
|
|
147
|
-
|
|
148
|
-
| Parameter | Type | Required | Description |
|
|
149
|
-
|-----------|------|----------|-------------|
|
|
150
|
-
| `id` | string | Yes | Document ID from search/list |
|
|
151
|
-
|
|
152
|
-
**Returns:**
|
|
153
|
-
|
|
154
|
-
```typescript
|
|
155
|
-
{
|
|
156
|
-
content: string; // Full markdown content
|
|
157
|
-
id: string; // Document ID
|
|
158
|
-
error?: string; // Error message if not found
|
|
159
|
-
}
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Example Request:**
|
|
163
|
-
|
|
164
|
-
```json
|
|
165
|
-
{
|
|
166
|
-
"id": "get-started/intro.md"
|
|
167
|
-
}
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
### 3. listDocs
|
|
91
|
+
### Code Search Flow (GitHub)
|
|
173
92
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
**Returns:**
|
|
183
|
-
|
|
184
|
-
```typescript
|
|
185
|
-
{
|
|
186
|
-
count: number;
|
|
187
|
-
docs: Array<{
|
|
188
|
-
id: string;
|
|
189
|
-
title: string;
|
|
190
|
-
category: string;
|
|
191
|
-
}>;
|
|
192
|
-
}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
**Example Response:**
|
|
93
|
+
```mermaid
|
|
94
|
+
sequenceDiagram
|
|
95
|
+
participant AI as AI Assistant
|
|
96
|
+
participant MCP as MCP Server
|
|
97
|
+
participant Tool as SearchCodeTool
|
|
98
|
+
participant Helper as GitHubHelper
|
|
99
|
+
participant API as GitHub API
|
|
196
100
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
]
|
|
207
|
-
}
|
|
101
|
+
AI->>MCP: searchCode("BaseController")
|
|
102
|
+
MCP->>Tool: Route to tool handler
|
|
103
|
+
Tool->>Helper: GitHubHelper.searchCode()
|
|
104
|
+
Helper->>API: GET /search/code
|
|
105
|
+
API-->>Helper: JSON results
|
|
106
|
+
Helper->>Helper: Process & Format
|
|
107
|
+
Helper-->>Tool: Code matches
|
|
108
|
+
Tool-->>MCP: Formatted response
|
|
109
|
+
MCP-->>AI: JSON results
|
|
208
110
|
```
|
|
209
111
|
|
|
210
112
|
---
|
|
211
113
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
**What it does:** Lists all unique categories, sorted alphabetically.
|
|
215
|
-
|
|
216
|
-
**Parameters:** None
|
|
217
|
-
|
|
218
|
-
**Returns:**
|
|
219
|
-
|
|
220
|
-
```typescript
|
|
221
|
-
{
|
|
222
|
-
count: number;
|
|
223
|
-
categories: string[]; // ["Core Concepts", "Getting Started", ...]
|
|
224
|
-
}
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
**Example Response:**
|
|
114
|
+
## Tools Reference
|
|
228
115
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
116
|
+
### 1. Documentation Tools
|
|
117
|
+
|
|
118
|
+
Tools for accessing the Ignis Framework wiki and guide documentation.
|
|
119
|
+
|
|
120
|
+
| Tool | Purpose | Use Case |
|
|
121
|
+
|------|---------|----------|
|
|
122
|
+
| `searchDocs` | Find docs by keyword | "How do I use Redis?" |
|
|
123
|
+
| `getDocContent` | Get full document content | "Show me the Redis guide" |
|
|
124
|
+
| `listDocs` | Browse available docs | "What guides are available?" |
|
|
125
|
+
| `listCategories` | List doc categories | "Show me doc topics" |
|
|
126
|
+
| `getDocMetadata` | Get doc statistics | "Is this guide long?" |
|
|
127
|
+
| `getPackageOverview` | Get package summaries | "What does the core package do?" |
|
|
128
|
+
|
|
129
|
+
#### `searchDocs`
|
|
130
|
+
Fuzzy searches across all documentation titles and content.
|
|
131
|
+
- **Input:** `{ query: string, limit?: number }`
|
|
132
|
+
- **Returns:** List of matching documents with snippets and relevance scores.
|
|
133
|
+
|
|
134
|
+
#### `getDocContent`
|
|
135
|
+
Retrieves the full markdown content of a specific document.
|
|
136
|
+
- **Input:** `{ id: string }`
|
|
137
|
+
- **Returns:** Full document content.
|
|
138
|
+
|
|
139
|
+
#### `listDocs`
|
|
140
|
+
Lists all documentation files, optionally filtered by category.
|
|
141
|
+
- **Input:** `{ category?: string }`
|
|
142
|
+
- **Returns:** List of document metadata (id, title, category).
|
|
143
|
+
|
|
144
|
+
#### `listCategories`
|
|
145
|
+
Lists all unique documentation categories.
|
|
146
|
+
- **Input:** `{}`
|
|
147
|
+
- **Returns:** List of category names.
|
|
148
|
+
|
|
149
|
+
#### `getDocMetadata`
|
|
150
|
+
Retrieves statistics about a document without loading full content.
|
|
151
|
+
- **Input:** `{ id: string }`
|
|
152
|
+
- **Returns:** Word count, character count, last modified date.
|
|
153
|
+
|
|
154
|
+
#### `getPackageOverview`
|
|
155
|
+
Retrieves high-level information about specific framework packages.
|
|
156
|
+
- **Input:** `{ packageName?: string }`
|
|
157
|
+
- **Returns:** Package description, version, and purpose.
|
|
240
158
|
|
|
241
159
|
---
|
|
242
160
|
|
|
243
|
-
###
|
|
161
|
+
### 2. Code & Project Tools
|
|
244
162
|
|
|
245
|
-
|
|
163
|
+
Tools for exploring the Ignis codebase, searching source code, and verifying dependencies via GitHub.
|
|
246
164
|
|
|
247
|
-
|
|
165
|
+
| Tool | Purpose | Use Case |
|
|
166
|
+
|------|---------|----------|
|
|
167
|
+
| `searchCode` | Search source code | "Find usages of BaseController" |
|
|
168
|
+
| `listProjectFiles` | List repo files | "Show me files in packages/core" |
|
|
169
|
+
| `viewSourceFile` | Read source code | "Read packages/core/src/index.ts" |
|
|
170
|
+
| `verifyDependencies` | Check package.json | "Check dependencies for @venizia/core" |
|
|
248
171
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
172
|
+
#### `searchCode`
|
|
173
|
+
Searches the codebase using GitHub's code search API.
|
|
174
|
+
- **Input:** `{ query: string, limit?: number, extension?: string }`
|
|
175
|
+
- **Returns:** List of code matches with file paths and snippets.
|
|
252
176
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
id: string;
|
|
258
|
-
title: string;
|
|
259
|
-
category: string;
|
|
260
|
-
wordCount: number;
|
|
261
|
-
charCount: number;
|
|
262
|
-
lastModified?: string;
|
|
263
|
-
size?: number; // Bytes
|
|
264
|
-
}
|
|
265
|
-
```
|
|
177
|
+
#### `listProjectFiles`
|
|
178
|
+
Lists files and directories in the repository.
|
|
179
|
+
- **Input:** `{ path?: string, recursive?: boolean }`
|
|
180
|
+
- **Returns:** File tree structure.
|
|
266
181
|
|
|
267
|
-
|
|
182
|
+
#### `viewSourceFile`
|
|
183
|
+
Retrieves the raw content of a source code file.
|
|
184
|
+
- **Input:** `{ path: string }`
|
|
185
|
+
- **Returns:** Raw file content.
|
|
268
186
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
"category": "Core Concepts",
|
|
274
|
-
"wordCount": 2500,
|
|
275
|
-
"charCount": 15234,
|
|
276
|
-
"size": 15234
|
|
277
|
-
}
|
|
278
|
-
```
|
|
187
|
+
#### `verifyDependencies`
|
|
188
|
+
Checks the `package.json` of a specific package or the root project.
|
|
189
|
+
- **Input:** `{ package?: string }`
|
|
190
|
+
- **Returns:** List of dependencies and their versions.
|
|
279
191
|
|
|
280
192
|
---
|
|
281
193
|
|
|
@@ -338,20 +250,31 @@ pie
|
|
|
338
250
|
```
|
|
339
251
|
mcp-server/
|
|
340
252
|
├── common/
|
|
341
|
-
│ ├── config.ts # Configuration constants
|
|
253
|
+
│ ├── config.ts # Configuration constants (MCPConfigs class)
|
|
342
254
|
│ ├── logger.ts # Logging infrastructure
|
|
343
255
|
│ ├── paths.ts # Path resolution
|
|
344
256
|
│ └── index.ts # Common exports
|
|
345
257
|
├── helpers/
|
|
346
258
|
│ ├── docs.helper.ts # Documentation loading and searching
|
|
259
|
+
│ ├── github.helper.ts # GitHub API integration
|
|
260
|
+
│ ├── logger.helper.ts # Logging utilities
|
|
347
261
|
│ └── index.ts # Helper exports
|
|
348
262
|
├── tools/
|
|
349
263
|
│ ├── base.tool.ts # Abstract base class for tools
|
|
350
|
-
│ ├──
|
|
351
|
-
│ ├── get-
|
|
352
|
-
│ ├──
|
|
353
|
-
│ ├──
|
|
354
|
-
│ ├──
|
|
264
|
+
│ ├── docs/ # Documentation tools
|
|
265
|
+
│ │ ├── get-document-content.tool.ts
|
|
266
|
+
│ │ ├── get-document-metadata.tool.ts
|
|
267
|
+
│ │ ├── get-package-overview.tool.ts
|
|
268
|
+
│ │ ├── list-categories.tool.ts
|
|
269
|
+
│ │ ├── list-documents.tool.ts
|
|
270
|
+
│ │ ├── search-documents.tool.ts
|
|
271
|
+
│ │ └── index.ts
|
|
272
|
+
│ ├── github/ # GitHub/Code tools
|
|
273
|
+
│ │ ├── list-project-files.tool.ts
|
|
274
|
+
│ │ ├── search-code.tool.ts
|
|
275
|
+
│ │ ├── verify-dependencies.tool.ts
|
|
276
|
+
│ │ ├── view-source-file.tool.ts
|
|
277
|
+
│ │ └── index.ts
|
|
355
278
|
│ └── index.ts
|
|
356
279
|
├── index.ts # Server entry point
|
|
357
280
|
└── README.md
|
|
@@ -364,9 +287,10 @@ mcp-server/
|
|
|
364
287
|
| `index.ts` | Server initialization, tool registration | `main()`, `mcpServer` |
|
|
365
288
|
| `tools/base.tool.ts` | Abstract tool class, singleton pattern | `BaseTool`, `createTool` |
|
|
366
289
|
| `helpers/docs.helper.ts` | Documentation loading, search, cache | `DocsHelper` class |
|
|
367
|
-
| `
|
|
290
|
+
| `helpers/github.helper.ts` | GitHub API integration | `GithubHelper` class |
|
|
291
|
+
| `common/config.ts` | Centralized configuration | `MCPConfigs` class |
|
|
368
292
|
| `common/logger.ts` | Structured logging | `Logger` class |
|
|
369
|
-
| `common/paths.ts` | Path resolution | `
|
|
293
|
+
| `common/paths.ts` | Path resolution | `Paths` object |
|
|
370
294
|
|
|
371
295
|
---
|
|
372
296
|
|
|
@@ -543,28 +467,55 @@ const mcpServer = new MCPServer({
|
|
|
543
467
|
|
|
544
468
|
### Configuration Updates
|
|
545
469
|
|
|
546
|
-
Modify `common/config.ts` to adjust global settings:
|
|
470
|
+
Modify `common/config.ts` to adjust global settings. The configuration is now a class with static properties:
|
|
547
471
|
|
|
548
472
|
```typescript
|
|
549
|
-
export
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
473
|
+
export class MCPConfigs {
|
|
474
|
+
// Server identification
|
|
475
|
+
static readonly server = { name: 'ignis-docs', version: '0.0.1' } as const;
|
|
476
|
+
|
|
477
|
+
// GitHub configuration (branch is runtime-configurable)
|
|
478
|
+
static readonly github = {
|
|
479
|
+
apiBase: 'https://api.github.com',
|
|
480
|
+
rawContentBase: 'https://raw.githubusercontent.com',
|
|
481
|
+
repoOwner: 'VENIZIA-AI',
|
|
482
|
+
repoName: 'ignis',
|
|
483
|
+
get branch(): string { return MCPConfigs._branch; },
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
// Set branch at runtime via CLI argument
|
|
487
|
+
static setBranch(opts: { branch: string }) {
|
|
488
|
+
MCPConfigs._branch = opts.branch;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// Documentation search settings
|
|
492
|
+
static readonly search = {
|
|
493
|
+
snippetLength: 320, // Max characters for content snippet
|
|
494
|
+
defaultLimit: 10, // Default results per search
|
|
495
|
+
maxLimit: 50, // Maximum allowed results
|
|
496
|
+
minQueryLength: 2, // Minimum query length
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
// Code search settings (GitHub API)
|
|
500
|
+
static readonly codeSearch = {
|
|
501
|
+
defaultLimit: 10,
|
|
502
|
+
maxLimit: 30, // GitHub API limit
|
|
503
|
+
minQueryLength: 2,
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
// Fuse.js search engine settings
|
|
507
|
+
static readonly fuse = {
|
|
508
|
+
includeScore: true,
|
|
509
|
+
threshold: 0.4, // 0.0 = exact, 1.0 = match anything
|
|
510
|
+
minMatchCharLength: 2,
|
|
511
|
+
findAllMatches: true,
|
|
512
|
+
ignoreLocation: true,
|
|
562
513
|
keys: [
|
|
563
|
-
{ name: 'title', weight: 0.7 },
|
|
564
|
-
{ name: 'content', weight: 0.3 },
|
|
514
|
+
{ name: 'title', weight: 0.7 },
|
|
515
|
+
{ name: 'content', weight: 0.3 },
|
|
565
516
|
],
|
|
566
|
-
}
|
|
567
|
-
}
|
|
517
|
+
};
|
|
518
|
+
}
|
|
568
519
|
```
|
|
569
520
|
|
|
570
521
|
**Configuration Impact:**
|
|
@@ -723,4 +674,4 @@ The search uses a threshold of 0.4, which balances between strict and fuzzy matc
|
|
|
723
674
|
- Close matches: Tolerate 1-2 character typos
|
|
724
675
|
- Partial matches: Find substrings anywhere in title/content
|
|
725
676
|
|
|
726
|
-
Adjust `
|
|
677
|
+
Adjust `MCPConfigs.fuse.threshold` to make it stricter (lower) or fuzzier (higher).
|
|
@@ -8,5 +8,5 @@ Utilities are pure, standalone functions that provide common, reusable logic for
|
|
|
8
8
|
- [Parse](./parse.md): A collection of functions for parsing and converting data types.
|
|
9
9
|
- [Performance](./performance.md): Utilities for measuring code execution time.
|
|
10
10
|
- [Promise](./promise.md): Helper functions for working with Promises.
|
|
11
|
-
- [Request](./request.md): Utilities for handling HTTP requests, such as parsing multipart form data.
|
|
11
|
+
- [Request](./request.md): Utilities for handling HTTP requests, such as parsing multipart form data and creating secure Content-Disposition headers.
|
|
12
12
|
- [Schema](./schema.md): Helpers for creating and validating Zod schemas, especially for request and response validation in an OpenAPI context.
|