# ajinkya-75/tweets_sentimental_analysis architecture

> Architecture diagram of the GitHub repository ajinkya-75/tweets_sentimental_analysis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ajinkya-75/tweets_sentimental_analysis
- Repository: https://github.com/ajinkya-75/tweets_sentimental_analysis

## Overview

##### Main Components

a) External Systems:
- Twitter API (source of tweets)
- AWS SQS (Message Queue system, evident from SimpleQueueServiceSample.java)

b) Core Components:
- Tweet Analyzer Service (main component)
- NLP Processing Engine (indicated by NLPPropFile.properties)

##### Architecture Representation

**[Input Queue] → [Tweet Analyzer Service] → [Output Queue]**
- ↑                    ↓
**[Twitter API]        [NLP Engine]**

Key Elements to Include:

##### Message Flow
- Tweet data flow from input queue to analyzer
- Analyzed data flow to output queue
- NLP processing flow within the service

##### Component Details
- Container Boundary (Docker):

- Service Components:
- FetchAnalyzeComponent (main processing unit)
- Analyzer (sentiment analysis logic)
- NLP Engine (natural language processing)

##### Integration Points
- AWS credentials connection
- Queue interfaces
- Configuration points

##### Technical Details to Note

A technical specifications section showing:
- Java-based implementation
- Docker containerization
- AWS SQS integration
- Multi-threading capability (NO_THREADS environment variable)

##### The sentiment analysis pipeline

Remember to maintain a balance between showing the component's independence (as a microservice) while indicating its place in the larger tweet sentiment analysis system.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph External
        TW[Twitter API]
        SQS1[AWS SQS Input Queue]
        SQS2[AWS SQS Output Queue]
    end

    subgraph "Docker Container"
        direction TB
        subgraph "Tweet Analyzer Service"
            direction TB
            APP[AnalyzerApplication]:::app
            FAC[FetchAnalyzeComponent]:::core
            ANA[Analyzer]:::core
            NLP[NLP Engine]:::core
            CONF[NLP Configuration]:::config
        end
    end

    %% External Connections
    TW --> SQS1
    SQS1 --> FAC
    FAC --> SQS2

    %% Internal Connections
    APP --> FAC
    FAC --> ANA
    ANA --> NLP
    NLP --> CONF

    %% Styling
    classDef external fill:#1E88E5,color:white
    classDef queue fill:#FDD835,color:black
    classDef app fill:#43A047,color:white
    classDef core fill:#4CAF50,color:white
    classDef config fill:#FF7043,color:white

    class TW external
    class SQS1,SQS2 queue
    class APP,FAC,ANA,NLP core
    class CONF config

    %% Click Events
    click APP "https://github.com/Ajinkya-75/Tweets_sentimental_analysis/blob/master/src/main/java/org/tweet/sentiment/analyis/analyzer/AnalyzerApplication.java"
    click FAC "https://github.com/Ajinkya-75/Tweets_sentimental_analysis/blob/master/src/main/java/org/tweet/sentiment/analyis/analyzer/FetchAnalyzeComponent.java"
    click ANA "https://github.com/Ajinkya-75/Tweets_sentimental_analysis/blob/master/src/main/java/org/tweet/sentiment/analyis/analyzer/Analyzer.java"
    click CONF "https://github.com/Ajinkya-75/Tweets_sentimental_analysis/blob/master/src/main/resources/NLPPropFile.properties"
    click SQS1,SQS2 "https://github.com/Ajinkya-75/Tweets_sentimental_analysis/blob/master/src/test/java/org/tweet/sentiment/analysis/analyzer/SimpleQueueServiceSample.java"
```
