A decentralized ticketing and loyalty platform built on Sui.
- ZkLogin Authentication: Secure sign-in with Google to get a Sui wallet
- On-chain Loyalty Cards: Create and manage loyalty cards as Sui objects
- NFT Tickets: Mint event tickets as NFTs and earn loyalty points
- Push Notifications: Automatic time-based notifications for ticket updates
- Sponsored Transactions: Gasless transactions for seamless user experience
Note: This setup will start the frontend, but full functionality requires smart contract deployment and Vercel KV setup (see sections below).
cd apppnpm ipnpm run dev
For a complete working setup, you'll need to:
- Deploy the Move smart contracts (see Smart Contract Configuration)
- Set up Vercel KV and environment variables (see Local development with Vercel KV)
- move: the Move code of the smart contracts
- app: the Typescript NextJS App
Before deploying the Move smart contracts, you need to configure the admin Ed25519 keypair for signature verification:
- List your keypairs to get the Ed25519 key you want to use as admin
sui keytool list
╭────────────────────────────────────────────────────────────────────────────────────────────╮
│ ╭─────────────────┬──────────────────────────────────────────────────────────────────────╮ │
│ │ alias │ YOUR_ALIAS │ │
│ │ suiAddress │ YOUR_ADDRESS │ │
│ │ publicBase64Key │ YOUR_BASE64_KEY │ │
│ │ keyScheme │ ed25519 │ │
│ │ flag │ 0 │ │
│ │ peerId │ YOUR_PEER_ID │ │
│ ╰─────────────────┴──────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────────────────────────╯- Convert the public key to hex format
echo "YOUR_BASE64_KEY" | base64 -d | xxd -p -c 256 | sed 's/^00//'- Update
DEFAULT_PKinmove/sources/init.movewith your Ed25519 public key
const DEFAULT_PK: vector<u8> = x"YOUR_PUBLIC_KEY_HEX_HERE";- Export the private key for the application environment variable
sui keytool export --key-identity YOUR_ALIAS- Publish the package using the publish script:
./publish.shTo run the full application with Vercel KV storage, you'll need to set up your own Vercel project:
- Create a Vercel account and install the Vercel CLI
- Create a new Vercel project and link it to your repository
- Add a Vercel KV database to your project in the Vercel dashboard
- Set up environment variables:
- Copy the KV environment variables from your Vercel dashboard
- Create
app/.env.development.localwith the KV connection details - The file should include variables like
KV_REST_API_URL,KV_REST_API_TOKEN, etc. (seeapp/.env.development.local.example) - Set
ADMIN_PRIVATE_KEY_ED25519to the private key from step 4 of the Smart Contract Configuration above
- Start the development server:
- Run
pnpm run devinside the app directory - Or use
vercel devin the project's root directory for full Vercel integration
- Run
- Test the connection by visiting
http://localhost:3000/api/visitsto see the page visit counter increment
Note: The application will run without Vercel KV, but some features like visit tracking may not work.