How hmbinara/toyalfa works
ToyAlfa is a toy e-commerce platform. Shoppers browse products, manage a cart, authenticate, and place orders; admins have a separate dashboard. The frontend also includes profile, wishlist, and product-management surfaces, while the FastAPI backend exposes authentication, product, and order APIs backed by PostgreSQL. The README additionally advertises multimodal search and automated order workflows with ChromaDB, Gemini, and n8n, but the supplied tree and excerpts do not show their implementation or wiring.
Main entry points: App.jsx App routing · orders.py Order API · auth.py Authentication API · orderStore.js Order state
Components 30
Shopper frontend
- App routing
frontend/src/App.jsx - Home storefront
frontend/src/pages/HomePage.jsx - Product browsing
frontend/src/pages/ShopPage.jsx - Product details
frontend/src/pages/ProductDetailPage.jsx - Account profile
frontend/src/pages/ProfilePage.jsx - Admin dashboard
frontend/src/pages/AdminPage.jsx - Shared layout
frontend/src/components/layout/MainLayout.jsx - Sign-in modal
frontend/src/components/common/AuthModal.jsx - Product card
frontend/src/components/common/ProductCard.jsx - Checkout
frontend/src/components/cart/CheckoutModal.jsx
Commerce state
- Auth state
frontend/src/store/authStore.js - Cart state
frontend/src/store/cartStore.js - Order state
frontend/src/store/orderStore.js - Product state
frontend/src/store/productStore.js - Wishlist state
frontend/src/store/wishlistStore.js - Demo catalog data
frontend/src/data/mockData.js
Backend API
- FastAPI application
backend/app/main.py - Authentication API
backend/app/api/auth.py - Product API
backend/app/api/products.py - Order API
backend/app/api/orders.py - Password and tokens
backend/app/core/security.py
Persistence and integrations
- Database sessions
backend/app/db/session.py - User records
backend/app/models/user.py - Product records
backend/app/models/product.py - Order records
backend/app/models/order.py
Other components
- Shopper
- PostgreSQL
- ChromaDB
- Gemini AI
- n8n workflows
Connections 39
- Shopper → App routing: visits
frontend/src/App.jsx - App routing → Shared layout: wraps pages
frontend/src/App.jsx - App routing → Home storefront: routes to
frontend/src/App.jsx - App routing → Product browsing: routes to
frontend/src/App.jsx - App routing → Product details: routes to
frontend/src/App.jsx - App routing → Account profile: guards route
frontend/src/App.jsx - App routing → Admin dashboard: guards route
frontend/src/App.jsx - Shared layout → Sign-in modal: renders
frontend/src/components/layout/MainLayout.jsx - Sign-in modal → Auth state: calls login
frontend/src/components/common/AuthModal.jsx - Auth state → Authentication API: HTTP requests
frontend/src/store/authStore.js - Product details → Product state: uses
frontend/src/pages/ProductDetailPage.jsx - Product browsing → Product state: uses
frontend/src/pages/ShopPage.jsx - Product card → Cart state: adds items
frontend/src/components/common/ProductCard.jsx - Product card → Wishlist state: toggles wishlist
frontend/src/components/common/ProductCard.jsx - Checkout → Cart state: reads cart
frontend/src/components/cart/CheckoutModal.jsx - Checkout → Order state: submits order
frontend/src/components/cart/CheckoutModal.jsx - Checkout → Auth state: reads account
frontend/src/components/cart/CheckoutModal.jsx - Account profile → Order state: shows orders
frontend/src/pages/ProfilePage.jsx - Account profile → Wishlist state: shows wishlist
frontend/src/pages/ProfilePage.jsx - Admin dashboard → Product state: manages products
frontend/src/pages/AdminPage.jsx - Admin dashboard → Order state: manages orders
frontend/src/pages/AdminPage.jsx - Cart state → Demo catalog data: reads promo codes
frontend/src/store/cartStore.js - Product state → Demo catalog data: uses demo data
frontend/src/store/productStore.js - Order state → Demo catalog data: uses demo orders
frontend/src/store/orderStore.js - FastAPI application → Authentication API: registers router
backend/app/main.py - FastAPI application → Product API: registers router
backend/app/main.py - FastAPI application → Order API: registers router
backend/app/main.py - Authentication API → Database sessions: uses sessions
backend/app/api/auth.py - Authentication API → User records: queries users
backend/app/api/auth.py - Authentication API → Password and tokens: hashes and verifies
backend/app/api/auth.py - Product API → Database sessions: uses sessions
backend/app/api/products.py - Product API → Product records: queries products
backend/app/api/products.py - Order API → Database sessions: uses sessions
backend/app/api/orders.py - Order API → Order records: queries orders
backend/app/api/orders.py - Order API → Product records: reads products
backend/app/api/orders.py - Database sessions → PostgreSQL: connects to
backend/app/db/session.py - Shopper → ChromaDB: multimodal search
README.md - ChromaDB → Gemini AI: AI-assisted search
README.md - Order API → n8n workflows: automated workflows
README.md