A financial intelligence system that monitors real-time news streams to detect market sentiment (Bullish 🚀 vs. Bearish 📉) before it reflects in stock prices. Jimmy combines the concurrency and stability of Java with the NLP capabilities of Python through a polyglot microservices architecture.
┌─────────────────────┐ POST /analyze ┌─────────────────────┐
│ THE MUSCLE │ ──────────────────────▶ │ THE BRAIN │
│ Java 17 Collector │ ◀────────────────────── │ Python Analyzer │
│ Spring Boot │ sentiment result │ FastAPI + VADER │
│ ROME + Async │ │ + FinBERT toggle │
└────────┬────────────┘ └─────────────────────┘
│
┌────▼────┐ SSE /stream ┌──────────────────────┐
│ Postgres│ │ DASHBOARD │
│ DB │ │ Real-Time Web UI │
└─────────┘ │ Chart.js + SSE │
▲ └──────────────────────┘
│ persist │
└────────────────────────────────┘
Technology: Java 17, Spring Boot, ROME, CompletableFuture, Spring Data JPA
The backbone of the system, handling high-throughput data collection with:
- Multithreading: Uses
CompletableFutureto scrape multiple RSS feeds (CoinDesk, Yahoo Finance, TechCrunch) in parallel without blocking the main thread - Resilience: Implements scheduled tasks (
@Scheduled, 10s interval) and per-feed error handling to ensure continuous uptime - Persistence: Saves every sentiment result to PostgreSQL via Spring Data JPA
- SSE Broadcasting: Streams live results to connected dashboard clients via Server-Sent Events
Technology: Python, FastAPI, VADER Sentiment, NLTK, FinBERT (optional)
The intelligence layer that processes and analyzes financial content:
- VADER: Default sentiment engine — lightweight, fast, tuned for social media and financial contexts
- FinBERT: Optional transformer-based model (
?model=finbert) for higher accuracy financial sentiment analysis usingProsusAI/finbert - Performance: Exposes a lightweight REST API optimized for fast inference times
| Compound Score | Sentiment | Emoji |
|---|---|---|
>= 0.15 |
Bullish | 🚀 |
<= -0.15 |
Bearish | 📉 |
| Between | Neutral | ⚖️ |
Technology: HTML, CSS, JavaScript, Chart.js, Server-Sent Events
- Live Feed: Sentiment cards appear in real-time as articles are analyzed
- Trend Chart: Doughnut chart showing Bullish / Bearish / Neutral distribution
- History Table: Last 50 analyzed articles pulled from PostgreSQL
- Design: Dark-mode glassmorphism UI with smooth animations
- Real-Time Monitoring: Scans financial news sources every 10 seconds
- Semantic Analysis: Detects nuance (e.g., distinguishing between "Market crash" 🔴 and "Buying the dip" 🟢)
- Persistent Storage: PostgreSQL database for historical trend analysis
- Live Dashboard: SSE-powered real-time visualization of sentiment shifts
- Dual NLP Models: VADER (default, fast) + FinBERT (opt-in, accurate)
- Microservices Orchestration: Fully Dockerized with 4 services
- Event-Driven Communication: HTTP REST + SSE between services
| Component | Technology |
|---|---|
| Collector | Java 17, Spring Boot 3, ROME, CompletableFuture |
| Analyzer | Python 3.11, FastAPI, VADER, FinBERT |
| Database | PostgreSQL 16 |
| Dashboard | HTML/CSS/JS, Chart.js, SSE |
| Orchestration | Docker, Docker Compose |
Jimmy-AI-Sentiment-Analyzer/
├── collector/ # Java Spring Boot service
│ ├── src/main/java/...
│ ├── src/main/resources/
│ │ └── application.yml
│ ├── Dockerfile
│ └── pom.xml
├── analyzer/ # Python FastAPI service
│ ├── main.py
│ ├── finbert_analyzer.py
│ ├── requirements.txt
│ └── Dockerfile
├── dashboard/ # Real-time web UI
│ ├── index.html
│ ├── styles.css
│ └── app.js
├── docker-compose.yml
└── README.md
- Docker & Docker Compose
docker-compose up --build| Service | URL |
|---|---|
| Dashboard | http://localhost:3000 |
| Collector | http://localhost:8080 |
| Analyzer | http://localhost:8000 |
| Postgres | localhost:5432 |
curl -X POST http://localhost:8000/analyze \
-H "Content-Type: application/json" \
-d '{"title": "Bitcoin Hits All-Time High", "text": "Crypto markets surge as institutional investors pile in"}'curl -X POST "http://localhost:8000/analyze?model=finbert" \
-H "Content-Type: application/json" \
-d '{"title": "Fed Signals Rate Hike", "text": "Markets tumble on hawkish Fed commentary"}'| Service | Image | Port | Depends On |
|---|---|---|---|
db |
PostgreSQL 16 | 5432 | — |
analyzer |
Python 3.11 | 8000 | — |
collector |
Java 17 | 8080 | db, analyzer |
dashboard |
nginx | 3000 | collector |
Analyze text for financial sentiment.
Request:
{
"title": "Market Rally Continues",
"text": "Stocks posted their best weekly gains in months"
}Response:
{
"title": "Market Rally Continues",
"sentiment": "Bullish",
"score": 0.6249,
"emoji": "🚀"
}Health check endpoint.
SSE endpoint — streams live sentiment results.
Returns last 50 sentiment records from the database.
- Java RSS collector with
CompletableFutureconcurrency - Python VADER sentiment analyzer
- PostgreSQL persistence
- SSE real-time dashboard
- FinBERT transformer toggle
- Kafka/RabbitMQ event streaming (future)
- Multi-language sentiment support (future)
- Alerting system for extreme sentiment shifts (future)