A proof-of-concept application that demonstrates intelligent supplier report generation using natural language prompts and real supplier database integration.
This PoC showcases how AI can transform supplier data into actionable business intelligence, with each stakeholder receiving reports tailored to their specific needs and decision-making authority.
- 🎯 Intelligent Prompt Processing: Automatically detects roles and report types from natural language
- 📊 Real Data Insights: Uses actual supplier database with $516M in spend data
- 🚨 Risk Assessment: Identifies critical single-source dependencies
- 💰 Financial Impact: Calculates real consolidation and optimization opportunities
- 📈 Interactive Visualizations: Dynamic charts that adapt to different report types
- 🔄 Scalable Architecture: Modular design ready for production deployment
The PoC integrates with a real supplier database containing:
- 2,718 active suppliers managing $516M in total spend
- 72,853 transactions across various commodity categories
- Major risk identified: SUN COAST RESOURCES INC as single-source supplier for $29.7M in fuel commodities
- Consolidation opportunities: Manufacturing suppliers with potential $8.7M savings
ai-supplier-report-poc/
├── frontend/ # React.js application
│ └── src/AIReportGenerator.jsx # Main React component
├── backend/ # Node.js API service
│ ├── supplier-data-service.js
│ └── package.json
├── scripts/ # Utility scripts
│ └── database-integration-demo.js
├── docs/ # Documentation
├── README.md # This file
└── PROJECT_OVERVIEW.md # Detailed project overview
The application supports these test scenarios:
-
"Hi I'm the Head of Manufacturing, create a consolidation report"
- Identifies TECHLINE INC ($30.3M) and OLDCASTLE MATERIALS ($12.9M) as key consolidation targets
- Shows potential $8.7M savings through supplier consolidation
-
"CFO needs supplier risk assessment with financial impact"
- Highlights $38.5M in single-source risk exposure (7.5% of total spend)
- Identifies SUN COAST RESOURCES as critical risk with $29.7M exposure
-
"Executive summary of supplier performance for board meeting"
- Presents high-level KPIs: $516M spend across 2,718 suppliers
- Shows top 5 suppliers represent 21.3% of total spend concentration
-
"Procurement manager wants detailed spend analytics"
- Breaks down spend into Major (79.91%) vs Tail (20.09%) categories
- Identifies price variation opportunities across commodity groups
- Node.js (v14 or higher)
- React development environment
- SQLite database (suppliers.db)
cd backend
npm install
npm start
cd frontend
npm install
npm start
cd scripts
node database-integration-demo.js
The backend service provides the following endpoints:
GET /api/supplier-stats
- Basic supplier statisticsGET /api/top-vendors
- Top vendors by spendGET /api/spend-by-category
- Spend breakdown by categoryGET /api/spend-trends
- Monthly spend trendsPOST /api/generate-report
- Generate role-specific reports
- Natural Language Interface: Enter requests in plain English
- Role-Based Reports: Automatically detects user role and adapts content
- Interactive Charts: Uses Recharts for data visualization
- Report History: Quick access to previously generated reports
- Responsive Design: Works across desktop and mobile devices
The PoC demonstrates integration with actual supplier data:
- TECHLINE INC - $30.3M (5,772 transactions)
- SUN COAST RESOURCES INC - $29.7M (501 transactions)
- TEXAS ELECTRIC COOPERATIVES - $24.5M (1,165 transactions)
- Single-Source Risk: $38.5M exposure (7.5% of total spend)
- Critical Supplier: SUN COAST RESOURCES INC ($29.7M across multiple fuel types)
- Diversification Needed: 15+ commodities with limited supplier options
- Component-based architecture
- State management with React hooks
- Recharts for data visualization
- Tailwind CSS for styling
- RESTful API design
- SQLite database integration
- Role-based report generation
- Error handling and logging
- Real-time querying of supplier data
- Complex SQL joins for insights
- Performance optimization for large datasets
For production deployment:
- Implement authentication and authorization
- Add input validation and sanitization
- Enable CORS restrictions
- Add rate limiting
- Implement audit logging
- Enhanced AI Processing: Integrate with LLM APIs for more sophisticated report generation
- Real-time Updates: Connect to live procurement systems for current data
- Advanced Analytics: Add predictive modeling for supplier performance
- Integration Capabilities: Connect with ERP systems, procurement platforms, and BI tools
- Mobile App: Native mobile application for executive dashboards
MIT License - see LICENSE file for details
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
For questions or issues, please open an issue on GitHub or contact the development team.
Note: This is a proof-of-concept application. For production use, additional security, scalability, and reliability measures should be implemented.