How hudsonmathew1910/berrys works
Berry’s is a children’s-clothing ecommerce store with a customer storefront and a staff dashboard. The principal workflow runs from browsing products and maintaining a bag through checkout, stock reservation, payment confirmation, and customer order history; staff then manage fulfillment and business operations. The graph preserves the documented dashboard capabilities and the central application modules. Several dashboard and domain modules are unsampled, so their documented capabilities are shown without speculative internal call flows.
Main entry points: [dash] Dashboard routes · (shop) Storefront pages · route.ts Checkout API · index.ts Postgres database
Components 27
Customer storefront
- Storefront pages
app/(shop) - Bag and favourites
components/store/bag.ts - Customer account
app/(shop)/account
Checkout and commerce
- Product catalog
lib/catalog.ts - Store data
lib/store-data.ts - Categories
lib/categories.ts - Checkout API
app/api/checkout/route.ts - Order lifecycle
lib/orders.ts - Razorpay integration
lib/razorpay.ts - Payment webhook
app/api/webhooks/razorpay/route.ts
Staff workspace
- Dashboard routes
app/[dash] - Dashboard actions
app/[dash]/actions.ts - Catalog operations
lib/admin/catalog.ts - Order operations
lib/admin/orders.ts - Sales insights
lib/admin/insights.ts - Staff access
lib/staff.ts - Site content
lib/content.ts - Store settings
lib/settings.ts
Identity and data
- Authentication
lib/auth.ts - Sessions
lib/session.ts - User accounts
lib/users.ts - Email service
lib/email.ts - Error logging
lib/error-log.ts - Postgres database
db/index.ts
Other components
- Shopper
- Google identity
- Razorpay
Connections 30
- Shopper → Storefront pages: browses
README.md - Storefront pages → Product catalog: loads products
app/(shop)/page.tsx - Storefront pages → Categories: loads categories
app/(shop)/shop/page.tsx - Storefront pages → Store data: loads store data
app/(shop)/page.tsx - Shopper → Bag and favourites: manages items
README.md - Storefront pages → Customer account: opens account
README.md - Shopper → Checkout API: submits order
README.md - Checkout API → Order lifecycle: creates pending order
app/api/checkout/route.ts - Checkout API → Store settings: checks payment settings
app/api/checkout/route.ts - Checkout API → Razorpay: creates payment order
README.md - Razorpay → Payment webhook: sends events
README.md - Payment webhook → Order lifecycle: marks order paid
app/api/webhooks/razorpay/route.ts - Payment webhook → Order operations: applies refund events
app/api/webhooks/razorpay/route.ts - Shopper → Google identity: signs in
README.md - Google identity → Authentication: returns identity
- Authentication → User accounts: logs in user
app/auth/google/callback/route.ts - Authentication → Sessions: creates session
app/auth/google/callback/route.ts - Dashboard routes → Staff access: checks permissions
app/[dash]/page.tsx - Dashboard routes → Catalog operations: loads overview data
app/[dash]/page.tsx - Dashboard routes → Order operations: loads overview data
app/[dash]/page.tsx - Dashboard routes → Sales insights: loads sales data
app/[dash]/page.tsx - Dashboard routes → Error logging: loads error counts
app/[dash]/page.tsx - Dashboard actions → Catalog operations: changes catalog
app/[dash]/content/page.tsx - Dashboard routes → Site content: loads content
app/[dash]/content/page.tsx - Dashboard routes → Store settings: loads settings
app/[dash]/settings/page.tsx - Dashboard routes → Postgres database: reads products
- Dashboard routes → Email service: checks email status
app/[dash]/settings/page.tsx - Order lifecycle → Postgres database: persists orders
- Catalog operations → Postgres database: manages catalog data
- Sales insights → Postgres database: aggregates sales data