Menu
View on GitHub
OPEN SOURCE · DEPLOYED 24/7 — RAILWAY · VERCEL · NEON

The Visibility Layer
For Enterprise Workflows

WFI silently monitors work patterns, identifies repetitive tasks, scores them for automation potential, and generates AI-powered audit reports with precise ROI projections.

0s
Tracking Interval
0%
CPU Overhead
0
Pipeline Stages
0B
Mistral Parameters
IDENTIFYING THE GAP

Manual audits are
killing productivity.

Most audit and reporting workflows inside organizations are slow, repetitive, and almost entirely manual. Work that a well-designed AI system should handle automatically.

2+ Hours Wasted Weekly

Managers spending hours generating reports that should be automated. Every single week.

Copy-Paste Culture

Data analysts copying figures between Excel sheets manually, introducing human error at scale.

Zero Visibility

No clear data on which workflows are actually bottlenecks vs. genuine value-adds.

Q4_Report_v2_FINAL_FINAL_revised.xlsx
A1
A2
A3
Error: #REF! Formula reference broken
Last manual update: 3 hours ago by analyst@company.com
Processing 4,203 rows... ETA: Unknown
THE SOLUTION

Built the visibility layer —
and the intelligence on top.

WFI replaces manual audit workflows with an autonomous system that monitors, analyzes, and reports — continuously.

STAGE 01

Session Aggregator

Python tracker captures active applications every 60 seconds via Win32 API. Under 2% CPU overhead.

STAGE 02

Pattern Miner

Discovers recurring behavioral patterns from raw usage data using n-gram sequence analysis algorithms.

STAGE 03

Workflow Builder

Assembles mined patterns into structured workflow definitions with dependency mapping and metrics.

STAGE 04

Context Generator

Dual AI engine — rule-based + fine-tuned Mistral 7B via QLoRA — generates business context and ROI.

Tracker
Aggregator
Miner
AI Engine
Report
INTERACTIVE SIMULATION

Experience the WFI Dashboard

Real-time tracking, pattern mining, AI suggestions, and report generation.

WorkFlow
Intelligence System
MR
Madha R.
Admin · Enterprise

Dashboard

Tracker Active
Sessions Tracked
1,247
+12% today
AI Suggestions
4
Pending review
Potential Time Saved
5.3h/day
Automation yield
Efficiency Boost
70%
Potential increase

Automation ROI Projection

App Usage Distribution

Top AI Suggestions

SYSTEM ARCHITECTURE

Built for Scale
& Privacy

A dual-engine architecture combining deterministic rule-based logic with a fine-tuned Mistral 7B model for context-aware workflow analysis. Full enterprise-grade security stack.

Python Tracker (Win32 API)

Logs active application every 60 seconds with <2% CPU overhead. Silent background process.

4-Stage Abstraction Pipeline

Session Aggregator → Pattern Miner → Workflow Builder → Business Context Generator.

Dual AI Engine

Rule-based logic (always on) + Fine-tuned Mistral 7B via QLoRA for context-aware insights.

Enterprise Security

JWT auth, RBAC, AES-256 encryption, audit middleware, async PDF reports, 24h background scheduler.

User Workstation
Win32 API Hook
Raw Data Ingestion
PostgreSQL on Neon
Pattern Mining Engine
FastAPI on Railway
Mistral 7B Analysis
QLoRA Fine-tuned
ROI Audit Report
Async PDF Generation

TECH STACK

Python 3.11
FastAPI
React 19
Vite 7
PostgreSQL
Mistral 7B
Docker
Railway
Vercel
Neon
SQLAlchemy 2.0
MUI v7
COMPLETE TECHNICAL DOCUMENTATION

Under the Hood

Every component, every endpoint, every design decision — fully documented for open source contributors.

Project Structure

