How mohamedbrzan/hippo_digital_app works
DigitalHippo is a digital-goods marketplace: shoppers browse approved products, add them to a locally persisted cart, authenticate, pay, and receive order confirmation. Sellers and admins manage products through Payload, which also supplies authentication and marketplace data. The sampled server and routers show the API and payment flow; the README documents additional admin, seller, and verification capabilities whose detailed wiring is not shown. Dashed links mark external integrations or documented capabilities without sampled call sites.
Main entry points: webhooks.ts Payment Webhook · get-payload.ts Payload CMS · payment-router.ts Payment API · page.tsx Product Detail
Components 27
Storefront
- Landing Page
src/app/page.tsx - Product Catalog
src/app/products/page.tsx - Product Detail
src/app/product/[productId]/page.tsx - Product Reel
src/components/ProductReel.tsx - Product Listing
src/components/ProductListing.tsx - Image Slider
src/components/ImageSlider.tsx
Identity
- Sign-in / Sign-up
src/app/(auth)/sign-in/page.tsx - Authentication API
src/trpc/auth-router.ts - Email Verification
src/app/(auth)/verify-email/page.tsx - User Collection
src/collections/Users.ts
Commerce
- Cart & Checkout
src/app/cart/page.tsx - Cart State
src/hooks/use-cart.ts - Payment API
src/trpc/payment-router.ts - Stripe Checkout
src/lib/stripe.ts - Payment Webhook
src/webhooks.ts - Orders
src/collections/Orders.ts - Order Confirmation
src/app/thank-you/page.tsx - Receipt Email
src/components/emails/ReceiptEmail.tsx
Marketplace Platform
- tRPC API
src/trpc/index.ts - Application Server
src/server.ts - Payload CMS
src/get-payload.ts - Product Management
src/collections/Products/Products.ts - Product Files
src/collections/ProductFile.ts - Media Collection
src/collections/Media.ts
Other components
- Shopper
- Seller / Admin
- Email Service
Connections 37
- Shopper → Landing Page: browses
- Shopper → Product Catalog: browses
- Shopper → Product Detail: views
src/app/product/[productId]/page.tsx - Landing Page → Product Reel: renders
src/app/page.tsx - Product Catalog → Product Reel: renders
src/app/products/page.tsx - Product Detail → Product Reel: renders
src/app/product/[productId]/page.tsx - Product Reel → Product Listing: renders
src/components/ProductReel.tsx - Product Detail → Image Slider: renders
src/app/product/[productId]/page.tsx - Product Detail → Cart State: adds products
- Shopper → Cart & Checkout: manages cart
- Cart & Checkout → Cart State: reads cart
src/app/cart/page.tsx - Sign-in / Sign-up → Authentication API: calls
src/app/(auth)/sign-in/page.tsx - Email Verification → Authentication API: verifies through
src/app/(auth)/verify-email/page.tsx - Authentication API → Payload CMS: authenticates users
src/trpc/auth-router.ts - Authentication API → User Collection: creates users
src/trpc/auth-router.ts - Application Server → tRPC API: mounts
src/server.ts - tRPC API → Authentication API: registers
src/trpc/index.ts - tRPC API → Payment API: registers
src/trpc/index.ts - tRPC API → Payload CMS: queries products
src/trpc/index.ts - Seller / Admin → Product Management: manages products
- Seller / Admin → Product Files: uploads assets
- Product Management → Payload CMS: configures collection
- Product Detail → Payload CMS: loads product
src/app/product/[productId]/page.tsx - Cart & Checkout → Payment API: starts checkout
src/app/cart/page.tsx - Payment API → Payload CMS: loads products
src/trpc/payment-router.ts - Payment API → Orders: creates order
src/trpc/payment-router.ts - Payment API → Stripe Checkout: creates session
src/trpc/payment-router.ts - Stripe Checkout → Payment Webhook: sends event
src/webhooks.ts - Application Server → Payment Webhook: mounts handler
src/server.ts - Payment Webhook → Stripe Checkout: validates event
src/webhooks.ts - Payment Webhook → Payload CMS: loads and updates
src/webhooks.ts - Payment Webhook → Orders: marks paid
src/webhooks.ts - Order Confirmation → Payload CMS: loads order
src/app/thank-you/page.tsx - Order Confirmation → Payment API: polls status
- Payment Webhook → Receipt Email: renders
src/webhooks.ts - Payment Webhook → Email Service: sends receipt
src/webhooks.ts - Product Management → Media Collection: uses media