Skip to content

Update scaffolds and specs for core package architecture#84

Open
oatsandsugar wants to merge 1 commit intomainfrom
scaffold-and-spec-updates
Open

Update scaffolds and specs for core package architecture#84
oatsandsugar wants to merge 1 commit intomainfrom
scaffold-and-spec-updates

Conversation

@oatsandsugar
Copy link
Contributor

Summary

  • Update connector scaffold to use @connector-factory/core with ApiConnectorBase inheritance
  • Fix scaffold structure to use proper domain delegation pattern and Jest testing framework
  • Update API specification to comprehensively document core package architecture
  • Update pipeline scaffold to match actual hubspot-to-clickhouse implementation patterns
  • Change all GitHub references from "514-labs/factory" to "514-labs/registry" throughout codebase

Changes Made

Connector Scaffold Updates

  • ✅ Added @connector-factory/core dependency with proper ApiConnectorBase extension
  • ✅ Implemented domain-based architecture using buildResourceDomain pattern
  • ✅ Switched from Vitest to Jest testing framework to match actual implementations
  • ✅ Added proper TypeScript configuration and build setup
  • ✅ Fixed GitHub repository URLs throughout templates

API Specification Updates

  • ✅ Added comprehensive "Core Package Architecture" section
  • ✅ Documented ApiConnectorBase inheritance patterns
  • ✅ Added domain delegation pattern documentation
  • ✅ Enhanced hook system documentation with named hooks and priority
  • ✅ Updated conformance checklist for core package integration

Pipeline Scaffold Updates

  • ✅ Updated package.json to include moose dependencies and proper build scripts
  • ✅ Added aurora.config.toml and moose.config.toml configuration files
  • ✅ Restructured to match actual hubspot-to-clickhouse implementation
  • ✅ Fixed ENV.EXAMPLE file naming and structure

Repository Reference Updates

  • ✅ Updated all documentation to reference "514-labs/registry" instead of "514-labs/factory"
  • ✅ Fixed install script examples and clone commands
  • ✅ Updated all scaffold templates with correct GitHub URLs

Test Plan

  • Verified scaffold JSON files parse correctly
  • Validated package.json templates have correct dependencies
  • Confirmed connector templates use ApiConnectorBase pattern
  • Tested that specifications align with actual core package architecture

🤖 Generated with Claude Code

- Update connector scaffold to use @connector-factory/core with ApiConnectorBase
- Fix scaffold structure to use domain delegation pattern and Jest testing
- Update API specification to document core package architecture properly
- Update pipeline scaffold to match actual hubspot-to-clickhouse patterns
- Change all GitHub references from "514-labs/factory" to "514-labs/registry"
- Add proper dependencies and build configurations to scaffolds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Sep 19, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
registry Error Error Sep 19, 2025 0:20am

@oatsandsugar
Copy link
Contributor Author

⚠️ Important: Differences Between Updated Scaffolds and Actual Implementation (PR #83)

After analyzing the Dutchie connector implementation in PR #83, I found several significant differences between our updated scaffolds and the actual production connector patterns. The scaffolds would need additional major updates to fully match the real implementation.

🚨 Critical Differences Found:

1. Core Package Dependency Mismatch

  • Our Scaffold: "@connector-factory/core": "workspace:*"
  • Actual PR Dutchie connector #83: "@connector-factory/core": "^0.1.0"
  • Issue: The core package appears to be published/versioned, not a workspace dependency

2. Different Resource Abstraction Pattern

  • Our Scaffold: Uses buildContactsDomain(send) with domain delegation
  • Actual PR Dutchie connector #83: Uses createBrandResource(send) with makeCrudResource utility
  • Issue: Real implementation has a different abstraction layer (resources/ vs domains/)

3. Missing OpenAPI Code Generation

  • Our Scaffold: Basic TypeScript setup
  • Actual PR Dutchie connector #83: Has openapi-typescript dependency and 16k+ lines of generated types in src/generated/dutchie.ts
  • Issue: Production connectors heavily rely on generated types from OpenAPI specs

4. More Sophisticated File Structure

  • Our Scaffold: src/domains/, src/models/
  • Actual PR Dutchie connector #83: src/resources/, src/lib/, src/validation/, src/observability/, src/generated/
  • Issue: Real structure includes validation, observability, and generated code directories

5. Advanced Observability Integration

  • Our Scaffold: Basic export of observability hooks
  • Actual PR Dutchie connector #83: Custom createLoggingHooks() and createMetricsHooks() with configuration options
  • Issue: Real connectors have more sophisticated logging/metrics setup

6. OpenAPI Validation Integration

  • Our Scaffold: No validation setup
  • Actual PR Dutchie connector #83: createOpenApiValidationHook(openapi) with strict/lenient modes
  • Issue: Production connectors validate responses against OpenAPI schemas

📋 Recommended Next Steps:

  1. Update scaffolds to use published core package version (^0.1.0)
  2. Switch to resources pattern with makeCrudResource instead of domains
  3. Add OpenAPI tooling including openapi-typescript dependency and generation scripts
  4. Include validation setup with OpenAPI schema validation hooks
  5. Add observability templates for logging and metrics configuration
  6. Update file structure to match resources/, lib/, validation/, observability/ pattern

✅ What This PR Accomplishes:

Despite these differences, this PR significantly improves the scaffolds by:

  • ✅ Fixing all GitHub repository references (factory → registry)
  • ✅ Aligning with core package architecture principles
  • ✅ Using proper ApiConnectorBase inheritance
  • ✅ Adding Jest testing framework (matches PR Dutchie connector #83)
  • ✅ Updating specifications to document core package properly

Recommendation: Merge this PR for the immediate fixes, then create follow-up PRs to address the remaining gaps with the actual implementation patterns.

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.

1 participant