|
| 1 | +# Money Dev Kit Examples |
| 2 | + |
| 3 | +This repository contains example applications demonstrating how to integrate Money Dev Kit into your projects. These examples use published npm packages and represent real-world usage patterns. |
| 4 | + |
| 5 | +## Examples |
| 6 | + |
| 7 | +### [mdk-nextjs-demo](./mdk-nextjs-demo) |
| 8 | + |
| 9 | +A Next.js application demonstrating the Money Dev Kit checkout flow integration. This example shows: |
| 10 | +- Client-side checkout navigation with `useCheckout` hook |
| 11 | +- Hosted checkout page rendering with `<Checkout />` component |
| 12 | +- Server-side API route setup |
| 13 | +- Next.js configuration with the MDK plugin |
| 14 | + |
| 15 | +**Live Demo:** [https://mdk-nextjs-demo-brown.vercel.app](https://mdk-nextjs-demo-brown.vercel.app) |
| 16 | + |
| 17 | +## Getting Started |
| 18 | + |
| 19 | +Each example is a standalone project with its own dependencies and setup instructions. Navigate to the example directory and follow its README. |
| 20 | + |
| 21 | +```bash |
| 22 | +cd mdk-nextjs-demo |
| 23 | +npm install |
| 24 | +npm run dev |
| 25 | +``` |
| 26 | + |
| 27 | +## Requirements |
| 28 | + |
| 29 | +- Node.js 20 or later |
| 30 | +- npm or pnpm |
| 31 | +- Money Dev Kit API credentials (get them at [moneydevkit.com](https://moneydevkit.com) or run `npx @moneydevkit/create`) |
| 32 | + |
| 33 | +## Using Published Packages |
| 34 | + |
| 35 | +All examples in this repository use published versions of Money Dev Kit packages: |
| 36 | +- `@moneydevkit/nextjs` - Next.js integration components |
| 37 | +- `@moneydevkit/core` - Core Lightning functionality |
| 38 | +- `@moneydevkit/create` - CLI for generating credentials |
| 39 | + |
| 40 | +For the latest stable versions: |
| 41 | +```bash |
| 42 | +npm install @moneydevkit/nextjs |
| 43 | +``` |
| 44 | + |
| 45 | +For beta releases: |
| 46 | +```bash |
| 47 | +npm install @moneydevkit/nextjs@beta |
| 48 | +``` |
| 49 | + |
| 50 | +## Contributing |
| 51 | + |
| 52 | +Want to add a new example? Follow these guidelines: |
| 53 | +1. Each example should be in its own directory at the repository root |
| 54 | +2. Use published npm packages (not local tarballs) |
| 55 | +3. Include a detailed README with setup instructions |
| 56 | +4. Add your example to the CI workflow matrix in [.github/workflows/ci.yml](./.github/workflows/ci.yml) |
| 57 | +5. Ensure the example builds and runs successfully |
| 58 | + |
| 59 | +## Development & Integration Testing |
| 60 | + |
| 61 | +This repository is for **user-facing examples** with published packages. For integration testing with local development builds, see the [mdk-checkout](https://github.com/moneydevkit/mdk-checkout) repository. |
| 62 | + |
| 63 | +## License |
| 64 | + |
| 65 | +MIT |
0 commit comments