Full-stack financial news sentiment analysis platform with interactive dashboard powered by ML
PulseScope is a complete end-to-end financial news analytics platform that automatically scrapes financial news, analyzes sentiment using VADER + FinBERT, discovers topics with BERTopic, detects high-impact market events, and visualizes insights through an interactive React dashboard.
Backend (FastAPI)
- Multi-source news scraping (CoinTelegraph, CoinDesk, CryptoNews)
- Dual sentiment analysis (VADER + FinBERT transformer models)
- Automatic topic discovery (BERTopic with UMAP + HDBSCAN)
- Event impact detection (Custom scoring algorithm)
- RESTful API (17+ endpoints with full CORS support)
- PostgreSQL database (98 articles, 25 daily metrics, 12 topics)
Frontend (React + TypeScript)
- Interactive Dashboard with 5 comprehensive pages
- Real-time sentiment trends visualization
- Topic distribution analysis with meaningful labels
- High-impact events timeline with filtering
- Article explorer with search and sentiment filters
- Responsive design with smooth animations
- Python 3.13+
- PostgreSQL 16+
- Node.js 18+ and npm
- pip
# 1. Clone repository
git clone https://github.com/supremkc05/PulseScope.git
cd PulseScope
# 2. Setup Python environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 3. Install ML dependencies
pip install -r requirements.txt
# 4. Run Jupyter notebooks (in order to generate data)
jupyter notebook
# → model/scraping_data.ipynb (Phase 1: Scrape news)
# → model/cleaning_data.ipynb (Phase 2: Clean data)
# → model/sentiment_analysis.ipynb (Phase 3: Analyze sentiment)
# → model/modelling_topic.ipynb (Phase 4: Topic modeling)
# 5. Setup PostgreSQL database
createdb pulsescope
# 6. Configure backend environment
cd backend
cp .env.example .env
# Edit .env: Add DATABASE_URL, SECRET_KEY, CORS_ORIGINS
# 7. Install backend dependencies
pip install -r requirements.txt
# 8. Migrate data to database
python migrate_data.py
# 9. Start FastAPI server
uvicorn app.main:app --reload
# API runs at http://localhost:8000
# API docs at http://localhost:8000/api/v1/docs# 1. Navigate to frontend directory
cd ui
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# Edit .env: Set VITE_API_BASE_URL=http://localhost:8000/api/v1
# 4. Start development server
npm run dev
# Dashboard runs at http://localhost:5173PulseScope/
├── data/
│ ├── scrap_data/ # Raw scraped data
│ ├── topic_analyzed_data.csv # Final analyzed data
│ └── daily_impact_metrics.csv # Daily aggregations
│
├── model/ # Jupyter notebooks (ML pipeline)
│ ├── scraping_data.ipynb # BeautifulSoup web scraping
│ ├── cleaning_data.ipynb # NLTK text preprocessing
│ ├── sentiment_analysis.ipynb # VADER + FinBERT
│ └── modelling_topic.ipynb # BERTopic clustering
│
├── backend/ # FastAPI backend
│ ├── app/
│ │ ├── main.py # FastAPI application
│ │ ├── api/v1/ # REST endpoints
│ │ │ ├── sentiments.py # Sentiment endpoints
│ │ │ ├── topicss.py # Topic analysis endpoints
│ │ │ ├── enventss.py # High-impact events
│ │ │ └── articlee.py # Article CRUD
│ │ ├── models/ # SQLAlchemy models
│ │ └── schemas/ # Pydantic validators
│ ├── migrate_data.py # CSV to PostgreSQL
│ └── requirements.txt
│
├── ui/ # React frontend
│ ├── src/
│ │ ├── pages/ # Dashboard pages
│ │ │ ├── Overview.tsx # Main dashboard
│ │ │ ├── SentimentAnalysis.tsx
│ │ │ ├── TopicAnalysis.tsx
│ │ │ ├── HighImpactEvents.tsx
│ │ │ └── ArticleExplorer.tsx
│ │ ├── components/ # Reusable components
│ │ ├── services/ # API client (axios)
│ │ └── types/ # TypeScript interfaces
│ ├── public/
│ │ └── favicon.svg # Custom branding
│ └── package.json
│
└── requirements.txt # ML dependencies
Web Scraping → Text Cleaning → Sentiment Analysis → Topic Modeling → Event Detection
(BeautifulSoup) (NLTK) (VADER + FinBERT) (BERTopic) (Impact Score)
↓ ↓ ↓ ↓ ↓
Raw HTML Clean Text Sentiment Scores Topic Labels Impact Metrics
↓
PostgreSQL Database
↓
FastAPI REST API
↓
React Dashboard
Backend
| Component | Technology |
|---|---|
| API Framework | FastAPI 0.109.0 |
| Database | PostgreSQL 16 + SQLAlchemy |
| Caching | Redis |
| Sentiment | VADER + FinBERT (transformer) |
| Topics | BERTopic (SentenceTransformers + UMAP + HDBSCAN) |
| Data Processing | pandas, NumPy, scikit-learn |
Frontend
| Component | Technology |
|---|---|
| Framework | React 18.3.1 + TypeScript 5.6.2 |
| Build Tool | Vite 6.0.5 |
| HTTP Client | Axios 1.7.9 |
| Charts | Recharts 2.15.0 |
| Styling | Tailwind CSS 3.4.17 |
| Icons | Lucide React 0.469.0 |
| Animations | Framer Motion 12.0.1 |
Base URL: http://localhost:8000/api/v1
GET /sentiments/summary- Overall sentiment statisticsGET /sentiments/trends- Daily sentiment trendsGET /sentiments/distribution- Sentiment breakdown by category
GET /topics/distribution- Topic distribution with article countsGET /topics/{topic_id}- Detailed topic information with articles
GET /events/high-impact- High-impact days with filtersGET /events/impact-distribution- Event impact statistics
GET /articles/- Paginated article list with filtersGET /articles/by-source- Article count by news sourceGET /articles/{article_id}- Individual article details
API Documentation: Available at http://localhost:8000/api/v1/docs (Swagger UI)
Articles Table (98 records)
- article_id, title, content, source, url
- published_at, scraped_at
- vader_compound, vader_pos, vader_neg, vader_neu
- finbert_pos, finbert_neg, finbert_neu
- sentiment_label, topic_id
Daily Metrics Table (25 records)
- date, total_articles
- avg_vader, avg_finbert
- sentiment_distribution (JSON)
- impact_score
DATABASE_URL=postgresql://username:password@localhost:5432/pulsescope
SECRET_KEY=your-secret-key
CORS_ORIGINS=http://localhost:5173,http://localhost:3000VITE_API_BASE_URL=http://localhost:8000/api/v1supremkc05
- GitHub: @supremkc05