How husanswe/texmart-laravel-ecommerce works
Texmart is an Uzbek-market electronics storefront split between a Nuxt frontend and a Laravel JSON API. The shopper-facing workflow is browsing categories and brands, viewing and filtering products, then (as documented API capabilities) authenticating, managing a cart and favorites, and placing orders. The README says the frontend currently uses JSON fixtures and can switch to the API without UI changes. API routing and catalog controller relationships are evidenced in the excerpts; several other API controllers are stubs or were not sampled, so their internal behavior is not inferred.
Main entry points: api.php Versioned API routes · app.vue Storefront UI · CategoryController.php Categories · ProductController.php Products and filters
Components 22
Nuxt storefront
- Storefront UI
frontend/app/app.vue - Storefront home
frontend/app/pages/index.vue - Header and search
frontend/app/components/AppHeader.vue - API client
frontend/app/composables/useApi.ts - Category repository
frontend/app/repositories/categoryRepo.ts
Laravel API
- Versioned API routes
backend/routes/api.php - Product response
backend/app/Http/Resources/ProductResource.php - Brand response
backend/app/Http/Resources/BrandResource.php - Category response
backend/app/Http/Resources/CategoryResource.php
Catalog domain
- Categories
backend/app/Http/Controllers/Api/CategoryController.php - Brands
backend/app/Http/Controllers/Api/BrandController.php - Products and filters
backend/app/Http/Controllers/Api/ProductController.php - Search
backend/app/Http/Controllers/Api/SearchController.php - Filter options
backend/app/Http/Controllers/Api/FilterController.php - Product model
backend/app/Models/Product.php - Category model
backend/app/Models/Category.php
Customer commerce
- Authentication
backend/app/Http/Controllers/Api/AuthController.php - Profile
backend/app/Http/Controllers/Api/ProfileController.php - Cart
backend/app/Http/Controllers/Api/CartController.php - Favorites
backend/app/Http/Controllers/Api/FavoriteController.php - Orders
backend/app/Http/Controllers/Api/OrderController.php
Other components
- Shopper
Connections 22
- Shopper → Storefront UI: browses
README.md - Storefront UI → Storefront home: shows
frontend/app/app.vue - Storefront UI → Header and search: renders
- Storefront home → API client: requests data
- Category repository → API client: uses
- API client → Versioned API routes: calls JSON API
README.md - Versioned API routes → Authentication: routes auth
backend/routes/api.php - Versioned API routes → Profile: routes profile
backend/routes/api.php - Versioned API routes → Cart: routes cart
backend/routes/api.php - Versioned API routes → Favorites: routes favorites
backend/routes/api.php - Versioned API routes → Orders: routes orders
backend/routes/api.php - Versioned API routes → Categories: routes categories
backend/routes/api.php - Versioned API routes → Brands: routes brands
backend/routes/api.php - Versioned API routes → Products and filters: routes products
backend/routes/api.php - Versioned API routes → Search: routes search
backend/routes/api.php - Versioned API routes → Filter options: routes filters
backend/routes/api.php - Categories → Category model: queries
backend/app/Http/Controllers/Api/CategoryController.php - Categories → Category response: serializes
backend/app/Http/Controllers/Api/CategoryController.php - Brands → Brand response: serializes
backend/app/Http/Controllers/Api/BrandController.php - Products and filters → Product model: queries
backend/app/Http/Controllers/Api/ProductController.php - Products and filters → Product response: serializes
backend/app/Http/Controllers/Api/ProductController.php - Product model → Category model: belongs to
backend/app/Models/Product.php