Skip to content

Commit e30a319

Browse files
Aparup GangulyAparup Ganguly
Aparup Ganguly
authored and
Aparup Ganguly
committed
Add mistral-small-3.1-trend-finder project
1 parent 6f7d858 commit e30a319

17 files changed

+4688
-0
lines changed

Diff for: mistral-small-3.1-trend-finder/.DS_Store

6 KB
Binary file not shown.

Diff for: mistral-small-3.1-trend-finder/.env.example

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Optional: API key from Together AI for trend analysis (https://www.together.ai/)
2+
TOGETHER_API_KEY=your_together_api_key_here
3+
4+
# Optional: API key from DeepSeek for trend analysis (https://deepseek.com/)
5+
DEEPSEEK_API_KEY=
6+
7+
# Optional: API key from OpenAI for trend analysis (https://openai.com/)
8+
OPENAI_API_KEY=
9+
10+
# Required for Claude 3.7: API key from Anthropic (https://www.anthropic.com/)
11+
ANTHROPIC_API_KEY=your_anthropic_api_key_here
12+
13+
# Required for Mistral: API key from Mistral AI (https://mistral.ai/)
14+
MISTRAL_API_KEY=your_mistral_api_key_here
15+
16+
# Required if monitoring web pages (https://www.firecrawl.dev/)
17+
FIRECRAWL_API_KEY=your_firecrawl_api_key_here
18+
19+
# Required if monitoring Twitter/X trends (https://developer.x.com/)
20+
X_API_BEARER_TOKEN=your_twitter_api_bearer_token_here
21+
22+
# Notification driver. Supported drivers: "slack", "discord"
23+
NOTIFICATION_DRIVER=discord
24+
25+
# Required (if NOTIFICATION_DRIVER is "slack"): Incoming Webhook URL from Slack for notifications
26+
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
27+
28+
# Required (if NOTIFICATION_DRIVER is "discord"): Incoming Webhook URL from Discord for notifications
29+
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/WEBHOOK/URL

Diff for: mistral-small-3.1-trend-finder/.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
.env
3+
.vercel
4+
.devcontainer.json
5+
dist

Diff for: mistral-small-3.1-trend-finder/Dockerfile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Use node:22 as the base image
2+
FROM node:22
3+
4+
# Set the working directory
5+
WORKDIR /app
6+
7+
# Copy package.json and package-lock.json
8+
COPY package*.json ./
9+
10+
# Install dependencies
11+
RUN npm install
12+
13+
# Copy the application code
14+
COPY . .
15+
16+
# Build the application
17+
RUN npm run build
18+
19+
# Set the command to run the application
20+
CMD ["npm", "start"]

Diff for: mistral-small-3.1-trend-finder/LICENSE

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Copyright 2025 Eric Ciarla
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8+

Diff for: mistral-small-3.1-trend-finder/README.md

+159
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
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+
[![Thumbnail](https://i.ytimg.com/vi/puimQSun92g/hqdefault.jpg)](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

Diff for: mistral-small-3.1-trend-finder/docker-compose.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: '3.8'
2+
3+
services:
4+
app:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
environment:
9+
- TOGETHER_API_KEY=${TOGETHER_API_KEY}
10+
- FIRECRAWL_API_KEY=${FIRECRAWL_API_KEY}
11+
- X_API_BEARER_TOKEN=${X_API_BEARER_TOKEN}
12+
- SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL}
13+
ports:
14+
- "3000:3000"

0 commit comments

Comments
 (0)