How ahmed-ali-313/super-store-agent works
SuperStore AI supports customer product discovery and administrator inventory operations through role-specific chat, alongside account registration and login. Customers can browse categories, search products, check prices, stock, and locations; administrators can inspect inventory, identify low stock, and change or create catalog entries. The frontend sends requests to FastAPI, which delegates chat and account work to routes, agents, and persistence. README capabilities supplement the sampled excerpts; exact internal wiring for unsampled routes and tools is not shown.
Main entry points: main.jsx React application · database.py Database sessions · api.js API client · main.py FastAPI application
Components 21
Web application
- React application
frontend/src/main.jsx - Customer browsing and chat
frontend/src/routes/CustomerChat.jsx - Category browsing
frontend/src/routes/CategoryPage.jsx - Admin chat and tools
frontend/src/routes/AdminChat.jsx - Login and registration
frontend/src/context/AuthContext.jsx - Voice input
frontend/src/components/VoiceInput.jsx - Voice autocorrect
frontend/src/utils/voiceAutocorrect.js - API client
frontend/src/api.js
API and access
- FastAPI application
src/api/main.py - Authentication routes
src/api/routes/auth.py - Chat routes
src/api/routes/chat.py - Admin routes
src/api/routes/admin.py - Account and sessions
src/auth.py
Conversational agents
- Customer agent
src/agents/customer.py - Admin agent
src/agents/admin.py - Product operations
src/tools.py
Persistence
- Database sessions
src/database.py - ORM models
src/models.py
Other components
- Shopper or admin
- Gemini or OpenAI
- MySQL database
Connections 26
- Shopper or admin → React application: uses
- React application → Customer browsing and chat: routes customers
- React application → Category browsing: routes categories
- React application → Admin chat and tools: routes admins
- React application → Login and registration: provides auth
- Customer browsing and chat → API client: requests chat
- Category browsing → API client: requests products
- Admin chat and tools → API client: requests admin
- Login and registration → API client: requests auth
- Admin chat and tools → Voice input: captures speech
- Voice input → Voice autocorrect: corrects transcript
- FastAPI application → Authentication routes: mounts router
- FastAPI application → Chat routes: mounts router
- FastAPI application → Admin routes: mounts router
- Authentication routes → Account and sessions: registers and logs in
- Authentication routes → Account and sessions: gets sessions
- Chat routes → Customer agent: handles customer chat
- Admin routes → Admin agent: handles admin chat
- Customer agent → Product operations: uses product tools
- Admin agent → Product operations: uses inventory tools
- Customer agent → Gemini or OpenAI: runs model
- Admin agent → Gemini or OpenAI: runs model
- Product operations → Database sessions: reads and updates
- Account and sessions → Database sessions: reads and writes
- Database sessions → ORM models: maps records
- Database sessions → MySQL database: persists data