How mit-007/ecommerce-platform works
Buyzaar combines a customer-facing storefront and authenticated commerce REST API with an AI support workflow. Customers use the UI to manage orders, invoices, and tracking or ask for help; the backend can connect the agent to a separate MCP server for commerce tools. The README also documents knowledge-base RAG: documents are chunked, embedded, and searched against PostgreSQL/pgvector. The sampled code confirms app startup, MCP/LLM initialization, and selected REST handlers; unsampled route and tool internals are represented only where the README or tree supports them.
Main entry points: main.py REST application · server.py MCP server · graph.py Agent workflow · llm_service.py LLM integration
Components 23
Customer interface
- Buyzaar web UI
frontend/src/main.jsx
Commerce API
- REST application
app/main.py - Authentication
app/routes/auth_routes.py - Orders and invoices
app/routes/order_routes.py - Invoice operations
app/routes/invoice_routes.py - Tracking operations
app/routes/tracking_routes.py - Document operations
app/routes/document_routes.py - Conversation routes
app/routes/conversation_routes.py - Support endpoint
app/routes/support_route.py
AI support
- Agent workflow
app/agent/graph.py - Agent nodes and state
app/agent/nodes.py - LLM integration
app/services/llm_service.py - MCP client
app/client/client.py
MCP capabilities
- MCP server
server/server.py - Order tools
server/tools/order_tool.py - Knowledge search
server/tools/search_tool.py - Support ticket tools
server/tools/support_ticket_tool.py
Knowledge and storage
- Document chunking
app/services/chunking.py - Embedding generation
app/services/embedding_service.py - Chunk storage
app/services/chunk_store_service.py - PostgreSQL and pgvector
Other components
- Customer
- Google Gemini
Connections 27
- Customer → Buyzaar web UI: uses
- Buyzaar web UI → REST application: calls API
- REST application → Authentication: routes requests
- REST application → Orders and invoices: routes requests
- REST application → Invoice operations: routes requests
- REST application → Tracking operations: routes requests
- REST application → Document operations: routes requests
- REST application → Conversation routes: routes requests
- REST application → Support endpoint: routes requests
- Support endpoint → Agent workflow: invokes
- Agent workflow → Agent nodes and state: runs nodes
- Agent workflow → LLM integration: requests reasoning
- LLM integration → MCP client: loads tools
- LLM integration → Google Gemini: generates responses
- MCP client → MCP server: discovers tools
- MCP server → Order tools: registers
- MCP server → Knowledge search: registers
- MCP server → Support ticket tools: registers
- Knowledge search → Embedding generation: embeds queries
- Knowledge search → PostgreSQL and pgvector: searches vectors
- Document operations → Document chunking: processes documents
- Document chunking → Embedding generation: prepares text
- Embedding generation → Google Gemini: requests embeddings
- Document chunking → Chunk storage: stores chunks
- Chunk storage → PostgreSQL and pgvector: writes chunks
- Order tools → PostgreSQL and pgvector: accesses commerce data
- Support ticket tools → PostgreSQL and pgvector: accesses tickets