Modern, AI-powered reporting and analysis platform. A comprehensive solution built with React frontend, Node.js API Gateway, and Python AI service.
This screen is a dashboard that provides AI-powered summary reports, KPI extraction, trend analysis, and recommended actions based on uploaded CSV data, such as trends over time. It is a control panel that allows you to ask questions by chatting with embeddings over the relevant data set, receive notifications for all actions performed, and view project details and technologies used on the help page.

The system uses GPU-accelerated embedding and parallel processing. The all-MiniLM-L6-v2 (384 dimensions) model runs on the GPU with CUDA; it produces ~2000+ texts/second with a batch size of 64. Data is divided into chunks of 5000 and written to PostgreSQL with 8 parallel workers. Cosine similarity searches are performed using pgvector; ivfflat indexes accelerate queries. With async background processing, the user receives an instant response, while the embedding is completed in the background. RAG pipeline: user query → embedding → vector search → context building → Gemini API → response. Total speed is ~1085 records/second; drops to GPU.
This project is a dashboard application where users can upload reports (PDF, CSV, Excel) and receive AI-powered analysis. You can chat with your uploaded data using natural language, get automatic summaries, and receive action items.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Frontend │ │ Backend API │ │ AI Service │ │ PostgreSQL │
│ (React) │◄──►│ Gateway │◄──►│ (Python) │◄──►│ + pgvector │
│ Port: 3000 │ │ (Node.js) │ │ Port: 5000 │ │ Port: 5432 │
│ Nginx │ │ Port: 8000 │ │ FastAPI │ │ Vector DB │
└─────────────────┘ └─────────────────┘ └─────────────────┘ └─────────────────┘
llm-analysis-dashboard/
├── service-frontend/ # React Frontend
│ ├── src/
│ │ ├── components/ # UI Components
│ │ │ ├── cards/ # KPI Cards
│ │ │ ├── charts/ # Trend Charts
│ │ │ ├── forms/ # Upload Area
│ │ │ ├── layout/ # Header, Sidebar, Footer
│ │ │ └── widgets/ # ChatBox, ActionBar, Settings
│ │ ├── pages/ # Dashboard, Help
│ │ ├── services/ # API services
│ │ ├── store/ # Zustand state management
│ │ └── styles/ # Theme and styles
│ ├── public/ # Static assets, favicon
│ ├── package.json
│ ├── Dockerfile
│ └── nginx.conf
│
├── service-backend/ # Node.js API Gateway
│ ├── src/
│ │ ├── routes/ # API endpoints
│ │ │ ├── upload.js # File upload
│ │ │ ├── chat.js # AI Chat
│ │ │ ├── summary.js # AI summary service
│ │ │ ├── kpi.js # KPI analysis service
│ │ │ ├── trend.js # Trend analysis service
│ │ │ ├── actions.js # Action items
│ │ │ ├── insights.js # AI insights
│ │ │ ├── settings.js # Settings management
│ │ │ └── query.js # Natural language query service
│ │ ├── middleware/ # Express middleware
│ │ ├── services/ # AI service integration
│ │ ├── app.js # Express application
│ │ └── server.js # Server startup
│ ├── uploads/ # Uploaded files
│ ├── package.json
│ ├── Dockerfile
│ └── env.example
│
├── service-ai/ # Python AI Service
│ ├── app/
│ │ ├── modules/ # AI modules
│ │ │ ├── rag_optimized.py # RAG system
│ │ │ ├── rag_ultra_fast.py # Ultra fast RAG
│ │ │ ├── parser.py # File parser
│ │ │ ├── kpi.py # KPI extraction
│ │ │ ├── trend.py # Trend analysis
│ │ │ ├── insights.py # AI insights
│ │ │ ├── actions.py # Action items
│ │ │ └── db.py # Database operations
│ │ ├── routes/ # FastAPI routes
│ │ └── main.py # FastAPI app
│ ├── requirements.txt
│ ├── Dockerfile
│ └── init.sql
│
├── docker-compose.yml # Multi-container orchestration
├── .env # Environment variables
├── .gitignore # Git ignore rules
└── README.md # This file
- Docker & Docker Compose
- Git
- Google Gemini API Key
git clone <repository-url>
cd llm-analysis-dashboardCreate .env file:
# AI Service Configuration
GEMINI_API_KEY=your_gemini_api_key_here
# Database Configuration
DATABASE_URL=postgresql://service_user:service_pass123@postgres:5432/service_ai
# Service URLs
AI_SERVICE_URL=http://localhost:5000
BACKEND_URL=http://localhost:8000
FRONTEND_URL=http://localhost:3000
# Development Settings
NODE_ENV=development
DEBUG=truedocker-compose up --build- Frontend: http://localhost:3000
- Backend API: http://localhost:8000
- AI Service: http://localhost:5000
File Upload → Parser → Chunking → Embedding → Vector DB → RAG Query
- Model:
all-MiniLM-L6-v2(Sentence Transformers) - Dimensions: 384 dimensions
- GPU: CUDA support
- Batch Size: 64 (ultra fast mode)
- PostgreSQL + pgvector extension
- Cosine similarity for semantic search
- Parallel processing for fast insert
- Chunk-based storage (5000 records/chunk)
# 1. User query embedding
query_embedding = model.encode(user_query)
# 2. Vector similarity search
similar_chunks = vector_search(query_embedding, top_k=5)
# 3. Context building
context = build_context(similar_chunks)
# 4. Gemini API call with context
response = gemini.generate_content(context + user_query)- Drag & drop file upload
- PDF, CSV, Excel support
- Real-time upload progress
- File validation and error handling
- AI-extracted key metrics
- Trend indicators (up/down/flat)
- Interactive cards with tooltips
- Real-time data updates
- Interactive line/area charts
- Time-series data visualization
- Export capabilities
- Responsive design
- Natural language queries
- Context-aware responses
- Data-specific insights
- Conversation history
- AI-generated action recommendations
- Priority-based categorization
- Expandable details
- Status tracking
- General: Theme, language, notifications
- Performance: Cache settings, batch sizes
- Display: Chart preferences, data formats
- AI: Model selection, temperature, timeout
- Notifications: Real-time updates, email alerts
- Comprehensive system documentation
- Architecture explanations
- Technology stack details
- Component descriptions
- Troubleshooting guides
- Context-Aware: Chat based on uploaded data
- Natural Language: English/Turkish Q&A
- Data Insights: Data-specific analysis
- Real-time: Instant responses
- Executive Summary: Management summary
- Detailed Summary: Detailed analysis
- Key Points: Main findings
- Financial Summary: Financial summary
- AI Analysis: Based on data analysis
- Priority Ranking: Priority ordering
- Categorization: Category-based grouping
- Implementation: Actionable recommendations
- Automatic Detection: Automatic KPI detection
- Trend Analysis: Trend calculation
- Comparison: Comparative analysis
- Visualization: Chart display
{
"framework": "React 18",
"build_tool": "Vite",
"ui_library": "Material-UI 5",
"state_management": "Zustand",
"routing": "React Router 6",
"charts": "Recharts",
"http_client": "Axios",
"deployment": "Nginx (Docker)"
}{
"runtime": "Node.js 18",
"framework": "Express.js",
"validation": "express-validator",
"file_upload": "Multer",
"security": "helmet, cors, rate-limit",
"compression": "compression",
"logging": "morgan",
"error_handling": "asyncHandler"
}{
"framework": "FastAPI",
"ai_models": "Google Gemini 2.5 Flash",
"embeddings": "Sentence Transformers",
"vector_db": "PostgreSQL + pgvector",
"data_processing": "Pandas, NumPy",
"ml_libraries": "Scikit-learn",
"async": "asyncio, ThreadPoolExecutor",
"gpu": "CUDA support"
}{
"database": "PostgreSQL 16",
"vector_extension": "pgvector",
"containerization": "Docker, Docker Compose",
"reverse_proxy": "Nginx",
"monitoring": "Health checks, Logs",
"security": "Environment variables, CORS"
}# AI Configuration
GEMINI_API_KEY=your_gemini_api_key_here
# Database
DATABASE_URL=postgresql://service_user:service_pass123@postgres:5432/service_ai
# Service URLs
AI_SERVICE_URL=http://localhost:5000
BACKEND_URL=http://localhost:8000
FRONTEND_URL=http://localhost:3000VITE_API_URL=http://localhost:8000/api
VITE_USE_MOCK_API=falseNODE_ENV=production
PORT=8000
AI_SERVICE_URL=http://ai-service:5000
MAX_FILE_SIZE=52428800
UPLOAD_DIR=uploads
ALLOWED_FILE_TYPES=pdf,csv,xlsx,xls
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173- Base: Node.js 18 Alpine
- Build: Multi-stage (Node.js → Nginx)
- Port: 3000:80
- Features: Gzip, Security headers, SPA routing
- Base: Node.js 18 Alpine
- Port: 8000:8000
- Features: File upload, API Gateway, Health checks
- Base: Python 3.10 Slim
- Port: 5000:5000
- Features: GPU support, FastAPI, RAG system
- Base: pgvector/pgvector:pg16
- Port: 5432:5432
- Features: Vector database, Automatic initialization
# Build stage
FROM node:18-alpine as build
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.confFROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
EXPOSE 8000
CMD ["npm", "start"]FROM python:3.10-slim
RUN apt-get update && apt-get install -y curl gcc g++ patchelf
WORKDIR /app
COPY requirements.txt ./
RUN pip install --upgrade pip && pip install -r requirements.txt
COPY . .
EXPOSE 5000
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "5000"]POST /api/upload- File uploadGET /api/upload/status- Upload status
POST /api/chat- AI chatGET /api/summary/:reportId- Report summaryGET /api/kpi/:reportId- KPI analysisGET /api/trend/:reportId- Trend analysisGET /api/actions/:reportId- Action itemsGET /api/insights/:reportId- AI insights
GET /api/settings- Get settingsPUT /api/settings- Update settingsPOST /api/settings/reset- Reset settings
GET /health- System health statusGET /api/{service}/status- Service status
- CSP Headers: Content Security Policy
- XSS Protection: Cross-site scripting protection
- HTTPS: SSL/TLS encryption
- Input Validation: Client-side validation
- Rate Limiting: Request limits per IP
- CORS: Cross-origin request protection
- Helmet: HTTP security headers
- File Validation: File type and size control
- Input Sanitization: Input data validation
- API Key Management: Environment variables
- Input Validation: Pydantic models
- Error Handling: Secure error messages
- Database Security: Connection pooling
# Build and start all services
docker-compose up -d --build
# Check status
docker-compose ps
# View logs
docker-compose logs -f
# Stop services
docker-compose down- Go to http://localhost:3000
- Upload a file (PDF, CSV, Excel)
- Ask questions in the chat box
- Review KPI cards and charts
- Change settings from the settings menu
- Read documentation from the help page
1. File Upload → Parser → Text Extraction
2. Text Chunking → Embedding Generation
3. Vector Storage → PostgreSQL + pgvector
4. Query Processing → Similarity Search
5. Context Building → Gemini API Call
6. Response Generation → User Interface
- PDF: Text extraction, table parsing
- CSV: Direct data processing
- Excel: Multi-sheet support
- TXT: Plain text processing
- Embedding:
all-MiniLM-L6-v2(384 dimensions) - LLM: Google Gemini 2.5 Flash
- Processing: GPU-accelerated (CUDA)
# Frontend
cd service-frontend
npm install
npm run dev
# Backend
cd service-backend
npm install
npm run dev
# AI Service
cd service-ai
pip install -r requirements.txt
uvicorn app.main:app --reload- Backend: Create new route
- Frontend: Update API service
- AI Service: Add new module
- UI: Update components
- State: Update Zustand store
- Vite: Fast build and HMR
- Code Splitting: Lazy loading
- Tree Shaking: Unused code elimination
- Gzip: Compression middleware
- Compression: Response compression
- Caching: Static asset caching
- Rate Limiting: Request throttling
- Connection Pooling: Database optimization
- GPU Acceleration: CUDA support
- Batch Processing: Parallel processing
- Vector Indexing: Fast similarity search
- Memory Management: Efficient data handling
This project is licensed under the MIT License.
AI-Powered Dashboard Ready!
This platform combines modern web technologies with AI power to provide a comprehensive analysis experience. You can chat with your uploaded data using natural language, get automatic summaries, and generate AI-powered action items.
Installation:
- Set your Gemini API key in
.envfile - Start all services with
docker-compose up --build - Access the platform at http://localhost:3000