Skip to content

Task 8: integrate frontend with cart service - #6

Draft
nextsukhorutchenko wants to merge 7 commits into
mainfrom
task-8
Draft

Task 8: integrate frontend with cart service#6
nextsukhorutchenko wants to merge 7 commits into
mainfrom
task-8

Conversation

@nextsukhorutchenko

@nextsukhorutchenko nextsukhorutchenko commented Jun 6, 2026

Copy link
Copy Markdown
Owner

What was done?

Integrated frontend order flows with the new Cart Service from Task 8.

Frontend scope

  • Updated order list request to use Cart Service route: /api/profile/cart/order.
  • Updated checkout submission to use Cart Service route: /api/profile/cart/order.
  • Added Basic auth header to order list requests.
  • Kept existing cart add/update behavior using Cart Service route: /api/profile/cart.

Links for review

The current deployed frontend URL points to the existing deployment. To verify this branch end-to-end, deploy the backend Cart Service first, update src/constants/apiPaths.ts cart value with the deployed Cart Service URL, then deploy this frontend branch.

How reviewers can verify frontend

After backend deployment, set:

cart: "<CartServiceApiUrl>"

in src/constants/apiPaths.ts, then deploy frontend.

Manual flow:

  1. Open frontend deployment.
  2. Login/register so authorization_token is stored in localStorage.
  3. Open product list.
  4. Add a product to cart.
  5. Open cart page.
  6. Proceed through checkout.
  7. Open admin orders and verify the created order is returned from Cart Service.

API calls used by this PR

Cart operations:

  • GET <CartServiceApiUrl>/api/profile/cart
  • PUT <CartServiceApiUrl>/api/profile/cart

Order operations:

  • PUT <CartServiceApiUrl>/api/profile/cart/order
  • GET <CartServiceApiUrl>/api/profile/cart/order

All protected calls send:

Authorization: Basic <authorization_token>

Validation

Passed locally:

  • npm run build

Vite emitted existing bundle-size and use client warnings from dependencies; build completed successfully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant