How pvyatzz/ecommerce works
This repository is the Angular frontend of a full-stack e-commerce application. The main customer journey is catalog browsing and search, cart management, authenticated checkout, and order-history review; a separate admin branch supports order viewing and product CRUD. The REST API and browser storage are external to this source tree. Some component-to-service links are supported by the source index; other API relationships are documented in the README, while unsampled implementation details are not inferred.
Main entry points: cart.service.ts Cart State · app-routing.module.ts Route and Guards · auth.service.ts Authentication · product.service.ts Product Service
Components 21
Storefront
- Catalog and Search
03-frontend/angular-ecommerce/src/app/components/product-list/product-list.component.ts - Product Detail
03-frontend/angular-ecommerce/src/app/components/product-detail/product-detail.component.ts - Product Service
03-frontend/angular-ecommerce/src/app/services/product.service.ts - Product Models
03-frontend/angular-ecommerce/src/app/models/product.ts
Cart and Purchase
- Cart View
03-frontend/angular-ecommerce/src/app/components/cart/cart.component.ts - Cart State
03-frontend/angular-ecommerce/src/app/services/cart.service.ts - Checkout Form
03-frontend/angular-ecommerce/src/app/components/checkout/checkout.component.ts
Identity and Orders
- Login and Registration
03-frontend/angular-ecommerce/src/app/components/register/register.component.ts - Authentication
03-frontend/angular-ecommerce/src/app/services/auth.service.ts - Order History
03-frontend/angular-ecommerce/src/app/components/order-history/order-history.component.ts - Order Service
03-frontend/angular-ecommerce/src/app/services/order.service.ts - Order Models
03-frontend/angular-ecommerce/src/app/models/order.model.ts
Administration
- Admin Orders
03-frontend/angular-ecommerce/src/app/components/admin-orders/admin-orders.component.ts - Admin Products
03-frontend/angular-ecommerce/src/app/components/admin-products/admin-products.component.ts - Admin Service
03-frontend/angular-ecommerce/src/app/services/admin.service.ts
Frontend Foundation
- Toast Notifications
03-frontend/angular-ecommerce/src/app/services/toast.service.ts - Route and Guards
03-frontend/angular-ecommerce/src/app/app-routing.module.ts - Application Shell
03-frontend/angular-ecommerce/src/app/app.component.ts
Other components
- Shopper
- Spring REST API
- Browser localStorage
Connections 35
- Shopper → Catalog and Search: browses
- Shopper → Login and Registration: signs in
- Catalog and Search → Product Service: loads catalog
03-frontend/angular-ecommerce/src/app/components/product-list/product-list.component.ts - Catalog and Search → Cart State: adds products
03-frontend/angular-ecommerce/src/app/components/product-list/product-list.component.ts - Product Detail → Product Service: loads product
03-frontend/angular-ecommerce/src/app/components/product-detail/product-detail.component.ts - Product Detail → Cart State: adds product
03-frontend/angular-ecommerce/src/app/components/product-detail/product-detail.component.ts - Product Service → Spring REST API: requests catalog
03-frontend/angular-ecommerce/src/app/services/product.service.ts - Product Service → Product Models: maps products
03-frontend/angular-ecommerce/src/app/services/product.service.ts - Cart View → Cart State: manages items
03-frontend/angular-ecommerce/src/app/components/cart/cart.component.ts - Cart State → Browser localStorage: persists cart
03-frontend/angular-ecommerce/src/app/services/cart.service.ts - Checkout Form → Cart State: reads and clears
03-frontend/angular-ecommerce/src/app/components/checkout/checkout.component.ts - Checkout Form → Product Service: loads locations
03-frontend/angular-ecommerce/src/app/components/checkout/checkout.component.ts - Checkout Form → Spring REST API: posts purchase
03-frontend/angular-ecommerce/src/app/components/checkout/checkout.component.ts - Checkout Form → Authentication: reads account email
03-frontend/angular-ecommerce/src/app/components/checkout/checkout.component.ts - Login and Registration → Authentication: authenticates
03-frontend/angular-ecommerce/src/app/components/register/register.component.ts - Authentication → Spring REST API: sends credentials
03-frontend/angular-ecommerce/src/app/services/auth.service.ts - Authentication → Browser localStorage: stores session
03-frontend/angular-ecommerce/src/app/services/auth.service.ts - Authentication → Cart State: restores or clears
03-frontend/angular-ecommerce/src/app/services/auth.service.ts - Order History → Order Service: requests orders
03-frontend/angular-ecommerce/src/app/components/order-history/order-history.component.ts - Order Service → Spring REST API: fetches history
- Order History → Order Models: displays orders
03-frontend/angular-ecommerce/src/app/components/order-history/order-history.component.ts - Admin Orders → Admin Service: loads orders
03-frontend/angular-ecommerce/src/app/components/admin-orders/admin-orders.component.ts - Admin Products → Admin Service: manages products
03-frontend/angular-ecommerce/src/app/components/admin-products/admin-products.component.ts - Admin Products → Product Service: loads catalog
03-frontend/angular-ecommerce/src/app/components/admin-products/admin-products.component.ts - Admin Service → Spring REST API: performs admin requests
- Route and Guards → Catalog and Search: routes to
03-frontend/angular-ecommerce/src/app/app-routing.module.ts - Route and Guards → Product Detail: routes to
03-frontend/angular-ecommerce/src/app/app-routing.module.ts - Route and Guards → Checkout Form: guards route
03-frontend/angular-ecommerce/src/app/app-routing.module.ts - Route and Guards → Order History: guards route
03-frontend/angular-ecommerce/src/app/app-routing.module.ts - Route and Guards → Admin Orders: routes to
03-frontend/angular-ecommerce/src/app/app-routing.module.ts - Route and Guards → Admin Products: routes to
03-frontend/angular-ecommerce/src/app/app-routing.module.ts - Application Shell → Authentication: checks session
03-frontend/angular-ecommerce/src/app/app.component.ts - Application Shell → Cart State: restores cart
03-frontend/angular-ecommerce/src/app/app.component.ts - Application Shell → Toast Notifications: renders notices
03-frontend/angular-ecommerce/src/app/app.component.ts - Catalog and Search → Toast Notifications: shows confirmation
03-frontend/angular-ecommerce/src/app/components/product-list/product-list.component.ts