How ega-septian/web-testing works
TestStore is a clothing storefront with a Vue client and Go API. The customer workflow runs from browsing/filtering the catalog through product details and a local cart to authenticated checkout, then order history and detail. The backend also supports account registration/login, product and image administration, sales recording, and reusable site assets. The tree and sampled source show the main wiring and several handler/repository interactions; unsampled view and repository internals limit some finer-grained links.
Main entry points: index.js Route access · main.go HTTP API · api.js API client · catalog_handler.go Catalog endpoints
Components 29
Storefront client
- Vue app
frontend/src/App.vue - Route access
frontend/src/router/index.js - Home discovery
frontend/src/views/HomeView.vue - Shop browsing
frontend/src/views/ShopView.vue - Product detail
frontend/src/views/ProductDetailView.vue - Cart view
frontend/src/views/CartView.vue - Checkout
frontend/src/views/CheckoutView.vue - Order views
frontend/src/views/OrderHistoryView.vue - Login view
frontend/src/views/LoginView.vue - Cart state
frontend/src/stores/cart.js - Auth state
frontend/src/stores/auth.js - API client
frontend/src/lib/api.js
API runtime
- HTTP API
backend/cmd/api/main.go
Catalog and orders
- Catalog endpoints
backend/internal/handlers/catalog_handler.go - Product repository
backend/internal/models/product_repo.go - Size repository
backend/internal/models/product_size_repo.go - Product image repository
backend/internal/models/product_image_repo.go - Sales repository
backend/internal/models/sale_repo.go - Order endpoints
backend/internal/handlers/order_handler.go - Order repository
backend/internal/models/order_repo.go
Identity and media
- Auth endpoints
backend/internal/handlers/auth_handler.go - Auth middleware
backend/internal/handlers/middleware.go - JWT manager
backend/internal/auth/jwt.go - User repository
backend/internal/models/user_repo.go - Asset endpoints
backend/internal/handlers/asset_handler.go - Asset repository
backend/internal/models/asset_repo.go
Persistence
- PostgreSQL
- Uploaded files
Other components
- Shopper
Connections 43
- Shopper → Route access: navigates
- Vue app → Route access: renders routes
- Route access → Home discovery: routes to
- Route access → Shop browsing: routes to
- Route access → Product detail: routes to
- Route access → Cart view: routes to
- Route access → Checkout: routes to
- Route access → Order views: routes to
- Route access → Login view: routes to
- Home discovery → API client: requests catalog/assets
- Shop browsing → API client: requests catalog
- Product detail → API client: requests product
- Cart view → Cart state: updates cart
- Checkout → Cart state: reads cart
- Checkout → API client: places order
- Order views → API client: requests orders
- Login view → Auth state: submits credentials
- Auth state → API client: auth requests
- API client → HTTP API: HTTP requests
- HTTP API → Auth endpoints: dispatches auth
- HTTP API → Catalog endpoints: dispatches catalog
- HTTP API → Order endpoints: dispatches orders
- HTTP API → Asset endpoints: dispatches assets
- HTTP API → Auth middleware: protects routes
- Auth middleware → JWT manager: validates token
- Auth endpoints → User repository: reads/writes users
- Auth endpoints → JWT manager: issues tokens
- Catalog endpoints → Product repository: catalog operations
- Catalog endpoints → Size repository: reads sizes
- Catalog endpoints → Product image repository: reads/writes images
- Catalog endpoints → Sales repository: records sales
- Catalog endpoints → Uploaded files: writes product files
- Order endpoints → Order repository: places/reads orders
- Asset endpoints → Asset repository: reads/writes metadata
- Asset endpoints → Uploaded files: writes/removes files
- HTTP API → Uploaded files: serves uploads
- User repository → PostgreSQL: queries
- Product repository → PostgreSQL: queries
- Size repository → PostgreSQL: queries
- Product image repository → PostgreSQL: queries
- Sales repository → PostgreSQL: queries
- Order repository → PostgreSQL: queries
- Asset repository → PostgreSQL: queries