AI-Powered Business Intelligence & Competitive Analysis Platform
π Demo β’ π Documentation β’ π Quick Start β’ π― Features β’ ποΈ Architecture
- π― Features
- ποΈ Architecture
- π Quick Start
- π Documentation
- π Demo
- π οΈ Technology Stack
- π± API Endpoints
- π§ Configuration
- π Data Sources
- π¨ UI Components
- π§ͺ Testing
- π’ Deployment
- π€ Contributing
- π License
- Single Company Deep Analysis: SWOT, PESTEL, Porter's Five Forces, BCG Matrix, McKinsey 7S
- RAG-Powered Insights: Retrieval-Augmented Generation with document upload support
- Visual Frameworks: Auto-generated strategy visualization charts
- LinkedIn Intelligence: Professional network analysis and company insights
- Real-time Data: Live web scraping with Tavily search integration
- Side-by-Side Analysis: Compare 2-5 companies simultaneously
- Investment Recommendations: AI-generated investment insights
- Performance Metrics: Market share, growth rate, sentiment scoring
- Interactive Visualizations: Radar charts, bar graphs, scatter plots
- Benchmark Analysis: Industry-standard comparative metrics
- Real-Time Monitoring: Automated daily sentiment collection
- Multi-Source Intelligence: News APIs, social media, financial data
- Time-Series Analytics: MongoDB time-series with granular tracking
- Event Detection: Statistical anomaly and pattern recognition
- Predictive Trends: Mathematical slope analysis and volatility metrics
- JWT Authentication: Secure token-based authentication
- Role-Based Access: Granular permission system
- Session Management: Secure user session handling
- API Security: CORS, rate limiting, input validation
- Responsive Design: Mobile-first UI with Tailwind CSS
- Interactive Dashboards: Real-time data visualization
- Export Capabilities: PDF, Markdown, TXT format exports
- Dark/Light Mode: User preference-based theming
- Progressive Web App: Offline capabilities and mobile optimization
graph TB
subgraph "Frontend Layer"
A[React 19 + TypeScript]
B[Tailwind CSS]
C[Vite Build Tool]
end
subgraph "Backend Layer"
D[Spring Boot 3.4.9]
E[Spring Security]
F[LangChain4j RAG]
end
subgraph "AI/ML Layer"
G[Ollama Llama 3.2]
H[Nomic Text Embeddings]
I[Statistical Analysis]
end
subgraph "Data Layer"
J[MongoDB Time-Series]
K[Firebase Storage]
L[Supabase Storage]
end
subgraph "External APIs"
M[Tavily Search]
N[NewsAPI]
O[Google Custom Search]
P[LinkedIn Scraping]
end
A --> D
D --> G
D --> J
G --> H
D --> M
D --> N
D --> O
D --> P
J --> L
J --> K
- Input Layer: User requests, file uploads, API calls
- Processing Layer: AI analysis, web scraping, data validation
- Storage Layer: Time-series data, document storage, cache management
- Analytics Layer: Trend calculation, comparison metrics, insights generation
- Presentation Layer: Charts, reports, interactive dashboards
- Java 17+ β
- Node.js 18+ & npm π¦
- MongoDB 7+ π
- Docker & Docker Compose π³
- Ollama (for AI features) π€
# Clone the repository
git clone https://github.com/Sayjad21/InsightFlow.git
cd InsightFlow
# Start all services with Docker
docker-compose up -d
# Access the application
# Frontend: http://localhost:5173
# Backend API: http://localhost:8000Backend Setup
cd backend
# Install dependencies
./mvnw clean install
# Configure environment variables
cp application.properties.example application.properties
# Edit application.properties with your API keys
# Start Ollama (if running locally)
ollama serve
ollama pull llama3.2
ollama pull nomic-embed-text
# Run the application
./mvnw spring-boot:runFrontend Setup
cd frontend
# Install dependencies
npm install
# Configure environment
cp .env.example .env
# Edit .env with your backend URL
# Start development server
npm run devBackend Configuration (application.properties)
# Database
spring.data.mongodb.uri=mongodb://localhost:27017/insightflow
# AI Configuration
ollama.base-url=http://localhost:11434
ollama.model.chat=llama3.2
ollama.model.embedding=nomic-embed-text
# External APIs
newsapi.key=your_newsapi_key
google-search.key=your_google_api_key
google-search.cx=your_search_engine_id
tavily.api.key=your_tavily_key
# Cloud Storage
supabase.url=your_supabase_url
supabase.key=your_supabase_key
firebase.config.path=path/to/firebase-config.json
# Security
jwt.secret=your_jwt_secret
jwt.expiration=86400000Frontend Configuration (.env)
VITE_API_BASE_URL=http://localhost:8000
VITE_APP_NAME=InsightFlow
VITE_APP_VERSION=1.0.0- π Authentication System - Complete auth flow and security
- π Competitive Analysis - Single company analysis system
- βοΈ Comparison System - Multi-company comparison engine
- π Sentiment & Trends - Real-time sentiment analysis
π View Live Demo (if deployed)
View Application Screenshots
| Technology | Version | Purpose |
|---|---|---|
| 3.4.9 | Application Framework | |
| 17 | Programming Language | |
| 7+ | Time-Series Database | |
| 0.35.0 | RAG Framework | |
| 3.6.1 | Statistical Analysis | |
| 1.5.4 | Chart Generation |
| Technology | Version | Purpose |
|---|---|---|
| 19.1.1 | UI Framework | |
| 5.8.3 | Type Safety | |
| 4.1.13 | Styling Framework | |
| 7.1.2 | Build Tool | |
| 1.11.0 | HTTP Client |
| Technology | Purpose |
|---|---|
| Ollama Llama 3.2 | Local LLM for analysis |
| Nomic Text Embeddings | 768-dimensional vectors |
| Apache Commons Math3 | Statistical calculations |
| Spring Cache | Performance optimization |
| Service | Purpose |
|---|---|
| Docker | Containerization |
| MongoDB Atlas | Cloud database |
| Supabase Storage | File storage |
| Firebase Storage | Alternative storage |
| Azure | Cloud deployment |
POST /api/auth/signup- User registrationPOST /api/auth/signin- User loginPOST /api/auth/refresh- Token refreshPOST /api/auth/logout- User logout
POST /api/analyze- Single company analysisPOST /api/generate-company-file- Generate analysis report
GET /api/comparison/analyses- Get user analysesPOST /api/comparison/compare-existing- Compare existing analysesPOST /api/comparison/compare- Generate new comparisonPOST /api/comparison/compare-enhanced- Advanced comparison
GET /api/sentiment/{company}/trend- Get sentiment trendsGET /api/sentiment/{company}/trend/chart- Trend visualizationGET /api/sentiment/comparison/chart- Multi-company sentimentPOST /api/sentiment/collect- Trigger data collection
View Sample API Requests
POST /api/analyze
Content-Type: multipart/form-data
company_name: Tesla
file: [optional analysis document]POST /api/comparison/compare-enhanced
Content-Type: application/json
{
"companyNames": ["Tesla", "Apple", "Google"],
"comparisonType": "new",
"saveResult": true
}GET /api/sentiment/Tesla/trend/chart?days=30&sources=news,social
Authorization: Bearer <jwt_token>- Tavily Search API - Comprehensive web search
- NewsAPI - Real-time news data
- Google Custom Search - Social media content
- LinkedIn Scraping - Professional network insights
- Web Scraping: Modular scraping with fallback mechanisms
- Content Extraction: Text processing and cleaning
- AI Analysis: Sentiment scoring and risk assessment
- Time-Series Storage: Optimized for trend analysis
src/components/
βββ common/
β βββ ImageUpload.tsx # File upload component
β βββ Pagination.tsx # Data pagination
βββ Dashboard/
β βββ AnalysisTab.tsx # Company analysis interface
β βββ ComparisonTab.tsx # Comparison dashboard
β βββ SentimentAnalysisTab.tsx # Sentiment monitoring
β βββ TrendsTab.tsx # Trend visualization
βββ ui/
β βββ button.tsx # Reusable UI components
βββ Layout.tsx # Application shell
- Responsive Design: Mobile-first approach
- Interactive Charts: Real-time data visualization
- Export Functions: Multiple format support
- Loading States: Skeleton screens and spinners
- Error Boundaries: Graceful error handling
cd backend
# Run all tests
./mvnw test
# Run specific test categories
./mvnw test -Dtest="*ControllerTest"
./mvnw test -Dtest="*ServiceTest"
./mvnw test -Dtest="*RepositoryTest"
# Generate test coverage report
./mvnw jacoco:report- Controllers: 85%+ coverage
- Services: 90%+ coverage
- Repositories: 95%+ coverage
- Integration Tests: End-to-end workflows
- Unit Tests: Individual component testing
- Integration Tests: Service interaction testing
- API Tests: Endpoint behavior validation
- Performance Tests: Load and stress testing
# Production build
docker-compose -f docker-compose.prod.yml up -d
# Scale services
docker-compose up -d --scale backend=3
# Health checks
docker-compose ps
docker-compose logs -fAzure Container Apps
# azure-container-app.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: insightflow-backend
spec:
replicas: 2
selector:
matchLabels:
app: insightflow-backend
template:
metadata:
labels:
app: insightflow-backend
spec:
containers:
- name: backend
image: insightflow/backend:latest
ports:
- containerPort: 8000
env:
- name: SPRING_PROFILES_ACTIVE
value: "prod"- Development: Local Ollama, file storage
- Staging: Cloud AI, managed database
- Production: Full cloud stack, CDN, monitoring
- API Response Time: < 200ms average
- Chart Generation: < 2s for complex visualizations
- Database Queries: Time-series optimized indexing
- Concurrent Users: 1000+ simultaneous connections
- Data Processing: Real-time sentiment analysis
- Application Metrics: Spring Boot Actuator
- Database Performance: MongoDB Compass
- Error Tracking: Comprehensive logging
- User Analytics: Custom dashboard metrics
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
- Java: Google Java Style Guide
- TypeScript: ESLint + Prettier configuration
- Documentation: Comprehensive inline documentation
- Testing: Minimum 80% code coverage
- π Documentation - Comprehensive guides
- π Issues - Bug reports and feature requests
- π¬ Discussions - Community support
- GitHub: @Sayjad21
- Email: your-email@example.com
This project is licensed under the MIT License - see the LICENSE file for details.
- Ollama for local LLM capabilities
- LangChain4j for RAG framework
- Spring Boot for robust backend framework
- React for modern frontend development
- Tailwind CSS for beautiful styling
- MongoDB for time-series database
- JFreeChart for chart generation