How ckothapa03-pixel/shopping-agentic-ai-mcp works
Shopwise is a Streamlit storefront using existing SQLite databases, with an optional Gemini shopping assistant. The main user journey runs from browsing and account access through cart and wishlist management to confirmed COD checkout and order review. Separate branches cover product discovery/recommendations and the assistant’s read-only catalog tools, with optional local document retrieval. The graph emphasizes documented call ownership and README-described capabilities; some UI and checkout internals were not sampled, so their links are limited to explicit documentation.
Main entry points: mcp_server.py MCP server · database.py Shopping SQLite · user_data.py Cart and wishlist data · product_card.py Product cards
Components 34
Storefront UI
- Streamlit app
app/ui/web_app.py - Catalog browsing
app/ui/catalog.py - Catalog presentation
app/ui/catalog_data.py - Product cards
app/ui/product_card.py - Login UI
app/ui/auth.py - Cart UI
app/ui/cart_pages.py - Checkout UI
app/ui/checkout_page.py - Order views
app/ui/orders_page.py - Account pages
app/ui/account_pages.py - Address pages
app/ui/address_pages.py - Wishlist page
app/ui/wishlist_page.py - Chat interface
app/ui/chat/chat_submission.py - Product images
app/ui/product_images.py
Shopping flows
- Authentication
app/shopping/authentication.py - Cart rules
app/shopping/cart.py - Checkout confirmation
app/shopping/confirmation.py - Money and coupons
app/shopping/money.py
SQLite data
- Product repository
app/db/products.py - Cart and wishlist data
app/db/user_data.py - Order creation
app/db/checkout_repository.py - Order repository
app/db/order_repository.py - Address repository
app/db/address_repository.py - Identity mapping
app/db/identity.py - Shopping SQLite
app/db/database.py - Accounts SQLite
AI assistant
- Gemini agent
app/agent/agent.py - Chat runtime
app/agent/chat_runtime.py - Tool permissions
app/agent/tool_permissions.py - MCP client tools
app/mcp/mcp_tools.py
MCP tools
- MCP server
app/mcp/mcp_server.py - Catalog adapter
app/tools/products_tool.py
Document retrieval
- Local retrieval
app/rag/retrieval.py
Other components
- Shopper
- Gemini service
Connections 39
- Shopper → Streamlit app: uses
README.md - Streamlit app → Catalog browsing: renders
README.md - Streamlit app → Login UI: renders
README.md - Catalog browsing → Catalog presentation: loads
app/ui/catalog.py - Catalog browsing → Product cards: renders
app/ui/catalog.py - Catalog presentation → Product repository: queries
app/ui/catalog_data.py - Product cards → Cart rules: updates
app/ui/product_card.py - Product cards → Cart and wishlist data: persists
app/ui/product_card.py - Product cards → Product images: resolves image
app/ui/product_card.py - Login UI → Authentication: authenticates
app/ui/auth.py - Authentication → Identity mapping: links identity
app/shopping/authentication.py - Authentication → Accounts SQLite: reads account
app/shopping/authentication.py - Cart UI → Cart and wishlist data: loads and saves
README.md - Wishlist page → Cart and wishlist data: loads and saves
README.md - Address pages → Address repository: manages
README.md - Checkout UI → Order creation: submits confirmed order
README.md - Order creation → Money and coupons: calculates totals
app/db/checkout_repository.py - Order creation → Shopping SQLite: writes order and stock
app/db/checkout_repository.py - Order views → Order repository: views orders
README.md - Account pages → Authentication: manages account
README.md - Cart and wishlist data → Shopping SQLite: reads and writes
app/db/user_data.py - Product repository → Shopping SQLite: reads catalog
app/db/products.py - Order repository → Shopping SQLite: reads orders
app/db/order_repository.py - Address repository → Shopping SQLite: reads and writes
app/db/address_repository.py - Identity mapping → Shopping SQLite: reads mapping
app/db/identity.py - Chat interface → Chat runtime: submits request
app/ui/chat/chat_submission.py - Chat runtime → Gemini agent: runs chat
app/agent/chat_runtime.py - Gemini agent → MCP client tools: discovers and calls
app/agent/agent.py - Gemini agent → Gemini service: requests response
app/agent/agent.py - Gemini agent → Tool permissions: checks tools
app/agent/agent.py - MCP client tools → Tool permissions: filters tools
app/mcp/mcp_tools.py - MCP client tools → MCP server: uses stdio server
README.md - MCP server → Tool permissions: guards operations
app/mcp/mcp_server.py - MCP server → Catalog adapter: dispatches catalog search
app/mcp/mcp_server.py - Catalog adapter → Product repository: queries products
app/tools/products_tool.py - MCP server → Product repository: reads catalog
app/mcp/mcp_server.py - MCP server → Cart and wishlist data: dispatches user tools
app/mcp/mcp_server.py - MCP server → Local retrieval: dispatches retrieval
app/mcp/mcp_server.py - Local retrieval → Shopping SQLite: reads and writes chunks
app/rag/retrieval.py