The Metal Input Line Entry System (MILES) is a comprehensive framework for describing surface properties using a standardized line notation format. MILES strings can be converted to numerical representations suitable for machine learning models in materials science applications.
- Encoder: Interactive form-based interface to create MILES strings from surface descriptions
- Decoder: Convert MILES strings back to human-readable JSON format with AI-powered descriptions
- Real-time encoding/decoding with debounced API calls for optimal performance
- Currently supports for 5 hierarchical layers (L0-L5) covering material properties from basic metal type to advanced manufacturing parameters
- AI-powered PDF data extraction using Large Language Models
- Automatic conversion of scientific literature to structured MILES data
- Batch processing capabilities for multiple PDF files
- reCAPTCHA integration for security and rate limiting
- L1: Base material type (metal) and specific metal element selection via interactive periodic table
- L2: Alloy composition, microstructure (EBSD), and grain characteristics
- L3: Conventional manufacturing processes (surface treatments, heat treatment)
- L4: Electrolyte composition and corrosion testing parameters
- L5: Additive manufacturing parameters and post-processing
- Framework: React 18 with TypeScript
- Routing: TanStack Router with type-safe navigation
- UI Library: Mantine v8 for consistent design system
- State Management: Zustand for PDF processing, React Query for server state
- Build Tool: Vite
- Framework: FastAPI with automatic OpenAPI documentation
- Data Validation: Pydantic v2 with custom MILES field validation
- AI Integration: Helmholtz LLM API for PDF extraction and text generation
- Rate Limiting: SlowAPI with IP-based throttling
- Security: reCAPTCHA v2 verification, file validation, input sanitization
- Node.js 18+ and npm
- Python 3.9+ and pip
cd frontend
npm install
npm run devThe frontend will be available at http://localhost:5173
cd backend
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000The API will be available at http://localhost:8000 with interactive docs at /docs
VITE_API_BASE_URL=http://localhost:8000
VITE_RECAPTCHA_SITE_KEY=your_recaptcha_site_key
HELMHOLTZ_API_KEY=your_llm_api_key
RECAPTCHA_SECRET_KEY=your_recaptcha_secret
The backend provides a comprehensive REST API with automatic OpenAPI documentation:
- POST /api/v1/encode - Convert JSON parameters to MILES string
- POST /api/v1/decode - Convert MILES string to JSON format
- POST /api/v1/extract - Extract MILES data from PDF files
- POST /api/v1/describe - Generate AI descriptions of MILES data
- GET /api/v1/metrics - Retrieve available MILES field definitions
- GET /api/v1/schema - Get complete JSON schema for validation
- Encoding/Decoding: 1000 requests/minute
- PDF Extraction: 20 requests/minute
- AI Descriptions: 20 requests/minute
- File Validation: Magic byte verification, size limits, extension checking
- Input Sanitization: Regex-based cleaning of all user inputs
- reCAPTCHA Integration: Bot protection on resource-intensive operations
- Rate Limiting: IP-based throttling to prevent abuse
- CORS Configuration: Restricted origins for production security
We welcome contributions! Please see our GitHub organization for:
- Issue tracking and feature requests
- Contribution guidelines
- Community discussions
This project is developed by researchers specializing in computational materials science, electrochemistry, and machine learning applications.
This project is licensed under the MIT License - see the LICENSE file for details.
Live Application: https://miles.hereon.de GitHub Organization: MILES4Materials Research Paper: [Coming Soon]
MILES: Making surface descriptions machine-readable for the future of materials science.