WFI_ANALYSIS_PRO/
├── backend/                           # FastAPI Python Backend
│   ├── app/
│   │   ├── main.py                   # App entry + middleware + lifespan
│   │   ├── config.py                 # Pydantic Settings (env vars)
│   │   ├── database.py               # Async SQLAlchemy setup
│   │   ├── models.py                 # ORM: User, ActivityLog, Suggestion, Audit, Config
│   │   ├── schemas.py                # Pydantic request/response schemas
│   │   ├── security.py               # JWT, bcrypt, Fernet encryption, RBAC
│   │   ├── ai_engine.py              # Rule-based pattern analyzer + scorer
│   │   ├── llm_engine.py             # LLM AI engine (Ollama/API/Local)
│   │   ├── workflow_builder.py       # 4-stage workflow abstraction pipeline
│   │   ├── report_service.py         # PDF gen (ReportLab + Matplotlib)
│   │   ├── email_service.py          # Async SMTP email service
│   │   ├── audit_middleware.py        # Request logging middleware
│   │   ├── scheduler.py              # Background analysis worker
│   │   ├── seed.py                   # Demo data seeder
│   │   ├── training_data_exporter.py # Real data → training JSONL
│   │   ├── synthetic_data_generator.py# Synthetic training data
│   │   ├── finetune_pipeline.py      # QLoRA fine-tuning
│   │   ├── eval_pipeline.py          # Model evaluation
│   │   └── routes/
│   │       ├── auth.py               # /api/v1/auth/*
│   │       ├── activity.py           # /api/v1/activity/*
│   │       ├── analytics.py          # /api/v1/analytics/*
│   │       ├── config.py             # /api/v1/config/*
│   │       └── reports.py            # /api/v1/reports/*, audit/*, scheduler/*
│   ├── Dockerfile
│   ├── Modelfile                     # Ollama model configuration
│   └── requirements.txt
├── frontend/                          # React + TypeScript + Vite
│   ├── src/
│   │   ├── main.tsx                  # React entry point
│   │   ├── App.tsx                   # Auth + routing
│   │   ├── api.ts                    # API client (all endpoints)
│   │   ├── theme.ts                  # MUI dark theme
│   │   ├── index.css                 # Global styles + animations
│   │   ├── components/
│   │   │   └── Layout.tsx            # Sidebar + top bar
│   │   └── pages/
│   │       ├── LoginPage.tsx         # Gradient login page
│   │       ├── DashboardPage.tsx     # Metrics + charts + AI + PDF
│   │       ├── ActivityPage.tsx      # Activity logs
│   │       ├── SuggestionsPage.tsx   # AI suggestions
│   │       └── SettingsPage.tsx      # System settings
│   ├── package.json
│   └── Dockerfile
├── tracker/                           # Windows Activity Tracker
│   └── tracker.py                    # Win32 API, batch upload, local fallback
├── docs/                              # Layered Documentation
│   ├── INDEX.md                      # Reading guide
│   ├── 1-planning/                    # PRD + TDD
│   ├── 2-guides/                      # Deployment, Users, AI/ML
│   └── 3-changelog/                   # Version history
├── docker-compose.yml                # Full stack Docker config
├── README.md                         # Project overview
└── STATE.md                          # Current project status

API Endpoints

25+ endpoints
Method Endpoint Auth Description
Authentication
POST /api/v1/auth/login Login with email/password, returns JWT
POST /api/v1/auth/register Register new user
POST /api/v1/auth/refresh Refresh access token
GET /api/v1/auth/me User Current user profile
Activity Data
GET /api/v1/activity/logs User Activity logs (filtered, paginated)
POST /api/v1/activity/logs/batch User Batch upload activity logs
Analytics & AI
GET /api/v1/analytics/dashboard/{user_id} User Dashboard metrics & charts data
GET /api/v1/analytics/team/{department} Manager+ Team analytics
GET /api/v1/analytics/automation-suggestions User AI-generated automation suggestions
POST /api/v1/analytics/run-analysis User Run rule-based analysis
POST /api/v1/analytics/run-llm-analysis User Run LLM-powered analysis (Mistral 7B)
Reports & Audit
POST /api/v1/reports/generate User Generate & download PDF report
POST /api/v1/reports/generate-and-email User Generate PDF + email delivery
GET /api/v1/reports/list User List generated reports
GET /api/v1/audit/logs Manager+ View audit trail
Scheduler & Config
POST /api/v1/scheduler/trigger Admin Manually trigger analysis
GET /api/v1/scheduler/status Admin Scheduler status
GET /api/v1/config/settings Admin System configuration
PUT /api/v1/config/settings/{key} Admin Update a setting
GET /api/v1/config/monitoring Manager+ System health metrics

Data Models

SQLAlchemy 2.0 Async

User

users
idString (UUID)
employee_idString(50)
name, emailString(100)
hashed_passwordString(255)
departmentString(100)
roleemployee | manager | admin
consent_givenBoolean
statusactive | inactive

ActivityLog

activity_logs
user_idFK → users
applicationString(100)
window_titleText (encrypted)
hashed_window_titleSHA-256
activity_typeString(50)
duration_secondsInteger (60)
cpu_percent, memory_percentFloat
repetitiveness_scoreFloat 0.0–1.0
automation_potentialFloat 0.0–1.0

AutomationSuggestion

automation_suggestions
suggestion_typerule_based | ai_generated
title, descriptionString / Text
confidence_scoreFloat
estimated_time_saved_hoursFloat
priorityHigh | Medium | Low
implementation_stepsJSON
tools_requiredJSON
statuspending | accepted | dismissed

AuditLog

