@venizia/ignis-docs 0.0.1-3 → 0.0.1-5
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/README.md +408 -2
- package/mcp-server/dist/common/config.d.ts +58 -21
- package/mcp-server/dist/common/config.d.ts.map +1 -1
- package/mcp-server/dist/common/config.js +69 -14
- package/mcp-server/dist/common/config.js.map +1 -1
- package/mcp-server/dist/common/index.d.ts +2 -2
- package/mcp-server/dist/common/paths.js +11 -11
- package/mcp-server/dist/helpers/docs.helper.d.ts +5 -5
- package/mcp-server/dist/helpers/docs.helper.d.ts.map +1 -1
- package/mcp-server/dist/helpers/docs.helper.js +38 -34
- package/mcp-server/dist/helpers/docs.helper.js.map +1 -1
- package/mcp-server/dist/helpers/github.helper.d.ts +37 -0
- package/mcp-server/dist/helpers/github.helper.d.ts.map +1 -0
- package/mcp-server/dist/helpers/github.helper.js +100 -0
- package/mcp-server/dist/helpers/github.helper.js.map +1 -0
- package/mcp-server/dist/helpers/index.d.ts +3 -2
- package/mcp-server/dist/helpers/index.d.ts.map +1 -1
- package/mcp-server/dist/helpers/index.js +1 -0
- package/mcp-server/dist/helpers/index.js.map +1 -1
- package/mcp-server/dist/index.js +64 -36
- package/mcp-server/dist/index.js.map +1 -1
- package/mcp-server/dist/tools/base.tool.d.ts +8 -12
- package/mcp-server/dist/tools/base.tool.d.ts.map +1 -1
- package/mcp-server/dist/tools/base.tool.js +3 -5
- package/mcp-server/dist/tools/base.tool.js.map +1 -1
- package/mcp-server/dist/tools/{get-doc-content.tool.d.ts → docs/get-document-content.tool.d.ts} +5 -5
- package/mcp-server/dist/tools/docs/get-document-content.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/{get-doc-content.tool.js → docs/get-document-content.tool.js} +14 -13
- package/mcp-server/dist/tools/docs/get-document-content.tool.js.map +1 -0
- package/mcp-server/dist/tools/{get-doc-metadata.tool.d.ts → docs/get-document-metadata.tool.d.ts} +5 -5
- package/mcp-server/dist/tools/docs/get-document-metadata.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/{get-doc-metadata.tool.js → docs/get-document-metadata.tool.js} +18 -17
- package/mcp-server/dist/tools/docs/get-document-metadata.tool.js.map +1 -0
- package/mcp-server/dist/tools/docs/get-package-overview.tool.d.ts +50 -0
- package/mcp-server/dist/tools/docs/get-package-overview.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/docs/get-package-overview.tool.js +221 -0
- package/mcp-server/dist/tools/docs/get-package-overview.tool.js.map +1 -0
- package/mcp-server/dist/tools/docs/index.d.ts +7 -0
- package/mcp-server/dist/tools/docs/index.d.ts.map +1 -0
- package/mcp-server/dist/tools/docs/index.js +23 -0
- package/mcp-server/dist/tools/docs/index.js.map +1 -0
- package/mcp-server/dist/tools/{list-categories.tool.d.ts → docs/list-categories.tool.d.ts} +3 -3
- package/mcp-server/dist/tools/docs/list-categories.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/{list-categories.tool.js → docs/list-categories.tool.js} +10 -9
- package/mcp-server/dist/tools/docs/list-categories.tool.js.map +1 -0
- package/mcp-server/dist/tools/{list-docs.tool.d.ts → docs/list-documents.tool.d.ts} +5 -5
- package/mcp-server/dist/tools/docs/list-documents.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/{list-docs.tool.js → docs/list-documents.tool.js} +15 -14
- package/mcp-server/dist/tools/docs/list-documents.tool.js.map +1 -0
- package/mcp-server/dist/tools/{search-docs.tool.d.ts → docs/search-documents.tool.d.ts} +5 -5
- package/mcp-server/dist/tools/docs/search-documents.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/{search-docs.tool.js → docs/search-documents.tool.js} +24 -23
- package/mcp-server/dist/tools/docs/search-documents.tool.js.map +1 -0
- package/mcp-server/dist/tools/github/index.d.ts +5 -0
- package/mcp-server/dist/tools/github/index.d.ts.map +1 -0
- package/mcp-server/dist/tools/github/index.js +21 -0
- package/mcp-server/dist/tools/github/index.js.map +1 -0
- package/mcp-server/dist/tools/github/list-project-files.tool.d.ts +28 -0
- package/mcp-server/dist/tools/github/list-project-files.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/github/list-project-files.tool.js +98 -0
- package/mcp-server/dist/tools/github/list-project-files.tool.js.map +1 -0
- package/mcp-server/dist/tools/github/search-code.tool.d.ts +42 -0
- package/mcp-server/dist/tools/github/search-code.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/github/search-code.tool.js +194 -0
- package/mcp-server/dist/tools/github/search-code.tool.js.map +1 -0
- package/mcp-server/dist/tools/github/verify-dependencies.tool.d.ts +55 -0
- package/mcp-server/dist/tools/github/verify-dependencies.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/github/verify-dependencies.tool.js +167 -0
- package/mcp-server/dist/tools/github/verify-dependencies.tool.js.map +1 -0
- package/mcp-server/dist/tools/github/view-source-file.tool.d.ts +26 -0
- package/mcp-server/dist/tools/github/view-source-file.tool.d.ts.map +1 -0
- package/mcp-server/dist/tools/github/view-source-file.tool.js +91 -0
- package/mcp-server/dist/tools/github/view-source-file.tool.js.map +1 -0
- package/mcp-server/dist/tools/index.d.ts +3 -7
- package/mcp-server/dist/tools/index.d.ts.map +1 -1
- package/mcp-server/dist/tools/index.js +17 -13
- package/mcp-server/dist/tools/index.js.map +1 -1
- package/package.json +27 -8
- package/wiki/get-started/best-practices/api-usage-examples.md +42 -0
- package/wiki/get-started/best-practices/architectural-patterns.md +42 -1
- package/wiki/get-started/best-practices/code-style-standards.md +41 -0
- package/wiki/get-started/best-practices/contribution-workflow.md +40 -6
- package/wiki/get-started/best-practices/data-modeling.md +126 -0
- package/wiki/get-started/core-concepts/dependency-injection.md +13 -1
- package/wiki/get-started/mcp-docs-server.md +130 -32
- package/wiki/get-started/philosophy.md +198 -25
- package/wiki/references/base/application.md +5 -5
- package/wiki/references/base/controllers.md +3 -1
- package/wiki/references/base/dependency-injection.md +6 -5
- package/wiki/references/helpers/inversion.md +21 -11
- package/wiki/references/src-details/core.md +15 -1
- package/wiki/references/src-details/docs.md +19 -9
- package/wiki/references/src-details/mcp-server.md +185 -234
- 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/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/README.md
CHANGED
|
@@ -21,13 +21,15 @@ Add to your Claude Desktop config (`claude_desktop_config.json`):
|
|
|
21
21
|
{
|
|
22
22
|
"mcpServers": {
|
|
23
23
|
"ignis-docs": {
|
|
24
|
-
"command": "
|
|
25
|
-
"args": ["@venizia/ignis-docs"]
|
|
24
|
+
"command": "bunx",
|
|
25
|
+
"args": ["@venizia/ignis-docs@latest"]
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
You can also `npx` for alternative
|
|
32
|
+
|
|
31
33
|
## Available MCP Tools
|
|
32
34
|
|
|
33
35
|
| Tool | Description |
|
|
@@ -51,3 +53,407 @@ Ignis brings together the structured, enterprise development experience of **Loo
|
|
|
51
53
|
## License
|
|
52
54
|
|
|
53
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.
|
|
@@ -1,27 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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: {
|
|
3
7
|
readonly name: "ignis-docs";
|
|
4
8
|
readonly version: "0.0.1";
|
|
5
9
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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;
|
|
11
21
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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;
|
|
25
39
|
};
|
|
26
|
-
|
|
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
|
+
}
|
|
27
64
|
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../common/config.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../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"}
|
|
@@ -1,27 +1,82 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
exports.MCPConfigs = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Centralized configuration for the Ignis MCP Documentation Server.
|
|
6
|
+
* All tool constants and settings are defined here for easy maintenance.
|
|
7
|
+
*/
|
|
8
|
+
class MCPConfigs {
|
|
9
|
+
// ----------------------------------------------------------------------------
|
|
10
|
+
// SERVER CONFIGURATION
|
|
11
|
+
// ----------------------------------------------------------------------------
|
|
12
|
+
static { this.server = { name: 'ignis-docs', version: '0.0.1' }; }
|
|
13
|
+
// ----------------------------------------------------------------------------
|
|
14
|
+
// GITHUB CONFIGURATION
|
|
15
|
+
// ----------------------------------------------------------------------------
|
|
16
|
+
/** Runtime-configurable branch (set via CLI argument) */
|
|
17
|
+
static { this._branch = 'main'; }
|
|
18
|
+
static { this.github = {
|
|
19
|
+
apiBase: 'https://api.github.com',
|
|
20
|
+
rawContentBase: 'https://raw.githubusercontent.com',
|
|
21
|
+
repoOwner: 'VENIZIA-AI',
|
|
22
|
+
repoPath: 'repos',
|
|
23
|
+
repoName: 'ignis',
|
|
24
|
+
userAgent: 'Ignis-MCP-Server',
|
|
25
|
+
/** Get current branch (configurable at runtime) */
|
|
26
|
+
get branch() {
|
|
27
|
+
return MCPConfigs._branch;
|
|
28
|
+
},
|
|
29
|
+
}; }
|
|
30
|
+
/**
|
|
31
|
+
* Set the GitHub branch to use for fetching source code.
|
|
32
|
+
* Call this before starting the server.
|
|
33
|
+
* @param branch - Branch name (e.g., 'main', 'develop', 'feature/xyz')
|
|
34
|
+
*/
|
|
35
|
+
static setBranch(opts) {
|
|
36
|
+
MCPConfigs._branch = opts.branch;
|
|
37
|
+
}
|
|
38
|
+
// ----------------------------------------------------------------------------
|
|
39
|
+
// DOCUMENTATION SEARCH CONFIGURATION
|
|
40
|
+
// ----------------------------------------------------------------------------
|
|
41
|
+
static { this.search = {
|
|
42
|
+
/** Maximum characters for content snippet in search results */
|
|
43
|
+
snippetLength: 320,
|
|
44
|
+
/** Default number of results to return */
|
|
11
45
|
defaultLimit: 10,
|
|
46
|
+
/** Maximum allowed results per search */
|
|
12
47
|
maxLimit: 50,
|
|
48
|
+
/** Minimum query length required */
|
|
13
49
|
minQueryLength: 2,
|
|
14
|
-
}
|
|
15
|
-
|
|
50
|
+
}; }
|
|
51
|
+
// ----------------------------------------------------------------------------
|
|
52
|
+
// CODE SEARCH CONFIGURATION
|
|
53
|
+
// ----------------------------------------------------------------------------
|
|
54
|
+
static { this.codeSearch = {
|
|
55
|
+
/** Default number of results to return */
|
|
56
|
+
defaultLimit: 10,
|
|
57
|
+
/** Maximum allowed results per search (GitHub API limit) */
|
|
58
|
+
maxLimit: 30,
|
|
59
|
+
/** Minimum query length required */
|
|
60
|
+
minQueryLength: 2,
|
|
61
|
+
/** Rate limit warning threshold */
|
|
62
|
+
rateLimitWarningThreshold: 5,
|
|
63
|
+
}; }
|
|
64
|
+
// ----------------------------------------------------------------------------
|
|
65
|
+
// FUSE.JS SEARCH ENGINE CONFIGURATION
|
|
66
|
+
// ----------------------------------------------------------------------------
|
|
67
|
+
static { this.fuse = {
|
|
16
68
|
includeScore: true,
|
|
69
|
+
/** Lower threshold = stricter matching (0.0 = exact, 1.0 = match anything) */
|
|
17
70
|
threshold: 0.4,
|
|
18
71
|
minMatchCharLength: 2,
|
|
19
72
|
findAllMatches: true,
|
|
20
73
|
ignoreLocation: true,
|
|
74
|
+
/** Search field weights: title matches are prioritized over content */
|
|
21
75
|
keys: [
|
|
22
|
-
{ name:
|
|
23
|
-
{ name:
|
|
76
|
+
{ name: 'title', weight: 0.7 },
|
|
77
|
+
{ name: 'content', weight: 0.3 },
|
|
24
78
|
],
|
|
25
|
-
}
|
|
26
|
-
}
|
|
79
|
+
}; }
|
|
80
|
+
}
|
|
81
|
+
exports.MCPConfigs = MCPConfigs;
|
|
27
82
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../common/config.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../common/config.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,MAAa,UAAU;IACrB,+EAA+E;IAC/E,uBAAuB;IACvB,+EAA+E;aAC/D,WAAM,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAW,CAAC;IAE3E,+EAA+E;IAC/E,uBAAuB;IACvB,+EAA+E;IAE/E,yDAAyD;aAC1C,YAAO,GAAW,MAAM,CAAC;aAExB,WAAM,GAAG;QACvB,OAAO,EAAE,wBAAwB;QACjC,cAAc,EAAE,mCAAmC;QACnD,SAAS,EAAE,YAAY;QACvB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,OAAO;QACjB,SAAS,EAAE,kBAAkB;QAE7B,mDAAmD;QACnD,IAAI,MAAM;YACR,OAAO,UAAU,CAAC,OAAO,CAAC;QAC5B,CAAC;KACF,CAAC;IAEF;;;;OAIG;IACH,MAAM,CAAC,SAAS,CAAC,IAAwB;QACvC,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;IACnC,CAAC;IAED,+EAA+E;IAC/E,qCAAqC;IACrC,+EAA+E;aAC/D,WAAM,GAAG;QACvB,+DAA+D;QAC/D,aAAa,EAAE,GAAG;QAClB,0CAA0C;QAC1C,YAAY,EAAE,EAAE;QAChB,yCAAyC;QACzC,QAAQ,EAAE,EAAE;QACZ,oCAAoC;QACpC,cAAc,EAAE,CAAC;KAClB,CAAC;IAEF,+EAA+E;IAC/E,4BAA4B;IAC5B,+EAA+E;aAC/D,eAAU,GAAG;QAC3B,0CAA0C;QAC1C,YAAY,EAAE,EAAE;QAChB,4DAA4D;QAC5D,QAAQ,EAAE,EAAE;QACZ,oCAAoC;QACpC,cAAc,EAAE,CAAC;QACjB,mCAAmC;QACnC,yBAAyB,EAAE,CAAC;KAC7B,CAAC;IAEF,+EAA+E;IAC/E,sCAAsC;IACtC,+EAA+E;aAC/D,SAAI,GAAG;QACrB,YAAY,EAAE,IAAI;QAClB,8EAA8E;QAC9E,SAAS,EAAE,GAAG;QACd,kBAAkB,EAAE,CAAC;QACrB,cAAc,EAAE,IAAI;QACpB,cAAc,EAAE,IAAI;QACpB,uEAAuE;QACvE,IAAI,EAAE;YACJ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE;YAC9B,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE;SACjC;KACF,CAAC;;AA/EJ,gCAgFC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './paths';
|
|
2
|
+
export * from './config';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -8,18 +8,18 @@ const node_path_1 = __importDefault(require("node:path"));
|
|
|
8
8
|
const MCP_ROOT = __dirname;
|
|
9
9
|
// When compiled, __dirname is mcp-server/dist/common
|
|
10
10
|
// Go up 3 levels to reach package root: common -> dist -> mcp-server -> docs
|
|
11
|
-
const DOCS_ROOT = node_path_1.default.resolve(MCP_ROOT,
|
|
11
|
+
const DOCS_ROOT = node_path_1.default.resolve(MCP_ROOT, '..', '..', '..');
|
|
12
12
|
class Paths {
|
|
13
|
-
static { this.WIKI = node_path_1.default.join(DOCS_ROOT,
|
|
14
|
-
static { this.GET_STARTED = node_path_1.default.join(this.WIKI,
|
|
15
|
-
static { this.BEST_PRACTICES = node_path_1.default.join(this.GET_STARTED,
|
|
16
|
-
static { this.CORE_CONCEPTS = node_path_1.default.join(this.GET_STARTED,
|
|
17
|
-
static { this.REFERENCES = node_path_1.default.join(this.WIKI,
|
|
18
|
-
static { this.BASE = node_path_1.default.join(this.REFERENCES,
|
|
19
|
-
static { this.COMPONENTS = node_path_1.default.join(this.REFERENCES,
|
|
20
|
-
static { this.HELPERS = node_path_1.default.join(this.REFERENCES,
|
|
21
|
-
static { this.SOURCE_DETAILS = node_path_1.default.join(this.REFERENCES,
|
|
22
|
-
static { this.UTILITIES = node_path_1.default.join(this.REFERENCES,
|
|
13
|
+
static { this.WIKI = node_path_1.default.join(DOCS_ROOT, 'wiki'); }
|
|
14
|
+
static { this.GET_STARTED = node_path_1.default.join(this.WIKI, 'get-started'); }
|
|
15
|
+
static { this.BEST_PRACTICES = node_path_1.default.join(this.GET_STARTED, 'best-practices'); }
|
|
16
|
+
static { this.CORE_CONCEPTS = node_path_1.default.join(this.GET_STARTED, 'core-concepts'); }
|
|
17
|
+
static { this.REFERENCES = node_path_1.default.join(this.WIKI, 'references'); }
|
|
18
|
+
static { this.BASE = node_path_1.default.join(this.REFERENCES, 'base'); }
|
|
19
|
+
static { this.COMPONENTS = node_path_1.default.join(this.REFERENCES, 'components'); }
|
|
20
|
+
static { this.HELPERS = node_path_1.default.join(this.REFERENCES, 'helpers'); }
|
|
21
|
+
static { this.SOURCE_DETAILS = node_path_1.default.join(this.REFERENCES, 'src-details'); }
|
|
22
|
+
static { this.UTILITIES = node_path_1.default.join(this.REFERENCES, 'utilities'); }
|
|
23
23
|
}
|
|
24
24
|
exports.Paths = Paths;
|
|
25
25
|
//# sourceMappingURL=paths.js.map
|