This repository hosts multiple npm packages that power the Money Dev Kit developer experience.
@moneydevkit/nextjs– Next.js checkout components and helpers located inpackages/nextjs.@moneydevkit/create– Developer onboarding CLI located inpackages/create.
Render the checkout page:
// app/checkout/[id]/page.js
"use client";
import { Checkout } from "@moneydevkit/nextjs";
import { use } from "react";
export default function CheckoutPage({ params }) {
const { id } = use(params);
return <Checkout id={id} />;
}Expose the API endpoint:
// app/api/mdk/route.js
export { POST } from "@moneydevkit/nextjs/server/route";See packages/nextjs/README.md for full setup instructions.
Run commands from the repo root using npm workspaces:
npm install # install all package deps
npm run build # build every package
npm run test -- --watch # pass flags through to workspace scripts
npm run build -w @moneydevkit/nextjs
npm run build -w createTo work on an individual package, cd into its folder under packages/ and run the usual commands (e.g., npm run dev).
All @moneydevkit/* packages share a unified version number and are released together.
Every push to main that modifies files in packages/ triggers the publish-beta workflow:
- All packages are bumped to the next beta version (e.g.,
0.4.0-beta.0→0.4.0-beta.1) - All packages are published to npm with the
betatag
Install the latest beta with:
npx @moneydevkit/create@beta
npm install @moneydevkit/nextjs@beta- Create a GitHub release with a tag matching the version in package.json (e.g., if package.json has
0.4.0-beta.3, create tagv0.4.0) - The
publish-releaseworkflow validates, publishes, and bumps to the next minor version
0.4.0 ← initial version in package.json
↓ push to main
0.4.0-beta.0 ← publish-beta.yml
↓ push to main
0.4.0-beta.1 ← publish-beta.yml
↓ push to main
0.4.0-beta.2 ← publish-beta.yml
↓ gh release create v0.4.0
0.4.0 @latest ← publish-release.yml (publishes stable)
0.5.0 ← publish-release.yml (auto-bumps to next minor)
↓ push to main
0.5.0-beta.0 ← publish-beta.yml
...
package.json: 0.4.0-beta.2
↓ gh release create v0.3.0
ERROR: Tag version 0.3.0 does not match package.json version 0.4.0
(cannot release older version)
package.json: 0.4.0-beta.2
↓ gh release create v0.5.0
ERROR: Tag version 0.5.0 does not match package.json version 0.4.0
(must release 0.4.0 first, then betas will be 0.5.0-beta.X)
package.json: 0.4.0-beta.2
↓ gh release create v0.4.0
SUCCESS: Publishes 0.4.0, then bumps to 0.5.0
.