|
| 1 | +# Trend Finder 🔦 |
| 2 | + |
| 3 | +**Stay on top of trending topics on social media — all in one place.** |
| 4 | + |
| 5 | +Trend Finder collects and analyzes posts from key influencers, then sends a Slack or Discord notification when it detects new trends or product launches. This has been a complete game-changer for the Firecrawl marketing team by: |
| 6 | + |
| 7 | +- **Saving time** normally spent manually searching social channels |
| 8 | +- **Keeping you informed** of relevant, real-time conversations |
| 9 | +- **Enabling rapid response** to new opportunities or emerging industry shifts |
| 10 | + |
| 11 | +_Spend less time hunting for trends and more time creating impactful campaigns._ |
| 12 | + |
| 13 | +## Watch the Demo & Tutorial video |
| 14 | + |
| 15 | +[](https://www.youtube.com/watch?v=puimQSun92g) |
| 16 | + |
| 17 | +Learn how to set up Trend Finder and start monitoring trends in this video! |
| 18 | + |
| 19 | +## How it Works |
| 20 | + |
| 21 | +1. **Data Collection** 📥 |
| 22 | + - Monitors selected influencers' posts on Twitter/X using the X API (Warning: the X API free plan is rate limited to only monitor 1 X account every 15 min) |
| 23 | + - Monitors websites for new releases and news with Firecrawl's /extract |
| 24 | + - Runs on a scheduled basis using cron jobs |
| 25 | + |
| 26 | +2. **AI Analysis** 🧠 |
| 27 | + - Processes collected content through Together AI |
| 28 | + - Identifies emerging trends, releases, and news. |
| 29 | + - Analyzes sentiment and relevance |
| 30 | + |
| 31 | +3. **Notification System** 📢 |
| 32 | + - When significant trends are detected, sends Slack or Discord notifications based on cron job setup |
| 33 | + - Provides context about the trend and its sources |
| 34 | + - Enables quick response to emerging opportunities |
| 35 | + |
| 36 | +## Features |
| 37 | + |
| 38 | +- 🤖 AI-powered trend analysis using Together AI |
| 39 | +- 📱 Social media monitoring (Twitter/X integration) |
| 40 | +- 🔍 Website monitoring with Firecrawl |
| 41 | +- 💬 Instant Slack or Discord notifications |
| 42 | +- ⏱️ Scheduled monitoring using cron jobs |
| 43 | + |
| 44 | +## Prerequisites |
| 45 | + |
| 46 | +- Node.js (v14 or higher) |
| 47 | +- npm or yarn |
| 48 | +- Docker |
| 49 | +- Docker Compose |
| 50 | +- Slack workspace with webhook permissions |
| 51 | +- API keys for required services |
| 52 | + |
| 53 | +## Environment Variables |
| 54 | + |
| 55 | +Copy `.env.example` to `.env` and configure the following variables: |
| 56 | + |
| 57 | +``` |
| 58 | +# Optional: API key from Together AI for trend analysis (https://www.together.ai/) |
| 59 | +TOGETHER_API_KEY=your_together_api_key_here |
| 60 | +
|
| 61 | +# Optional: API key from DeepSeek for trend analysis (https://deepseek.com/) |
| 62 | +DEEPSEEK_API_KEY= |
| 63 | +# Optional: API key from Anthropic for trend analysis (https://www.anthropic.com/claude) |
| 64 | +ANTRHOPIC_API_KEY= |
| 65 | +
|
| 66 | +# Optional: API key from OpenAI for trend analysis (https://openai.com/) |
| 67 | +OPENAI_API_KEY= |
| 68 | +
|
| 69 | +# Optional: API key from Mistral for trend analysis (https://mistral.ai/) |
| 70 | +MISTRAL_API_KEY= |
| 71 | +
|
| 72 | +# Required if monitoring web pages (https://www.firecrawl.dev/) |
| 73 | +FIRECRAWL_API_KEY=your_firecrawl_api_key_here |
| 74 | +
|
| 75 | +# Required if monitoring Twitter/X trends (https://developer.x.com/) |
| 76 | +X_API_BEARER_TOKEN=your_twitter_api_bearer_token_here |
| 77 | +
|
| 78 | +# Notification driver. Supported drivers: "slack", "discord" |
| 79 | +NOTIFICATION_DRIVER=discord |
| 80 | +
|
| 81 | +# Required (if NOTIFICATION_DRIVER is "slack"): Incoming Webhook URL from Slack for notifications |
| 82 | +SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL |
| 83 | +
|
| 84 | +# Required (if NOTIFICATION_DRIVER is "discord"): Incoming Webhook URL from Discord for notifications |
| 85 | +DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/WEBHOOK/URL |
| 86 | +``` |
| 87 | + |
| 88 | +## Getting Started |
| 89 | + |
| 90 | +1. **Clone the repository:** |
| 91 | + ```bash |
| 92 | + git clone [repository-url] |
| 93 | + cd trend-finder |
| 94 | + ``` |
| 95 | + |
| 96 | +2. **Install dependencies:** |
| 97 | + ```bash |
| 98 | + npm install |
| 99 | + ``` |
| 100 | + |
| 101 | +3. **Configure environment variables:** |
| 102 | + ```bash |
| 103 | + cp .env.example .env |
| 104 | + # Edit .env with your configuration |
| 105 | + ``` |
| 106 | + |
| 107 | +4. **Run the application:** |
| 108 | + ```bash |
| 109 | + # Development mode with hot reloading |
| 110 | + npm run start |
| 111 | + |
| 112 | + # Build for production |
| 113 | + npm run build |
| 114 | + ``` |
| 115 | + |
| 116 | +## Using Docker |
| 117 | + |
| 118 | +1. **Build the Docker image:** |
| 119 | + ```bash |
| 120 | + docker build -t trend-finder . |
| 121 | + ``` |
| 122 | + |
| 123 | +2. **Run the Docker container:** |
| 124 | + ```bash |
| 125 | + docker run -d -p 3000:3000 --env-file .env trend-finder |
| 126 | + ``` |
| 127 | + |
| 128 | +## Using Docker Compose |
| 129 | + |
| 130 | +1. **Start the application with Docker Compose:** |
| 131 | + ```bash |
| 132 | + docker-compose up --build -d |
| 133 | + ``` |
| 134 | + |
| 135 | +2. **Stop the application with Docker Compose:** |
| 136 | + ```bash |
| 137 | + docker-compose down |
| 138 | + ``` |
| 139 | + |
| 140 | +## Project Structure |
| 141 | + |
| 142 | +``` |
| 143 | +trend-finder/ |
| 144 | +├── src/ |
| 145 | +│ ├── controllers/ # Request handlers |
| 146 | +│ ├── services/ # Business logic |
| 147 | +│ └── index.ts # Application entry point |
| 148 | +├── .env.example # Environment variables template |
| 149 | +├── package.json # Dependencies and scripts |
| 150 | +└── tsconfig.json # TypeScript configuration |
| 151 | +``` |
| 152 | + |
| 153 | +## Contributing |
| 154 | + |
| 155 | +1. Fork the repository |
| 156 | +2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
| 157 | +3. Commit your changes (`git commit -m 'Add some amazing feature'`) |
| 158 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 159 | +5. Open a Pull Request |
0 commit comments