A standalone React/Vite example that embeds the Markee sign and payment modal. ConnectKit supplies the app wallet; Markee supplies the sign, moderation data, payment preparation, reward quote, and transaction verification through its hosted API. The SDK knows its API endpoint, so this app needs no Markee, RPC, or database key.
The sign is a themed button. MarkeeSign fetches the current winner and moderation state on its own, blurs flagged messages, and opens the modal when clicked. The sample controls that modal through onOpen, so its separate Open Markee button still works. The sign and modal share their theme by default; enable Customize modal separately to give the modal its own theme. The ConnectKit wallet is passed only to the modal.
<MarkeeSign placement={placement} theme={signThemeConfig} onOpen={() => setOpen(true)} />
<button onClick={() => setOpen(true)}>Open Markee</button>
<MarkeeModal placement={placement} open={open} onClose={() => setOpen(false)} wallet={wallet} theme={modalThemeConfig} />npm ci
npm run devOpen http://127.0.0.1:5173. The sample locks the published SDK version in package-lock.json and includes two existing Base boards. The For sale board supports one-time payments and MARKEE rewards; For rent uses ETHx streaming. These are live contracts, so confirming in a wallet moves real funds.
The Community tab uses the live Gardens integration lookup. Choose the identity network and enter a Gardens RegistryCommunity address, such as the Markee Cooperative on Base. The SDK asks Markee's API for that community's board and moderation state. A valid community may have no Markee board yet. The community admin view links to Markee's Creator dashboard. Exported React and JavaScript examples accept the current page's chainId and communityId, so the same component can serve many community pages.
The Community selector also includes Giveth Projects · concept preview. Enter a numeric Project ID to show a proposed activation screen with a blank Base beneficiary field and For Sale/For Rent payment models. It does not fetch Giveth project data, authorize an owner, generate SDK integration code, or activate a board. Share links can carry the Project ID for demonstrations. Giveth remains a non-production design test.
const placement = { kind: 'gardens-community' as const, chainId: community.chainId, community: community.address };
<MarkeeSign placement={placement} onOpen={() => setOpen(true)} />
<MarkeeModal placement={placement} open={open} onClose={() => setOpen(false)} wallet={wallet} />Use the shared theme selector to preview charcoal, light, dark, system, and a custom brand palette. The sign fades in a theme-matched MARKEE logo on hover or keyboard focus; the Markee logo on hover control toggles theme.sign.hoverLogo. The app passes its selected ConnectKit wallet to the modal. With no app wallet, supported For Sale payments can continue through Markee's hosted checkout.
Copy .env.example to .env.local only if you want to change the boards or enable WalletConnect. VITE_WALLETCONNECT_PROJECT_ID is optional; without it, installed browser wallets remain available. To target a local Markee API during development, set VITE_MARKEE_API_URL=http://localhost:3000/api/sdk/v1. The default is managed by the SDK.
For a new integration, create a Markee leaderboard, then use the board address from its markee.xyz/markee/0x… link. The SDK detects whether the board is For Sale or For Rent. No strategy setting is needed.
Deploy this repository as a Vite project on Vercel. The build command is npm run build and the output directory is dist. No environment variables are required for the default boards. If you enable WalletConnect, add VITE_WALLETCONNECT_PROJECT_ID to the Vercel project and redeploy.
The published sample registers https://markee-sdk-connectkit-example.vercel.app with Markee for both default boards. If you fork it, set VITE_PUBLIC_SITE_URL to your public HTTPS origin and update the data-markee-address markers in index.html to match your boards. Markee reads the published HTML before accepting the site.
npm run buildThe SDK uses the production Markee API (https://www.markee.xyz/api/sdk/v1) by default. Set VITE_MARKEE_API_URL only when explicitly testing another backend.
To test the new generic multiBoard={{ platformId, chainId, communityId }} path, set VITE_MULTI_BOARD_PREVIEW=true and point VITE_MARKEE_API_URL at a Markee API deployment that supports platform-community and its Base registrar lookup. This is off by default because the current production API rejects that placement. New activation requires Markee's platform gate and owner authorization; Revnet remains a gated prototype and Giveth a design test. Merely supplying a community identity does not verify a domain: render a marker containing the resolved board address in the page's server-returned HTML and verify the public HTTPS page with Markee.
Open the playground with integration=react or integration=vanilla a Base leaderboard contract in board, and strategy=ForSale or strategy=ForRent:
React example · Vanilla JavaScript example
A valid board link shows only the supplied leaderboard, with no other demo placement tabs. The Your board tab prefills that address. Direct visits without a board link keep all demo tabs. The SDK detects its strategy; no strategy parameter is needed. Customize the sign and modal themes, then copy or download the generated SiteMarkee.tsx or markee.js. JavaScript output assumes an npm bundler and includes teardown instructions. React output accepts your existing SDK wallet adapter. Deep-linked boards are previewed without registering the playground as their website.
Use Share above the placement tabs to copy a link to the current preview. The link records the selected placement, integration format, moderation settings, theme colors, and hover setting. For Community, it also records the platform ID, identity chain ID, and current community ID. Opening that link restores the same playground inputs; it does not authorize activation or register the community as a site. Share is available once the selected board or community identity is valid.
Run npm test to check URL validation and compile both generated code formats against the installed published SDK.
The automatic moderation selector offers Relaxed (scam/phishing rules), Standard (current rules plus profanity), and Strict (also hides links and payment addresses). The exported code passes a versioned moderation: { version: 1, severity, rules } object to both the sign and modal. severity=relaxed|standard|strict can prefill the selector, and rules=profanity,ens can prefill custom rules from Markee's Add to your site wizard. Board owners can update saved moderation in Markee without changing the host site's SDK config; saved board rules take precedence over the integration default. Manual flags and unavailable checks still hide content.
Use Randomize shared colors (or Randomize modal colors when customizing separately) for a coordinated palette in the selected light/dark mode (System uses the current device mode). Generation checks text/background pairs at 4.5:1 or higher and borders/focus rings at 3:1 or higher, while keeping warning, error, and success hues recognizable. The contrast readout updates after manual edits too. Generated colors appear in the preview, swatches, and exported integration code. These checks cover the generated color pairs, not a complete accessibility audit of the host app.
Shared theme changes, color picks, and random palettes apply to both components by default. Enabling Customize modal separately copies the current shared theme to start; disabling it restores synchronization without discarding the saved modal settings. React and vanilla exports define sharedTheme once and reuse it, with a separate modal theme only when enabled.
The left column previews the live sign and the SDK’s real modal while the right column controls their configuration. The modal preview is visual-only: it runs without the app wallet in an inert frame and blocks write requests, including view recording and payment preparation. Use Open Markee or click the live sign to interact with the full modal. Theme edits update the preview in place without reloading financial data.