> ## Documentation Index
> Fetch the complete documentation index at: https://v1.docs.megapot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Standalone Implementations

## Key Features

* **🎰 Jackpot**: Users can easily purchase tickets for the jackpot directly within your app.
* **⚡ Seamless Integration**: Designed for smooth integration with your existing app, leveraging React components and hooks.
* **🎨 Custom UI**: Match the jackpot to your existing site.  Implement any way you like.
* **Earn 10% of ticket purchases**: Referring a user ticket purchase earns you 10% of each ticket sale

## Demo & Examples

Feel free to fork this example repo and use it as a starting point for your own project.  Or just for a reference implementation.

### [Demo Standalone Github Repo](https://github.com/coordinationlabs/megapot-standalone-demo) - [Live Demo](https://megapot-standalone-demo.vercel.app/)

> [!NOTE]
>
> [Developer API](https://v1.docs.megapot.io/developers/megapot-api.md): Speed up development with our data APIs.

### Our Examples

* [Examples Docs](https://v1.docs.megapot.io/developers/megapot-examples.md)
* [Examples Repo](https://github.com/coordinationlabs/megapot-examples/)

### Community Spotlight

This is an incomplete list of developers building on the Megapot protocol.

* [Eggs.fun](https://farcaster.xyz/eggsdotfun) - Farcaster/Base mini app (100k+ users) that incentivizes paid transactions with Megapot tickets
* [Moai Cash](https://moai.cash/) - Telegram mini app with embedded Megapot and ticket pooling feature. They incentive signups by giving away Megapot tickets ([try it here](https://t.me/moaicash_bot/join_megapot))!
* [Tab](https://farcaster.xyz/usetab) - Farcaster/Base mini app with embedded Megapot.
* [BTB Finance](https://btb.finance/contracts/megapot) - DeFi super app with embedded Megapot. Plus, instant cashback for users and an auto-subscription feature.
* [Colony](https://x.com/colonyfun) - World mini app (20k+ users) that incentivizes paid transactions with Megapot tickets
* [Stocks Trader](https://x.com/stacknapp) - World mini app (25k+ users) that incentivizes paid transactions with Megapot tickets
* [Scoreline](https://x.com/Scorelinefun) - Farcaster/Base and World mini app (10k+ users) that incentivizes paid transactions with Megapot tickets
* [Sendpot](https://send.app/sendpot) - Weekly jackpot in Send.app's native token $SEND (past mcap of $1.9M).
* \[$jackpot](https://x.com/jackpot_onbase) - Token (past mcap of $1.4M) that auto-buys Megapot tickets with trading fees
* [Pot Raiders](https://www.basedbits.fun/raid) - NFT collection (minted out in 1h) that auto-buys Megapot tickets with a portion of their treasury

## Main Components

Every site is different, but these are the main considerations for building your own UI.

> [!NOTE]
>
> Check out [megapot.io](https://megapot.io) for inspiration.

* Jackpot Info, Countdown, Ticket Purchase, Claim Winnings & Last Jackpot Results
  * Jackpot Total
  * Countdown to next drawing
  * Form to select the number of tickets to buy
  * Verifying the user has enough ERC-20 tokens to buy tickets
    * Your user has approved spending of their ERC-20 tokens on your contract
  * Submitting and confirming the transaction
  * [Earning 10% fee on every ticket sold](https://github.com/coordinationlabs/megapot-standalone-demo?tab=readme-ov-file#how-to-earn-10-of-each-ticket-sold)
* Liquidity Pool
  * If you intend to allow users to deposit liquidity to the jackpot you will need to:
    * Create a form to allow users to deposit liquidity, edit position in range, or add more liquidity
    * Verify the user has approved spending of their ERC-20 tokens on your contract
    * Submitting and confirming the transaction
  * If you plan to provide all liquidity, you can do this through the contract directly.
* History
  * Display a users ticket purchase history
  * Display a jackpot history


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.