audit_logs
user_idString (from JWT)
action"POST /api/v1/reports/generate"
resourceString(200)
detailsJSON {status, duration_ms, method}
ip_addressString(45)
timestampDateTime (auto)

AI / ML Pipeline

Dual Engine + QLoRA

Engine 1: Rule-Based

Always ON
  • PatternAnalyzer — App frequency analysis, sequence detection, time pattern scoring
  • AutomationScorer — Rule-based scoring by app type, duration weighting, consistency analysis
  • Instant scoring, <100ms latency, no GPU needed
  • Serves as automatic fallback when LLM is unavailable

Engine 2: Fine-Tuned LLM

Mistral 7B
  • QLoRA Fine-tuning — Trained on real tracker data via 4-stage workflow abstraction
  • 3 Deployment Modes — Ollama (GGUF), HuggingFace API, or Local transformers
  • Context-aware insights with executive summaries, ROI projections, and optimization opportunities
  • 4 layers of fallback: LLM → parse retry → rule-based → summary

Training Pipeline

Real Tracker Logs
PostgreSQL/SQLite/JSON
Workflow Pipeline
workflow_builder.py
JSONL Dataset
training_data_exporter.py
QLoRA Fine-Tune
finetune_pipeline.py
Deploy Model
Ollama / API / Local

Security Architecture

JWT Authentication

30-min access tokens + 7-day refresh. python-jose + bcrypt password hashing.

RBAC Access Control

3-tier roles: Employee → Manager → Admin. Per-endpoint permission checks.

AES-256 Encryption

Fernet symmetric encryption for sensitive data. SHA-256 one-way hashing for window titles.

Audit Middleware

Auto-logs every API request: user, action, IP, duration. Path sanitization for sensitive routes.

Role Own Data Team Data System Config Audit Logs Scheduler
Employee
Manager
Admin

End-to-End Data Flow

1. Capture

Win32 GetForegroundWindow() every 60s. Records app, title, type, CPU%, memory%.

2. Transmit

Auto-login via JWT. Batch upload to API. Local JSON fallback if offline.

3. Analyze

Rule-based instant scoring + LLM workflow analysis via 4-stage pipeline.

4. Report

PDF with charts + ROI. Async SMTP email. 24h auto-scheduler.

5. Display

React dashboard with real-time data, charts, AI panel, and PDF download.

Deployment Infrastructure

Backend API

Railway
  • FastAPI server with uvicorn
  • Auto-deploy from GitHub
  • Background scheduler worker
  • Environment variable management

Frontend

Vercel
  • React + Vite production build
  • Edge CDN distribution
  • API proxy configuration
  • Instant rollbacks

Database

Neon (PostgreSQL)
  • Serverless PostgreSQL
  • Auto-scaling compute
  • Branching for dev/prod
  • Async via asyncpg driver
RADICAL TRANSPARENCY

What worked. What didn't.

I'd rather say that openly than present a version that looks more finished than it is.

What Worked

The architecture went from "just working" to genuinely scalable

Local AI orchestration with Docker + Railway became stable enough for continuous production use

Fine-tuned workflows producing far more context-aware outputs than earlier iterations

The system now feels less like a prototype and more like a company foundation

What Didn't — Yet

Report formatting and output intelligence still need significant improvement

GPU inference is partially local due to computational constraints — removing that dependency is the next major milestone

The infrastructure is production-grade. The product experience is not fully polished yet

OPEN SOURCE

Contribute to WFI

WFI is fully open source. Get started in minutes with these commands.

Backend

# Clone & setup
git clone https://github.com/AcID3r/WFI-NeuralOps.git
cd WFI-NeuralOps/backend
pip install -r requirements.txt
uvicorn app.main:app --reload --port 8000
# API Docs → http://localhost:8000/docs

Frontend

# Setup frontend
cd frontend
npm install
npm run dev
# Dashboard → http://localhost:5173

Activity Tracker

# Start tracking (Windows only)
cd tracker
pip install -r requirements.txt
python tracker.py
# Runs silently in background

Docker (Full Stack)

# All-in-one: PostgreSQL + Backend + Frontend
docker-compose up -d
# Includes PostgreSQL, Redis, Backend, Frontend
# Everything running in containers

Demo Credentials

Employee
priya@wfi.com
password123
Manager
rajesh@wfi.com
password123
Admin
admin@wfi.com
admin123

Roadmap — Phase 3 (Open for Contributions)

Alembic database migrations
Real-time WebSocket activity feed
Export to CSV/JSON functionality
Team management UI for managers
Admin configuration panel (full CRUD)
Temporal pattern detection
Data anonymization pipeline
Prometheus/Grafana monitoring

Ready to explore WFI?

Check out the source code, explore the architecture, or reach out to discuss how workflow intelligence can transform your organization.