An application for competitive analysis and intelligence gathering, featuring competitor discovery, feature comparison, funding analysis, and automated weekly digest subscriptions.
- Competitor Discovery: Find competitors using Perplexity Sonar API
- Feature Analysis: Extract and compare competitor features with contextual insights
- Funding Intelligence: Track competitor funding rounds and investment data
- Detailed Analysis: Deep 1v1 competitive analysis with product comparison, pricing insights, and sales battlecards
- Weekly Digest: Automated email subscriptions for competitive intelligence updates
- Modern Frontend: React-based UI with comprehensive analysis tools
- Python 3.11+
- uv package manager
# Clone and navigate to project
git clone <repository-url>
cd pplx-hackathon
# Create virtual environment and install dependencies
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt
# Run the application
python -m app.main# Navigate to frontend and install dependencies
cd frontend
npm install
# Start development server
npm run devAccess the application:
- Backend API: http://localhost:8000
- Frontend UI: http://localhost:5173
- API Documentation: http://localhost:8000/docs
Create a .env file with the following required variables:
# Required
SONAR_API_KEY=your_sonar_api_key_here
# Database (SQLite for dev, PostgreSQL for production)
DATABASE_URL=sqlite:///./weekly_digest.db
# Email Configuration (for weekly digest)
EMAIL_SMTP_SERVER=smtp.gmail.com
EMAIL_SMTP_PORT=587
EMAIL_SMTP_USERNAME=your_email@gmail.com
EMAIL_SMTP_PASSWORD=your_app_password
EMAIL_FROM_ADDRESS=your_email@gmail.com
# Security
JWT_SECRET=your_jwt_secret_key_min_32_chars
# Scheduler Configuration
DIGEST_SCHEDULE_DAY=6 # 0=Monday, 6=Sunday
DIGEST_SCHEDULE_HOUR=9 # 24-hour format
DIGEST_SCHEDULE_TIMEZONE=UTCRivalScope leverages the Perplexity Sonar API to power its competitive intelligence capabilities. Sonar provides real-time web search and analysis capabilities that enable deep competitive insights.
1. Competitor Discovery
- Searches the web to identify companies in similar domains
- Analyzes business models and market positioning
- Returns competitor names with verified website URLs
2. Feature Extraction & Analysis
- Scrapes and analyzes competitor websites for product features
- Provides contextual feature comparison when user company is specified
- Generates citations and source URLs for transparency
3. Funding Intelligence
- Searches for recent funding announcements and press releases
- Extracts funding round details (Series A/B/C, amounts, dates)
- Provides citation URLs to source articles
4. Deep Competitive Research
- Uses Sonar's Deep Research capability for comprehensive 1v1 analysis
- Generates product comparisons, pricing insights, and sales battlecards
- Analyzes user preferences and market sentiment
5. Weekly Deep Research Digest
- Generates weekly summary of key developments and changes using Sonar Deep research model
- Includes feature updates, pricing changes, and market movements
- Provides actionable insights and competitive recommendations
- Delivers findings via scheduled email digest
- Navigate to https://rivalscope.netlify.app/
- Enter your company name and website URL
- Click "Find Competitors" to discover similar companies
- View analysis results including:
- Competitor list with websites
- Feature comparison matrix
- Funding information
- Detailed competitive insights
pplx-hackathon/
├── app/ # FastAPI Backend
│ ├── main.py # Application entry point
│ ├── config.py # Configuration management
│ ├── database.py # Database setup and session management
│ ├── models/ # Pydantic and SQLAlchemy models
│ ├── services/ # Business logic and external API clients
│ ├── routes/ # API endpoint definitions
│ └── utils/ # Helper functions and utilities
├── frontend/ # React Frontend
│ ├── src/
│ │ ├── pages/ # Page components
│ │ ├── components/ # Reusable UI components
│ │ └── services/ # Frontend API services
│ └── package.json
├── requirements.txt # Python dependencies
When providing your company information, the analysis becomes more targeted:
- Generic: "AI-powered recommendations"
- Contextual: "Large language model API (competing with OpenAI's GPT models)"
- Automated competitive intelligence emails
- Rate-limited API compliance (5 requests/minute)
- Concurrent processing for multiple competitors
- Deep research integration for comprehensive insights
- Database: PostgreSQL on Render (free tier)
- Backend: FastAPI on Render with environment variables
- Frontend: React on Netlify with API proxy
DATABASE_URL=postgresql://username:password@host:port/database
SONAR_API_KEY=your_production_api_key
# ... other production configsThe application uses:
- FastAPI with async support and automatic documentation
- React with modern hooks and routing
- SQLAlchemy with async database operations
- APScheduler for automated weekly digest cron jobs
- Perplexity Sonar API for competitive intelligence
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc