Skip to content

guptatavish/Sentimizer

Repository files navigation

Sentimizer: Company News Sentiment Analyzer

Sentimizer is a powerful web application that analyzes news articles related to companies and provides sentiment analysis. It helps users understand the overall sentiment in media coverage of specific companies, delivering valuable insights through clear visualizations and detailed reports.

Features

  • Company News Analysis: Search for any company name to analyze recent news coverage
  • Sentiment Analysis: Uses AI to determine if news articles are positive, negative, or neutral
  • Interactive Visualizations: View sentiment distribution in easy-to-understand charts and graphs
  • Detailed Reports: Get comprehensive summaries and insights from news data
  • Export Options: Download analysis reports in PDF or Markdown formats
  • Responsive Design: Works seamlessly on desktop and mobile devices
  • Dark/Light Theme: Choose between light and dark themes for comfortable viewing

Getting Started

Prerequisites

To run Sentimizer locally, you'll need:

  • Node.js (v18 or later)
  • npm or yarn
  • API keys for the following services:

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/sentimizer.git
    cd sentimizer
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Start the development server:

    npm run dev
    # or
    yarn dev
  4. Open your browser and navigate to http://localhost:5173

  5. Configure your API keys by clicking the "API Settings" button in the top-right corner of the application

Building for Production

To create a production build:

npm run build
# or
yarn build

The built files will be in the dist directory, ready to be deployed to any static hosting service.

How It Works

  1. Search for a Company: Enter a company name in the search bar
  2. Fetch News Articles: The app retrieves recent news articles about the company using MediaStack API
  3. Analyze Sentiment: Each article is processed through AI to determine sentiment (positive, neutral, or negative)
  4. Generate Summary: AI creates a comprehensive summary of the news coverage and sentiment
  5. Visualize Results: Interactive charts display sentiment distribution and trends
  6. Export Reports: Download the analysis in PDF or Markdown format for sharing

API Configuration

Sentimizer requires API keys to function. These are stored locally in your browser and are never sent to any server:

  • MediaStack API: Used to fetch news articles about companies
  • OpenAI API: Used for sentiment analysis of news articles
  • Perplexity API (optional): Used to generate enhanced summaries and insights

If the Perplexity API key is provided, the app will use it to fetch additional insights and generate more detailed summaries. Otherwise, it will rely solely on MediaStack and OpenAI APIs.

Core Technologies

Sentimizer is built with modern web technologies:

  • React: Frontend library for building the user interface
  • TypeScript: Typed JavaScript for improved development experience
  • Tailwind CSS: Utility-first CSS framework for styling
  • Shadcn UI: Component library for consistent design
  • Framer Motion: Animation library for smooth transitions
  • Recharts: Charting library for data visualization
  • React Router: Handling navigation and routing
  • Tanstack Query: Data fetching and state management
  • HTML2PDF: PDF generation for exporting reports

Architecture

The application follows a component-based architecture with these key parts:

  • API Layer: Handles external API communication and data processing
  • Core Components: Reusable UI elements that make up the interface
  • State Management: Managing application state and data flow
  • Utilities: Helper functions and type definitions

Contributing

Contributions to Sentimizer are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages