@l4yercak3/cli 1.3.1 → 2.0.0-alpha.0
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 +10 -220
- package/dist/api/client.d.ts +12 -0
- package/dist/api/client.d.ts.map +1 -0
- package/dist/api/client.js +37 -0
- package/dist/api/client.js.map +1 -0
- package/dist/api/platform.d.ts +161 -0
- package/dist/api/platform.d.ts.map +1 -0
- package/dist/api/platform.js +70 -0
- package/dist/api/platform.js.map +1 -0
- package/dist/bin/sevenlayers.d.ts +3 -0
- package/dist/bin/sevenlayers.d.ts.map +1 -0
- package/dist/bin/sevenlayers.js +198 -0
- package/dist/bin/sevenlayers.js.map +1 -0
- package/dist/commands/agent/catalog.d.ts +5 -0
- package/dist/commands/agent/catalog.d.ts.map +1 -0
- package/dist/commands/agent/catalog.js +142 -0
- package/dist/commands/agent/catalog.js.map +1 -0
- package/dist/commands/agent/drift.d.ts +5 -0
- package/dist/commands/agent/drift.d.ts.map +1 -0
- package/dist/commands/agent/drift.js +113 -0
- package/dist/commands/agent/drift.js.map +1 -0
- package/dist/commands/agent/init.d.ts +5 -0
- package/dist/commands/agent/init.d.ts.map +1 -0
- package/dist/commands/agent/init.js +75 -0
- package/dist/commands/agent/init.js.map +1 -0
- package/dist/commands/agent/permissions.d.ts +5 -0
- package/dist/commands/agent/permissions.d.ts.map +1 -0
- package/dist/commands/agent/permissions.js +88 -0
- package/dist/commands/agent/permissions.js.map +1 -0
- package/dist/commands/agent/runner.d.ts +14 -0
- package/dist/commands/agent/runner.d.ts.map +1 -0
- package/dist/commands/agent/runner.js +59 -0
- package/dist/commands/agent/runner.js.map +1 -0
- package/dist/commands/agent/shared.d.ts +13 -0
- package/dist/commands/agent/shared.d.ts.map +1 -0
- package/dist/commands/agent/shared.js +31 -0
- package/dist/commands/agent/shared.js.map +1 -0
- package/dist/commands/agent/template.d.ts +5 -0
- package/dist/commands/agent/template.d.ts.map +1 -0
- package/dist/commands/agent/template.js +104 -0
- package/dist/commands/agent/template.js.map +1 -0
- package/dist/commands/app/connect.d.ts +7 -0
- package/dist/commands/app/connect.d.ts.map +1 -0
- package/dist/commands/app/connect.js +12 -0
- package/dist/commands/app/connect.js.map +1 -0
- package/dist/commands/app/init.d.ts +7 -0
- package/dist/commands/app/init.d.ts.map +1 -0
- package/dist/commands/app/init.js +12 -0
- package/dist/commands/app/init.js.map +1 -0
- package/dist/commands/app/link.d.ts +3 -0
- package/dist/commands/app/link.d.ts.map +1 -0
- package/dist/commands/app/link.js +92 -0
- package/dist/commands/app/link.js.map +1 -0
- package/dist/commands/app/pages.d.ts +15 -0
- package/dist/commands/app/pages.d.ts.map +1 -0
- package/dist/commands/app/pages.js +180 -0
- package/dist/commands/app/pages.js.map +1 -0
- package/dist/commands/app/register.d.ts +3 -0
- package/dist/commands/app/register.d.ts.map +1 -0
- package/dist/commands/app/register.js +120 -0
- package/dist/commands/app/register.js.map +1 -0
- package/dist/commands/app/remote.d.ts +14 -0
- package/dist/commands/app/remote.d.ts.map +1 -0
- package/dist/commands/app/remote.js +44 -0
- package/dist/commands/app/remote.js.map +1 -0
- package/dist/commands/app/setup.d.ts +3 -0
- package/dist/commands/app/setup.d.ts.map +1 -0
- package/dist/commands/app/setup.js +299 -0
- package/dist/commands/app/setup.js.map +1 -0
- package/dist/commands/app/shared.d.ts +9 -0
- package/dist/commands/app/shared.d.ts.map +1 -0
- package/dist/commands/app/shared.js +122 -0
- package/dist/commands/app/shared.js.map +1 -0
- package/dist/commands/app/sync.d.ts +7 -0
- package/dist/commands/app/sync.d.ts.map +1 -0
- package/dist/commands/app/sync.js +107 -0
- package/dist/commands/app/sync.js.map +1 -0
- package/dist/commands/booking/check.d.ts +3 -0
- package/dist/commands/booking/check.d.ts.map +1 -0
- package/dist/commands/booking/check.js +68 -0
- package/dist/commands/booking/check.js.map +1 -0
- package/dist/commands/booking/setup.d.ts +3 -0
- package/dist/commands/booking/setup.d.ts.map +1 -0
- package/dist/commands/booking/setup.js +95 -0
- package/dist/commands/booking/setup.js.map +1 -0
- package/dist/commands/booking/shared.d.ts +31 -0
- package/dist/commands/booking/shared.d.ts.map +1 -0
- package/dist/commands/booking/shared.js +112 -0
- package/dist/commands/booking/shared.js.map +1 -0
- package/dist/commands/booking/smoke.d.ts +3 -0
- package/dist/commands/booking/smoke.d.ts.map +1 -0
- package/dist/commands/booking/smoke.js +101 -0
- package/dist/commands/booking/smoke.js.map +1 -0
- package/dist/commands/cms/bind.d.ts +3 -0
- package/dist/commands/cms/bind.d.ts.map +1 -0
- package/dist/commands/cms/bind.js +212 -0
- package/dist/commands/cms/bind.js.map +1 -0
- package/dist/commands/cms/content.d.ts +40 -0
- package/dist/commands/cms/content.d.ts.map +1 -0
- package/dist/commands/cms/content.js +169 -0
- package/dist/commands/cms/content.js.map +1 -0
- package/dist/commands/cms/doctor.d.ts +3 -0
- package/dist/commands/cms/doctor.d.ts.map +1 -0
- package/dist/commands/cms/doctor.js +69 -0
- package/dist/commands/cms/doctor.js.map +1 -0
- package/dist/commands/cms/migrate.d.ts +3 -0
- package/dist/commands/cms/migrate.d.ts.map +1 -0
- package/dist/commands/cms/migrate.js +78 -0
- package/dist/commands/cms/migrate.js.map +1 -0
- package/dist/commands/cms/registry.d.ts +3 -0
- package/dist/commands/cms/registry.d.ts.map +1 -0
- package/dist/commands/cms/registry.js +161 -0
- package/dist/commands/cms/registry.js.map +1 -0
- package/dist/commands/cms/seed.d.ts +3 -0
- package/dist/commands/cms/seed.d.ts.map +1 -0
- package/dist/commands/cms/seed.js +102 -0
- package/dist/commands/cms/seed.js.map +1 -0
- package/dist/commands/cms/shared.d.ts +22 -0
- package/dist/commands/cms/shared.d.ts.map +1 -0
- package/dist/commands/cms/shared.js +82 -0
- package/dist/commands/cms/shared.js.map +1 -0
- package/dist/commands/doctor/target.d.ts +3 -0
- package/dist/commands/doctor/target.d.ts.map +1 -0
- package/dist/commands/doctor/target.js +46 -0
- package/dist/commands/doctor/target.js.map +1 -0
- package/dist/commands/env/list.d.ts +3 -0
- package/dist/commands/env/list.d.ts.map +1 -0
- package/dist/commands/env/list.js +28 -0
- package/dist/commands/env/list.js.map +1 -0
- package/dist/commands/env/set.d.ts +3 -0
- package/dist/commands/env/set.d.ts.map +1 -0
- package/dist/commands/env/set.js +36 -0
- package/dist/commands/env/set.js.map +1 -0
- package/dist/commands/env/use.d.ts +3 -0
- package/dist/commands/env/use.d.ts.map +1 -0
- package/dist/commands/env/use.js +15 -0
- package/dist/commands/env/use.js.map +1 -0
- package/dist/commands/legacy/connect.d.ts +3 -0
- package/dist/commands/legacy/connect.d.ts.map +1 -0
- package/dist/commands/legacy/connect.js +8 -0
- package/dist/commands/legacy/connect.js.map +1 -0
- package/dist/commands/legacy/pages.d.ts +3 -0
- package/dist/commands/legacy/pages.d.ts.map +1 -0
- package/dist/commands/legacy/pages.js +16 -0
- package/dist/commands/legacy/pages.js.map +1 -0
- package/dist/commands/legacy/spread.d.ts +3 -0
- package/dist/commands/legacy/spread.d.ts.map +1 -0
- package/dist/commands/legacy/spread.js +8 -0
- package/dist/commands/legacy/spread.js.map +1 -0
- package/dist/commands/legacy/sync.d.ts +3 -0
- package/dist/commands/legacy/sync.d.ts.map +1 -0
- package/dist/commands/legacy/sync.js +8 -0
- package/dist/commands/legacy/sync.js.map +1 -0
- package/dist/config/env-diff.d.ts +10 -0
- package/dist/config/env-diff.d.ts.map +1 -0
- package/dist/config/env-diff.js +24 -0
- package/dist/config/env-diff.js.map +1 -0
- package/dist/config/env-parser.d.ts +20 -0
- package/dist/config/env-parser.d.ts.map +1 -0
- package/dist/config/env-parser.js +70 -0
- package/dist/config/env-parser.js.map +1 -0
- package/dist/config/env-writer.d.ts +22 -0
- package/dist/config/env-writer.d.ts.map +1 -0
- package/dist/config/env-writer.js +172 -0
- package/dist/config/env-writer.js.map +1 -0
- package/dist/config/profile-store.d.ts +29 -0
- package/dist/config/profile-store.d.ts.map +1 -0
- package/dist/config/profile-store.js +257 -0
- package/dist/config/profile-store.js.map +1 -0
- package/dist/core/args.d.ts +11 -0
- package/dist/core/args.d.ts.map +1 -0
- package/dist/core/args.js +106 -0
- package/dist/core/args.js.map +1 -0
- package/dist/core/colors.d.ts +6 -0
- package/dist/core/colors.d.ts.map +1 -0
- package/dist/core/colors.js +29 -0
- package/dist/core/colors.js.map +1 -0
- package/dist/safety/target-guard.d.ts +16 -0
- package/dist/safety/target-guard.d.ts.map +1 -0
- package/dist/safety/target-guard.js +55 -0
- package/dist/safety/target-guard.js.map +1 -0
- package/dist/testing/booking-smoke.d.ts +17 -0
- package/dist/testing/booking-smoke.d.ts.map +1 -0
- package/dist/testing/booking-smoke.js +43 -0
- package/dist/testing/booking-smoke.js.map +1 -0
- package/dist/tests/agent-commands.test.d.ts +2 -0
- package/dist/tests/agent-commands.test.d.ts.map +1 -0
- package/dist/tests/agent-commands.test.js +180 -0
- package/dist/tests/agent-commands.test.js.map +1 -0
- package/dist/tests/agent-governance.test.d.ts +2 -0
- package/dist/tests/agent-governance.test.d.ts.map +1 -0
- package/dist/tests/agent-governance.test.js +233 -0
- package/dist/tests/agent-governance.test.js.map +1 -0
- package/dist/tests/app-commands.test.d.ts +2 -0
- package/dist/tests/app-commands.test.d.ts.map +1 -0
- package/dist/tests/app-commands.test.js +462 -0
- package/dist/tests/app-commands.test.js.map +1 -0
- package/dist/tests/booking-commands.test.d.ts +2 -0
- package/dist/tests/booking-commands.test.d.ts.map +1 -0
- package/dist/tests/booking-commands.test.js +204 -0
- package/dist/tests/booking-commands.test.js.map +1 -0
- package/dist/tests/booking-smoke.test.d.ts +2 -0
- package/dist/tests/booking-smoke.test.d.ts.map +1 -0
- package/dist/tests/booking-smoke.test.js +183 -0
- package/dist/tests/booking-smoke.test.js.map +1 -0
- package/dist/tests/cms-commands.test.d.ts +2 -0
- package/dist/tests/cms-commands.test.d.ts.map +1 -0
- package/dist/tests/cms-commands.test.js +254 -0
- package/dist/tests/cms-commands.test.js.map +1 -0
- package/dist/tests/cms-ops.test.d.ts +2 -0
- package/dist/tests/cms-ops.test.d.ts.map +1 -0
- package/dist/tests/cms-ops.test.js +125 -0
- package/dist/tests/cms-ops.test.js.map +1 -0
- package/dist/tests/env-writer.test.d.ts +2 -0
- package/dist/tests/env-writer.test.d.ts.map +1 -0
- package/dist/tests/env-writer.test.js +90 -0
- package/dist/tests/env-writer.test.js.map +1 -0
- package/dist/tests/profile-store.test.d.ts +2 -0
- package/dist/tests/profile-store.test.d.ts.map +1 -0
- package/dist/tests/profile-store.test.js +88 -0
- package/dist/tests/profile-store.test.js.map +1 -0
- package/dist/tests/target-guard.test.d.ts +2 -0
- package/dist/tests/target-guard.test.d.ts.map +1 -0
- package/dist/tests/target-guard.test.js +132 -0
- package/dist/tests/target-guard.test.js.map +1 -0
- package/dist/ui/logo.d.ts +2 -0
- package/dist/ui/logo.d.ts.map +1 -0
- package/dist/ui/logo.js +22 -0
- package/dist/ui/logo.js.map +1 -0
- package/package.json +17 -53
- package/.claude/settings.local.json +0 -36
- package/.cursor/rules.md +0 -203
- package/.eslintrc.js +0 -31
- package/CLAUDE.md +0 -100
- package/bin/cli.js +0 -116
- package/docs/ADDING_FRAMEWORK_DETECTORS.md +0 -391
- package/docs/ADDING_NEW_PROJECT_TYPE.md +0 -156
- package/docs/ARCHITECTURE_RELATIONSHIPS.md +0 -411
- package/docs/CLI_AUTHENTICATION.md +0 -214
- package/docs/CLI_PAGE_DETECTION_REQUIREMENTS.md +0 -519
- package/docs/CRM-PIPELINES-SEQUENCES-SPEC.md +0 -429
- package/docs/DETECTOR_ARCHITECTURE.md +0 -326
- package/docs/DEVELOPMENT.md +0 -194
- package/docs/IMPLEMENTATION_PHASES.md +0 -468
- package/docs/INTEGRATION_PATHS_ARCHITECTURE.md +0 -1543
- package/docs/OAUTH_CLARIFICATION.md +0 -258
- package/docs/OAUTH_SETUP_GUIDE_TEMPLATE.md +0 -211
- package/docs/PHASE_0_PROGRESS.md +0 -120
- package/docs/PHASE_1_COMPLETE.md +0 -366
- package/docs/PHASE_SUMMARY.md +0 -149
- package/docs/PLAN.md +0 -511
- package/docs/README.md +0 -56
- package/docs/STRIPE_INTEGRATION.md +0 -447
- package/docs/SUMMARY.md +0 -230
- package/docs/UPDATED_PLAN.md +0 -447
- package/docs/mcp_server/MCP_EXTENSION_GUIDE.md +0 -1313
- package/docs/mcp_server/MCP_SERVER_ARCHITECTURE.md +0 -1481
- package/docs/mcp_server/applicationOntology.ts +0 -817
- package/docs/mcp_server/cliApplications.ts +0 -639
- package/docs/mcp_server/crmOntology.ts +0 -1063
- package/docs/mcp_server/eventOntology.ts +0 -1183
- package/docs/mcp_server/formsOntology.ts +0 -1401
- package/docs/mcp_server/ontologySchemas.ts +0 -185
- package/docs/mcp_server/schema.ts +0 -250
- package/docs/microsass_production_machine/CLI_API_REFERENCE.md +0 -1197
- package/docs/microsass_production_machine/CLI_PRODUCT_VISION.md +0 -676
- package/docs/microsass_production_machine/CLI_REQUIREMENTS.md +0 -606
- package/docs/microsass_production_machine/CONNECTED_APPLICATIONS_SPEC.md +0 -390
- package/docs/microsass_production_machine/IMPLEMENTATION_ROADMAP.md +0 -725
- package/docs/microsass_production_machine/OBJECT_MAPPINGS.md +0 -808
- package/docs/microsass_production_machine/REFERENCE_IMPLEMENTATION.md +0 -532
- package/src/api/backend-client.js +0 -449
- package/src/commands/api-keys.js +0 -119
- package/src/commands/connect.js +0 -243
- package/src/commands/login.js +0 -332
- package/src/commands/logout.js +0 -30
- package/src/commands/mcp-server.js +0 -85
- package/src/commands/mcp-setup.js +0 -686
- package/src/commands/pages.js +0 -317
- package/src/commands/scaffold.js +0 -409
- package/src/commands/spread.js +0 -861
- package/src/commands/status.js +0 -62
- package/src/commands/sync.js +0 -169
- package/src/commands/upgrade.js +0 -48
- package/src/config/config-manager.js +0 -206
- package/src/detectors/api-client-detector.js +0 -85
- package/src/detectors/base-detector.js +0 -77
- package/src/detectors/database-detector.js +0 -245
- package/src/detectors/expo-detector.js +0 -166
- package/src/detectors/github-detector.js +0 -74
- package/src/detectors/index.js +0 -106
- package/src/detectors/mapping-suggestor.js +0 -119
- package/src/detectors/model-detector.js +0 -318
- package/src/detectors/nextjs-detector.js +0 -139
- package/src/detectors/oauth-detector.js +0 -122
- package/src/detectors/page-detector.js +0 -480
- package/src/detectors/registry.js +0 -121
- package/src/generators/api-client-generator.js +0 -223
- package/src/generators/api-only/client.js +0 -683
- package/src/generators/api-only/index.js +0 -96
- package/src/generators/api-only/types.js +0 -618
- package/src/generators/api-only/webhooks.js +0 -377
- package/src/generators/env-generator.js +0 -191
- package/src/generators/expo-auth-generator.js +0 -1009
- package/src/generators/gitignore-generator.js +0 -92
- package/src/generators/index.js +0 -166
- package/src/generators/manifest-generator.js +0 -154
- package/src/generators/mcp-guide-generator.js +0 -256
- package/src/generators/nextauth-generator.js +0 -247
- package/src/generators/oauth-guide-generator.js +0 -277
- package/src/generators/quickstart/components/index.js +0 -1699
- package/src/generators/quickstart/components-mobile/index.js +0 -1440
- package/src/generators/quickstart/database/convex.js +0 -1257
- package/src/generators/quickstart/database/index.js +0 -34
- package/src/generators/quickstart/database/supabase.js +0 -1132
- package/src/generators/quickstart/hooks/index.js +0 -1065
- package/src/generators/quickstart/index.js +0 -191
- package/src/generators/quickstart/pages/index.js +0 -1466
- package/src/generators/quickstart/screens/index.js +0 -1498
- package/src/logo.js +0 -116
- package/src/mcp/auth.js +0 -127
- package/src/mcp/registry/domains/applications.js +0 -516
- package/src/mcp/registry/domains/benefits.js +0 -798
- package/src/mcp/registry/domains/codegen.js +0 -894
- package/src/mcp/registry/domains/core.js +0 -324
- package/src/mcp/registry/domains/crm.js +0 -591
- package/src/mcp/registry/domains/events.js +0 -649
- package/src/mcp/registry/domains/forms.js +0 -696
- package/src/mcp/registry/index.js +0 -164
- package/src/mcp/server.js +0 -116
- package/src/utils/file-utils.js +0 -117
- package/src/utils/init-helpers.js +0 -243
- package/src/utils/prompt-utils.js +0 -195
- package/templates/CLAUDE.md +0 -86
- package/tests/api-client-detector.test.js +0 -214
- package/tests/api-client-generator.test.js +0 -176
- package/tests/backend-client.test.js +0 -640
- package/tests/base-detector.test.js +0 -101
- package/tests/commands/login.test.js +0 -143
- package/tests/commands/logout.test.js +0 -84
- package/tests/commands/status.test.js +0 -167
- package/tests/config-manager.test.js +0 -321
- package/tests/database-detector.test.js +0 -221
- package/tests/detector-index.test.js +0 -209
- package/tests/detector-registry.test.js +0 -93
- package/tests/env-generator.test.js +0 -278
- package/tests/expo-detector.test.js +0 -263
- package/tests/file-utils.test.js +0 -194
- package/tests/generators-index.test.js +0 -454
- package/tests/github-detector.test.js +0 -145
- package/tests/gitignore-generator.test.js +0 -109
- package/tests/logo.test.js +0 -96
- package/tests/nextauth-generator.test.js +0 -255
- package/tests/nextjs-detector.test.js +0 -235
- package/tests/oauth-detector.test.js +0 -264
- package/tests/oauth-guide-generator.test.js +0 -273
- package/tests/page-detector.test.js +0 -371
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gitignore Generator
|
|
3
|
-
* Updates .gitignore to ensure sensitive files are not committed
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
|
|
9
|
-
class GitignoreGenerator {
|
|
10
|
-
/**
|
|
11
|
-
* Update .gitignore file
|
|
12
|
-
*/
|
|
13
|
-
generate(options) {
|
|
14
|
-
const { projectPath } = options;
|
|
15
|
-
const gitignorePath = path.join(projectPath, '.gitignore');
|
|
16
|
-
|
|
17
|
-
// Required entries to ensure are present
|
|
18
|
-
const requiredEntries = [
|
|
19
|
-
'# L4YERCAK3 Configuration',
|
|
20
|
-
'.env.local',
|
|
21
|
-
'.env*.local',
|
|
22
|
-
'.l4yercak3/',
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
let gitignoreContent = '';
|
|
26
|
-
let needsUpdate = false;
|
|
27
|
-
|
|
28
|
-
// Read existing .gitignore if it exists
|
|
29
|
-
if (fs.existsSync(gitignorePath)) {
|
|
30
|
-
gitignoreContent = fs.readFileSync(gitignorePath, 'utf8');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// Check if required entries are missing
|
|
34
|
-
for (const entry of requiredEntries) {
|
|
35
|
-
// Skip comment lines for checking
|
|
36
|
-
if (entry.startsWith('#')) {
|
|
37
|
-
if (!gitignoreContent.includes(entry)) {
|
|
38
|
-
needsUpdate = true;
|
|
39
|
-
}
|
|
40
|
-
} else {
|
|
41
|
-
// Check for the actual entry (with or without leading/trailing whitespace)
|
|
42
|
-
const entryRegex = new RegExp(`^\\s*${entry.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\s*$`, 'm');
|
|
43
|
-
if (!entryRegex.test(gitignoreContent)) {
|
|
44
|
-
needsUpdate = true;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// If no update needed, return null
|
|
50
|
-
if (!needsUpdate && gitignoreContent) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
// Append required entries if they're missing
|
|
55
|
-
if (needsUpdate) {
|
|
56
|
-
if (gitignoreContent && !gitignoreContent.endsWith('\n')) {
|
|
57
|
-
gitignoreContent += '\n';
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
// Add section header if not present
|
|
61
|
-
if (!gitignoreContent.includes('# L4YERCAK3 Configuration')) {
|
|
62
|
-
gitignoreContent += '\n# L4YERCAK3 Configuration\n';
|
|
63
|
-
gitignoreContent += '# Auto-generated by @l4yercak3/cli\n';
|
|
64
|
-
gitignoreContent += '# DO NOT commit sensitive configuration files\n\n';
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Add entries if missing
|
|
68
|
-
const entriesToAdd = [
|
|
69
|
-
'.env.local',
|
|
70
|
-
'.env*.local',
|
|
71
|
-
'.l4yercak3/',
|
|
72
|
-
];
|
|
73
|
-
|
|
74
|
-
for (const entry of entriesToAdd) {
|
|
75
|
-
const entryRegex = new RegExp(`^\\s*${entry.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\s*$`, 'm');
|
|
76
|
-
if (!entryRegex.test(gitignoreContent)) {
|
|
77
|
-
gitignoreContent += `${entry}\n`;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Write updated .gitignore
|
|
83
|
-
fs.writeFileSync(gitignorePath, gitignoreContent, 'utf8');
|
|
84
|
-
return gitignorePath;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
module.exports = new GitignoreGenerator();
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
package/src/generators/index.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* File Generators
|
|
3
|
-
* Main entry point for all file generation
|
|
4
|
-
*
|
|
5
|
-
* Supports multiple frameworks:
|
|
6
|
-
* - nextjs: Next.js (App Router and Pages Router)
|
|
7
|
-
* - expo: Expo/React Native
|
|
8
|
-
*
|
|
9
|
-
* Supports multiple integration paths:
|
|
10
|
-
* - quickstart: Full-stack with UI components & database
|
|
11
|
-
* - api-only: Just the typed API client
|
|
12
|
-
* - mcp-assisted: AI-powered custom generation
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
const apiClientGenerator = require('./api-client-generator');
|
|
16
|
-
const envGenerator = require('./env-generator');
|
|
17
|
-
const nextauthGenerator = require('./nextauth-generator');
|
|
18
|
-
const oauthGuideGenerator = require('./oauth-guide-generator');
|
|
19
|
-
const gitignoreGenerator = require('./gitignore-generator');
|
|
20
|
-
const apiOnlyGenerator = require('./api-only');
|
|
21
|
-
const mcpGuideGenerator = require('./mcp-guide-generator');
|
|
22
|
-
const quickstartGenerator = require('./quickstart');
|
|
23
|
-
|
|
24
|
-
class FileGenerator {
|
|
25
|
-
/**
|
|
26
|
-
* Check if framework is a mobile platform
|
|
27
|
-
*/
|
|
28
|
-
isMobileFramework(frameworkType) {
|
|
29
|
-
return ['expo', 'react-native'].includes(frameworkType);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Check if framework is Next.js
|
|
34
|
-
*/
|
|
35
|
-
isNextJs(frameworkType) {
|
|
36
|
-
return frameworkType === 'nextjs';
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Generate all files based on configuration
|
|
41
|
-
*/
|
|
42
|
-
async generate(options) {
|
|
43
|
-
const integrationPath = options.integrationPath || 'api-only';
|
|
44
|
-
|
|
45
|
-
// Route to the appropriate generator based on integration path
|
|
46
|
-
switch (integrationPath) {
|
|
47
|
-
case 'api-only':
|
|
48
|
-
return this.generateApiOnly(options);
|
|
49
|
-
case 'mcp-assisted':
|
|
50
|
-
return this.generateMcpAssisted(options);
|
|
51
|
-
case 'quickstart':
|
|
52
|
-
return this.generateQuickStart(options);
|
|
53
|
-
default:
|
|
54
|
-
return this.generateLegacy(options);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* API-Only path: Generate typed API client and types
|
|
60
|
-
*/
|
|
61
|
-
async generateApiOnly(options) {
|
|
62
|
-
const results = {
|
|
63
|
-
apiClient: null,
|
|
64
|
-
types: null,
|
|
65
|
-
webhooks: null,
|
|
66
|
-
index: null,
|
|
67
|
-
envFile: null,
|
|
68
|
-
gitignore: null,
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
// Generate the full typed API client package
|
|
72
|
-
const apiOnlyResults = await apiOnlyGenerator.generate(options);
|
|
73
|
-
results.apiClient = apiOnlyResults.client;
|
|
74
|
-
results.types = apiOnlyResults.types;
|
|
75
|
-
results.webhooks = apiOnlyResults.webhooks;
|
|
76
|
-
results.index = apiOnlyResults.index;
|
|
77
|
-
|
|
78
|
-
// Generate environment file
|
|
79
|
-
results.envFile = envGenerator.generate(options);
|
|
80
|
-
|
|
81
|
-
// Update .gitignore
|
|
82
|
-
results.gitignore = gitignoreGenerator.generate(options);
|
|
83
|
-
|
|
84
|
-
return results;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* MCP-Assisted path: Generate MCP config and guide
|
|
89
|
-
*/
|
|
90
|
-
async generateMcpAssisted(options) {
|
|
91
|
-
const results = {
|
|
92
|
-
mcpConfig: null,
|
|
93
|
-
mcpGuide: null,
|
|
94
|
-
envFile: null,
|
|
95
|
-
gitignore: null,
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
// Generate MCP configuration and guide
|
|
99
|
-
const mcpResults = await mcpGuideGenerator.generate(options);
|
|
100
|
-
results.mcpConfig = mcpResults.config;
|
|
101
|
-
results.mcpGuide = mcpResults.guide;
|
|
102
|
-
|
|
103
|
-
// Generate environment file
|
|
104
|
-
results.envFile = envGenerator.generate(options);
|
|
105
|
-
|
|
106
|
-
// Update .gitignore
|
|
107
|
-
results.gitignore = gitignoreGenerator.generate(options);
|
|
108
|
-
|
|
109
|
-
return results;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Quick Start path: Full-stack generation with database, hooks, and components
|
|
114
|
-
*/
|
|
115
|
-
async generateQuickStart(options) {
|
|
116
|
-
return quickstartGenerator.generate(options);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Legacy generation (backward compatibility)
|
|
121
|
-
*/
|
|
122
|
-
async generateLegacy(options) {
|
|
123
|
-
const results = {
|
|
124
|
-
apiClient: null,
|
|
125
|
-
envFile: null,
|
|
126
|
-
nextauth: null,
|
|
127
|
-
oauthGuide: null,
|
|
128
|
-
gitignore: null,
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const frameworkType = options.frameworkType || 'unknown';
|
|
132
|
-
const isMobile = this.isMobileFramework(frameworkType);
|
|
133
|
-
const isNextJs = this.isNextJs(frameworkType);
|
|
134
|
-
|
|
135
|
-
// Generate API client (async - checks for file overwrites)
|
|
136
|
-
if (options.features && options.features.length > 0) {
|
|
137
|
-
results.apiClient = await apiClientGenerator.generate(options);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// Generate environment file
|
|
141
|
-
results.envFile = envGenerator.generate(options);
|
|
142
|
-
|
|
143
|
-
// Generate NextAuth.js config if OAuth is enabled (Next.js only)
|
|
144
|
-
if (options.features && options.features.includes('oauth') && options.oauthProviders) {
|
|
145
|
-
if (isNextJs) {
|
|
146
|
-
results.nextauth = await nextauthGenerator.generate(options);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Generate OAuth guide if OAuth is enabled
|
|
151
|
-
if (options.features && options.features.includes('oauth') && options.oauthProviders) {
|
|
152
|
-
results.oauthGuide = oauthGuideGenerator.generate({
|
|
153
|
-
...options,
|
|
154
|
-
isMobile,
|
|
155
|
-
isNextJs,
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// Update .gitignore
|
|
160
|
-
results.gitignore = gitignoreGenerator.generate(options);
|
|
161
|
-
|
|
162
|
-
return results;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
module.exports = new FileGenerator();
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Manifest Generator
|
|
3
|
-
* Generates and manages the .l4yercak3.json project manifest file
|
|
4
|
-
*
|
|
5
|
-
* The manifest captures the project's structure (framework, models, routes)
|
|
6
|
-
* and is used by the platform to understand and integrate with the app.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
const fs = require('fs');
|
|
10
|
-
const path = require('path');
|
|
11
|
-
|
|
12
|
-
const MANIFEST_FILENAME = '.l4yercak3.json';
|
|
13
|
-
const MANIFEST_VERSION = '1.0.0';
|
|
14
|
-
|
|
15
|
-
class ManifestGenerator {
|
|
16
|
-
/**
|
|
17
|
-
* Generate or update the .l4yercak3.json manifest
|
|
18
|
-
* @param {object} options
|
|
19
|
-
* @param {string} options.projectPath - Project root directory
|
|
20
|
-
* @param {object} options.detection - Detection results from ProjectDetector
|
|
21
|
-
* @param {Array} options.models - Detected models from model-detector
|
|
22
|
-
* @param {Array} options.routes - Detected routes from page-detector (with methods)
|
|
23
|
-
* @param {Array} options.mappings - Suggested mappings from mapping-suggestor
|
|
24
|
-
* @returns {string} Path to the generated manifest file
|
|
25
|
-
*/
|
|
26
|
-
generate(options) {
|
|
27
|
-
const { projectPath, detection, models, routes, mappings } = options;
|
|
28
|
-
const manifestPath = path.join(projectPath, MANIFEST_FILENAME);
|
|
29
|
-
|
|
30
|
-
// Read existing manifest to preserve user overrides
|
|
31
|
-
const existing = this.loadManifest(projectPath);
|
|
32
|
-
|
|
33
|
-
const manifest = {
|
|
34
|
-
version: MANIFEST_VERSION,
|
|
35
|
-
framework: detection?.framework?.type || 'unknown',
|
|
36
|
-
routerType: detection?.framework?.metadata?.routerType || null,
|
|
37
|
-
typescript: detection?.framework?.metadata?.hasTypeScript || false,
|
|
38
|
-
database: detection?.database?.primary?.type || null,
|
|
39
|
-
detectedModels: (models || []).map(m => ({
|
|
40
|
-
name: m.name,
|
|
41
|
-
source: m.source,
|
|
42
|
-
fields: m.fields || [],
|
|
43
|
-
})),
|
|
44
|
-
detectedRoutes: (routes || [])
|
|
45
|
-
.filter(r => r.pageType === 'api_route')
|
|
46
|
-
.map(r => ({
|
|
47
|
-
path: r.path,
|
|
48
|
-
methods: r.methods || ['GET', 'POST'],
|
|
49
|
-
})),
|
|
50
|
-
suggestedMappings: (mappings || []).map(m => ({
|
|
51
|
-
localModel: m.localModel,
|
|
52
|
-
platformType: m.platformType,
|
|
53
|
-
confidence: m.confidence,
|
|
54
|
-
})),
|
|
55
|
-
lastSyncedAt: new Date().toISOString(),
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// Preserve user overrides from existing manifest
|
|
59
|
-
if (existing && existing.userOverrides) {
|
|
60
|
-
manifest.userOverrides = existing.userOverrides;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// Preserve confirmed mappings from existing manifest
|
|
64
|
-
if (existing && existing.confirmedMappings) {
|
|
65
|
-
manifest.confirmedMappings = existing.confirmedMappings;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
fs.writeFileSync(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`, 'utf8');
|
|
69
|
-
return manifestPath;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Load an existing manifest from a project
|
|
74
|
-
* @param {string} projectPath - Project root directory
|
|
75
|
-
* @returns {object|null} Parsed manifest or null if not found
|
|
76
|
-
*/
|
|
77
|
-
loadManifest(projectPath) {
|
|
78
|
-
const manifestPath = path.join(projectPath, MANIFEST_FILENAME);
|
|
79
|
-
try {
|
|
80
|
-
if (!fs.existsSync(manifestPath)) {
|
|
81
|
-
return null;
|
|
82
|
-
}
|
|
83
|
-
const content = fs.readFileSync(manifestPath, 'utf8');
|
|
84
|
-
return JSON.parse(content);
|
|
85
|
-
} catch {
|
|
86
|
-
return null;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Check if a manifest exists in the project
|
|
92
|
-
* @param {string} projectPath
|
|
93
|
-
* @returns {boolean}
|
|
94
|
-
*/
|
|
95
|
-
hasManifest(projectPath) {
|
|
96
|
-
return fs.existsSync(path.join(projectPath, MANIFEST_FILENAME));
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Compute a diff between old and new manifest data
|
|
101
|
-
* @param {object} oldManifest - Previous manifest
|
|
102
|
-
* @param {object} newManifest - New manifest data
|
|
103
|
-
* @returns {object} Diff summary
|
|
104
|
-
*/
|
|
105
|
-
diff(oldManifest, newManifest) {
|
|
106
|
-
const result = {
|
|
107
|
-
modelsAdded: [],
|
|
108
|
-
modelsRemoved: [],
|
|
109
|
-
routesAdded: [],
|
|
110
|
-
routesRemoved: [],
|
|
111
|
-
mappingsChanged: [],
|
|
112
|
-
hasChanges: false,
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
if (!oldManifest) {
|
|
116
|
-
result.modelsAdded = newManifest.detectedModels || [];
|
|
117
|
-
result.routesAdded = newManifest.detectedRoutes || [];
|
|
118
|
-
result.hasChanges = result.modelsAdded.length > 0 || result.routesAdded.length > 0;
|
|
119
|
-
return result;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Compare models
|
|
123
|
-
const oldModelNames = new Set((oldManifest.detectedModels || []).map(m => m.name));
|
|
124
|
-
const newModelNames = new Set((newManifest.detectedModels || []).map(m => m.name));
|
|
125
|
-
|
|
126
|
-
for (const m of (newManifest.detectedModels || [])) {
|
|
127
|
-
if (!oldModelNames.has(m.name)) result.modelsAdded.push(m);
|
|
128
|
-
}
|
|
129
|
-
for (const m of (oldManifest.detectedModels || [])) {
|
|
130
|
-
if (!newModelNames.has(m.name)) result.modelsRemoved.push(m);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
// Compare routes
|
|
134
|
-
const oldRoutePaths = new Set((oldManifest.detectedRoutes || []).map(r => r.path));
|
|
135
|
-
const newRoutePaths = new Set((newManifest.detectedRoutes || []).map(r => r.path));
|
|
136
|
-
|
|
137
|
-
for (const r of (newManifest.detectedRoutes || [])) {
|
|
138
|
-
if (!oldRoutePaths.has(r.path)) result.routesAdded.push(r);
|
|
139
|
-
}
|
|
140
|
-
for (const r of (oldManifest.detectedRoutes || [])) {
|
|
141
|
-
if (!newRoutePaths.has(r.path)) result.routesRemoved.push(r);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
result.hasChanges =
|
|
145
|
-
result.modelsAdded.length > 0 ||
|
|
146
|
-
result.modelsRemoved.length > 0 ||
|
|
147
|
-
result.routesAdded.length > 0 ||
|
|
148
|
-
result.routesRemoved.length > 0;
|
|
149
|
-
|
|
150
|
-
return result;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
module.exports = new ManifestGenerator();
|
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Guide Generator
|
|
3
|
-
* Generates MCP configuration and guide for AI-powered development
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const { ensureDir, writeFileWithBackup, checkFileOverwrite } = require('../utils/file-utils');
|
|
9
|
-
|
|
10
|
-
class McpGuideGenerator {
|
|
11
|
-
/**
|
|
12
|
-
* Generate MCP configuration and guide files
|
|
13
|
-
* @param {Object} options - Generation options
|
|
14
|
-
* @returns {Promise<Object>} - Generated file paths
|
|
15
|
-
*/
|
|
16
|
-
async generate(options) {
|
|
17
|
-
const results = {
|
|
18
|
-
config: null,
|
|
19
|
-
guide: null,
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
results.config = await this.generateConfig(options);
|
|
23
|
-
results.guide = await this.generateGuide(options);
|
|
24
|
-
|
|
25
|
-
return results;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Generate .claude/mcp.json configuration
|
|
30
|
-
*/
|
|
31
|
-
async generateConfig(options) {
|
|
32
|
-
const { projectPath } = options;
|
|
33
|
-
|
|
34
|
-
const claudeDir = path.join(projectPath, '.claude');
|
|
35
|
-
ensureDir(claudeDir);
|
|
36
|
-
|
|
37
|
-
const outputPath = path.join(claudeDir, 'mcp.json');
|
|
38
|
-
|
|
39
|
-
// Check if file exists
|
|
40
|
-
let existingConfig = {};
|
|
41
|
-
if (fs.existsSync(outputPath)) {
|
|
42
|
-
try {
|
|
43
|
-
existingConfig = JSON.parse(fs.readFileSync(outputPath, 'utf8'));
|
|
44
|
-
} catch {
|
|
45
|
-
// Ignore parse errors
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Merge with existing config
|
|
50
|
-
const config = {
|
|
51
|
-
...existingConfig,
|
|
52
|
-
mcpServers: {
|
|
53
|
-
...existingConfig.mcpServers,
|
|
54
|
-
l4yercak3: {
|
|
55
|
-
command: 'npx',
|
|
56
|
-
args: ['@l4yercak3/cli', 'mcp', 'start'],
|
|
57
|
-
env: {
|
|
58
|
-
L4YERCAK3_CONFIG_PATH: '${workspaceFolder}/.l4yercak3',
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
const action = await checkFileOverwrite(outputPath);
|
|
65
|
-
if (action === 'skip') {
|
|
66
|
-
return null;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return writeFileWithBackup(outputPath, JSON.stringify(config, null, 2), action);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Generate MCP integration guide
|
|
74
|
-
*/
|
|
75
|
-
async generateGuide(options) {
|
|
76
|
-
const {
|
|
77
|
-
projectPath,
|
|
78
|
-
organizationName,
|
|
79
|
-
features,
|
|
80
|
-
} = options;
|
|
81
|
-
|
|
82
|
-
const docsDir = path.join(projectPath, 'docs');
|
|
83
|
-
ensureDir(docsDir);
|
|
84
|
-
|
|
85
|
-
const outputPath = path.join(docsDir, 'L4YERCAK3_MCP_GUIDE.md');
|
|
86
|
-
|
|
87
|
-
const action = await checkFileOverwrite(outputPath);
|
|
88
|
-
if (action === 'skip') {
|
|
89
|
-
return null;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const content = this.generateGuideContent({
|
|
93
|
-
organizationName,
|
|
94
|
-
features,
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
return writeFileWithBackup(outputPath, content, action);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
generateGuideContent({ organizationName, features }) {
|
|
101
|
-
const featureList = features || ['crm'];
|
|
102
|
-
|
|
103
|
-
return `# L4YERCAK3 MCP Integration Guide
|
|
104
|
-
|
|
105
|
-
Your project is connected to L4YERCAK3! You can now use Claude Code to build
|
|
106
|
-
custom integrations using natural language.
|
|
107
|
-
|
|
108
|
-
## Getting Started
|
|
109
|
-
|
|
110
|
-
The L4YERCAK3 MCP server has been configured in \`.claude/mcp.json\`. When you
|
|
111
|
-
use Claude Code in this project, it will have access to L4YERCAK3 tools.
|
|
112
|
-
|
|
113
|
-
## Available MCP Tools
|
|
114
|
-
|
|
115
|
-
### CRM Tools (contacts:read, contacts:write)
|
|
116
|
-
${featureList.includes('crm') ? `
|
|
117
|
-
- \`l4yercak3_crm_list_contacts\` - List and search contacts
|
|
118
|
-
- \`l4yercak3_crm_create_contact\` - Create new contacts
|
|
119
|
-
- \`l4yercak3_crm_get_contact\` - Get contact details
|
|
120
|
-
- \`l4yercak3_crm_update_contact\` - Update contacts
|
|
121
|
-
- \`l4yercak3_crm_delete_contact\` - Delete contacts
|
|
122
|
-
- \`l4yercak3_crm_add_tags\` - Add tags to contacts
|
|
123
|
-
- \`l4yercak3_crm_list_organizations\` - List organizations
|
|
124
|
-
- \`l4yercak3_crm_create_organization\` - Create organizations
|
|
125
|
-
` : '*Not enabled*'}
|
|
126
|
-
|
|
127
|
-
### Events Tools (events:read, events:write)
|
|
128
|
-
${featureList.includes('events') ? `
|
|
129
|
-
- \`l4yercak3_events_list\` - List events
|
|
130
|
-
- \`l4yercak3_events_create\` - Create events
|
|
131
|
-
- \`l4yercak3_events_get\` - Get event details with products/sponsors
|
|
132
|
-
- \`l4yercak3_events_get_attendees\` - List attendees
|
|
133
|
-
- \`l4yercak3_events_check_in\` - Check in attendees
|
|
134
|
-
` : '*Not enabled*'}
|
|
135
|
-
|
|
136
|
-
### Forms Tools (forms:read, forms:write)
|
|
137
|
-
${featureList.includes('forms') ? `
|
|
138
|
-
- \`l4yercak3_forms_list\` - List forms
|
|
139
|
-
- \`l4yercak3_forms_get\` - Get form with fields
|
|
140
|
-
- \`l4yercak3_forms_submit\` - Submit form responses
|
|
141
|
-
- \`l4yercak3_forms_get_responses\` - Get form submissions
|
|
142
|
-
` : '*Not enabled*'}
|
|
143
|
-
|
|
144
|
-
### Products Tools (products:read)
|
|
145
|
-
${featureList.includes('products') ? `
|
|
146
|
-
- \`l4yercak3_products_list\` - List products
|
|
147
|
-
- \`l4yercak3_products_get\` - Get product details
|
|
148
|
-
` : '*Not enabled*'}
|
|
149
|
-
|
|
150
|
-
### Checkout Tools (checkout:write)
|
|
151
|
-
${featureList.includes('checkout') ? `
|
|
152
|
-
- \`l4yercak3_checkout_create_session\` - Create checkout session
|
|
153
|
-
- \`l4yercak3_checkout_get_session\` - Get checkout status
|
|
154
|
-
- \`l4yercak3_orders_list\` - List orders
|
|
155
|
-
- \`l4yercak3_orders_get\` - Get order details
|
|
156
|
-
` : '*Not enabled*'}
|
|
157
|
-
|
|
158
|
-
### Invoicing Tools (invoices:read, invoices:write)
|
|
159
|
-
${featureList.includes('invoicing') ? `
|
|
160
|
-
- \`l4yercak3_invoices_list\` - List invoices
|
|
161
|
-
- \`l4yercak3_invoices_create\` - Create invoices
|
|
162
|
-
- \`l4yercak3_invoices_get\` - Get invoice details
|
|
163
|
-
- \`l4yercak3_invoices_send\` - Send invoice to customer
|
|
164
|
-
- \`l4yercak3_invoices_mark_paid\` - Mark invoice as paid
|
|
165
|
-
- \`l4yercak3_invoices_get_pdf\` - Get invoice PDF URL
|
|
166
|
-
` : '*Not enabled*'}
|
|
167
|
-
|
|
168
|
-
### Benefits Tools (benefits:read, benefits:write)
|
|
169
|
-
${featureList.includes('benefits') ? `
|
|
170
|
-
- \`l4yercak3_benefits_list_claims\` - List benefit claims
|
|
171
|
-
- \`l4yercak3_benefits_create_claim\` - Submit a benefit claim
|
|
172
|
-
- \`l4yercak3_benefits_approve_claim\` - Approve a claim
|
|
173
|
-
- \`l4yercak3_benefits_reject_claim\` - Reject a claim
|
|
174
|
-
- \`l4yercak3_benefits_list_commissions\` - List commission payouts
|
|
175
|
-
` : '*Not enabled*'}
|
|
176
|
-
|
|
177
|
-
### Code Generation Tools
|
|
178
|
-
- \`l4yercak3_generate_api_client\` - Generate typed API client
|
|
179
|
-
- \`l4yercak3_generate_component\` - Generate React components
|
|
180
|
-
- \`l4yercak3_generate_hook\` - Generate React hooks
|
|
181
|
-
- \`l4yercak3_generate_page\` - Generate Next.js pages
|
|
182
|
-
|
|
183
|
-
## Example Prompts
|
|
184
|
-
|
|
185
|
-
Here are some things you can ask Claude Code to do:
|
|
186
|
-
|
|
187
|
-
### CRM & Contacts
|
|
188
|
-
1. "Create a contact management page with search, filtering by tags, and the ability to add notes"
|
|
189
|
-
2. "Build a contact detail view that shows all activities and related organizations"
|
|
190
|
-
3. "Generate a contact import feature that reads from CSV"
|
|
191
|
-
|
|
192
|
-
### Events & Registrations
|
|
193
|
-
4. "Build an event registration flow with ticket selection and Stripe checkout"
|
|
194
|
-
5. "Create an event listing page with filters for date, location, and category"
|
|
195
|
-
6. "Build a mobile-friendly check-in scanner for event attendees"
|
|
196
|
-
|
|
197
|
-
### Forms
|
|
198
|
-
7. "Generate a form builder that lets admins create custom forms and view submissions"
|
|
199
|
-
8. "Create a contact form that saves to L4YERCAK3 CRM"
|
|
200
|
-
9. "Build a survey results dashboard with charts"
|
|
201
|
-
|
|
202
|
-
### E-commerce
|
|
203
|
-
10. "Create a product catalog with categories and search"
|
|
204
|
-
11. "Build a shopping cart with quantity controls"
|
|
205
|
-
12. "Generate an order history page for customers"
|
|
206
|
-
|
|
207
|
-
### Invoicing
|
|
208
|
-
13. "Create an invoice dashboard showing pending, paid, and overdue invoices"
|
|
209
|
-
14. "Build a send invoice flow with email preview"
|
|
210
|
-
15. "Generate an invoice PDF viewer component"
|
|
211
|
-
|
|
212
|
-
### Dashboard & Analytics
|
|
213
|
-
16. "Create a dashboard showing CRM contacts, recent events, and pending invoices"
|
|
214
|
-
17. "Build a revenue analytics chart from order data"
|
|
215
|
-
18. "Generate a customer lifetime value report"
|
|
216
|
-
|
|
217
|
-
## Your Configuration
|
|
218
|
-
|
|
219
|
-
- **Organization:** ${organizationName || 'Your Organization'}
|
|
220
|
-
- **Features Enabled:** ${featureList.join(', ')}
|
|
221
|
-
- **API Key:** Stored in .env.local
|
|
222
|
-
|
|
223
|
-
## Tips for Best Results
|
|
224
|
-
|
|
225
|
-
1. **Be specific about your UI framework** - Tell Claude if you're using Tailwind, shadcn/ui, Material UI, etc.
|
|
226
|
-
|
|
227
|
-
2. **Reference existing patterns** - Say "match the style of my existing components" so Claude reads your code first.
|
|
228
|
-
|
|
229
|
-
3. **Start with data** - Ask Claude to show what data is available from the API before designing UI.
|
|
230
|
-
|
|
231
|
-
4. **Iterate incrementally** - Start simple and add features one at a time.
|
|
232
|
-
|
|
233
|
-
5. **Ask for explanations** - Claude can explain what MCP tools are available and how they work.
|
|
234
|
-
|
|
235
|
-
## Webhook Integration
|
|
236
|
-
|
|
237
|
-
You can also ask Claude to set up webhooks for real-time updates:
|
|
238
|
-
|
|
239
|
-
- "Set up a webhook handler for new contact creation"
|
|
240
|
-
- "Create a webhook endpoint that syncs orders to our local database"
|
|
241
|
-
- "Build a notification system triggered by invoice.paid webhooks"
|
|
242
|
-
|
|
243
|
-
## Need Help?
|
|
244
|
-
|
|
245
|
-
- Ask Claude: "What L4YERCAK3 MCP tools are available?"
|
|
246
|
-
- Ask Claude: "Show me an example of using the contacts API"
|
|
247
|
-
- Ask Claude: "Help me debug this L4YERCAK3 integration"
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
Generated by @l4yercak3/cli
|
|
252
|
-
`;
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
module.exports = new McpGuideGenerator();
|