How cnek00/4project works
3D Store is a React storefront backed by a Django REST API. Shoppers browse and inspect products—including GLB previews—then authenticate, manage a stock-validated cart, apply coupons, check out, and view orders. The README documents concurrency-safe checkout and JWT/Google OAuth; frontend page-to-service relationships and backend view-to-model/serializer relationships are also visible in the source index. Backend implementation details beyond the supplied excerpts are represented at their existing source paths, so finer internal control flow is not inferred.
Main entry points: AppRoutes.jsx Page routes · api.js API client · views.py Store API · AuthContext.jsx Auth state
Components 22
Storefront
- App shell
3D Web Project/frontend/src/App.jsx - Page routes
3D Web Project/frontend/src/components/AppRoutes.jsx - Catalogue
3D Web Project/frontend/src/pages/Home.jsx - Product detail
3D Web Project/frontend/src/pages/ProductDetail.jsx - Product card
3D Web Project/frontend/src/components/ProductCard.jsx - Cart & checkout
3D Web Project/frontend/src/pages/Cart.jsx - Orders
3D Web Project/frontend/src/pages/Orders.jsx - About page
3D Web Project/frontend/src/pages/About.jsx
Identity & UI
- Navigation
3D Web Project/frontend/src/components/Navbar.jsx - Login & register
3D Web Project/frontend/src/pages/Login.jsx - Auth state
3D Web Project/frontend/src/context/AuthContext.jsx - OAuth callback
3D Web Project/frontend/src/pages/AuthCallback.jsx - Theme state
3D Web Project/frontend/src/context/ThemeContext.jsx
Commerce API
- API client
3D Web Project/frontend/src/services/api.js - Store API
3D Web Project/backend/store/views.py - API serializers
3D Web Project/backend/store/serializers.py - Auth endpoints
3D Web Project/backend/core/urls.py
Persistence
- User account
3D Web Project/backend/users/models.py - Commerce records
3D Web Project/backend/store/models.py - PostgreSQL
Other components
- Shopper
- Google OAuth
Connections 26
- Shopper → Page routes: browses
- App shell → Page routes: renders
3D Web Project/frontend/src/App.jsx - Page routes → Catalogue: routes to
3D Web Project/frontend/src/components/AppRoutes.jsx - Page routes → Product detail: routes to
3D Web Project/frontend/src/components/AppRoutes.jsx - Page routes → Cart & checkout: routes to
3D Web Project/frontend/src/components/AppRoutes.jsx - Page routes → Orders: routes to
3D Web Project/frontend/src/components/AppRoutes.jsx - Page routes → Login & register: routes to
3D Web Project/frontend/src/components/AppRoutes.jsx - Page routes → About page: routes to
3D Web Project/frontend/src/components/AppRoutes.jsx - Catalogue → API client: fetches products
3D Web Project/frontend/src/pages/Home.jsx - Catalogue → Product card: renders
3D Web Project/frontend/src/pages/Home.jsx - Product detail → API client: fetches & adds
3D Web Project/frontend/src/pages/ProductDetail.jsx - Cart & checkout → API client: manages cart
3D Web Project/frontend/src/pages/Cart.jsx - Orders → API client: fetches orders
3D Web Project/frontend/src/pages/Orders.jsx - Login & register → Auth state: uses auth
3D Web Project/frontend/src/pages/Login.jsx - Auth state → API client: auth requests
3D Web Project/frontend/src/context/AuthContext.jsx - OAuth callback → Auth state: sets tokens
3D Web Project/frontend/src/pages/AuthCallback.jsx - Navigation → Auth state: reads auth
3D Web Project/frontend/src/components/Navbar.jsx - Navigation → Theme state: toggles theme
3D Web Project/frontend/src/components/Navbar.jsx - API client → Store API: REST / JSON
- API client → Auth endpoints: requests auth
3D Web Project/frontend/src/services/api.js - Store API → API serializers: uses serializers
3D Web Project/backend/store/views.py - Store API → Commerce records: queries records
3D Web Project/backend/store/views.py - Store API → PostgreSQL: ORM; locked checkout
- Auth endpoints → User account: authenticates users
- Google OAuth → OAuth callback: returns JWT
- Auth endpoints → Google OAuth: OAuth integration