Skip to content

feat(integrations): a connector framework for stores and marketplaces, on integration_connections #1185

Closed as not planned

Description

@gkhngyk

Problem

Shopify comes first. Then Google Merchant Center and Amazon, then eBay, Walmart, Etsy, WooCommerce, BigCommerce, Shoptet, Trendyol and Hepsiburada. Every one of them needs the same plumbing: connect, sync the catalog, sync orders, handle webhooks, disconnect. Without one shape, each connector reinvents it, and contributors can't build one without the core team.

What exists today:

  • integration_connections holds one row per organization and provider (Search Console, Analytics). Composio runs the OAuth flow and keeps the tokens; we keep the connected-account id (composio.js).
  • key-encryption.ts encrypts organization API keys with AES-256-GCM under the app's master key.
  • The Search Console and Analytics syncs run daily after tracking (server.js).

Proposal

  1. Connections: extend integration_connections rather than adding a second table.

    • Add the brand a store feeds, since one store belongs to one brand.
    • Add the external account (shop domain, seller id), the last catalog and order sync times, and the last error.
  2. Credentials:

    • Through Composio when it supports the platform with our own app credentials.
    • Otherwise encrypted with the same envelope as key-encryption.ts, usable from the server, in a column authenticated can't read.
    • Never logged.
  3. Interface, one folder per connector under server/src/connectors/:

    • connect
    • syncCatalog(since)
    • syncOrders(since)
    • handleWebhook(event)
    • disconnect

    Catalog writes go through the batch upsert from feat(shopping): a product catalog per brand, with CSV import #1184.

  4. Plumbing:

    • A daily sync next to the Search Console and Analytics syncs, plus an on-demand sync.
    • Retries with backoff, and respect for each platform's rate-limit headers.
    • Structured logs with no credentials and no personal data.
  5. Test harness: fixtures and a fake HTTP API per connector, so a connector's tests run in npm test without real accounts.

  6. Reference connector: a product feed URL (Google feed XML or CSV), fetched daily.

  7. Contributor guide: how to build, test and submit a connector, with the checklist every connector PR is reviewed against:

    • least scopes
    • credentials only in the credential store
    • no buyer personal data: orders keep id, date, line items, revenue and channel
    • disconnect and uninstall delete credentials and stop syncs
    • platform rate limits respected

Acceptance criteria

  • The feed URL connector passes the harness and keeps a catalog in sync daily.
  • A contributor can build and test a connector from the guide alone, with no production keys.
  • No credential is readable by authenticated or appears in logs (checked).

Activity

  1. added
    enhancement
    integrations
    e-commerce
    security-review
    on Oct 19, 2026
  2. gkhngyk commented on Oct 20, 2026

    @gkhngyk
    ContributorAuthor

    Closing: the e-commerce plan is being reworked, and new issues will replace this one.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    e-commerceenhancementintegrationssecurity-review

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions