nitrostack 1.0.57 → 1.0.58
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/package.json +8 -2
- package/ARCHITECTURE.md +0 -302
- package/CHANGELOG.md +0 -49
- package/CONTRIBUTING.md +0 -182
- package/NOTICE +0 -153
- package/jest.config.js +0 -21
- package/src/assets/nitrocloud.png +0 -0
- package/src/studio/README.md +0 -140
- package/src/studio/app/api/auth/fetch-metadata/route.ts +0 -71
- package/src/studio/app/api/auth/register-client/route.ts +0 -67
- package/src/studio/app/api/chat/route.ts +0 -250
- package/src/studio/app/api/health/checks/route.ts +0 -42
- package/src/studio/app/api/health/route.ts +0 -13
- package/src/studio/app/api/init/route.ts +0 -109
- package/src/studio/app/api/ping/route.ts +0 -13
- package/src/studio/app/api/prompts/[name]/route.ts +0 -21
- package/src/studio/app/api/prompts/route.ts +0 -13
- package/src/studio/app/api/resources/[...uri]/route.ts +0 -18
- package/src/studio/app/api/resources/route.ts +0 -13
- package/src/studio/app/api/roots/route.ts +0 -13
- package/src/studio/app/api/sampling/route.ts +0 -14
- package/src/studio/app/api/tools/[name]/call/route.ts +0 -41
- package/src/studio/app/api/tools/route.ts +0 -23
- package/src/studio/app/api/widget-examples/route.ts +0 -44
- package/src/studio/app/auth/callback/page.tsx +0 -175
- package/src/studio/app/auth/page.tsx +0 -560
- package/src/studio/app/chat/page.tsx +0 -1133
- package/src/studio/app/chat/page.tsx.backup +0 -390
- package/src/studio/app/globals.css +0 -486
- package/src/studio/app/health/page.tsx +0 -179
- package/src/studio/app/layout.tsx +0 -68
- package/src/studio/app/logs/page.tsx +0 -279
- package/src/studio/app/page.tsx +0 -351
- package/src/studio/app/page.tsx.backup +0 -346
- package/src/studio/app/ping/page.tsx +0 -209
- package/src/studio/app/prompts/page.tsx +0 -230
- package/src/studio/app/resources/page.tsx +0 -315
- package/src/studio/app/settings/page.tsx +0 -199
- package/src/studio/branding.md +0 -807
- package/src/studio/components/EnlargeModal.tsx +0 -138
- package/src/studio/components/LogMessage.tsx +0 -153
- package/src/studio/components/MarkdownRenderer.tsx +0 -410
- package/src/studio/components/Sidebar.tsx +0 -295
- package/src/studio/components/ToolCard.tsx +0 -139
- package/src/studio/components/WidgetRenderer.tsx +0 -346
- package/src/studio/lib/api.ts +0 -207
- package/src/studio/lib/http-client-transport.ts +0 -222
- package/src/studio/lib/llm-service.ts +0 -480
- package/src/studio/lib/log-manager.ts +0 -76
- package/src/studio/lib/mcp-client.ts +0 -258
- package/src/studio/lib/store.ts +0 -192
- package/src/studio/lib/theme-provider.tsx +0 -50
- package/src/studio/lib/types.ts +0 -107
- package/src/studio/lib/widget-loader.ts +0 -90
- package/src/studio/middleware.ts +0 -27
- package/src/studio/next.config.js +0 -38
- package/src/studio/package.json +0 -35
- package/src/studio/postcss.config.mjs +0 -10
- package/src/studio/public/nitrocloud.png +0 -0
- package/src/studio/tailwind.config.ts +0 -67
- package/src/studio/tsconfig.json +0 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nitrostack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.58",
|
|
4
4
|
"description": "NitroStack - Build powerful MCP servers with TypeScript",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/core/index.js",
|
|
@@ -25,6 +25,12 @@
|
|
|
25
25
|
"types": "./dist/widgets/index.d.ts"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist/",
|
|
30
|
+
"templates/",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
28
34
|
"peerDependencies": {
|
|
29
35
|
"react": "^18.0.0 || ^19.0.0"
|
|
30
36
|
},
|
|
@@ -108,4 +114,4 @@
|
|
|
108
114
|
"url": "https://github.com/abhishekpanditofficial/nitrostack/issues"
|
|
109
115
|
},
|
|
110
116
|
"homepage": "https://nitrostack.vercel.app"
|
|
111
|
-
}
|
|
117
|
+
}
|
package/ARCHITECTURE.md
DELETED
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
# NitroStack Architecture
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
NitroStack is a **framework** built on top of the official MCP SDK that provides a structured, decorator-based approach for building production-ready MCP servers with enterprise features.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
┌─────────────────────────────────────────────────────────────┐
|
|
9
|
-
│ NitroStack Framework │
|
|
10
|
-
├─────────────────────────────────────────────────────────────┤
|
|
11
|
-
│ CLI Tools │ Templates │ Studio UI │ Decorators │
|
|
12
|
-
├─────────────────────────────────────────────────────────────┤
|
|
13
|
-
│ Core Server Layer (Module System) │
|
|
14
|
-
├─────────────────────────────────────────────────────────────┤
|
|
15
|
-
│ Auth │ Guards │ Interceptors │ Pipes │ Events │
|
|
16
|
-
├─────────────────────────────────────────────────────────────┤
|
|
17
|
-
│ Transport Layer (HTTP/STDIO) │
|
|
18
|
-
├─────────────────────────────────────────────────────────────┤
|
|
19
|
-
│ Official MCP SDK (@modelcontextprotocol) │
|
|
20
|
-
└─────────────────────────────────────────────────────────────┘
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Core Architecture
|
|
24
|
-
|
|
25
|
-
### 1. Module System (Inspired by NestJS)
|
|
26
|
-
|
|
27
|
-
**Module** → Groups related components
|
|
28
|
-
```typescript
|
|
29
|
-
@Module({
|
|
30
|
-
components: [CalculatorComponent],
|
|
31
|
-
imports: [ConfigModule]
|
|
32
|
-
})
|
|
33
|
-
export class AppModule {}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
**Component** → Contains tools, resources, prompts
|
|
37
|
-
```typescript
|
|
38
|
-
@Component()
|
|
39
|
-
export class CalculatorComponent {
|
|
40
|
-
@Tool({ description: "Add numbers" })
|
|
41
|
-
add(@Param('a') a: number, @Param('b') b: number) {
|
|
42
|
-
return a + b;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### 2. Decorator System
|
|
48
|
-
|
|
49
|
-
**Purpose**: Declarative API for defining MCP primitives
|
|
50
|
-
|
|
51
|
-
| Decorator | Purpose |
|
|
52
|
-
|-----------|---------|
|
|
53
|
-
| `@Tool()` | Define callable tools |
|
|
54
|
-
| `@Resource()` | Expose data resources |
|
|
55
|
-
| `@Prompt()` | Create prompt templates |
|
|
56
|
-
| `@UseGuards()` | Apply authentication |
|
|
57
|
-
| `@UseInterceptors()` | Add middleware logic |
|
|
58
|
-
| `@UsePipes()` | Validate/transform input |
|
|
59
|
-
| `@Subscribe()` | Handle events |
|
|
60
|
-
|
|
61
|
-
### 3. Dependency Injection
|
|
62
|
-
|
|
63
|
-
**Injectable Services** → Shared across components
|
|
64
|
-
```typescript
|
|
65
|
-
@Injectable()
|
|
66
|
-
export class DatabaseService {
|
|
67
|
-
query(sql: string) { ... }
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
@Component()
|
|
71
|
-
export class UserComponent {
|
|
72
|
-
constructor(private db: DatabaseService) {}
|
|
73
|
-
}
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Component Flow
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
Request → Transport → Server → Guards → Pipes → Component Method → Interceptors → Response
|
|
80
|
-
↓ ↓
|
|
81
|
-
Auth Check Logging/Transform
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
1. **Transport** receives request (HTTP/STDIO)
|
|
85
|
-
2. **Guards** check authentication/authorization
|
|
86
|
-
3. **Pipes** validate and transform input
|
|
87
|
-
4. **Component** executes business logic
|
|
88
|
-
5. **Interceptors** transform response/add logging
|
|
89
|
-
6. **Transport** sends response back
|
|
90
|
-
|
|
91
|
-
## Key Features
|
|
92
|
-
|
|
93
|
-
### 🔒 Built-in Authentication
|
|
94
|
-
- **JWT**: Token-based auth
|
|
95
|
-
- **API Key**: Simple key-based auth
|
|
96
|
-
- **OAuth**: Full OAuth2/PKCE flow
|
|
97
|
-
- **Guards**: Declarative protection
|
|
98
|
-
|
|
99
|
-
### 🚀 Dual Transport
|
|
100
|
-
- **STDIO**: For dev (MCP Inspector, Claude Desktop)
|
|
101
|
-
- **HTTP SSE**: For production web clients
|
|
102
|
-
- **Auto-switching**: Based on NODE_ENV
|
|
103
|
-
|
|
104
|
-
### 🎨 NitroStudio (Admin UI)
|
|
105
|
-
- Visual tool testing
|
|
106
|
-
- Resource browsing
|
|
107
|
-
- Prompt management
|
|
108
|
-
- Real-time logs
|
|
109
|
-
- Built with Next.js
|
|
110
|
-
|
|
111
|
-
### 🧩 Widget System
|
|
112
|
-
- React components for tool UIs
|
|
113
|
-
- Auto-exported as static HTML
|
|
114
|
-
- Embedded in tool responses
|
|
115
|
-
- Custom rendering in clients
|
|
116
|
-
|
|
117
|
-
### 📦 CLI Tooling
|
|
118
|
-
```bash
|
|
119
|
-
nitro init # Scaffold new project
|
|
120
|
-
nitro dev # Run with hot-reload
|
|
121
|
-
nitro build # Production build
|
|
122
|
-
nitro generate-types # Generate TypeScript types
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### 🏗️ Templates
|
|
126
|
-
- `typescript-starter` - Basic MCP server
|
|
127
|
-
- `typescript-auth` - With JWT auth
|
|
128
|
-
- `typescript-auth-api-key` - With API key auth
|
|
129
|
-
- `typescript-oauth` - With OAuth flow
|
|
130
|
-
|
|
131
|
-
## Architecture Comparison
|
|
132
|
-
|
|
133
|
-
### Official MCP SDK
|
|
134
|
-
```typescript
|
|
135
|
-
// Manual setup, imperative
|
|
136
|
-
const server = new Server({ name: "my-server" });
|
|
137
|
-
|
|
138
|
-
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
139
|
-
tools: [{ name: "add", description: "...", inputSchema: {...} }]
|
|
140
|
-
}));
|
|
141
|
-
|
|
142
|
-
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
143
|
-
if (request.params.name === "add") {
|
|
144
|
-
return { content: [{ type: "text", text: result }] };
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
|
|
148
|
-
const transport = new StdioServerTransport();
|
|
149
|
-
await server.connect(transport);
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### NitroStack
|
|
153
|
-
```typescript
|
|
154
|
-
// Declarative, structured
|
|
155
|
-
@Component()
|
|
156
|
-
export class CalculatorComponent {
|
|
157
|
-
@Tool({ description: "Add numbers" })
|
|
158
|
-
@UseGuards(JwtGuard)
|
|
159
|
-
@HealthCheck('add-operation')
|
|
160
|
-
async add(
|
|
161
|
-
@Param('a') a: number,
|
|
162
|
-
@Param('b') b: number
|
|
163
|
-
): Promise<number> {
|
|
164
|
-
return a + b;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Bootstrap
|
|
169
|
-
await McpApplicationFactory.create(AppModule).start('dual');
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Advantages Over Raw SDK
|
|
173
|
-
|
|
174
|
-
| Feature | MCP SDK | NitroStack |
|
|
175
|
-
|---------|---------|------------|
|
|
176
|
-
| **Structure** | Manual | Module-based |
|
|
177
|
-
| **Tools** | Imperative handlers | Decorators |
|
|
178
|
-
| **Auth** | DIY | Built-in (JWT/OAuth/API Key) |
|
|
179
|
-
| **Validation** | Manual | Pipes with Zod |
|
|
180
|
-
| **Transport** | Single | Dual (HTTP+STDIO) |
|
|
181
|
-
| **UI** | None | NitroStudio |
|
|
182
|
-
| **DI** | None | Full container |
|
|
183
|
-
| **Guards** | DIY | Declarative |
|
|
184
|
-
| **Events** | None | EventEmitter |
|
|
185
|
-
| **Widgets** | None | React components |
|
|
186
|
-
| **CLI** | None | Full toolchain |
|
|
187
|
-
| **Templates** | None | 4+ ready templates |
|
|
188
|
-
|
|
189
|
-
## Component Relationships
|
|
190
|
-
|
|
191
|
-
```
|
|
192
|
-
AppModule
|
|
193
|
-
├── ConfigModule (Injectable)
|
|
194
|
-
├── AuthModule (JWT/OAuth/API Key)
|
|
195
|
-
└── Feature Modules
|
|
196
|
-
├── CalculatorComponent
|
|
197
|
-
│ ├── Tools (@Tool decorator)
|
|
198
|
-
│ ├── Resources (@Resource decorator)
|
|
199
|
-
│ ├── Prompts (@Prompt decorator)
|
|
200
|
-
│ └── Dependencies (via DI)
|
|
201
|
-
└── DatabaseComponent
|
|
202
|
-
└── Shared via @Injectable
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
## Production Architecture
|
|
206
|
-
|
|
207
|
-
```
|
|
208
|
-
┌──────────────────────────────────────────┐
|
|
209
|
-
│ Load Balancer (nginx) │
|
|
210
|
-
└─────────────┬────────────────────────────┘
|
|
211
|
-
│
|
|
212
|
-
┌─────────┴─────────┐
|
|
213
|
-
│ │
|
|
214
|
-
┌───▼────┐ ┌───▼────┐
|
|
215
|
-
│ Node 1 │ │ Node 2 │ (Multiple instances)
|
|
216
|
-
│ :3000 │ │ :3001 │
|
|
217
|
-
└───┬────┘ └───┬────┘
|
|
218
|
-
│ │
|
|
219
|
-
│ HTTP SSE + STDIO │
|
|
220
|
-
│ │
|
|
221
|
-
┌───▼───────────────────▼────┐
|
|
222
|
-
│ Shared Services │
|
|
223
|
-
│ (DB, Cache, Message Q) │
|
|
224
|
-
└─────────────────────────────┘
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## Development Workflow
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
# 1. Scaffold
|
|
231
|
-
nitro init my-server --template typescript-auth
|
|
232
|
-
|
|
233
|
-
# 2. Develop
|
|
234
|
-
cd my-server
|
|
235
|
-
npm install
|
|
236
|
-
npm run dev # STDIO transport for Inspector
|
|
237
|
-
|
|
238
|
-
# 3. Build
|
|
239
|
-
npm run build # Compiles TS + exports widgets
|
|
240
|
-
|
|
241
|
-
# 4. Production
|
|
242
|
-
NODE_ENV=production npm start # Dual transport
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
## File Structure
|
|
246
|
-
|
|
247
|
-
```
|
|
248
|
-
my-server/
|
|
249
|
-
├── src/
|
|
250
|
-
│ ├── index.ts # Bootstrap
|
|
251
|
-
│ ├── app.module.ts # Root module
|
|
252
|
-
│ ├── modules/ # Feature modules
|
|
253
|
-
│ │ └── calculator/
|
|
254
|
-
│ │ ├── calculator.component.ts
|
|
255
|
-
│ │ └── calculator.service.ts
|
|
256
|
-
│ ├── guards/ # Auth guards
|
|
257
|
-
│ ├── interceptors/ # Logging, transform
|
|
258
|
-
│ ├── pipes/ # Validation
|
|
259
|
-
│ └── widgets/ # React UIs
|
|
260
|
-
│ ├── package.json
|
|
261
|
-
│ └── components/
|
|
262
|
-
└── dist/ # Compiled output
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
## Key Design Principles
|
|
266
|
-
|
|
267
|
-
1. **Convention over Configuration** - Sensible defaults, minimal boilerplate
|
|
268
|
-
2. **Decorator-First** - Declarative, self-documenting code
|
|
269
|
-
3. **Production-Ready** - Auth, validation, logging, health checks
|
|
270
|
-
4. **Framework Agnostic** - Can integrate with Express, Fastify, etc.
|
|
271
|
-
5. **Type-Safe** - Full TypeScript support with inference
|
|
272
|
-
6. **Modular** - Each feature is a module, easy to add/remove
|
|
273
|
-
|
|
274
|
-
## When to Use NitroStack vs Raw SDK
|
|
275
|
-
|
|
276
|
-
### Use NitroStack When:
|
|
277
|
-
- Building production servers
|
|
278
|
-
- Need authentication
|
|
279
|
-
- Want structured codebase
|
|
280
|
-
- Multiple developers
|
|
281
|
-
- Need admin UI
|
|
282
|
-
- Building complex servers with many tools
|
|
283
|
-
|
|
284
|
-
### Use Raw SDK When:
|
|
285
|
-
- Simple, single-purpose servers
|
|
286
|
-
- Prototyping/experimenting
|
|
287
|
-
- Minimal dependencies preferred
|
|
288
|
-
- Learning MCP basics
|
|
289
|
-
- Custom architecture needed
|
|
290
|
-
|
|
291
|
-
## Summary
|
|
292
|
-
|
|
293
|
-
NitroStack = **MCP SDK** + **Structure** + **Enterprise Features** + **Developer Experience**
|
|
294
|
-
|
|
295
|
-
It's not replacing the MCP SDK, it's enhancing it with:
|
|
296
|
-
- 🏗️ **Architecture**: Modules, components, DI
|
|
297
|
-
- 🔐 **Security**: Built-in auth strategies
|
|
298
|
-
- 🎨 **UI**: Admin dashboard & widget system
|
|
299
|
-
- 🛠️ **Tooling**: CLI, templates, hot-reload
|
|
300
|
-
- 📦 **Deployment**: Dual transport, production-ready
|
|
301
|
-
|
|
302
|
-
Think of it as **NestJS for MCP** - bringing enterprise patterns and developer ergonomics to MCP server development.
|
package/CHANGELOG.md
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to NitroStack will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [1.0.15] - 2025-10-28
|
|
9
|
-
|
|
10
|
-
### Fixed
|
|
11
|
-
- **Node.js Compatibility**: Fixed compatibility issues with Node.js versions 18.x and 20.x (< 20.10.0)
|
|
12
|
-
- Downgraded `ora` from v9.0.0 to v8.1.1 to avoid `import ... with {type: 'json'}` syntax
|
|
13
|
-
- Downgraded `inquirer` from v12.10.0 to v9.3.7 for broader Node.js compatibility
|
|
14
|
-
- Added `@types/inquirer` v9.0.7 as dev dependency for TypeScript support
|
|
15
|
-
- Resolved `SyntaxError: Unexpected token 'with'` error on older Node.js versions
|
|
16
|
-
|
|
17
|
-
### Added
|
|
18
|
-
- `NODE_COMPATIBILITY.md` - Comprehensive guide for Node.js version compatibility
|
|
19
|
-
- Updated README with Node.js version requirements
|
|
20
|
-
|
|
21
|
-
### Changed
|
|
22
|
-
- Improved developer experience for users on different Node.js versions
|
|
23
|
-
- Package now works reliably on Node.js 18.0.0 and later
|
|
24
|
-
|
|
25
|
-
## [1.0.14] - 2025-10-27
|
|
26
|
-
|
|
27
|
-
### Added
|
|
28
|
-
- Initial public release to npm
|
|
29
|
-
- Full MCP server framework with decorators
|
|
30
|
-
- Built-in Studio for visual testing
|
|
31
|
-
- Authentication modules (JWT, OAuth 2.1, API Keys)
|
|
32
|
-
- Widget system for interactive UIs
|
|
33
|
-
- CLI with project generation and hot reload
|
|
34
|
-
- Multiple starter templates
|
|
35
|
-
- Comprehensive documentation
|
|
36
|
-
|
|
37
|
-
### Features
|
|
38
|
-
- Declarative programming model with decorators
|
|
39
|
-
- Runtime pipeline (Guards, Middleware, Interceptors, Pipes, Filters)
|
|
40
|
-
- Type generation from tool definitions
|
|
41
|
-
- Caching and rate limiting support
|
|
42
|
-
- Hot reload development workflow
|
|
43
|
-
- Production-grade tooling
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## Version History
|
|
48
|
-
|
|
49
|
-
For older versions and detailed changes, see [GitHub Releases](https://github.com/abhishekpanditofficial/nitrostack/releases).
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
# Contributing to NitroStack
|
|
2
|
-
|
|
3
|
-
Thank you for your interest in contributing to NitroStack! This document provides guidelines and instructions for contributing.
|
|
4
|
-
|
|
5
|
-
## 📝 Contributor License Agreement
|
|
6
|
-
|
|
7
|
-
By contributing to NitroStack, you agree that your contributions will be licensed under the [Apache License 2.0](LICENSE). This means:
|
|
8
|
-
|
|
9
|
-
- You have the right to contribute the code
|
|
10
|
-
- You agree to license your contributions under Apache 2.0
|
|
11
|
-
- Your contributions will be made available to the community
|
|
12
|
-
|
|
13
|
-
## Getting Started
|
|
14
|
-
|
|
15
|
-
1. Fork the repository
|
|
16
|
-
2. Clone your fork: `git clone https://github.com/yourusername/nitrostack.git`
|
|
17
|
-
3. Create a branch: `git checkout -b feature/your-feature-name`
|
|
18
|
-
4. Make your changes
|
|
19
|
-
5. Add Apache 2.0 license header to new files (see below)
|
|
20
|
-
6. Run tests: `npm test`
|
|
21
|
-
7. Commit your changes: `git commit -am 'Add some feature'`
|
|
22
|
-
8. Push to the branch: `git push origin feature/your-feature-name`
|
|
23
|
-
9. Create a Pull Request
|
|
24
|
-
|
|
25
|
-
## 📄 License Headers
|
|
26
|
-
|
|
27
|
-
All new source files must include the Apache 2.0 license header:
|
|
28
|
-
|
|
29
|
-
```typescript
|
|
30
|
-
/**
|
|
31
|
-
* Copyright 2025 Abhishek Pandit
|
|
32
|
-
*
|
|
33
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
34
|
-
* you may not use this file except in compliance with the License.
|
|
35
|
-
* You may obtain a copy of the License at
|
|
36
|
-
*
|
|
37
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
38
|
-
*
|
|
39
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
40
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
41
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
42
|
-
* See the License for the specific language governing permissions and
|
|
43
|
-
* limitations under the License.
|
|
44
|
-
*/
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Development Setup
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
# Install dependencies
|
|
51
|
-
npm install
|
|
52
|
-
|
|
53
|
-
# Build the project
|
|
54
|
-
npm run build
|
|
55
|
-
|
|
56
|
-
# Run in development mode
|
|
57
|
-
npm run dev
|
|
58
|
-
|
|
59
|
-
# Run tests
|
|
60
|
-
npm test
|
|
61
|
-
|
|
62
|
-
# Lint code
|
|
63
|
-
npm run lint
|
|
64
|
-
|
|
65
|
-
# Format code
|
|
66
|
-
npm run format
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
## Project Structure
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
nitrostack/
|
|
73
|
-
├── src/
|
|
74
|
-
│ ├── core/ # Core framework
|
|
75
|
-
│ │ ├── server.ts # Main server class
|
|
76
|
-
│ │ ├── tool.ts # Tool abstraction
|
|
77
|
-
│ │ ├── resource.ts # Resource abstraction
|
|
78
|
-
│ │ ├── prompt.ts # Prompt abstraction
|
|
79
|
-
│ │ ├── logger.ts # Logging utilities
|
|
80
|
-
│ │ ├── errors.ts # Error classes
|
|
81
|
-
│ │ └── types.ts # Type definitions
|
|
82
|
-
│ └── cli/ # CLI tool
|
|
83
|
-
│ ├── index.ts # CLI entry point
|
|
84
|
-
│ └── commands/ # CLI commands
|
|
85
|
-
├── templates/ # Project templates
|
|
86
|
-
│ ├── basic/
|
|
87
|
-
│ ├── typescript/
|
|
88
|
-
│ └── advanced/
|
|
89
|
-
└── examples/ # Example projects
|
|
90
|
-
|
|
91
|
-
## Code Style
|
|
92
|
-
|
|
93
|
-
We use ESLint and Prettier for code formatting. Please ensure your code passes linting:
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
npm run lint
|
|
97
|
-
npm run format
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Testing
|
|
101
|
-
|
|
102
|
-
- Write tests for new features
|
|
103
|
-
- Ensure all tests pass before submitting PR
|
|
104
|
-
- Aim for good test coverage
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
npm test
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Commit Messages
|
|
111
|
-
|
|
112
|
-
Follow conventional commit format:
|
|
113
|
-
|
|
114
|
-
- `feat:` New feature
|
|
115
|
-
- `fix:` Bug fix
|
|
116
|
-
- `docs:` Documentation changes
|
|
117
|
-
- `style:` Code style changes (formatting, etc.)
|
|
118
|
-
- `refactor:` Code refactoring
|
|
119
|
-
- `test:` Test changes
|
|
120
|
-
- `chore:` Build process or auxiliary tool changes
|
|
121
|
-
|
|
122
|
-
Example:
|
|
123
|
-
```
|
|
124
|
-
feat: add rate limiting support for tools
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
## Pull Request Process
|
|
128
|
-
|
|
129
|
-
1. Update the README.md with details of changes if applicable
|
|
130
|
-
2. Update the CHANGELOG.md with a note describing your changes
|
|
131
|
-
3. Ensure all tests pass and linting is clean
|
|
132
|
-
4. Request review from maintainers
|
|
133
|
-
5. Address any feedback
|
|
134
|
-
|
|
135
|
-
## Reporting Bugs
|
|
136
|
-
|
|
137
|
-
When reporting bugs, please include:
|
|
138
|
-
|
|
139
|
-
- Your operating system and version
|
|
140
|
-
- Node.js version
|
|
141
|
-
- NitroStack version
|
|
142
|
-
- Steps to reproduce the bug
|
|
143
|
-
- Expected behavior
|
|
144
|
-
- Actual behavior
|
|
145
|
-
- Any error messages or logs
|
|
146
|
-
|
|
147
|
-
## Feature Requests
|
|
148
|
-
|
|
149
|
-
We welcome feature requests! Please:
|
|
150
|
-
|
|
151
|
-
- Check if the feature has already been requested
|
|
152
|
-
- Clearly describe the feature and its use case
|
|
153
|
-
- Provide examples of how it would be used
|
|
154
|
-
|
|
155
|
-
## Code of Conduct
|
|
156
|
-
|
|
157
|
-
- Be respectful and inclusive
|
|
158
|
-
- Welcome newcomers
|
|
159
|
-
- Focus on constructive feedback
|
|
160
|
-
- Maintain professional communication
|
|
161
|
-
|
|
162
|
-
## Questions?
|
|
163
|
-
|
|
164
|
-
Feel free to:
|
|
165
|
-
- Open an issue for discussion
|
|
166
|
-
- Join our community discussions
|
|
167
|
-
- Reach out to maintainers
|
|
168
|
-
|
|
169
|
-
## 🔗 Resources
|
|
170
|
-
|
|
171
|
-
- **Website**: [https://nitrostack.vercel.app/](https://nitrostack.vercel.app/)
|
|
172
|
-
- **Documentation**: [https://nitrostack-docs.vercel.app/](https://nitrostack-docs.vercel.app/)
|
|
173
|
-
- **GitHub**: [https://github.com/abhishekpanditofficial/nitrostack](https://github.com/abhishekpanditofficial/nitrostack)
|
|
174
|
-
- **npm Package**: [https://www.npmjs.com/package/nitrostack](https://www.npmjs.com/package/nitrostack)
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
Thank you for contributing to NitroStack! 🎉
|
|
179
|
-
|
|
180
|
-
**By submitting a pull request, you represent that you have the right to license your contribution to NitroStack and the community, and agree by submitting the patch that your contributions are licensed under the Apache License 2.0.**
|
|
181
|
-
|
|
182
|
-
|
package/NOTICE
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
NitroStack
|
|
2
|
-
Copyright 2025 Abhishek Pandit
|
|
3
|
-
|
|
4
|
-
This product includes software developed by Abhishek Pandit for NitroStack (https://nitrostack.vercel.app/).
|
|
5
|
-
|
|
6
|
-
This project contains code and dependencies from various open source projects:
|
|
7
|
-
|
|
8
|
-
================================================================================
|
|
9
|
-
|
|
10
|
-
@modelcontextprotocol/sdk
|
|
11
|
-
Copyright (c) Anthropic PBC
|
|
12
|
-
Licensed under the MIT License
|
|
13
|
-
|
|
14
|
-
@google/generative-ai
|
|
15
|
-
Copyright (c) Google LLC
|
|
16
|
-
Licensed under the Apache License, Version 2.0
|
|
17
|
-
|
|
18
|
-
express
|
|
19
|
-
Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
|
|
20
|
-
Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com>
|
|
21
|
-
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
|
22
|
-
Licensed under the MIT License
|
|
23
|
-
|
|
24
|
-
zod
|
|
25
|
-
Copyright (c) 2020 Colin McDonnell
|
|
26
|
-
Licensed under the MIT License
|
|
27
|
-
|
|
28
|
-
reflect-metadata
|
|
29
|
-
Copyright (c) Microsoft Corporation
|
|
30
|
-
Licensed under the Apache License, Version 2.0
|
|
31
|
-
|
|
32
|
-
winston
|
|
33
|
-
Copyright (c) 2010 Charlie Robbins
|
|
34
|
-
Licensed under the MIT License
|
|
35
|
-
|
|
36
|
-
jsonwebtoken
|
|
37
|
-
Copyright (c) 2015 Auth0, Inc. <support@auth0.com> (http://auth0.com)
|
|
38
|
-
Licensed under the MIT License
|
|
39
|
-
|
|
40
|
-
jose
|
|
41
|
-
Copyright (c) 2020 Filip Skokan
|
|
42
|
-
Licensed under the MIT License
|
|
43
|
-
|
|
44
|
-
better-sqlite3
|
|
45
|
-
Copyright (c) 2016 Joshua Wise
|
|
46
|
-
Licensed under the MIT License
|
|
47
|
-
|
|
48
|
-
bcryptjs
|
|
49
|
-
Copyright (c) 2012 Nevins Bartolomeo
|
|
50
|
-
Licensed under the MIT License
|
|
51
|
-
|
|
52
|
-
inquirer
|
|
53
|
-
Copyright (c) 2012 Simon Boudrias
|
|
54
|
-
Licensed under the MIT License
|
|
55
|
-
|
|
56
|
-
commander
|
|
57
|
-
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>
|
|
58
|
-
Licensed under the MIT License
|
|
59
|
-
|
|
60
|
-
chokidar
|
|
61
|
-
Copyright (c) 2012-2019 Paul Miller (https://paulmillr.com)
|
|
62
|
-
Copyright (c) 2014-2019 Elan Shanker
|
|
63
|
-
Licensed under the MIT License
|
|
64
|
-
|
|
65
|
-
openai
|
|
66
|
-
Copyright (c) OpenAI
|
|
67
|
-
Licensed under the Apache License, Version 2.0
|
|
68
|
-
|
|
69
|
-
fs-extra
|
|
70
|
-
Copyright (c) 2011-2017 JP Richardson
|
|
71
|
-
Licensed under the MIT License
|
|
72
|
-
|
|
73
|
-
dotenv
|
|
74
|
-
Copyright (c) 2015, Scott Motte
|
|
75
|
-
Licensed under the BSD 2-Clause License
|
|
76
|
-
|
|
77
|
-
ora
|
|
78
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
79
|
-
Licensed under the MIT License
|
|
80
|
-
|
|
81
|
-
open
|
|
82
|
-
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
83
|
-
Licensed under the MIT License
|
|
84
|
-
|
|
85
|
-
uuid
|
|
86
|
-
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
|
87
|
-
Licensed under the MIT License
|
|
88
|
-
|
|
89
|
-
ws
|
|
90
|
-
Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
|
|
91
|
-
Licensed under the MIT License
|
|
92
|
-
|
|
93
|
-
cors
|
|
94
|
-
Copyright (c) 2013 Troy Goode <troygoode@gmail.com>
|
|
95
|
-
Licensed under the MIT License
|
|
96
|
-
|
|
97
|
-
http-proxy-middleware
|
|
98
|
-
Copyright (c) 2015 Steven Chim
|
|
99
|
-
Licensed under the MIT License
|
|
100
|
-
|
|
101
|
-
zod-to-json-schema
|
|
102
|
-
Copyright (c) 2021 Stefan Terdell
|
|
103
|
-
Licensed under the ISC License
|
|
104
|
-
|
|
105
|
-
================================================================================
|
|
106
|
-
|
|
107
|
-
For the full license texts of these dependencies, please refer to their
|
|
108
|
-
respective package directories in node_modules or their source repositories.
|
|
109
|
-
|
|
110
|
-
================================================================================
|
|
111
|
-
|
|
112
|
-
The HyperMCP project also includes documentation and examples that reference
|
|
113
|
-
various standards and specifications:
|
|
114
|
-
|
|
115
|
-
- Model Context Protocol (MCP) Specification
|
|
116
|
-
https://modelcontextprotocol.io/
|
|
117
|
-
|
|
118
|
-
- OAuth 2.1 (draft-ietf-oauth-v2-1-13)
|
|
119
|
-
https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-13
|
|
120
|
-
|
|
121
|
-
- RFC 9728 - OAuth 2.0 Protected Resource Metadata
|
|
122
|
-
https://datatracker.ietf.org/doc/html/rfc9728
|
|
123
|
-
|
|
124
|
-
- RFC 8707 - Resource Indicators for OAuth 2.0
|
|
125
|
-
https://datatracker.ietf.org/doc/html/rfc8707
|
|
126
|
-
|
|
127
|
-
- RFC 7662 - OAuth 2.0 Token Introspection
|
|
128
|
-
https://datatracker.ietf.org/doc/html/rfc7662
|
|
129
|
-
|
|
130
|
-
- RFC 8414 - OAuth 2.0 Authorization Server Metadata
|
|
131
|
-
https://datatracker.ietf.org/doc/html/rfc8414
|
|
132
|
-
|
|
133
|
-
- RFC 7591 - OAuth 2.0 Dynamic Client Registration Protocol
|
|
134
|
-
https://datatracker.ietf.org/doc/html/rfc7591
|
|
135
|
-
|
|
136
|
-
- RFC 7636 - Proof Key for Code Exchange by OAuth Public Clients (PKCE)
|
|
137
|
-
https://datatracker.ietf.org/doc/html/rfc7636
|
|
138
|
-
|
|
139
|
-
================================================================================
|
|
140
|
-
|
|
141
|
-
TRADEMARKS
|
|
142
|
-
|
|
143
|
-
NitroStack, the NitroStack logo, and related marks are trademarks of the NitroStack
|
|
144
|
-
project. Use of these trademarks is subject to the trademark policy available
|
|
145
|
-
at https://nitrostack.vercel.app/.
|
|
146
|
-
|
|
147
|
-
================================================================================
|
|
148
|
-
|
|
149
|
-
For more information, visit:
|
|
150
|
-
- Website: https://nitrostack.vercel.app/
|
|
151
|
-
- Documentation: https://nitrostack-docs.vercel.app/
|
|
152
|
-
- GitHub: https://github.com/abhishekpanditofficial/nitrostack
|
|
153
|
-
|