Live App: https://supplygenie-metamorphs-idealize-fro-six.vercel.app/
SupplyGenie is a comprehensive AI-powered supply chain management platform that helps businesses discover, evaluate, and connect with reliable suppliers based on their exact requirements. The platform consists of two main components:
- AI Service: A FastAPI-based backend with intelligent supplier discovery using LangChain and MongoDB
- Frontend: A modern Next.js 15 web application with an interactive chat interface
SupplyGenie Platform
βββ supplygenie-metamorphs-idealize-ai-service-main/ # Backend AI Service
β βββ FastAPI + LangChain + MongoDB
β βββ AI Agents for Supplier Discovery
βββ supplygenie-metamorphs-idealize-frontend/ # Frontend Application
βββ Next.js 15 + React 18
βββ Interactive Chat Interface
- Intelligent Supplier Discovery: AI agents search and evaluate suppliers from multiple sources
- MongoDB Integration: Efficient storage and querying of supplier data
- Web Research: Real-time supplier information gathering via Tavily API
- Smart Filtering: Advanced search with location, price, and certification filters
- RESTful API: Clean, documented endpoints for frontend integration
- AI-Powered Chat Interface: Interactive chat system for supplier recommendations
- User Authentication: Secure Firebase-based authentication
- Responsive Design: Modern, mobile-first UI with Tailwind CSS and shadcn/ui
- Speech-to-Text: Voice input capability for hands-free interaction
- Real-time Data: Integration with the AI service for up-to-date supplier information
- Dark Theme: Professional interface optimized for business use
- Backend: FastAPI with Python 3.12
- AI/ML: LangChain, LangGraph, OpenAI GPT models
- Database: MongoDB with text search indexing
- Search: Tavily API for web research
- Logging: Loguru for structured logging
- Deployment: Docker support with Cloud Run optimization
- Framework: Next.js 15.2.4 with React 18 and TypeScript 5
- UI/Styling: Tailwind CSS, shadcn/ui, Radix UI components
- Authentication: Firebase 11.9.1
- Database: MongoDB 6.17.0 for chat history
- Forms: React Hook Form with Zod validation
- Voice: Web Speech API for speech-to-text
- Charts: Recharts for data visualization
- Icons: Lucide React icon library
- Deployment: Vercel with automatic deployments
- Python 3.12+ (for AI service)
- Node.js 18+ (for frontend)
- pnpm or npm
- MongoDB database (local or cloud)
- OpenAI API key
- Tavily API key
- Firebase account and project
git clone <repository-url>
cd supplygenie-metamorphs-idealize-mergecd supplygenie-metamorphs-idealize-ai-service-main
# Install dependencies
pip install -r requirements.txt
# or using uv (recommended)
uv sync
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys:
# OPENAI_API_KEY=your_openai_key
# TAVILY_API_KEY=your_tavily_key
# MONGO_URI=your_mongodb_uri
# Run the service
uvicorn src.main:app --reload --host 0.0.0.0 --port 8080The AI service will be available at http://localhost:8080
cd supplygenie-metamorphs-idealize-frontend/supplygenie-frontend
# Install dependencies
pnpm install
# or npm install
# Set up environment variables
# Create .env.local file with:
# NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
# NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
# NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
# MONGODB_URI=your_mongodb_uri
# SUPPLY_CHAIN_API_URL=http://localhost:8080
# Run the frontend
pnpm dev
# or npm run devThe frontend will be available at http://localhost:3000
Base URL: http://localhost:8080
- Interactive Documentation:
http://localhost:8080/docs - ReDoc:
http://localhost:8080/redoc
POST /api/v1/supply-chain/recommendations
Get AI-powered supplier recommendations based on requirements.
Request:
{
"query": "I need electronics manufacturers in Asia with ISO certifications",
"chat_history": [] // optional
}Response:
{
"suppliers": [
{
"company_name": "TechSource Electronics",
"location": "Shenzhen, China",
"rating": 4.8,
"price_range": "$50-100 USD",
"lead_time": "15-20 days",
"moq": "1000 units",
"certifications": ["ISO 9001", "RoHS"],
"specialties": ["Electronics", "IoT Components"],
"response_time": "2-4 hours",
"contact": "[email protected]"
}
]
}"I need suppliers for electronic components, specifically microcontrollers and sensors. Looking for reliable manufacturers in Asia with competitive pricing, ISO certifications, and fast response times."
π Found 3 suppliers matching your criteria:
1. TechSource Electronics (Shenzhen, China)
β Rating: 4.8/5 | π
Lead Time: 15-20 days
π° Price Range: Competitive
π Contact: +86-755-xxxx | [email protected]
2. Pacific Components (Taipei, Taiwan)
β Rating: 4.6/5 | π
Lead Time: 10-15 days
π° Price Range: Premium
π Website: www.pacificcomp.tw
3. ElectroAsia Manufacturing (Bangkok, Thailand)
β Rating: 4.4/5 | π
Lead Time: 20-25 days
π° Price Range: Budget-friendly
π§ Contact: [email protected]
cd supplygenie-metamorphs-idealize-ai-service-main
docker build -t supply-genie-backend .
docker run -p 8080:8080 --env-file .env supply-genie-backendversion: "3.8"
services:
backend:
build: ./supplygenie-metamorphs-idealize-ai-service-main
ports:
- "8080:8080"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- TAVILY_API_KEY=${TAVILY_API_KEY}
- MONGO_URI=${MONGO_URI}
frontend:
build: ./supplygenie-metamorphs-idealize-frontend/supplygenie-frontend
ports:
- "3000:3000"
environment:
- SUPPLY_CHAIN_API_URL=http://backend:8080
depends_on:
- backend- User Input: Users interact via the chat interface or direct API calls
- AI Processing: LangChain agents analyze requirements and search criteria
- Multi-Source Search: System queries MongoDB database and performs web research
- Data Extraction: AI extracts detailed supplier information from multiple sources
- Intelligent Ranking: Suppliers are evaluated and ranked based on user criteria
- Response Generation: Structured supplier recommendations with complete details
cd supplygenie-metamorphs-idealize-ai-service-main
pytest
pytest --cov=srccd supplygenie-metamorphs-idealize-frontend/supplygenie-frontend
pnpm test
# or npm testBackend (.env):
OPENAI_API_KEY=sk-proj-your-openai-key
TAVILY_API_KEY=tvly-dev-your-tavily-key
MONGO_URI=mongodb+srv://username:[email protected]/
MODEL_NAME=gpt-4o-miniFrontend (.env.local):
NEXT_PUBLIC_FIREBASE_API_KEY=your_firebase_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
MONGODB_URI=your_mongodb_uri
SUPPLY_CHAIN_API_URL=http://localhost:8080- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- Create an issue on GitHub
- Check the API documentation at
http://localhost:8080/docs - Review the logs for error details
- Ensure all environment variables are set correctly
- Verify MongoDB connection and API keys
Built with β€οΈ by the SupplyGenie Team