How valrazi/jeda-coffee-client works
This is a Next.js ticketing/commerce application: customers browse products, manage favorites and a cart, place orders, and then review or complete order-related actions. The tree also shows sign-up, sign-in, profile management, and receipt functionality. Sampled API handlers directly support product, favorite, order, customer, and subcategory operations; UI-to-API wiring and several route implementations were not sampled, so those links are omitted.
Main entry points: order/route.js Order history API · product/route.js Product listing · [id]/route.js Product detail API · product.js Products
Components 31
Customer UI
- Catalog pages
app/main/home/page.js - Product detail
app/main/product/[id]/page.jsx - Cart and checkout
app/main/cart/page.js - Order history
app/main/order/page.js - Profile
app/main/profile/page.js - Sign-in and sign-up
app/auth/sign-in/page.js - Receipt action
app/components/Order/button.receipt.jsx
API routes
- Product listing
app/api/product/route.js - Product detail API
app/api/product/[id]/route.js - Subcategories
app/api/subcategory/route.js - Favorites
app/api/favorite/route.js - Cart operations
app/api/cart/add/[id]/route.js - Customer cart
app/api/cart/customer/route.js - Cart lookup
app/api/cart/function.js - Order history API
app/api/order/route.js - Order actions
app/api/order/complete/[id]/route.js - Order cancellation
app/api/order/cancel/[id]/route.js - Order reviews
app/api/order/review/[id]/route.js - Receipt API
app/api/order/receipt/[id]/route.js - Profile operations
app/api/user/detail/route.js
Domain data
- Products
models/product.js - Subcategories
models/subcategory.js - Favorites
models/favorites.js - Orders
models/order.js - Order items
models/order_item.js - Reviews
models/reviews.js - Customers
models/customer.js
Identity
- Registration
app/api/auth/sign-up/route.js - Authentication
app/api/auth/[...nextauth]/route.js - Auth configuration
app/lib/auth.js
Other components
- Customer
Connections 38
- Customer → Catalog pages: browses
- Customer → Product detail: views
- Customer → Cart and checkout: manages cart
- Customer → Order history: manages orders
- Customer → Profile: manages profile
- Customer → Sign-in and sign-up: signs in
- Customer → Receipt action: requests receipt
- Customer → Product listing: requests products
- Customer → Product detail API: requests product
- Customer → Subcategories: requests categories
- Customer → Favorites: updates favorites
- Customer → Cart operations: updates cart
- Customer → Customer cart: loads cart
- Customer → Order history API: loads orders
- Customer → Order actions: completes order
- Customer → Order cancellation: cancels order
- Customer → Order reviews: submits review
- Customer → Receipt API: requests receipt
- Customer → Profile operations: loads profile
- Customer → Registration: registers
- Customer → Authentication: authenticates
- Product listing → Products: queries
- Product listing → Subcategories: includes
- Product listing → Favorites: counts
- Product detail API → Products: queries
- Product detail API → Favorites: includes
- Subcategories → Subcategories: queries
- Favorites → Favorites: reads or writes
- Customer cart → Cart lookup: calls
- Order history API → Orders: queries
- Order history API → Order items: includes
- Order history API → Products: includes
- Order history API → Reviews: includes
- Order actions → Orders: reads and updates
- Order cancellation → Orders: reads and updates
- Profile operations → Customers: queries
- Registration → Customers: creates
- Authentication → Auth configuration: uses