Skip to content

rahulmanish05/MetalliSense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MetalliSense AI

AI-Driven Alloy Optimization & Industrial Monitoring System

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.


System Architecture

Frontend (React Dashboard)
        │
        ▼
Node.js Backend API
        │
        ├── AI Model Service (FastAPI)
        │       │
        │       ├── Alloy Recommendation Model
        │       └── Anomaly Detection Model
        │
        └── AI Agent Service

Ports Used

Service Port
Frontend 5173 / 3000
Backend API 3000
AI Model API 8000
AI Agent 8001

Project Structure

MetalliSense
│
├── frontend # React dashboard
├── backend # Node.js API server
├── Metallisense-AI # AI model service
├── ai-agent # AI reasoning agent
│
├── README.md
└── .env.example


Prerequisites

Install the following before running the project:

  • Node.js (v18+)
  • Python (3.9+)
  • npm
  • pip
  • MongoDB Atlas or local MongoDB

Installation

Clone the repository:

git clone <repository-url>
cd MetalliSense

Backend Setup (Node.js)

Navigate to backend:

cd MetalliSense_Backend

Install dependencies:

npm install

Create environment file:

copy .env.example .env

Start backend server:

npm run dev

Backend runs at:

http://localhost:3000

Frontend Setup (React)

Navigate to frontend:

cd MetalliSense_Frontend

Install dependencies:

npm install

Create environment file:

copy .env.example .env

Start frontend:

npm start

Frontend runs at:

http://localhost:5173

AI Model Service Setup

Read the setup.bat file in the folder

Navigate to AI service:

cd MetalliSense_AI

Create virtual environment:

python -m venv venv

Activate environment (Windows):

venv\Scripts\activate

Install dependencies:

pip install -r requirements.txt

Train AI Models

Before starting the API, train the models:

python app/training/train_alloy_agent.py

This generates trained models used by the API.

Start AI Model API

uvicorn app.main:app --reload --port 8000

API documentation:

http://localhost:8000/docs

AI Agent Setup

Read the setup.bat file in the folder

Navigate to agent folder:

cd MetalliSense_Agent

Install dependencies:

pip install -r requirements.txt

Start agent:

python agent.py

Agent runs on:

http://localhost:8001 Running the Full System

Start services in this order:

Train AI models

Start AI Model API (8000)

Start AI Agent (8001)

Start Backend API (3000)

Start Frontend (5173)

Environment Variables

Example .env configuration for backend:

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

Features

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

Technologies Used

Frontend

React.js

JavaScript

TailwindCSS

Backend

Node.js

Express.js

MongoDB

AI Model Service

Python

FastAPI

Scikit-learn

Pandas

NumPy

AI Agent

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

Train models first:

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

License

This project is developed for research and educational purposes.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors