Skip to content

Commit

Permalink
Enhance README with detailed feature descriptions, tech stack updates…
Browse files Browse the repository at this point in the history
…, and improved setup instructions
  • Loading branch information
zoharbabin committed Dec 25, 2024
1 parent e1b168c commit 99b5a38
Showing 1 changed file with 81 additions and 37 deletions.
118 changes: 81 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,45 @@ This was also an experiement of writing an entire project where:

## Features 🌟

- **Interactive Timeline**: Visualize chat activity over time
- **Word Cloud**: See the most frequently used words in your conversations
- **Top Contributors**: Identify the most active participants
- **Emoji Analysis**: Track the most popular emojis
- **AI-Powered Insights**: Get memorable moments and context-aware holiday greetings using Claude AI
- **Festive UI**: Enjoy snow effects and holiday-themed animations
- **Real-time Analysis**: Process and visualize chat data instantly
- **Interactive Timeline**: Visualize chat activity patterns over time with clickable data points
- **Floating Word Cloud**: Interactive visualization of most used words with popularity counts
- **Sentiment Analysis**: Track group mood over time with AI-powered sentiment scoring
- **Top Contributors**: Identify the most active participants with message counts
- **Emoji Analysis**: Track and visualize the most popular emojis used
- **Viral Messages**: Detect and showcase messages that sparked the most engagement
- **Shared Links**: Track and analyze the most engaging shared links with context
- **AI-Powered Insights**:
- Memorable moments detection
- Context-aware holiday greetings
- Custom chat poems based on group dynamics
- Popular topics analysis
- **Festive UI**: Snow effects, confetti animations, and holiday-themed design
- **Real-time Analysis**: Instant processing and visualization of chat data
- **Responsive Design**: Works beautifully on both desktop and mobile
- **Smart Caching**: Efficient caching system for faster repeated analyses

## Tech Stack 🛠

- **Backend**: FastAPI (Python)
- **Frontend**: HTML, JavaScript, Tailwind CSS
- **AI/ML**: Claude AI via AWS Bedrock
- **Visualization**: Chart.js, D3.js
- **Container**: Docker support
- **AI/ML**:
- Claude AI via AWS Bedrock for insights
- Parallel sentiment analysis processing
- Smart message batching
- **Visualization**:
- Chart.js for timelines and graphs
- Custom interactive word cloud implementation
- **Performance**:
- Caching system with MD5 hashing
- Parallel processing for sentiment analysis
- Optimized message parsing
- **Dependencies**: See requirements.txt for full list

## Prerequisites 📋

- Python 3.9+
- AWS Account with Bedrock access
- AWS credentials (access key and secret key)
- AWS credentials configured
- Node.js (optional, for development)

## Setup 🚀
Expand All @@ -56,10 +72,12 @@ source holyvenv/bin/activate # On Windows: holyvenv\Scripts\activate
pip install -r requirements.txt
```

4. Create a .env file with your AWS credentials:
4. Create a .env file with your credentials:
```env
AWS_ACCESS_KEY_ID=your_access_key
AWS_SECRET_ACCESS_KEY=your_secret_key
SENTIMENT_MODEL=anthropic.claude-3-sonnet-20240229-v1:0
CHAT_INSIGHTS_MODEL=anthropic.claude-3-sonnet-20240229-v1:0
```

5. Run the application:
Expand All @@ -78,7 +96,12 @@ docker build -t whatsapp-analyzer .

2. Run the container:
```bash
docker run -p 8000:8000 -e AWS_ACCESS_KEY_ID=your_access_key -e AWS_SECRET_ACCESS_KEY=your_secret_key whatsapp-analyzer
docker run -p 8000:8000 \
-e AWS_ACCESS_KEY_ID=your_access_key \
-e AWS_SECRET_ACCESS_KEY=your_secret_key \
-e SENTIMENT_MODEL=your_model \
-e CHAT_INSIGHTS_MODEL=your_model \
whatsapp-analyzer
```

## Usage 📱
Expand All @@ -92,43 +115,60 @@ docker run -p 8000:8000 -e AWS_ACCESS_KEY_ID=your_access_key -e AWS_SECRET_ACCES
2. Upload the exported .txt file to the application

3. View your personalized chat analysis with:
- Activity timeline
- Word cloud
- Top contributors
- Emoji statistics
- AI-generated memorable moments
- Interactive activity timeline with clickable data points
- Floating word cloud with popularity counts
- Sentiment analysis timeline showing group mood
- Top contributors and their message counts
- Most used emoji statistics
- AI-detected memorable moments
- Viral messages with engagement metrics
- Popular shared links with context
- Custom holiday greeting
- Group chat poem

## Project Structure 📁

```
holiday-ai-hackerspace/
├── main.py # FastAPI application and backend logic
├── requirements.txt # Python dependencies
├── Dockerfile # Container configuration
├── .env # Environment variables (create this)
├── .gitignore # Git ignore rules
├── static/ # Frontend assets
│ ├── index.html # Main HTML file
│ └── app.js # Frontend JavaScript
└── cache/ # Cache directory for API responses
├── main.py # FastAPI application and backend logic
├── requirements.txt # Python dependencies
├── Dockerfile # Container configuration
├── .env # Environment variables (create this)
├── .gitignore # Git ignore rules
├── static/ # Static frontend assets
│ ├── index.html # Main HTML file
│ ├── app.js # Frontend JavaScript
│ └── word-cloud.js # Word cloud implementation
├── gh_static_front/ # GitHub static frontend
│ ├── index.html # Static HTML file
│ ├── app.js # Frontend logic
│ ├── word-cloud.js # Word cloud visualization
│ └── analyzed_data/ # Pre-analyzed chat data
└── cache/ # Cache directory for API responses
```

## Development 🔧

### Backend (main.py)
- FastAPI application with CORS support
- Structured logging with color formatting
- Error handling and input validation
- Caching for API responses
- WhatsApp chat parsing with multiple timestamp formats
- Integration with AWS Bedrock for AI analysis

### Frontend (static/)
- Efficient chat parsing with multiple timestamp formats
- Parallel sentiment analysis processing
- Smart message batching for AI analysis
- Caching system with MD5 hashing
- Comprehensive error handling
- Viral message detection algorithm
- Shared link analysis

### Frontend (static/ & gh_static_front/)
- Responsive design with Tailwind CSS
- Interactive visualizations with Chart.js and D3.js
- Interactive visualizations:
- Activity timeline with clickable points
- Floating word cloud with hover effects
- Sentiment analysis graph
- Engagement metrics displays
- Real-time data processing
- Festive animations and effects
- Festive animations (snow, confetti)
- Error handling and loading states

## Contributing 🤝
Expand All @@ -149,9 +189,12 @@ holiday-ai-hackerspace/

Future improvements could include:

1. [ ] Support for more chat export formats (Facebook Messanger, Discord, etc.)
1. [ ] Support for more chat export formats (Facebook Messenger, Discord, etc.)
2. [ ] Export reports as PDF
3. [ ] More AI-powered insights and additional visualization types
4. [ ] Enhanced sentiment analysis with emotion detection
5. [ ] Topic clustering and trend analysis
6. [ ] Custom theme support

## License 📄

Expand All @@ -160,8 +203,9 @@ This project is licensed under the MIT License - see the LICENSE file for detail
## Acknowledgments 💝

- Built with Roo-Cline, ChatGPT and @zoharbabin
- Visualization libraries: Chart.js and D3.js
- Chart.js for data visualization
- Tailwind CSS for styling
- AWS Bedrock for AI capabilities

---

Expand Down

0 comments on commit 99b5a38

Please sign in to comment.