Skip to content

itzdineshx/ReportX-Ai

 
 

Repository files navigation

ReportX-Ai (Insight Guardian) 🔍

License: MIT TypeScript React FastAPI Python Vite Tailwind CSS Ollama

Fully offline AI-powered audit report generator that ingests scan ZIP files, filters High/Critical vulnerabilities, whitens sensitive data, runs local LLM analysis via Ollama, and exports Markdown reports.

✨ Features

  • 🔒 Offline-First: No external API dependencies - runs completely offline
  • 🤖 AI-Powered Analysis: Local LLM integration via Ollama for intelligent vulnerability analysis
  • 📊 Data Processing Pipeline: Complete ETL pipeline for security scan data
  • 🛡️ Data Whitening: Automatic sanitization of sensitive information
  • 📋 Markdown Reports: Clean, professional audit reports in Markdown format
  • 🎨 Modern UI: Beautiful React interface with Shadcn/ui components
  • 🚀 FastAPI Backend: High-performance Python backend
  • 📱 Responsive Design: Works on desktop and mobile devices

🏗️ Architecture

┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
│   React Frontend│    │   FastAPI Backend│    │     Ollama LLM   │
│   (TypeScript)  │◄──►│    (Python)      │◄──►│   (Local Models) │
│                 │    │                 │    │                 │
│ • Dashboard     │    │ • Data Ingestion│    │ • Gemma         │
│ • Data Whitening│    │ • ETL Pipeline  │    │ • Llama Tech    │
│ • AI Analysis   │    │ • Report Gen    │    │ • Custom Models │
│ • Validation    │    │ • API Endpoints │    │                 │
└─────────────────┘    └─────────────────┘    └─────────────────┘

🚀 Quick Start

Prerequisites

  • Node.js (v18+)
  • Python (v3.8+)
  • Ollama (for AI analysis)

Installation

  1. Clone the repository

    git clone https://github.com/Hari-Eshwaran/insight-guardian.git
    cd insight-guardian
  2. Install Frontend Dependencies

    npm install
  3. Install Backend Dependencies

    cd backend
    pip install -r requirements.txt
    cd ..
  4. Start Ollama Service

    # Make sure Ollama is running with required models
    ollama serve
    ollama pull llama2  # or your preferred model
  5. Start the Application

    # Terminal 1: Start Frontend (Dev Mode)
    npm run dev
    
    # Terminal 2: Start Backend
    cd backend
    python main.py
  6. Open your browser

    http://localhost:5173
    

📁 Project Structure

ReportX-Ai/
├── src/                    # React Frontend
│   ├── components/         # Reusable UI Components
│   ├── pages/             # Application Pages
│   ├── services/          # API Services
│   └── hooks/             # Custom React Hooks
├── backend/               # FastAPI Backend
│   ├── app/
│   │   ├── analysis/      # Data Analysis Modules
│   │   ├── ingestion/     # Data Ingestion Logic
│   │   ├── llm/          # LLM Integration
│   │   ├── models/       # Pydantic Models
│   │   ├── pipeline/     # Processing Pipeline
│   │   ├── prompts/      # LLM Prompt Templates
│   │   ├── report/       # Report Generation
│   │   ├── service/      # Business Logic
│   │   └── whitening/    # Data Sanitization
│   └── main.py           # FastAPI Application
├── data/                  # Sample Data & Evidence
├── public/               # Static Assets
└── package.json          # Frontend Dependencies

🛠️ Development

Available Scripts

# Frontend
npm run dev          # Start development server
npm run build        # Build for production
npm run preview      # Preview production build
npm run test         # Run tests
npm run lint         # Run ESLint

# Backend
cd backend
python main.py       # Start FastAPI server

Environment Setup

Create a .env file in the backend directory:

OLLAMA_BASE_URL=http://localhost:11434
MODEL_GEMMA_EXEC=gemma:7b
MODEL_LLAMA_TECH=llama2:7b

🔧 Configuration

Ollama Models

The application supports multiple Ollama models for different analysis tasks:

  • Gemma: General vulnerability analysis
  • Llama Tech: Technical report generation
  • Custom Models: Configure in backend/app/config.py

Data Processing

  • Supported Formats: ZIP files containing security scan data
  • Vulnerability Filtering: High/Critical severity only
  • Data Whitening: Automatic PII and sensitive data removal

📊 API Documentation

Once the backend is running, visit:

  • Swagger UI: http://localhost:8000/docs
  • ReDoc: http://localhost:8000/redoc
  • OpenAPI JSON: http://localhost:8000/openapi.json

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


Built with ❤️ for the cybersecurity community

About

Fully offline AI-powered audit report generator local LLM analysis via Ollama

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 75.0%
  • Python 23.9%
  • Other 1.1%