MetalliSense AI is an intelligent decision-support platform designed for modern foundries. It analyzes spectrometer data, detects anomalies in metal composition, and recommends alloy corrections using machine learning and AI agents.
The system integrates real-time industrial data processing, AI recommendation engines, and an interactive dashboard to help metallurgists optimize alloy composition safely and efficiently.
Frontend (React Dashboard)
│
▼
Node.js Backend API
│
├── AI Model Service (FastAPI)
│ │
│ ├── Alloy Recommendation Model
│ └── Anomaly Detection Model
│
└── AI Agent Service
| Service | Port |
|---|---|
| Frontend | 5173 / 3000 |
| Backend API | 3000 |
| AI Model API | 8000 |
| AI Agent | 8001 |
MetalliSense
│
├── frontend # React dashboard
├── backend # Node.js API server
├── Metallisense-AI # AI model service
├── ai-agent # AI reasoning agent
│
├── README.md
└── .env.example
Install the following before running the project:
- Node.js (v18+)
- Python (3.9+)
- npm
- pip
- MongoDB Atlas or local MongoDB
git clone <repository-url>
cd MetalliSenseNavigate to backend:
cd MetalliSense_Backendnpm installcopy .env.example .envnpm run devcd MetalliSense_Frontendnpm installcopy .env.example .envnpm startcd MetalliSense_AIpython -m venv venvvenv\Scripts\activatepip install -r requirements.txtBefore starting the API, train the models:
python app/training/train_alloy_agent.pyThis generates trained models used by the API.
uvicorn app.main:app --reload --port 8000cd MetalliSense_Agentpip install -r requirements.txtpython agent.pyhttp://localhost:8001 Running the Full System
Train AI models
Start AI Model API (8000)
Start AI Agent (8001)
Start Backend API (3000)
Start Frontend (5173)
Environment Variables
NODE_ENV=development PORT=3000
DATABASE=mongodb+srv://:@cluster.mongodb.net/MetalliSense
AI_SERVICE_INDIVIDUAL_URL=http://localhost:8000 AI_SERVICE_AGENT_URL=http://localhost:8001
Real-time alloy composition monitoring
AI-based alloy correction recommendations
Anomaly detection in metal composition
AI agent assistance for metallurgists
Human-in-the-loop decision workflow
Complete traceability of recommendations
Modular microservice architecture
React.js
JavaScript
TailwindCSS
Node.js
Express.js
MongoDB
Python
FastAPI
Scikit-learn
Pandas
NumPy
Python
LLM APIs
Gemini API
Cloud & Tools
Firebase Authentication
MongoDB Atlas
GitHub
API Endpoints Alloy Recommendation POST /alloy/recommend Anomaly Detection POST /anomaly/predict Troubleshooting AI Service 503 Error
python app/training/train_alloy_agent.py
Restart the AI API.
Database Connection Error
Check the .env database connection string.
Frontend Cannot Reach Backend
Verify backend is running on port 3000.
Future Improvements
Real spectrometer hardware integration
Advanced machine learning models
Cost optimization for alloy additions
Digital twin for foundry process simulation
Integration with ERP systems
This project is developed for research and educational purposes.