How kinyabundi/payflip works
PayFlip is a role-based marketplace supporting merchant product management and buyer product discovery, with local-currency checkout intended to deliver stablecoins to merchants. The visible entry point authenticates users and looks up their on-chain role; merchant product creation submits a smart-account operation, while the payment modal calls Kotani’s fiat checkout and wallet-transfer APIs. The tree shows buyer and merchant routes and components, but their implementation excerpts are unavailable, so their internal wiring is not asserted. The README provides no additional product documentation.
Main entry points: app/page.tsx Home and role lookup · AddProduct.tsx Add product form · AuthContext.tsx Authentication context · view/page.tsx Product browsing
Components 24
Identity and roles
- Home and role lookup
src/app/page.tsx - Authentication context
src/context/AuthContext.tsx - Login page
src/app/app/login/page.tsx - Role selection
src/components/modal/roles.tsx - Buyer onboarding
src/app/app/buyer/onboarding/page.tsx - Merchant onboarding
src/app/app/merchant/onboarding/page.tsx
Merchant marketplace
- Merchant dashboard
src/app/app/merchant/product/dashboard/page.tsx - New product route
src/app/app/merchant/product/new/page.tsx - Add product form
src/app/app/_components/AddProduct.tsx - Merchant product view
src/app/app/merchant/product/view/page.tsx - Merchant product layout
src/app/app/merchant/product/layout.tsx
Buyer marketplace
- Product browsing
src/app/app/buyer/products/view/page.tsx - Buyer product layout
src/app/app/buyer/products/layout.tsx - Fiat-to-crypto payment
src/components/modal/pay.tsx
Chain and payments
- Marketplace contract interface
src/abi/contract.ts - Alchemy RPC proxy
src/app/api/rpc/[...routes]/route.ts - Chain RPC route
src/app/api/rpc/chain/[id]/route.ts - Account configuration
src/lib/config.ts
Application shell
- Application providers
src/app/providers.tsx - Root layout
src/app/layout.tsx
Other components
- Visitor or user
- Alchemy services
- Marketplace blockchain
- Kotani Pay API
Connections 26
- Visitor or user → Home and role lookup: opens
- Visitor or user → Login page: opens
- Home and role lookup → Authentication context: reads session
- Login page → Authentication context: authenticates
- Authentication context → Alchemy services: uses auth hooks
- Home and role lookup → Marketplace blockchain: looks up role
- Home and role lookup → Marketplace contract interface: calls ABI method
- Visitor or user → Role selection: selects role
- Visitor or user → Buyer onboarding: starts onboarding
- Visitor or user → Merchant onboarding: starts onboarding
- Visitor or user → Product browsing: browses
- Product browsing → Fiat-to-crypto payment: initiates payment
- Fiat-to-crypto payment → Kotani Pay API: submits checkout and transfer
- Visitor or user → Merchant dashboard: manages products
- Visitor or user → New product route: adds product
- New product route → Add product form: renders form
- Add product form → Marketplace contract interface: encodes addProduct
- Add product form → Alchemy services: submits user operation
- Alchemy services → Marketplace blockchain: sends operation
- Visitor or user → Merchant product view: views products
- Alchemy RPC proxy → Alchemy services: forwards RPC request
- Chain RPC route → Alchemy services: forwards chain RPC
- Root layout → Application providers: provides app
- Buyer product layout → Product browsing: wraps route
- Merchant product layout → Merchant dashboard: wraps merchant routes
- Account configuration → Alchemy services: configures account client