Click to expand
- Overview
- What's New โ v2.0
- Live Demo
- System Architecture
- ML Pipeline
- Chrome Extension
- Core Features
- AI Strategy Co-Pilot (MIRA Oracle)
- Competitive War Room Simulator
- Auto-Generated Battlecards
- Live Sales Kill Cards ๐ฏ
- Model Configurations
- Quick Start
- Environment Variables
- API Reference
- Integration Guides
- Tech Stack
- Project Structure
- Deployment
- Known Limitations
- Contributing
- License
MIRA (Market Intelligence & Research Automation) is an autonomous, self-healing competitor monitoring engine with an AI-powered strategy co-pilot and competitive war room simulator. It scrapes competitor websites on a configurable schedule, detects meaningful content changes using ONNX sentence embeddings, analyzes business impact with Gemini 3.6 Flash (with a local Qwen GGUF fallback), generates auto-battlecards, and pushes real-time alerts to Slack, Email, and Notion / Airtable CRM โ all within a 512 MB RAM footprint.
| ๐ฌ Scrape | ๐ง Detect | ๐ Analyze & Score | โ๏ธ Simulate | ๐จ Alert |
|---|---|---|---|---|
| Axios + Puppeteer | ONNX Embeddings | Gemini 3.6 Flash / Qwen | War Room + Oracle | Slack + Email + CRM |
| Static & JS pages | Cosine similarity | Impact 1โ10 + Battlecards | Game-theory simulation | Real-time webhooks |
|
๐ง Semantic Understanding |
๐ Triple-Tier Fallback |
|
๐ฎ AI Strategy Co-Pilot |
โ๏ธ War Room Simulator |
|
๐ข Multi-Channel Alerts |
๐ฉน Self-Healing |
|
๐งฉ Chrome Extension |
๐ Auto-Battlecards |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ MIRA v2.0 HIGHLIGHTS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ฎ AI STRATEGY CO-PILOT (MIRA Oracle) โ
โ โข Conversational AI with full workspace context โ
โ โข Instant pitch drafts, pricing analysis, SWOT audits โ
โ โข Quick-prompt chips for common strategic queries โ
โ โ
โ โ๏ธ COMPETITIVE WAR ROOM SIMULATOR โ
โ โข "What-If" scenario engine with game-theory modeling โ
โ โข Dynamic risk scoring (1-10) with threat levels โ
โ โข Per-competitor predicted reactions & timelines โ
โ โข Step-by-step counter-offensive playbook generation โ
โ โข Pre-built scenario templates for rapid simulation โ
โ โ
โ ๐ AUTO-GENERATED BATTLECARDS โ
โ โข LLM-powered competitive comparison cards โ
โ โข Strengths / Weaknesses / Killer Questions / Landmines โ
โ โข One-click refresh from latest intelligence data โ
โ โข CRM sync status tracking (Notion / Airtable) โ
โ โ
โ ๐ฏ LIVE SALES OBJECTION "KILL CARDS" โ
โ โข Real-time 15-second verbatim counter-scripts for pitch calls โ
โ โข Live call HUD timer telemetry โ
โ โข Dynamic displacement triggers & ROI defense per competitor โ
โ โข 1-click script copy & AI co-pilot escalation โ
โ โ
โ ๐ป DEVELOPER SDKs & INTEGRATIONS โ
โ โข Multi-language SDKs for Node.js, Python, Go, and PHP โ
โ โข Scrape triggers, ONNX similarity, War Room & Webhook APIs โ
โ โข 1-click Workspace API Key & ID credential copying โ
โ โ
โ ๐ ENHANCED CONTENT CHANGE INSPECTOR & ANALYTICS โ
โ โข 3 Review Modes: Split Slider, Side-by-Side & Inline Diff โ
โ โข Color-coded text additions (+ green) & removals (- red) โ
โ โข Metadata bar: HTTP Status, Latency, Payload Delta โ
โ โข 7-Day Change Frequency Timeline & Severity Distribution โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
The app is deployed on Railway and publicly accessible:
๐ https://autonomous-competitor-intelligence-engine-production.up.railway.app/
graph TD
subgraph "๐ก Input Sources"
A["๐งฉ Chrome Extension"] -->|"One-Click API"| B("๐ Sequential Queue")
C["โฐ Scheduled Runner"] -->|"Configurable Interval"| B
end
subgraph "โ๏ธ Core Pipeline"
B --> D["๐ธ๏ธ Double-Engine Scraper"]
D -->|"Cleaned Text"| E["๐ง ONNX Sentence Embedder"]
E -->|"Cosine Similarity"| F{"๐ Semantic Change?"}
F -->|"similarity >= 0.85"| G["โ
No Action"]
F -->|"similarity < 0.85"| H["๐ง Gemini / Qwen LLM"]
end
subgraph "๐ Battlecard Engine"
H -->|"Change Analysis"| BC["๐ Auto-Battlecard Generator"]
BC -->|"Strengths / Weaknesses / Landmines"| BD["๐ Battlecard DB"]
end
subgraph "๐ฎ AI Strategy Layer"
ORACLE["๐ฎ MIRA Oracle Co-Pilot"]
WARROOM["โ๏ธ War Room Simulator"]
BD --> ORACLE
BD --> WARROOM
ORACLE -->|"Conversational AI"| ORACLE_OUT["๐ฌ Strategic Advice"]
WARROOM -->|"Game Theory"| WAR_OUT["๐ Simulation Report"]
end
subgraph "๐ค Integrations"
H --> J["๐ CRM Adapter"]
J -->|"Idempotent Write"| K["๐ Notion"]
J -->|"Idempotent Write"| L["๐ Airtable"]
J -->|"On Failure"| M["๐พ SQLite Retry Queue"]
H -->|"Impact >= 8"| N["๐ฌ Slack"]
H -->|"Periodic Digest"| O["๐ง Email"]
end
style K fill:#000000,stroke:#A78BFA,stroke-width:2px,color:#fff
style N fill:#4A154B,stroke:#A78BFA,stroke-width:2px,color:#fff
style O fill:#EA4335,stroke:#A78BFA,stroke-width:2px,color:#fff
style B fill:#0d1117,stroke:#A78BFA,stroke-width:1px,color:#c9d1d9
style D fill:#0d1117,stroke:#A78BFA,stroke-width:1px,color:#c9d1d9
style E fill:#0d1117,stroke:#FFD21E,stroke-width:2px,color:#FFD21E
style H fill:#0d1117,stroke:#A78BFA,stroke-width:1px,color:#c9d1d9
style F fill:#161b22,stroke:#A78BFA,stroke-width:2px,color:#c9d1d9
style ORACLE fill:#1a1040,stroke:#A78BFA,stroke-width:2px,color:#d8b4fe
style WARROOM fill:#1a1040,stroke:#EC4899,stroke-width:2px,color:#f9a8d4
style BC fill:#0d1117,stroke:#FFD21E,stroke-width:2px,color:#FFD21E
|
Runtime: const { pipeline } = require('@huggingface/transformers');
const embedder = await pipeline(
'feature-extraction',
'Xenova/all-MiniLM-L6-v2'
);
const oldEmbed = await embedder("Price is $100",
{ pooling: 'mean', normalize: true });
const newEmbed = await embedder("Current Price: $100",
{ pooling: 'mean', normalize: true });
// Cosine similarity โ 0.93
// Same meaning โ NO alert triggered โ
|
Cloud: Gemini 3.6 Flash API Local: Qwen2.5-0.5B GGUF via llama-cli (CPU) Detected changes are analyzed in a single inference pass. The LLM returns structured output:
|
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Gemini 3.6 Flash โโโโโโถโ Qwen2.5-0.5B GGUF โโโโโโถโ Rule-Based Heuristics โ
โ (Cloud, <1.5s) โ โ (Local, CPU, 7-15s) โ โ (Keyword match, <1ms) โ
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ
When cloud inference is unavailable (rate limits, missing API key), MIRA falls back to local GGUF, then to keyword-based heuristics. Analysis always completes.
The MIRA Chrome Extension turns your browser into a competitor registration tool. Browse any competitor's website, click the extension icon, and it's instantly queued for monitoring.
| Feature | Description |
|---|---|
| ๐ฑ๏ธ One-Click Add | Auto-detects the active tab's URL and infers competitor name from the domain |
| ๐ด Live Badge | Service worker polls every 60s โ new intel lights up a badge counter on the icon |
| ๐ API Key Auth | All requests secured with Bearer token, configured via Options page |
| ๐ฏ Scope Selector | Monitor full website, pricing page, or a specific section |
๐ Architecture
graph LR
subgraph "Chrome Extension โ Manifest V3"
POPUP["๐ฑ๏ธ popup.html + popup.js"]
OPTIONS["โ๏ธ options.html + options.js"]
BG["๐ background.js"]
STORAGE["๐พ chrome.storage.sync"]
end
subgraph "MIRA Backend"
API_ADD["/api/extension/add-competitor"]
API_UNREAD["/api/extension/unread-count"]
end
POPUP -->|"POST + Bearer"| API_ADD
BG -->|"GET every 60s"| API_UNREAD
API_UNREAD -->|"{ unreadCount: N }"| BG
BG -->|"setBadgeText(N)"| BADGE["๐ด Badge"]
POPUP --> STORAGE
OPTIONS --> STORAGE
BG --> STORAGE
style POPUP fill:#0d1117,stroke:#4285F4,stroke-width:2px,color:#c9d1d9
style BG fill:#0d1117,stroke:#FF6D00,stroke-width:2px,color:#c9d1d9
style OPTIONS fill:#0d1117,stroke:#4285F4,stroke-width:1px,color:#c9d1d9
style BADGE fill:#38bdf8,stroke:#fff,stroke-width:1px,color:#000
style API_ADD fill:#161b22,stroke:#A78BFA,stroke-width:1px,color:#c9d1d9
style API_UNREAD fill:#161b22,stroke:#A78BFA,stroke-width:1px,color:#c9d1d9
๐ง Installation
- Navigate to
chrome://extensions/and enable Developer mode - Click Load unpacked โ select the
extension/directory - Click the MIRA extension icon โ Configure Server Settings
- Enter your server URL (e.g.,
http://localhost:3000) and Extension API Key (from dashboard Settings) - Click Verify and Save โ
๐ธ๏ธ Intelligent Double-Engine Scraper
| Engine | Library | Use Case |
|---|---|---|
| โก Fast Fetch | axios + cheerio |
Static HTML โ fast and lightweight |
| ๐ JS Render | puppeteer (headless Chromium) |
SPAs & dynamic JS content |
Smart Cleaning Pipeline:
- ๐งน Strips cookie banners, nav bars, footers, sidebars
- ๐ Rotates User-Agent strings to avoid bot detection
- ๐ผ๏ธ Blocks images/CSS in Puppeteer to minimize RAM
- ๐ธ Captures screenshots for audit trails
๐ Tech Stack & DNS Enrichment
- ๐ DNS Resolution โ A-records & MX-records for server/email hosting detection
- ๐ง Header Inspection โ Reads
server,x-powered-byheaders - ๐ Dashboard Widget โ Enriched tech profiles displayed in competitor sidebar
๐ผ Idempotent CRM Sync
- ๐ Deduplication โ Queries Notion/Airtable before writes
- ๐ SQLite Retry Queue โ Failed syncs queued locally, auto-retried
- ๐ Dynamic Schema Matching โ Case-insensitive, whitespace-tolerant
- โ
Status Tracking โ
synced/failed/pendingper card
๐ข Multi-Channel Alerts
| Channel | Trigger | Content |
|---|---|---|
| ๐ฌ Slack | Impact โฅ 8 | Immediate webhook with full intel card |
| ๐ง Email | Periodic digest | HTML summary of recent changes |
| ๐ Notion | Every change | Structured database row |
| ๐ Airtable | Every change | Structured record |
๐ฅ๏ธ Rich Dashboard UI
Built with React 18 + Tailwind CSS + Vite, the dashboard features:
- ๐ Command Palette โ
Cmd/Ctrl + Kglobal search & quick navigation - ๐ Intel Feed โ Card-based timeline of all detected changes, filterable by impact
- ๐๏ธ Visual Diff Modal โ Side-by-side content diff viewer for every scrape
- ๐ Live Badge โ Unread intel count synced with the Chrome Extension badge
- โ๏ธ Settings Panel โ Per-workspace CRM keys, SMTP, Slack webhook, and API key management
- ๐ Skeleton Loaders โ Smooth loading states throughout the UI
MIRA Oracle is an embedded AI strategy co-pilot that has real-time access to your entire competitive intelligence workspace โ business profile, competitor radar, intel signals, and battlecards. Ask it anything and get actionable strategic advice instantly.
|
Pre-built strategy prompts for instant access:
|
graph LR
USER["๐ค User Query"] --> CTX["๐ฆ Context Assembler"]
CTX --> |"Profile + Competitors + Intel + Battlecards"| LLM["๐ง Gemini 3.6 Flash"]
LLM --> RESP["๐ฌ Strategic Response"]
RESP --> CONV["๐ Conversation Memory"]
CONV --> |"Multi-turn context"| CTX
style USER fill:#0d1117,stroke:#A78BFA,stroke-width:2px,color:#c9d1d9
style CTX fill:#0d1117,stroke:#FFD21E,stroke-width:2px,color:#FFD21E
style LLM fill:#1a1040,stroke:#A78BFA,stroke-width:2px,color:#d8b4fe
style RESP fill:#0d1117,stroke:#00C853,stroke-width:2px,color:#00C853
style CONV fill:#161b22,stroke:#A78BFA,stroke-width:1px,color:#c9d1d9
Fallback: When Gemini is unavailable, Oracle generates intelligent contextual reports using your live workspace data โ competitor counts, high-impact signals, and rule-based strategic recommendations.
"What happens if we drop prices by 30%?" โ The War Room runs a full market simulation powered by Gemini, modeling how each competitor is likely to react, with timelines, risk scores, and a step-by-step counter-offensive playbook.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ๏ธ WAR ROOM SIMULATION โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ ๐ SCENARIO: "Drop pricing 30% across all tiers" โ
โ โ
โ ๐ฏ RISK SCORE: โโโโโโโโโโ 8/10 โ HIGH RISK โ
โ โ
โ ๐ MARKET IMPACT: โ
โ "Aggressive pricing will trigger a race-to-bottom in โ
โ the mid-market segment within 2-3 weeks..." โ
โ โ
โ ๐ฅ COMPETITOR RESPONSES: โ
โ โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโโ โ
โ โ Competitor โ Predicted Action โ Prob โ When โ โ
โ โโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโผโโโโโโโโโโค โ
โ โ Rival A โ Match pricing + โ 85% โ 1-2 wks โ โ
โ โ โ launch ad blitz โ โ โ โ
โ โ Rival B โ Highlight premium โ 60% โ 2-4 wks โ โ
โ โ โ positioning โ โ โ โ
โ โโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโดโโโโโโโโโโ โ
โ โ
โ ๐ก๏ธ COUNTER-OFFENSIVE PLAYBOOK: โ
โ Step 1 โ Days 1-7: Distribute battlecards to sales โ
โ Step 2 โ Weeks 2-4: Publish customer success stories โ
โ Step 3 โ Month 2: Release differentiation features โ
โ โ
โ โ๏ธ VERDICT: PROCEED WITH CAUTION โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Template | Description |
|---|---|
| ๐ฐ Price Drop | "Drop prices by 30% across all tiers" |
| ๐ AI Feature Launch | "Launch an AI-powered feature competitor doesn't have" |
| ๐ Freemium Pivot | "Introduce a free tier to capture market share" |
| ๐ข Enterprise Push | "Pivot to enterprise-only with premium support" |
๐ก Or type any custom hypothesis โ e.g., "Acquire competitor X's top engineer and launch a PR campaign"
Every tracked competitor gets an auto-generated battlecard powered by LLM analysis. Battlecards are living documents that evolve as new intelligence signals are captured.
|
Each battlecard includes:
|
|
Never get caught off guard on a sales call again. The Live Sales Kill Cards Co-Pilot converts real-time competitor telemetry and AI battlecards into 15-second verbatim counter-scripts, customer migration triggers, pricing defenses, and landmine questions โ strictly personalized per monitored competitor target.
|
Unlike legacy static cheat-sheets, MIRA Kill Cards are 100% dynamic:
|
| Component | Model | Runtime | Disk | RAM | Latency |
|---|---|---|---|---|---|
| ๐ Embeddings | Xenova/all-MiniLM-L6-v2 |
ONNX (JavaScript) | ~90 MB | ~80 MB | < 0.5s |
| ๐ง LLM (Cloud) | gemini-3.6-flash |
Google API | โ | โ | < 1.5s |
| ๐ง LLM (Local) | Qwen2.5-0.5B-Instruct |
llama-cli (GGUF Q4_K_M) | ~382 MB | ~350 MB | 7โ15s |
| ๐ง Fallback | Rule-based heuristic | Node.js keyword matching | โ | โ | < 1ms |
| ๐ฎ Oracle | gemini-3.6-flash |
Google API (contextual) | โ | โ | < 2s |
| โ๏ธ War Room | gemini-3.6-flash |
Google API (game-theory) | โ | โ | < 3s |
๐ก Configure your Gemini API key and other integration credentials via the dashboard Settings tab โ no
.envchanges needed.
โ
Node.js v20+
โ
NPM v10+
โ
OS macOS / Linux / Windows (WSL)
git clone https://github.com/NitheshK4/Autonomous-Competitor-Intelligence-Engine.git
cd Autonomous-Competitor-Intelligence-Engine
npm install
npm run install:all๐ก No Python required. All ML inference runs natively in Node.js.
cp .env.example .env
# Only PORT and NODE_ENV are needed โ all API keys (Gemini, Slack,
# Notion, Airtable, SMTP) are configured via the dashboard Settings tab.npm run dev| Service | URL |
|---|---|
| ๐ฅ๏ธ Backend API | http://localhost:3000 |
| ๐จ Dashboard | http://localhost:5173 |
npm testValidates: Scraping โ Semantic Detection โ LLM Inference โ Battlecards โ CRM Sync
Create a .env in the project root (copy from .env.example). Only PORT is strictly required โ all integration credentials are managed via the dashboard Settings tab and persisted in SQLite.
| Variable | Required | Default | Description |
|---|---|---|---|
PORT |
โ | 3000 |
Express server port |
NODE_ENV |
โ | development |
production for optimized builds |
PUPPETEER_EXECUTABLE_PATH |
โ | bundled | Override Chrome binary (e.g. /usr/bin/google-chrome-stable) |
Note:
GEMINI_API_KEY,SLACK_WEBHOOK_URL, Notion, Airtable, and SMTP credentials are all configured through the dashboard Settings tab โ no.enventry needed.
Dashboard endpoints use X-Workspace-Id header (defaults to default).
Extension endpoints require Authorization: Bearer <api_key>.
๐ Dashboard Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET |
/health |
Health check |
GET |
/api/profile |
Get business profile |
POST |
/api/profile |
Save business profile |
GET |
/api/competitors |
List competitors |
POST |
/api/competitors |
Add competitor |
GET |
/api/competitors/:id |
Competitor details |
PUT |
/api/competitors/:id |
Update competitor |
DELETE |
/api/competitors/:id |
Remove competitor |
POST |
/api/competitors/:id/check |
Trigger immediate scrape |
GET |
/api/intelligence |
Get intel cards |
PUT |
/api/intelligence/:id |
Update card (read/unread) |
POST |
/api/intelligence/read-all |
Mark all read |
POST |
/api/intelligence/:id/retry |
Retry failed CRM sync |
GET |
/api/settings |
Get settings |
POST |
/api/settings |
Save settings |
POST |
/api/settings/test-email |
Test SMTP |
GET |
/api/debug-status |
Pipeline debug info |
๐ Battlecard Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/battlecards |
List all battlecards |
GET |
/api/battlecards/:competitorId |
Get battlecard for competitor |
POST |
/api/battlecards/:competitorId/generate |
Generate / refresh battlecard |
DELETE |
/api/battlecards/:competitorId |
Delete battlecard |
๐ฎ AI Strategy Co-Pilot & War Room Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/oracle/chat |
Send message to MIRA Oracle (AI Co-Pilot) |
POST |
/api/warroom/simulate |
Run War Room "What-If" simulation |
Oracle Request Body:
{
"message": "How should we counter Competitor X's new AI feature?",
"history": [
{ "role": "user", "text": "Previous question..." },
{ "role": "assistant", "text": "Previous answer..." }
]
}War Room Request Body:
{
"move": "Drop pricing by 30% across all tiers"
}War Room Response Structure:
{
"scenario": "Drop pricing by 30% across all tiers",
"risk_score": 8,
"risk_level": "HIGH",
"market_impact_summary": "Aggressive pricing will trigger...",
"competitor_responses": [
{
"competitor_name": "Rival A",
"predicted_action": "Match pricing + launch ad blitz",
"likelihood_pct": 85,
"timeframe": "1-2 Weeks",
"threat_severity": "High"
}
],
"counter_offensive_playbook": [
{
"step": 1,
"phase": "Immediate (Days 1-7)",
"action": "Distribute battlecards to SDRs",
"details": "Equip sales team before competitors adjust messaging"
}
],
"strategic_verdict": "PROCEED WITH CAUTION"
}๐งฉ Extension Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/extension/status |
Connection check |
GET |
/api/extension/unread-count |
Unread card count (badge) |
POST |
/api/extension/add-competitor |
Register competitor from browser |
๐ Notion CRM
- Create an integration at Notion My Integrations
- Create a database with these properties:
| Property | Type |
|---|---|
| Title | Title |
| Competitor Name | Select |
| URL | URL |
| Category | Select |
| Impact Score | Number |
| Recommended Action | Text |
| Summary | Text |
| Justification | Text |
| Screenshot URL | URL |
- Connect integration to database โ
...โ Connect to - Copy Database ID from page URL
- Enter credentials in dashboard Settings
๐ Airtable CRM
- Generate a PAT with
data.records:writeat Airtable Tokens - Create a Base โ Table named Competitor Intel
- Enter Base ID, Table name, and Token in dashboard Settings
๐ฌ Slack
- Create an Incoming Webhook in your workspace
- Paste the webhook URL in dashboard Settings
- Impact Score โฅ 8 โ instant Slack alert โก
๐ง Email (SMTP)
- For Gmail: generate an App Password at security.google.com
- Configure in Settings:
smtp.gmail.com/ Port587 - Click Test SMTP Connection to verify
- Periodic digests arrive automatically ๐ฌ
| Layer | Technologies |
|---|---|
| ๐ฅ๏ธ Backend | Node.js 20, Express 4, SQLite (sqlite3), UUID |
| ๐จ Frontend | React 18, Vite 5, Tailwind CSS 3, Lucide React, PHP (SSR Dashboard) |
| ๐ PHP SDK & SSR | MiraClient.php, Server-Side Rendered Dashboard & CSV Exporter |
| ๐ธ๏ธ Scraping | Axios, Cheerio, Puppeteer (headless Chromium) |
| ๐ง AI / ML | HuggingFace Transformers (ONNX), Gemini 3.6 Flash, Qwen GGUF |
| ๐ฎ Strategy AI | MIRA Oracle (Co-Pilot), War Room Simulator (Game Theory) |
| ๐ Battlecards | LLM-powered auto-generation with CRM sync |
| ๐ Integrations | Notion SDK, Airtable REST, Slack Webhooks, Nodemailer |
| ๐งฉ Extension | Chrome Manifest V3, Service Workers |
| ๐ง Tooling | Concurrently, Nodemon, Docker |
๐ฆ MIRA โ Autonomous Competitor Intelligence Engine
โ
โโโ ๐ php/ # Complete PHP Subsystem & Intelligence Portal
โ โโโ ๐ src/
โ โ โโโ ๐ Console/ # PHP CLI Command Runners
โ โ โ โโโ MiraCliCommand.php
โ โ โโโ ๐ Core/ # Configuration & Environment Manager
โ โ โ โโโ Config.php
โ โ โโโ ๐ Services/ # War Room Simulator & Battlecard Services
โ โ โโโ BattlecardService.php
โ โ โโโ WarRoomSimulator.php
โ โโโ ๐ tests/ # PHP Subsystem Unit Test Suite
โ โ โโโ MiraClientTest.php
โ โโโ MiraClient.php # Object-Oriented PHP SDK API Client
โ โโโ mira.php # Executable PHP CLI tool
โ โโโ index.php # Server-Side Rendered PHP Dashboard
โ โโโ export.php # PHP CSV/JSON Intelligence Exporter
โ โโโ composer.json # PSR-4 Package Manifest
โ โโโ README.md # PHP Subsystem Documentation
โ
โโโ ๐ client/ # React + Vite + Tailwind CSS dashboard
โ โโโ src/
โ โ โโโ App.jsx # Root dashboard application (all views)
โ โ โโโ index.css # Global + Tailwind styles
โ โ โโโ main.jsx # React entry point
โ โ โโโ components/
โ โ โโโ BattlecardsView.jsx # ๐ Auto-generated battlecards UI
โ โ โโโ CommandPalette.jsx # ๐ Cmd+K global search & quick actions
โ โ โโโ Sidebar.jsx # ๐ฑ Navigation sidebar
โ โ โโโ SkeletonLoader.jsx # ๐ Loading state placeholders
โ โ โโโ StrategyCopilotModal.jsx # ๐ฎ MIRA Oracle AI chat modal
โ โ โโโ TopBar.jsx # ๐ Top navigation bar
โ โ โโโ VisualDiffModal.jsx # ๐๏ธ Side-by-side content diff viewer
โ โ โโโ WarRoomView.jsx # โ๏ธ War Room scenario simulator
โ โโโ index.html
โ โโโ tailwind.config.js # Tailwind theme configuration
โ โโโ vite.config.js # Vite config with API proxy to :3000
โ
โโโ ๐ server/ # Node.js + Express backend
โ โโโ src/
โ โโโ index.js # Express server, routes, scheduler
โ โโโ scraper.js # Double-engine scraper (Axios + Puppeteer)
โ โโโ detector.js # Semantic change detection (ONNX)
โ โโโ llm.js # LLM inference + Oracle + War Room + Battlecards
โ โโโ crm.js # Notion & Airtable CRM adapter
โ โโโ queue.js # Sequential processing queue
โ โโโ slack.js # Slack webhook alerts
โ โโโ mailer.js # SMTP email digest
โ โโโ enrichment.js # DNS & header enrichment
โ โโโ db.js # SQLite database layer
โ โโโ verify-test.js # Integration tests
โ
โโโ ๐ extension/ # Chrome Extension (MV3)
โ โโโ manifest.json
โ โโโ popup.html / popup.js # One-click competitor registration
โ โโโ options.html / options.js # Server URL & API key config
โ โโโ background.js # Badge polling service worker
โ โโโ icon*.png # Icons (16, 48, 128)
โ
โโโ ๐ docs/ # Documentation & screenshots
โ โโโ images/
โ โโโ railway_deployment_guide.md
โ โโโ walkthrough.md
โโโ data_exporter.py # CSV/Markdown export utility
โโโ Dockerfile # Production container (Node 20 + Chrome)
โโโ package.json # Workspace orchestrator
โโโ .env.example # Environment template
The Dockerfile installs Google Chrome Stable, downloads ONNX models, builds the Vite client, and starts Express โ all automatically.
- Create a project on Railway
- Link your GitHub repo
- Set env vars:
PORT=3000,NODE_ENV=production - Deploy ๐
All integration credentials (Gemini, Slack, Notion, etc.) are configured via the dashboard Settings after deploy โ no extra env vars needed.
docker build -t mira .
docker run -p 3000:3000 --env-file .env mira| Issue | Details |
|---|---|
| โณ Cold Start | First run downloads models (~90 MB ONNX + ~382 MB GGUF). Cached after. |
| ๐ค Anti-Bot | Some sites block headless scrapers โ graceful Axios fallback. |
| ๐ Sequential Queue | One-at-a-time processing to stay under 512 MB RAM. |
| ๐ Rate Limits | Gemini may throttle โ auto-fallback to GGUF โ heuristics. |
| ๐ฎ Oracle Fallback | Without Gemini key, Oracle provides data-driven reports (not conversational AI). |
| โ๏ธ War Room Fallback | Without Gemini key, simulations use deterministic rule-based modeling. |
- Fork the repository
- Branch โ
git checkout -b feature/your-feature - Commit โ
git commit -m 'Add your feature' - Push โ
git push origin feature/your-feature - PR โ Open a Pull Request
Please ensure npm test passes before submitting.
Licensed under the MIT License โ see LICENSE for details.
