@hasna/microservices 0.0.17 → 0.0.18
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/bin/index.js +84 -0
- package/bin/mcp.js +84 -0
- package/dist/index.js +86 -1
- package/package.json +14 -4
package/bin/index.js
CHANGED
|
@@ -2474,6 +2474,90 @@ var MICROSERVICES = [
|
|
|
2474
2474
|
tags: ["jobs", "queues", "background", "cron", "scheduling", "workers", "retry"],
|
|
2475
2475
|
requiredEnv: ["DATABASE_URL"],
|
|
2476
2476
|
optionalEnv: ["JOBS_PORT", "JOBS_WORKER_CONCURRENCY"]
|
|
2477
|
+
},
|
|
2478
|
+
{
|
|
2479
|
+
name: "llm",
|
|
2480
|
+
displayName: "LLM",
|
|
2481
|
+
description: "LLM gateway: multi-provider routing (OpenAI/Anthropic/Groq), per-workspace rate limiting, token cost tracking, response caching, and fallback chains.",
|
|
2482
|
+
category: "AI",
|
|
2483
|
+
package: "@hasna/microservice-llm",
|
|
2484
|
+
binary: "microservice-llm",
|
|
2485
|
+
schemaPrefix: "llm",
|
|
2486
|
+
tags: ["llm", "openai", "anthropic", "groq", "ai", "gateway", "cost-tracking", "rate-limiting"],
|
|
2487
|
+
requiredEnv: ["DATABASE_URL"],
|
|
2488
|
+
optionalEnv: ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GROQ_API_KEY", "LLM_PORT"]
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
name: "memory",
|
|
2492
|
+
displayName: "Memory",
|
|
2493
|
+
description: "Persistent agent memory with pgvector semantic search, full-text fallback, importance scoring, collections, and per-user/workspace recall.",
|
|
2494
|
+
category: "AI",
|
|
2495
|
+
package: "@hasna/microservice-memory",
|
|
2496
|
+
binary: "microservice-memory",
|
|
2497
|
+
schemaPrefix: "memory",
|
|
2498
|
+
tags: ["memory", "embeddings", "pgvector", "semantic-search", "rag", "ai-agents", "recall"],
|
|
2499
|
+
requiredEnv: ["DATABASE_URL"],
|
|
2500
|
+
optionalEnv: ["OPENAI_API_KEY", "MEMORY_PORT"]
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
name: "search",
|
|
2504
|
+
displayName: "Search",
|
|
2505
|
+
description: "Full-text + semantic/vector search (pgvector) across any data collection. Hybrid BM25+cosine scoring. Works without API keys (text-only mode).",
|
|
2506
|
+
category: "AI",
|
|
2507
|
+
package: "@hasna/microservice-search",
|
|
2508
|
+
binary: "microservice-search",
|
|
2509
|
+
schemaPrefix: "search",
|
|
2510
|
+
tags: ["search", "full-text", "semantic", "vector", "pgvector", "hybrid", "rag"],
|
|
2511
|
+
requiredEnv: ["DATABASE_URL"],
|
|
2512
|
+
optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
name: "usage",
|
|
2516
|
+
displayName: "Usage",
|
|
2517
|
+
description: "Usage metering for API calls, tokens, storage, or any custom metric. Quota enforcement, daily/monthly aggregates, overage detection.",
|
|
2518
|
+
category: "Observability",
|
|
2519
|
+
package: "@hasna/microservice-usage",
|
|
2520
|
+
binary: "microservice-usage",
|
|
2521
|
+
schemaPrefix: "usage",
|
|
2522
|
+
tags: ["usage", "metering", "quotas", "billing", "limits", "analytics"],
|
|
2523
|
+
requiredEnv: ["DATABASE_URL"],
|
|
2524
|
+
optionalEnv: ["USAGE_PORT"]
|
|
2525
|
+
},
|
|
2526
|
+
{
|
|
2527
|
+
name: "webhooks",
|
|
2528
|
+
displayName: "Webhooks",
|
|
2529
|
+
description: "Reliable outbound webhook delivery with HMAC signing, retries (exponential backoff), delivery logs, and endpoint health tracking.",
|
|
2530
|
+
category: "Infrastructure",
|
|
2531
|
+
package: "@hasna/microservice-webhooks",
|
|
2532
|
+
binary: "microservice-webhooks",
|
|
2533
|
+
schemaPrefix: "webhooks",
|
|
2534
|
+
tags: ["webhooks", "outbound", "delivery", "retry", "signing", "integrations"],
|
|
2535
|
+
requiredEnv: ["DATABASE_URL"],
|
|
2536
|
+
optionalEnv: ["WEBHOOKS_PORT"]
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
name: "onboarding",
|
|
2540
|
+
displayName: "Onboarding",
|
|
2541
|
+
description: "User activation flows with checklist step tracking, required vs optional steps, completion percentage, and per-user/workspace progress.",
|
|
2542
|
+
category: "Growth",
|
|
2543
|
+
package: "@hasna/microservice-onboarding",
|
|
2544
|
+
binary: "microservice-onboarding",
|
|
2545
|
+
schemaPrefix: "onboarding",
|
|
2546
|
+
tags: ["onboarding", "activation", "checklists", "flows", "user-journey"],
|
|
2547
|
+
requiredEnv: ["DATABASE_URL"],
|
|
2548
|
+
optionalEnv: ["ONBOARDING_PORT"]
|
|
2549
|
+
},
|
|
2550
|
+
{
|
|
2551
|
+
name: "waitlist",
|
|
2552
|
+
displayName: "Waitlist",
|
|
2553
|
+
description: "Waitlist management with referral codes, priority scoring, batch invite logic, and per-campaign tracking. Standard for AI product launches.",
|
|
2554
|
+
category: "Growth",
|
|
2555
|
+
package: "@hasna/microservice-waitlist",
|
|
2556
|
+
binary: "microservice-waitlist",
|
|
2557
|
+
schemaPrefix: "waitlist",
|
|
2558
|
+
tags: ["waitlist", "referral", "invites", "launch", "growth"],
|
|
2559
|
+
requiredEnv: ["DATABASE_URL"],
|
|
2560
|
+
optionalEnv: ["WAITLIST_PORT"]
|
|
2477
2561
|
}
|
|
2478
2562
|
];
|
|
2479
2563
|
function getMicroservice(name) {
|
package/bin/mcp.js
CHANGED
|
@@ -19570,6 +19570,90 @@ var MICROSERVICES = [
|
|
|
19570
19570
|
tags: ["jobs", "queues", "background", "cron", "scheduling", "workers", "retry"],
|
|
19571
19571
|
requiredEnv: ["DATABASE_URL"],
|
|
19572
19572
|
optionalEnv: ["JOBS_PORT", "JOBS_WORKER_CONCURRENCY"]
|
|
19573
|
+
},
|
|
19574
|
+
{
|
|
19575
|
+
name: "llm",
|
|
19576
|
+
displayName: "LLM",
|
|
19577
|
+
description: "LLM gateway: multi-provider routing (OpenAI/Anthropic/Groq), per-workspace rate limiting, token cost tracking, response caching, and fallback chains.",
|
|
19578
|
+
category: "AI",
|
|
19579
|
+
package: "@hasna/microservice-llm",
|
|
19580
|
+
binary: "microservice-llm",
|
|
19581
|
+
schemaPrefix: "llm",
|
|
19582
|
+
tags: ["llm", "openai", "anthropic", "groq", "ai", "gateway", "cost-tracking", "rate-limiting"],
|
|
19583
|
+
requiredEnv: ["DATABASE_URL"],
|
|
19584
|
+
optionalEnv: ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GROQ_API_KEY", "LLM_PORT"]
|
|
19585
|
+
},
|
|
19586
|
+
{
|
|
19587
|
+
name: "memory",
|
|
19588
|
+
displayName: "Memory",
|
|
19589
|
+
description: "Persistent agent memory with pgvector semantic search, full-text fallback, importance scoring, collections, and per-user/workspace recall.",
|
|
19590
|
+
category: "AI",
|
|
19591
|
+
package: "@hasna/microservice-memory",
|
|
19592
|
+
binary: "microservice-memory",
|
|
19593
|
+
schemaPrefix: "memory",
|
|
19594
|
+
tags: ["memory", "embeddings", "pgvector", "semantic-search", "rag", "ai-agents", "recall"],
|
|
19595
|
+
requiredEnv: ["DATABASE_URL"],
|
|
19596
|
+
optionalEnv: ["OPENAI_API_KEY", "MEMORY_PORT"]
|
|
19597
|
+
},
|
|
19598
|
+
{
|
|
19599
|
+
name: "search",
|
|
19600
|
+
displayName: "Search",
|
|
19601
|
+
description: "Full-text + semantic/vector search (pgvector) across any data collection. Hybrid BM25+cosine scoring. Works without API keys (text-only mode).",
|
|
19602
|
+
category: "AI",
|
|
19603
|
+
package: "@hasna/microservice-search",
|
|
19604
|
+
binary: "microservice-search",
|
|
19605
|
+
schemaPrefix: "search",
|
|
19606
|
+
tags: ["search", "full-text", "semantic", "vector", "pgvector", "hybrid", "rag"],
|
|
19607
|
+
requiredEnv: ["DATABASE_URL"],
|
|
19608
|
+
optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
|
|
19609
|
+
},
|
|
19610
|
+
{
|
|
19611
|
+
name: "usage",
|
|
19612
|
+
displayName: "Usage",
|
|
19613
|
+
description: "Usage metering for API calls, tokens, storage, or any custom metric. Quota enforcement, daily/monthly aggregates, overage detection.",
|
|
19614
|
+
category: "Observability",
|
|
19615
|
+
package: "@hasna/microservice-usage",
|
|
19616
|
+
binary: "microservice-usage",
|
|
19617
|
+
schemaPrefix: "usage",
|
|
19618
|
+
tags: ["usage", "metering", "quotas", "billing", "limits", "analytics"],
|
|
19619
|
+
requiredEnv: ["DATABASE_URL"],
|
|
19620
|
+
optionalEnv: ["USAGE_PORT"]
|
|
19621
|
+
},
|
|
19622
|
+
{
|
|
19623
|
+
name: "webhooks",
|
|
19624
|
+
displayName: "Webhooks",
|
|
19625
|
+
description: "Reliable outbound webhook delivery with HMAC signing, retries (exponential backoff), delivery logs, and endpoint health tracking.",
|
|
19626
|
+
category: "Infrastructure",
|
|
19627
|
+
package: "@hasna/microservice-webhooks",
|
|
19628
|
+
binary: "microservice-webhooks",
|
|
19629
|
+
schemaPrefix: "webhooks",
|
|
19630
|
+
tags: ["webhooks", "outbound", "delivery", "retry", "signing", "integrations"],
|
|
19631
|
+
requiredEnv: ["DATABASE_URL"],
|
|
19632
|
+
optionalEnv: ["WEBHOOKS_PORT"]
|
|
19633
|
+
},
|
|
19634
|
+
{
|
|
19635
|
+
name: "onboarding",
|
|
19636
|
+
displayName: "Onboarding",
|
|
19637
|
+
description: "User activation flows with checklist step tracking, required vs optional steps, completion percentage, and per-user/workspace progress.",
|
|
19638
|
+
category: "Growth",
|
|
19639
|
+
package: "@hasna/microservice-onboarding",
|
|
19640
|
+
binary: "microservice-onboarding",
|
|
19641
|
+
schemaPrefix: "onboarding",
|
|
19642
|
+
tags: ["onboarding", "activation", "checklists", "flows", "user-journey"],
|
|
19643
|
+
requiredEnv: ["DATABASE_URL"],
|
|
19644
|
+
optionalEnv: ["ONBOARDING_PORT"]
|
|
19645
|
+
},
|
|
19646
|
+
{
|
|
19647
|
+
name: "waitlist",
|
|
19648
|
+
displayName: "Waitlist",
|
|
19649
|
+
description: "Waitlist management with referral codes, priority scoring, batch invite logic, and per-campaign tracking. Standard for AI product launches.",
|
|
19650
|
+
category: "Growth",
|
|
19651
|
+
package: "@hasna/microservice-waitlist",
|
|
19652
|
+
binary: "microservice-waitlist",
|
|
19653
|
+
schemaPrefix: "waitlist",
|
|
19654
|
+
tags: ["waitlist", "referral", "invites", "launch", "growth"],
|
|
19655
|
+
requiredEnv: ["DATABASE_URL"],
|
|
19656
|
+
optionalEnv: ["WAITLIST_PORT"]
|
|
19573
19657
|
}
|
|
19574
19658
|
];
|
|
19575
19659
|
function getMicroservice(name) {
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,8 @@ var CATEGORIES = [
|
|
|
8
8
|
"Storage",
|
|
9
9
|
"Observability",
|
|
10
10
|
"Growth",
|
|
11
|
-
"Infrastructure"
|
|
11
|
+
"Infrastructure",
|
|
12
|
+
"AI"
|
|
12
13
|
];
|
|
13
14
|
var MICROSERVICES = [
|
|
14
15
|
{
|
|
@@ -106,6 +107,90 @@ var MICROSERVICES = [
|
|
|
106
107
|
tags: ["jobs", "queues", "background", "cron", "scheduling", "workers", "retry"],
|
|
107
108
|
requiredEnv: ["DATABASE_URL"],
|
|
108
109
|
optionalEnv: ["JOBS_PORT", "JOBS_WORKER_CONCURRENCY"]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "llm",
|
|
113
|
+
displayName: "LLM",
|
|
114
|
+
description: "LLM gateway: multi-provider routing (OpenAI/Anthropic/Groq), per-workspace rate limiting, token cost tracking, response caching, and fallback chains.",
|
|
115
|
+
category: "AI",
|
|
116
|
+
package: "@hasna/microservice-llm",
|
|
117
|
+
binary: "microservice-llm",
|
|
118
|
+
schemaPrefix: "llm",
|
|
119
|
+
tags: ["llm", "openai", "anthropic", "groq", "ai", "gateway", "cost-tracking", "rate-limiting"],
|
|
120
|
+
requiredEnv: ["DATABASE_URL"],
|
|
121
|
+
optionalEnv: ["OPENAI_API_KEY", "ANTHROPIC_API_KEY", "GROQ_API_KEY", "LLM_PORT"]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "memory",
|
|
125
|
+
displayName: "Memory",
|
|
126
|
+
description: "Persistent agent memory with pgvector semantic search, full-text fallback, importance scoring, collections, and per-user/workspace recall.",
|
|
127
|
+
category: "AI",
|
|
128
|
+
package: "@hasna/microservice-memory",
|
|
129
|
+
binary: "microservice-memory",
|
|
130
|
+
schemaPrefix: "memory",
|
|
131
|
+
tags: ["memory", "embeddings", "pgvector", "semantic-search", "rag", "ai-agents", "recall"],
|
|
132
|
+
requiredEnv: ["DATABASE_URL"],
|
|
133
|
+
optionalEnv: ["OPENAI_API_KEY", "MEMORY_PORT"]
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "search",
|
|
137
|
+
displayName: "Search",
|
|
138
|
+
description: "Full-text + semantic/vector search (pgvector) across any data collection. Hybrid BM25+cosine scoring. Works without API keys (text-only mode).",
|
|
139
|
+
category: "AI",
|
|
140
|
+
package: "@hasna/microservice-search",
|
|
141
|
+
binary: "microservice-search",
|
|
142
|
+
schemaPrefix: "search",
|
|
143
|
+
tags: ["search", "full-text", "semantic", "vector", "pgvector", "hybrid", "rag"],
|
|
144
|
+
requiredEnv: ["DATABASE_URL"],
|
|
145
|
+
optionalEnv: ["OPENAI_API_KEY", "SEARCH_PORT"]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "usage",
|
|
149
|
+
displayName: "Usage",
|
|
150
|
+
description: "Usage metering for API calls, tokens, storage, or any custom metric. Quota enforcement, daily/monthly aggregates, overage detection.",
|
|
151
|
+
category: "Observability",
|
|
152
|
+
package: "@hasna/microservice-usage",
|
|
153
|
+
binary: "microservice-usage",
|
|
154
|
+
schemaPrefix: "usage",
|
|
155
|
+
tags: ["usage", "metering", "quotas", "billing", "limits", "analytics"],
|
|
156
|
+
requiredEnv: ["DATABASE_URL"],
|
|
157
|
+
optionalEnv: ["USAGE_PORT"]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "webhooks",
|
|
161
|
+
displayName: "Webhooks",
|
|
162
|
+
description: "Reliable outbound webhook delivery with HMAC signing, retries (exponential backoff), delivery logs, and endpoint health tracking.",
|
|
163
|
+
category: "Infrastructure",
|
|
164
|
+
package: "@hasna/microservice-webhooks",
|
|
165
|
+
binary: "microservice-webhooks",
|
|
166
|
+
schemaPrefix: "webhooks",
|
|
167
|
+
tags: ["webhooks", "outbound", "delivery", "retry", "signing", "integrations"],
|
|
168
|
+
requiredEnv: ["DATABASE_URL"],
|
|
169
|
+
optionalEnv: ["WEBHOOKS_PORT"]
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "onboarding",
|
|
173
|
+
displayName: "Onboarding",
|
|
174
|
+
description: "User activation flows with checklist step tracking, required vs optional steps, completion percentage, and per-user/workspace progress.",
|
|
175
|
+
category: "Growth",
|
|
176
|
+
package: "@hasna/microservice-onboarding",
|
|
177
|
+
binary: "microservice-onboarding",
|
|
178
|
+
schemaPrefix: "onboarding",
|
|
179
|
+
tags: ["onboarding", "activation", "checklists", "flows", "user-journey"],
|
|
180
|
+
requiredEnv: ["DATABASE_URL"],
|
|
181
|
+
optionalEnv: ["ONBOARDING_PORT"]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: "waitlist",
|
|
185
|
+
displayName: "Waitlist",
|
|
186
|
+
description: "Waitlist management with referral codes, priority scoring, batch invite logic, and per-campaign tracking. Standard for AI product launches.",
|
|
187
|
+
category: "Growth",
|
|
188
|
+
package: "@hasna/microservice-waitlist",
|
|
189
|
+
binary: "microservice-waitlist",
|
|
190
|
+
schemaPrefix: "waitlist",
|
|
191
|
+
tags: ["waitlist", "referral", "invites", "launch", "growth"],
|
|
192
|
+
requiredEnv: ["DATABASE_URL"],
|
|
193
|
+
optionalEnv: ["WAITLIST_PORT"]
|
|
109
194
|
}
|
|
110
195
|
];
|
|
111
196
|
function getMicroservice(name) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/microservices",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Production-grade microservice building blocks for SaaS apps —
|
|
3
|
+
"version": "0.0.18",
|
|
4
|
+
"description": "Production-grade microservice building blocks for SaaS apps — 15 services covering identity, billing, AI, storage, search, and more. Each with PostgreSQL, HTTP API, MCP server, and CLI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"microservices": "./bin/index.js",
|
|
@@ -32,16 +32,19 @@
|
|
|
32
32
|
"keywords": [
|
|
33
33
|
"microservices",
|
|
34
34
|
"saas",
|
|
35
|
+
"ai-agents",
|
|
35
36
|
"auth",
|
|
36
37
|
"billing",
|
|
37
38
|
"stripe",
|
|
38
39
|
"postgresql",
|
|
40
|
+
"pgvector",
|
|
41
|
+
"llm-gateway",
|
|
39
42
|
"feature-flags",
|
|
40
43
|
"background-jobs",
|
|
44
|
+
"vector-search",
|
|
41
45
|
"mcp",
|
|
42
46
|
"model-context-protocol",
|
|
43
47
|
"ai",
|
|
44
|
-
"agent",
|
|
45
48
|
"cli"
|
|
46
49
|
],
|
|
47
50
|
"author": "Hasna",
|
|
@@ -64,7 +67,14 @@
|
|
|
64
67
|
"@hasna/microservice-files": "^0.0.1",
|
|
65
68
|
"@hasna/microservice-audit": "^0.0.1",
|
|
66
69
|
"@hasna/microservice-flags": "^0.0.1",
|
|
67
|
-
"@hasna/microservice-jobs": "^0.0.1"
|
|
70
|
+
"@hasna/microservice-jobs": "^0.0.1",
|
|
71
|
+
"@hasna/microservice-llm": "^0.0.1",
|
|
72
|
+
"@hasna/microservice-memory": "^0.0.1",
|
|
73
|
+
"@hasna/microservice-search": "^0.0.1",
|
|
74
|
+
"@hasna/microservice-usage": "^0.0.1",
|
|
75
|
+
"@hasna/microservice-webhooks": "^0.0.1",
|
|
76
|
+
"@hasna/microservice-onboarding": "^0.0.1",
|
|
77
|
+
"@hasna/microservice-waitlist": "^0.0.1"
|
|
68
78
|
},
|
|
69
79
|
"engines": {
|
|
70
80
|
"bun": ">=1.0.0"
|