Skip to content

[P0] Define Leadtype core and framework adapter boundary #40

@KayleeWilliams

Description

@KayleeWilliams

Problem

Leadtype is intentionally a framework-agnostic docs pipeline, but the framework story needs a clear boundary so integrations can be idiomatic without pulling framework dependencies into core.

The core should own source resolution, MDX transforms, markdown flattening, llms.txt, llms-full.txt, search artifacts, linting, Agent Readability files, and package-bundled AGENTS.md.

Framework integrations should be thin, optional, and native-feeling:

  • Next.js users should see App Router route handlers and generateStaticParams().
  • Nuxt users should see Nitro routes/middleware and Vue composables.
  • SvelteKit users should see +page.server.ts, +server.ts, entries(), and stores/runes.
  • Astro users should see getStaticPaths(), endpoints, Content Collections interop, and islands where relevant.
  • Fumadocs users should get a focused adapter over the same source primitive.

Proposal

Document and enforce the core/adapters boundary.

Core package:

  • No runtime dependency on Next, Nuxt, SvelteKit, Astro, React, Vue, or Svelte.
  • Owns framework-neutral artifacts and source/search primitives.
  • Provides plain data structures that adapters can consume.

Adapter/docs layer:

  • Uses native framework conventions.
  • Keeps behavior thin and testable.
  • Provides examples that users can copy into their app.

Possible adapter entry points over time:

  • leadtype/adapters/next
  • leadtype/adapters/nuxt
  • leadtype/adapters/sveltekit
  • leadtype/adapters/astro
  • leadtype/search/react
  • leadtype/search/vue
  • leadtype/search/svelte

Acceptance Criteria

  • The architecture boundary is documented in Leadtype docs.
  • The core package has no framework runtime dependencies.
  • Framework-specific recipes use native host conventions instead of generic pseudocode.
  • Shared behavior is tested once in core.
  • Framework recipes verify artifact paths, markdown routes, and search loading.
  • The release positioning is clear: one agnostic pipeline, native-feeling integrations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions