BringAm is a multi-vendor marketplace frontend for customers and vendors. Customers can discover stores and products, manage a cart and wishlist, provide delivery details, place an order, and pay through Paga. Vendors can manage their stores, products, and offers.
- Customer sign-up, sign-in, password recovery, and account screens
- Store discovery, product browsing, search, reviews, and wishlists
- Cart management and selected-item checkout
- Delivery-address collection and Paga payment handoff
- Customer orders, notifications, and support screens
- Vendor onboarding, store management, product management, and offers
- Next.js 14 (App Router)
- React 18 and TypeScript
- Tailwind CSS
- Axios for API requests
- Redux Toolkit for shared application state
- Node.js 18 or later
- npm
- Access to the BringAm backend services
npm install
npm run devOpen http://localhost:3000.
Create a .env.local file in the project root:
NEXT_PUBLIC_API_URL=https://your-api-host
NEXT_PUBLIC_PAYMENT_PUBLIC_KEY=your-paga-public-key
# Use https://beta-checkout.paga.com/checkout/params for sandbox keys.
NEXT_PUBLIC_PAYMENT_CHECKOUT_URL=https://checkout.paga.com/checkout/paramsNEXT_PUBLIC_DISABLE_BOOTSTRAP_CART_FETCH=true can be used for local cart-only debugging. Do not use it when testing the signed-in cart and checkout flow.
app/
auth/ Customer authentication pages
cart/ Cart page and item selection
checkout/ Address, checkout, order, and payment handoff
contexts/ Shared client state, including CartContext
services/ API clients and request helpers
product/ and store/ Customer product and store views
vendor*/ Vendor onboarding and catalog management
wishlist/ Customer wishlist
For an authenticated customer, the intended API sequence is:
- Read the active server cart with
GET /api/v1/carts/get-user-cart. - Add a product with
PUT /api/v1/carts/add-item-to-cart/{cartUuid}using the vendor store-product UUID and quantity. - Re-read the cart and use
cartItems[].uuidas the checkout item IDs. - Create a checkout session with
POST /api/v1/checkout. - Create or select a delivery address, then attach it with
POST /api/v1/checkout/{sessionUuid}/address. - Place the order with
POST /api/v1/place-orderand use the returned payment reference and amount for the Paga handoff. - Let the backend verify payment through its Paga webhook; the client should display the resulting order state.
Important: storeProductUuid and cartItems[].uuid are different values. Checkout must use the cart-item UUIDs returned by the server, never a product UUID.
The frontend correctly requires cart items to appear in GET /carts/get-user-cart before checkout. If the add-to-cart endpoint reports success but the next cart read remains empty, the issue is in backend cart persistence or the active-cart/customer association. Checkout cannot safely continue until the server returns persisted cart items.
npm run lint
npm run buildBefore merging cart or checkout changes, manually verify this path with a fresh signed-in account:
add product -> refresh cart -> select item -> add address
-> create checkout session -> attach address -> place order -> Paga handoff
- Keep API request logic in
app/services. - Keep cart state changes in
CartContextand treat the server cart as authoritative for signed-in users. - Do not commit secrets or
.env.localfiles. - Keep checkout changes small and test the full customer flow before merging.