Skip to content

feat: developer site#33

Merged
Villarley merged 7 commits into
PACTO-LAT:mainfrom
KevinLatino:feat/developer-site
Jun 29, 2026
Merged

feat: developer site#33
Villarley merged 7 commits into
PACTO-LAT:mainfrom
KevinLatino:feat/developer-site

Conversation

@KevinLatino

@KevinLatino KevinLatino commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

What this pr implements, closes #20

Implements the developer site for Pacto Connect (#20 ) — a Nextra 2 / Next.js 14 app under apps/docs with four things a developer needs to go from zero to a working integration:

  1. Intro page — overview of the three integration paths (React, Vanilla JS, custom UI) with links to the relevant packages.
  2. Quickstart — tabbed step-by-step guide for React, Vanilla JS, and CDN/HTML. Each tab produces a complete, paste-ready snippet.
  3. API reference — full type documentation for @pacto-connect/core, /react, and /elements, generated directly from the TypeScript sources via TypeDoc.
  4. Interactive playground — configure the widget live (key, mode, listingId, testMode), open it with a real pacto.mount() call, and copy the generated snippet in React, Vanilla JS, or CDN flavour.

Adds package.json (nextra, typedoc, tsx deps), next.config.mjs,
theme.config.tsx, tsconfig.json, and the root _app.tsx entry.
Updates turbo.json to include .next/** in build outputs.
- index.mdx: landing page with integration cards and steps overview
- quickstart.mdx: tabbed guide for React, Vanilla JS, and CDN paths
- api-reference/: overview + seeded reference pages for core, react,
  and elements (overwritten on each generate:api-docs run)
Config panel (publishableKey, mode, listingId, gatewayUrl, toggles)
plus a live preview area that calls pacto.mount() via dynamic import.
Snippet panel shows React / Vanilla JS / CDN tabs with one-click copy.
Component is SSR-disabled since it registers browser-only custom elements.
generate-api-docs.mts runs TypeDoc + typedoc-plugin-markdown against
all three package entry points and writes MDX to pages/api-reference/.
Binary resolution walks up from apps/docs to handle npm workspace hoisting.

api-docs.yml triggers on changes to packages/*/src/**, builds packages,
regenerates docs, and fails PRs if committed files are out of date.
Auto-commits refreshed docs on pushes to main.
@aguilar1x aguilar1x changed the title Feat/developer site feat: developer site Jun 29, 2026
KevinLatino and others added 3 commits June 28, 2026 21:51
- Pin next@^14.2.18 in root devDependencies to prevent npm from
  installing next@16 as a peer dep of next-seo, which broke the build
  (next@16 removed dist/server/future/ used by next-seo@6.x)
- Remove next override (redundant now that root has a direct dep)
- Escape bare custom-element tags like <pacto-checkout> outside code
  blocks in the API docs generator so MDX doesn't parse them as JSX
- Add next-seo as explicit dep in apps/docs for clarity
@Villarley Villarley merged commit 28f2932 into PACTO-LAT:main Jun 29, 2026
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.

Improve SDK developer onboarding and integration flow

2 participants