Skip to content

fix: update documentation to reflect folder-per-provider layout and co-located specs#429

Open
frontegg-david wants to merge 1 commit into
mainfrom
fix/404-create-provider-doc
Open

fix: update documentation to reflect folder-per-provider layout and co-located specs#429
frontegg-david wants to merge 1 commit into
mainfrom
fix/404-create-provider-doc

Conversation

@frontegg-david
Copy link
Copy Markdown
Contributor

@frontegg-david frontegg-david commented May 17, 2026

Summary by CodeRabbit

  • Documentation
    • Updated provider organization and file structure guidance for extensibility
    • Added recommendations for folder-per-provider layout with co-located implementations and per-provider barrel exports
    • Expanded examples demonstrating proper module import paths and organization patterns
    • Clarified when to promote flat provider files to folder structure as they grow
    • Added guidance on cross-provider imports and naming conventions

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

📝 Walkthrough

Walkthrough

This PR documents a recommended file organization pattern for FrontMCP providers: when providers grow beyond a single class (by adding specs, helpers, or types), they should be organized into per-provider folders with index.ts barrels, a top-level src/providers/index.ts barrel for re-exports, and import guidance requiring barrel access rather than direct implementation file imports.

Changes

Provider File Layout Pattern

Layer / File(s) Summary
Provider file layout pattern specification
docs/frontmcp/extensibility/providers.mdx, libs/skills/catalog/frontmcp-development/references/create-provider.md
Core pattern introduced in extensibility docs with directory trees, barrel examples, and import rules; formalized in create-provider reference File Layout section with naming conventions and cross-provider import rules.
Reference guide implementation rules and verification
libs/skills/catalog/frontmcp-development/references/create-provider.md
Notes that Nx generator initially creates flat <slug>.provider.ts and should promote to folder layout when specs/helpers exist; Common Patterns table compares flat vs. folder approaches; Verification Checklist requires per-provider folders once specs/helpers/types are added; examples table updated to include folder-per-provider example.
Basic example: promoting flat provider to folder layout
libs/skills/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md
Demonstrates transition from single-file database.provider.ts to database/ folder with index.ts, optional connection.ts, and co-located spec.
Comprehensive multi-provider example with barrels and specs
libs/skills/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md
Config and API providers show full folder-per-provider implementation: each provider has its own folder with exported class, co-located spec, and per-folder barrel; top-level providers/index.ts re-exports both providers; server bootstrap imports from top-level barrel.
Skill manifest metadata synchronization
libs/skills/catalog/skills-manifest.json
Create-provider skill example metadata updated to reflect folder-per-provider structure, co-located specs, and barrel exports as explicit features.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Poem

🐰 Providers grow and folders bloom,
Barrels tidy up each room,
Index files hold the light,
Organized and structured right!
Cross-provider paths now clear,
The pattern's crystal, never fear! 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: it updates documentation to reflect a folder-per-provider layout and co-located specs across multiple files, which aligns with the comprehensive nature of this documentation-focused PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/404-create-provider-doc

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@libs/skills/catalog/frontmcp-development/references/create-provider.md`:
- Around line 212-220: Replace the confusing import examples so the "✅ Good"
case actually shows the correct subfolder-barrel import and remove the
duplicate/contradictory line: show "import { TaskStoreProvider } from
'../task-store';" as the single ✅ Good example, keep the two distinct ❌ Bad
examples as "import { TaskStoreProvider } from '..';" (top-level barrel) and
"import { TaskStoreProvider } from '../task-store/task-store.provider';"
(reaching into implementation), and ensure only those three lines (one good, two
bad) remain in the block referencing TaskStoreProvider.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ef31093f-f7f6-4754-b736-60e538b7ba62

📥 Commits

Reviewing files that changed from the base of the PR and between 4328981 and 3a4de84.

📒 Files selected for processing (5)
  • docs/frontmcp/extensibility/providers.mdx
  • libs/skills/catalog/frontmcp-development/examples/create-provider/basic-database-provider.md
  • libs/skills/catalog/frontmcp-development/examples/create-provider/config-and-api-providers.md
  • libs/skills/catalog/frontmcp-development/references/create-provider.md
  • libs/skills/catalog/skills-manifest.json

Comment on lines +212 to +220
```typescript
// ✅ Good — imports through the subfolder barrel

// ❌ Bad — top-level barrel for sibling imports causes circular-init churn
import { TaskStoreProvider } from '..';
import { TaskStoreProvider } from '../task-store';
// ❌ Bad — reaches into another provider's implementation file
import { TaskStoreProvider } from '../task-store/task-store.provider';
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix the cross-provider import example block (missing “good” import and contradictory snippet).

The snippet labels a “✅ Good” case but doesn’t show it, and then presents conflicting imports in the same block. Keep one explicit good import and the bad variants separated.

Suggested doc fix
 ```typescript
 // ✅ Good — imports through the subfolder barrel
+import { TaskStoreProvider } from '../task-store';

 // ❌ Bad — top-level barrel for sibling imports causes circular-init churn
 import { TaskStoreProvider } from '..';
-import { TaskStoreProvider } from '../task-store';
 // ❌ Bad — reaches into another provider's implementation file
 import { TaskStoreProvider } from '../task-store/task-store.provider';
</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @libs/skills/catalog/frontmcp-development/references/create-provider.md
around lines 212 - 220, Replace the confusing import examples so the "✅ Good"
case actually shows the correct subfolder-barrel import and remove the
duplicate/contradictory line: show "import { TaskStoreProvider } from
'../task-store';" as the single ✅ Good example, keep the two distinct ❌ Bad
examples as "import { TaskStoreProvider } from '..';" (top-level barrel) and
"import { TaskStoreProvider } from '../task-store/task-store.provider';"
(reaching into implementation), and ensure only those three lines (one good, two
bad) remain in the block referencing TaskStoreProvider.


</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

@github-actions
Copy link
Copy Markdown
Contributor

Performance Test Results

Status: ✅ All tests passed

Summary

Project Tests Passed Warnings Failed Leaks
✅ demo-e2e-agents 4 4 0 0 0
✅ demo-e2e-cache 11 11 0 0 0
✅ demo-e2e-codecall 4 4 0 0 0
✅ demo-e2e-config 4 4 0 0 0
✅ demo-e2e-direct 3 3 0 0 0
✅ demo-e2e-elicitation 1 1 0 0 0
✅ demo-e2e-errors 4 4 0 0 0
✅ demo-e2e-hooks 3 3 0 0 0
✅ demo-e2e-multiapp 4 4 0 0 0
✅ demo-e2e-notifications 3 3 0 0 0
✅ demo-e2e-openapi 2 2 0 0 0
✅ demo-e2e-providers 4 4 0 0 0
✅ demo-e2e-public 4 4 0 0 0
✅ demo-e2e-redis 15 15 0 0 0
✅ demo-e2e-remember 4 4 0 0 0
✅ demo-e2e-remote 5 5 0 0 0
✅ demo-e2e-serverless 2 2 0 0 0
✅ demo-e2e-skills 15 15 0 0 0
✅ demo-e2e-standalone 2 2 0 0 0
✅ demo-e2e-transport-recreation 3 3 0 0 0
✅ demo-e2e-ui 4 4 0 0 0

Total: 101 tests across 21 projects

📊 View full report in workflow run


Generated at: 2026-05-17T09:19:04.972Z
Commit: 21df52d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Skill create-provider doesn't recommend a folder-per-provider layout

1 participant