How amoghpoluru/evega works
This is a multi-vendor marketplace built with Next.js and Payload CMS. The main buyer journey is browsing and searching the shared catalog, viewing a product, checking out, and having payment events create or update orders. Vendors manage storefronts and social connections; staff administer marketplace data. The graph preserves documented capabilities and source-indexed modules, but several page and procedure implementations were not sampled, so uncertain links are omitted or marked unverified.
Main entry points: server/procedures.ts Product catalog · server/procedures.ts Checkout · Orders.ts Order management · payload.config.ts Payload CMS
Components 21
Marketplace storefront
- Product catalog
src/modules/products/server/procedures.ts - Catalog search
src/lib/search/search-query-builder.ts - Product detail
src/modules/products/ui/components/product-view.tsx - Storefront templates
src/lib/templates/template-engine.ts
Commerce and orders
- Checkout
src/modules/checkout/server/procedures.ts - Payment webhooks
src/app/api/stripe/webhook/route.ts - Order management
src/collections/Orders.ts - Inventory adjustment
src/lib/inventory/adjust-product-stock.ts
Vendor operations
- Social connections
src/lib/vendor-social-connections.ts - Instagram OAuth
src/lib/instagram-oauth.ts - Staff administration
src/modules/admin/server/procedures.ts - Vendor data
src/collections/Vendors.ts
CMS and platform
- Authentication
src/app/api/auth/[...nextauth]/route.ts - tRPC API
src/trpc/routers/_app.ts - Payload CMS
src/payload.config.ts - Media API
src/app/api/media/route.ts - Blob storage
src/lib/vercel-blob-storage.ts - Media records
src/lib/create-media-from-blob.ts
Other components
- Shopper
- Vendor
- Staff
Connections 20
- Shopper → Product catalog: browses
README.md - Shopper → Catalog search: searches
- Shopper → Product detail: views
- Shopper → Checkout: checks out
README.md - Product catalog → Catalog search: builds queries
src/lib/search/search-query-builder.ts - Product catalog → Storefront templates: resolves storefront
src/lib/templates/template-engine.ts - Checkout → Order management: creates orders
README.md - Payment webhooks → Payload CMS: loads CMS
src/app/api/stripe/webhook/route.ts - Payment webhooks → Order management: handles payment events
src/app/api/stripe/webhook/route.ts - Order management → Inventory adjustment: adjusts stock
src/collections/Orders.ts - tRPC API → Product catalog: routes procedures
src/trpc/routers/_app.ts - tRPC API → Checkout: routes procedures
src/trpc/routers/_app.ts - Authentication → Payload CMS: authenticates users
src/app/api/auth/[...nextauth]/route.ts - Media API → Blob storage: uploads and deletes
src/app/api/media/route.ts - Media API → Media records: creates records
src/app/api/media/route.ts - Media records → Payload CMS: stores metadata
- Vendor → Social connections: connects accounts
- Social connections → Instagram OAuth: refreshes tokens
src/lib/vendor-social-connections.ts - Staff → Staff administration: administers marketplace
- Staff administration → Vendor data: manages vendors