{"id":29425741,"url":"https://github.com/the-developer-306/comp_intell-ai-competitor-intelligence-system","last_synced_at":"2025-07-12T10:08:05.397Z","repository":{"id":302080234,"uuid":"1011165317","full_name":"the-developer-306/Comp_Intell-AI-Competitor-Intelligence-System","owner":"the-developer-306","description":"An intelligent, file-aware platform that helps businesses analyze competitors, extract insights from internal documents, and generate detailed strategy + SWOT reports using LLMs and RAG.","archived":false,"fork":false,"pushed_at":"2025-07-03T18:53:34.000Z","size":499,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-03T19:34:07.774Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://compintell-ai.streamlit.app/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/the-developer-306.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-30T12:00:12.000Z","updated_at":"2025-07-03T18:53:37.000Z","dependencies_parsed_at":"2025-07-03T19:35:26.326Z","dependency_job_id":null,"html_url":"https://github.com/the-developer-306/Comp_Intell-AI-Competitor-Intelligence-System","commit_stats":null,"previous_names":["the-developer-306/compintell-ai-competitor-intelligence-system","the-developer-306/comp_intell-ai-competitor-intelligence-system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/the-developer-306/Comp_Intell-AI-Competitor-Intelligence-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-developer-306%2FComp_Intell-AI-Competitor-Intelligence-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-developer-306%2FComp_Intell-AI-Competitor-Intelligence-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-developer-306%2FComp_Intell-AI-Competitor-Intelligence-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-developer-306%2FComp_Intell-AI-Competitor-Intelligence-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/the-developer-306","download_url":"https://codeload.github.com/the-developer-306/Comp_Intell-AI-Competitor-Intelligence-System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/the-developer-306%2FComp_Intell-AI-Competitor-Intelligence-System/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264973232,"owners_count":23691494,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-12T10:08:01.960Z","updated_at":"2025-07-12T10:08:05.386Z","avatar_url":"https://github.com/the-developer-306.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 AI Competitor Intelligence System\n\nAn intelligent, file-aware platform that helps businesses analyze competitors, extract insights from internal documents, and generate detailed strategy + SWOT reports using LLMs and RAG.\n\n![Streamlit Screenshot](./assets/ss/home.jpg) \u003c!-- optional screenshot --\u003e\n\n---\n\n## 🚀 Features\n\n- 🔍 **Competitor Discovery** using Exa AI neural search\n\n- 🌐 **Web Data Extraction** via Firecrawl structured scraping\n\n- 📄 **RAG (Retrieval-Augmented Generation)** with FAISS and HuggingFace for file-based insights\n\n- 🧠 **Strategy \u0026 SWOT Generation** powered by DeepSeek API\n\n- 📊 **Markdown-Based Comparison Table** across 6 key business dimensions\n\n- 📥 **PDF Report Export** with all results in a clean downloadable format\n\n- 📂 Supports **PDF, DOCX, TXT** files for company knowledge\n\n---\n\n## 🎯 Use Case\n\nFor any startup or business that wants to:\n\n- Identify 3--5 real competitors with similar offerings\n\n- Compare pricing, features, tech stack, and positioning\n\n- Upload internal documents and get actionable growth strategies\n\n- Generate a SWOT analysis tailored to their current situation\n\n- Export a fully structured PDF report\n\n---\n\n## 🧩 Tech Stack\n\n| **Layer** | **Technology / Tool** | **Purpose** |\n| --- | --- | --- |\n| **Frontend** | Streamlit | User interface for interaction and results display |\n| **LLM (Language Model)** | DeepSeek API | Generates growth strategy and SWOT analysis |\n| **File Processing** | PyPDFLoader, Docx2txtLoader, TextLoader | Loads and parses PDF, DOCX, and TXT files |\n| **Embeddings** | HuggingFaceEmbeddings (`all-MiniLM-L6-v2`) | Converts text into vector form for retrieval |\n| **Vector DB** | FAISS (Facebook AI Similarity Search) | Stores document vectors for semantic search |\n| **RAG Engine** | LangChain + FAISS + HuggingFace | Retrieval-Augmented Generation from uploaded documents |\n| **Web Scraping** | Firecrawl API | Extracts structured business info from URLs |\n| **Search Engine** | Exa AI | Finds real competitors from a description or website |\n| **PDF Export** | FPDF (Python) | Generates a clean, downloadable business intelligence report as PDF |\n| **Prompt Handling** | Custom Prompt Templates (`prompts.py`) | Defines LLM behavior for comparison, strategy, and SWOT generation |\n---\n\n## 📁 Directory Structure\n\n```\nproject_root/\n│\n├── app.py                    # Streamlit UI\n├── agents/\n│   ├── deepseek_agent.py     # DeepSeek-based strategy + SWOT\n│   ├── rag_agent.py          # RAG chain using uploaded files\n│   └── firecrawl_agent.py    # Scrapes and extracts info\n│\n├── tools/\n│   ├── exa_tool.py           # Wraps Exa API calls\n│   ├── deepseek_llm.py       # Custom wrapper for DeepSeek API\n│   └── rag_tools.py          # RAG vector store + retriever setup\n│\n├── components/\n│   └── pdf_exporter.py       # Converts everything into PDF\n│\n├── data/\n│   └── uploaded_docs/        # Temporary upload path\n│\n└── utils/\n    └── prompts.py            # Prompt templates\n\n```\n## 🔑 API Keys Required\n\nCreate a `.env` or use Streamlit sidebar to provide:\n\n- `DEEPSEEK_API_KEY` -- for strategy generation\n\n- `FIRECRAWL_API_KEY` -- for structured website crawling\n\n- `EXA_API_KEY` -- for competitor discovery\n\n---\n\n## 📦 Installation\n\n```bash\n\ngit clone https://github.com/yourusername/ai-competitor-intelligence.git\n\ncd ai-competitor-intelligence\n\npip install -r requirements.txt\n\nstreamlit run app.py\n\n```\n\n📊 Sample Output\n----------------\n\n-   ✅ Top 5 Competitor URLs\n\n-   ✅ Comparison Table (Markdown)\n\n-   ✅ Strategy Suggestions (LLM-generated)\n\n-   ✅ SWOT Analysis (LLM-generated)\n\n-   ✅ File-aware Insights via RAG\n\n-   ✅ Exportable PDF Report\n\n📈 Metrics\n----------\n\n-   Reduced competitor research time by **80%**\n\n-   LLM-based strategy rated **90%+ relevance** by testers\n\n-   Processed **20+ page docs** in under **10 seconds**\n\n-   Exported PDF formatting accuracy: **~95%**\n\n🛡️ License\n-----------\n\nMIT License. Use freely and contribute if you love it!\n\n* * * * *\n\n🙌 Acknowledgements\n-------------------\n\n-   [DeepSeek AI](https://deepseek.com)\n\n-   [Exa AI](https://exa.ai)\n\n-   [Firecrawl](https://firecrawl.dev)\n\n-   [LangChain](https://python.langchain.com/)\n\n-   [Streamlit](https://streamlit.io)\n\n* * * * *\n\n📬 Contact\n----------\n\nBuilt by [Pratham](https://the-developer-306.github.io/Portfolio-PrathamKhanna/) -- passionate about automation, AI, and making business tools smarter.\n\nFor any questions or suggestions, feel free to reach out:\n\n- GitHub: [the-developer-306](https://github.com/the-developer-306)\n- Email: [whilealivecode127.0.0.1@gmail.com](mailto:whilealivecode127.0.0.1@gmail.com)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-developer-306%2Fcomp_intell-ai-competitor-intelligence-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-developer-306%2Fcomp_intell-ai-competitor-intelligence-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-developer-306%2Fcomp_intell-ai-competitor-intelligence-system/lists"}