Infrnce is a full-stack application designed to demonstrate a professional, high-performance log classification engine. It automates the analysis of infrastructure logs by intelligently routing them through a hybrid pipeline, optimizing for speed, accuracy, and cost.
This repository contains the complete project, including the backend API, the frontend client, and the foundational data science research.
- Project Overview
- Core Components
- How It Works: The Hybrid Pipeline
- Technology Stack
- Getting Started
- Performance Metrics
- Documentation
The Infrnce engine solves a common problem in infrastructure management: the overwhelming volume of log data. By automatically classifying logs, it helps engineering teams accelerate incident response, reduce manual triage time, and gain clear insights into system behavior.
This project is presented as a professional-grade software product, complete with:
- An interactive Engine for real-time classification with visual pipeline journey
- A Dashboard showcasing performance metrics, cost analysis, and architectural details
- A REST API providing programmatic access to classification capabilities
The project is structured into three main directories:
-
backend/
: A FastAPI service that exposes the classification pipeline via a REST API
→ Backend Documentation -
frontend/
: A Next.js application that provides a clean, professional user interface for interacting with the engine
→ Frontend Documentation -
log_classification_system/
: The original data science notebooks, models, and data that form the foundation of the engine's logic
→ Research Documentation
The engine's core is a multi-stage pipeline designed for efficiency:
- Regex Engine: Instantly handles high-volume, simple logs with pattern matching (42% coverage)
- BERT Model: A fine-tuned transformer model provides accurate semantic analysis for common but complex logs (26% coverage)
- LLM Fallback: A powerful Large Language Model handles rare, novel, or low-confidence logs, ensuring high coverage (21% coverage)
This intelligent routing minimizes reliance on expensive LLM calls, making the system both powerful and cost-effective.
- High Coverage: 92.7% of logs successfully classified
- Fast Processing: ~260 logs/second average throughput
- Cost Efficient: 89% reduction in expensive API calls through smart routing
- Accurate Results: 94.3% overall classification accuracy
- Python: FastAPI, PyTorch, Transformers, LangChain
- Models: Fine-tuned DistilBERT, LLaMA 3.1 via Groq API
- Data Processing: Pandas, NumPy, Scikit-learn
- JavaScript: Next.js 15, React, shadcn/ui
- Styling: Tailwind CSS with professional teal theme
- Icons: Lucide React for consistent iconography
- Development: Local development with hot reload
- Deployment: Vercel (Frontend), Cloud hosting (Backend)
- API: RESTful endpoints with comprehensive error handling
To run the full application locally, you will need to start both the backend and frontend servers.
Prerequisites: Python 3.8+, Node.js, pip
, npm
-
Clone the repository:
git clone https://github.com/kxshrx/infrnce.git cd infrnce
-
Start the Backend Server:
cd backend python -m venv ../logenv source ../logenv/bin/activate # macOS/Linux pip install -r requirements.txt python main.py
The API will run on
http://127.0.0.1:8000
-
Start the Frontend Server:
cd frontend npm install npm run dev
The application will run on
http://localhost:3000
Once both servers are running, you can access the Infrnce application in your browser.
For comprehensive setup instructions, refer to the individual component documentation:
- Classification Coverage: 92.7% of logs successfully processed
- Overall Accuracy: 94.3% across all pipeline stages
- Processing Speed: ~260 logs/second average throughput
- Cost Efficiency: 89% reduction in expensive LLM API calls
- Response Time: 150ms average per classification
- Regex Engine: 100% precision, handles 42% of logs
- BERT Model: 94.3% accuracy, processes 26% of logs
- LLM Fallback: 89% accuracy, manages 21% of complex logs
- Backend API Documentation - FastAPI service setup and endpoints
- Frontend Application Documentation - Next.js client setup and features
- Research & Models Documentation - Data science foundation
- Setup Guide - Quick start instructions for development
- API Endpoints:
POST /api/classify
- Classify log messagesPOST /api/generate
- Generate synthetic logsGET /health
- System health check
Infrnce/
├── backend/ # FastAPI service
│ ├── main.py # API server
│ ├── classifier.py # Pipeline logic
│ └── requirements.txt
├── frontend/ # Next.js client
│ ├── src/app/ # Application pages
│ ├── src/components/ # UI components
│ └── package.json
├── log_classification_system/ # Research foundation
│ ├── notebooks/ # Jupyter notebooks
│ ├── models/ # Trained models
│ └── data/ # Datasets
└── logenv/ # Python virtual environment
This architecture supports both development and production deployment, with clear separation of concerns between the API service, user interface, and research components.