Tiko is a creator commerce and ticketing platform built on CKB. It combines a familiar Web2-style storefront and operations flow with blockchain-backed payment confirmation, ownership, and fulfillment where that actually improves the product.
Today, Tiko supports:
- event listing and publishing
- buyer checkout
- CKB testnet xUDT payment confirmation
- QR-based ticket access
- operator check-in
- Spore-backed ownership after successful purchase
- invite-based private beta access
- public test-token faucet
This repository contains the standalone Tiko app, deployment configuration, local testnet tooling, and product planning docs.
src/
app/ Next.js routes for buyer, auth, admin, operator, faucet, and API surfaces
components/ Buyer, seller, auth, admin, layout, and shared UI components
lib/
auth/ Session, invite, and role guards
ckb/ CKB, xUDT, and Spore integration
frontend/ View models, API client, and display formatting
tiko/ Checkout, fulfillment, jobs, listings, faucet, and domain logic
prisma/ Prisma schema, migrations, and seed data
scripts/ Local devnet and testnet setup / smoke-test utilities
docs/ Product overview, product spec, architecture, user journeys, and offering docs
vercel.json Hosted cron configuration
- browse events
- create and publish events
- buy tickets
- submit payment transaction hashes
- receive ticket access
- check in guests
- digital ownership issued after confirmed purchases
- buyer wallet linking
- creator-facing inventory setup
- public faucet for test-token distribution
- managed Postgres support
- Vercel Blob-backed image storage
- background job processing for reconciliation and fulfillment
- private beta auth and invite management
npm installStart from:
cp .env.example .envFor the current local testnet flow, .env should point at a local Postgres instance and include valid CKB testnet settings.
The project expects Postgres locally. If you use the same Docker setup we used during development:
docker start tiko-postgres-testnpm run db:generate
npm run db:migrate
npm run db:seedFor local testing, prefer the Webpack dev server because Turbopack was unstable for this project:
npm run dev:webpack -- --port 3001Open:
http://127.0.0.1:3001
The repo includes scripts for a full local app + CKB testnet flow.
npm run testnet:generateThis creates a local .env, prints wallet addresses, and tells you which wallet must be funded first.
npm run testnet:bootstrapThis:
- funds the generated buyer / merchant / minter wallets from the issuer
- ensures the test token exists and is usable
- seeds the catalog
npm run testnet:flowThis exercises:
- login
- checkout
- seeded-wallet payment
- tx-hash submission
- reconciliation
- fulfillment
- Spore minting
Tiko is structured for a hosted private beta on Vercel with:
- managed Postgres
- Vercel Blob for event artwork
- cron-driven background jobs
- private beta auth and invites
- real CKB testnet payment verification
- optional real Spore minting
The current vercel.json schedules /api/cron/process-jobs every minute. That does not fit Vercel Hobby cron limits. For hosted beta you need either:
- Vercel Pro, or
- an external scheduler calling the cron endpoint
Start from .env.example. At minimum, hosted beta needs:
APP_URLDATABASE_URLSESSION_SECRETCRON_SECRETCKB_NETWORK=testnetCKB_RPC_URLPAYMENT_RECEIVER_ADDRESSCKB_XUDT_ARGSCKB_ISSUER_ADDRESSorCKB_ISSUER_PRIVATE_KEYCKB_SPORE_MINTER_PRIVATE_KEYwhenSPORE_MINTING_MODE=realBLOB_READ_WRITE_TOKEN
Optional but strongly recommended:
BETA_ADMIN_EMAILBETA_ADMIN_PASSWORDBETA_ADMIN_NAME
If you deploy on Vercel with Supabase:
- use the transaction pooler for app runtime
- use
sslmode=no-verifyif needed for the Prisma +pgTLS path
The hosted app and migration path may require different connection strings depending on provider behavior, so verify with your provider docs.
- Create the hosted Postgres database.
- Add the Vercel environment variables.
- Deploy from GitHub.
- Run:
npm run db:migrate
npm run db:seed- Sign in with the seeded admin account.
- Create tester/operator invites in
/admin. - Verify
/api/health, login, checkout, and cron processing.
The app includes a public faucet for test-token distribution:
- page:
/faucet - route:
/api/faucet
Current behavior:
- public access
- capped per wallet
- intended for checkout and beta testing support
If you deploy this feature, make sure:
- the faucet migration is applied
- the issuer wallet has enough CKB and token balance
npm run db:generate
npm run typecheck
npm run lint
npm run buildAdditional useful scripts:
npm run testnet:generate
npm run testnet:bootstrap
npm run testnet:flow
npm run test:backendCopy .env.example to .env and then fill in:
- local or hosted Postgres connection string
- session and cron secrets
- beta admin settings
- CKB network and RPC details
- token config
- Blob token if using hosted image uploads
Do not commit real secrets or production private keys.
- The repo ignores
.env*, build artifacts, and local-only files. - There is an untracked local file
docs/Untitledin the workspace that is not part of the product documentation set.