How shukrypeter79-max/pmcosmeticshub works
PM.Cosmetics appears to be a cosmetics-commerce product with web and mobile clients backed by an Express API. Its user-facing stages include browsing products, authentication, cart management, orders and payments, with profile, wishlist, reviews, stores and invoices as additional API capabilities. The mobile product-detail and cart excerpts show HTTP calls to product and cart endpoints; API registration is visible in the server entry point. Most web screens and API route implementations were not sampled, so their internal calls and persistence are not inferred.
Main entry points: index.ts API server · App.tsx Mobile navigation · auth.ts Token middleware · cart.ts Cart routes
Components 34
Mobile app
- Mobile navigation
apps/mobile/App.tsx - Client state
apps/mobile/store.ts - Home screen
apps/mobile/screens/HomeScreen.tsx - Shop screen
apps/mobile/screens/ShopScreen.tsx - Product detail
apps/mobile/screens/ProductDetailScreen.tsx - Cart screen
apps/mobile/screens/CartScreen.tsx - Login screen
apps/mobile/screens/LoginScreen.tsx - Register screen
apps/mobile/screens/RegisterScreen.tsx - Profile screen
apps/mobile/screens/ProfileScreen.tsx - Orders screen
apps/mobile/screens/OrdersScreen.tsx - Wishlist screen
apps/mobile/screens/WishlistScreen.tsx
Web storefront
- Storefront home
apps/web/app/page.tsx - Web shop
apps/web/app/shop/page.tsx - Web login
apps/web/app/login/page.tsx - Web registration
apps/web/app/register/page.tsx - Dashboard
apps/web/app/dashboard/page.tsx
Commerce API
- API server
apps/api/src/index.ts - Authentication
apps/api/src/routes/auth.ts - Product routes
apps/api/src/routes/products.ts - Cart routes
apps/api/src/routes/cart.ts - Order routes
apps/api/src/routes/orders.ts - Payment routes
apps/api/src/routes/payments.ts - User routes
apps/api/src/routes/users.ts - Store routes
apps/api/src/routes/stores.ts - Wishlist routes
apps/api/src/routes/wishlist.ts - Review routes
apps/api/src/routes/reviews.ts - Invoice routes
apps/api/src/routes/invoices.ts - Token middleware
apps/api/src/middleware/auth.ts - Error handling
apps/api/src/middleware/errorHandler.ts
Products service
- Products entry
src/index.ts - Product endpoints
src/api/products/products.routes.ts - Product queries
src/api/products/products.controller.ts - Product database
src/db/db.ts
Other components
- Shopper
Connections 38
- Shopper → Mobile navigation: uses
apps/mobile/App.tsx - Shopper → Storefront home: visits
- Mobile navigation → Client state: provides state
apps/mobile/App.tsx - Mobile navigation → Home screen: navigates
apps/mobile/App.tsx - Mobile navigation → Shop screen: navigates
apps/mobile/App.tsx - Mobile navigation → Product detail: navigates
apps/mobile/App.tsx - Mobile navigation → Cart screen: navigates
apps/mobile/App.tsx - Mobile navigation → Login screen: navigates
apps/mobile/App.tsx - Mobile navigation → Register screen: navigates
apps/mobile/App.tsx - Mobile navigation → Profile screen: navigates
apps/mobile/App.tsx - Mobile navigation → Orders screen: navigates
apps/mobile/App.tsx - Mobile navigation → Wishlist screen: navigates
apps/mobile/App.tsx - Product detail → Product routes: fetches product
apps/mobile/screens/ProductDetailScreen.tsx - Product detail → Cart routes: adds item
apps/mobile/screens/ProductDetailScreen.tsx - Cart screen → Cart routes: reads and removes
apps/mobile/screens/CartScreen.tsx - API server → Authentication: routes requests
apps/api/src/index.ts - API server → Product routes: routes requests
apps/api/src/index.ts - API server → Cart routes: routes requests
apps/api/src/index.ts - API server → Order routes: routes requests
apps/api/src/index.ts - API server → Payment routes: routes requests
apps/api/src/index.ts - API server → User routes: routes requests
apps/api/src/index.ts - API server → Store routes: routes requests
apps/api/src/index.ts - API server → Wishlist routes: routes requests
apps/api/src/index.ts - API server → Review routes: routes requests
apps/api/src/index.ts - API server → Invoice routes: routes requests
apps/api/src/index.ts - API server → Error handling: handles errors
apps/api/src/index.ts - Authentication → Token middleware: authenticates
apps/api/src/routes/auth.ts - Review routes → Token middleware: authenticates
apps/api/src/routes/reviews.ts - Cart routes → Token middleware: authenticates
apps/api/src/routes/cart.ts - Order routes → Token middleware: authenticates
apps/api/src/routes/orders.ts - Payment routes → Token middleware: authenticates
apps/api/src/routes/payments.ts - Product routes → Token middleware: authenticates
apps/api/src/routes/products.ts - User routes → Token middleware: authenticates
apps/api/src/routes/users.ts - Store routes → Token middleware: authenticates
apps/api/src/routes/stores.ts - Wishlist routes → Token middleware: authenticates
apps/api/src/routes/wishlist.ts - Products entry → Product endpoints: mounts routes
src/index.ts - Product endpoints → Product queries: dispatches
src/api/products/products.routes.ts - Product queries → Product database: queries
src/api/products/products.controller.ts