How llmeajinll/nextgacha works
Next Gacha is a commerce site designed to limit bulk buying: users browse and search products, adjust cart quantities, pay with points through TossPayments, and track orders; administrators manage catalog content and fulfillment. The README documents a five-unit-per-person policy checked at cart, API, and payment stages, plus transactional payment processing. The payment-confirmation route excerpt shows the server-side validation, Toss approval, and MongoDB transaction calls. Other feature links below reflect documented capabilities; unsampled route implementations were not inspected.
Main entry points: postPaymentsConfirm/route.ts Payment confirmation · page.tsx Admin workspace · postCheckToSending/route.ts Order fulfillment · mongodb.ts MongoDB collections
Components 21
Shopfront
- Storefront pages
src/app/(router)/main/page.tsx - Catalog and detail
src/views/DetailPage.tsx - Product search
src/views/SearchPage.tsx
Purchase and fulfillment
- Cart
src/features/cart/ui/Cart.tsx - Quantity policy
src/features/purchase/lib/checkCartLimit.ts - Checkout
src/app/(router)/(payment)/checkout/[orderId]/page.tsx - Payment confirmation
src/app/api/postPaymentsConfirm/route.ts - Order validation
src/features/purchase/lib/verifyOrder.ts - Stock validation
src/features/purchase/lib/validateStock.ts - TossPayments
src/features/purchase/lib/toss.ts - Order transaction
src/features/purchase/lib/addOrder.ts
Customer account
- Order history
src/entities/order/api/getHistory.ts - Reviews and Q&A
src/features/review-write/ui/ReviewModal.tsx
Administration
- Admin workspace
src/app/(router)/manager/page.tsx - Product management
src/features/product-manage/ui/ProductManageRow.tsx - Order fulfillment
src/app/api/postCheckToSending/route.ts - Store content management
src/features/banner-manage/ui/BannerManager.tsx - Member management
src/features/user-manage/ui/UserManager.tsx
Identity and data
- Kakao sign-in
src/auth.ts - MongoDB collections
src/shared/api/mongodb.ts
Other components
- Customer
Connections 22
- Customer → Storefront pages: browses
- Storefront pages → Catalog and detail: opens products
- Customer → Product search: searches
- Customer → Cart: manages cart
- Cart → Quantity policy: checks limits
- Customer → Checkout: checks out
- Checkout → Payment confirmation: confirms payment
- Payment confirmation → Stock validation: validates stock
src/app/api/postPaymentsConfirm/route.ts - Payment confirmation → Order validation: verifies order
src/app/api/postPaymentsConfirm/route.ts - Payment confirmation → TossPayments: confirms charge
src/app/api/postPaymentsConfirm/route.ts - Payment confirmation → Order transaction: creates order
src/app/api/postPaymentsConfirm/route.ts - Payment confirmation → MongoDB collections: runs transaction
src/app/api/postPaymentsConfirm/route.ts - Customer → Order history: views orders
- Customer → Reviews and Q&A: writes feedback
- Customer → Kakao sign-in: signs in
- Kakao sign-in → MongoDB collections: creates user
src/auth.ts - Admin workspace → Product management: manages products
- Admin workspace → Order fulfillment: processes orders
- Admin workspace → Store content management: manages banners
- Admin workspace → Member management: manages members
- Order fulfillment → TossPayments: cancels payment
src/app/api/postCheckToSending/route.ts - Order fulfillment → MongoDB collections: updates fulfillment
src/app/api/postCheckToSending/route.ts