A full-stack web application that analyzes sentiment of posts (skeets) on Bluesky in real-time. The platform uses advanced AI models to classify public sentiment on any topic of interest.
Bluesk is a sentiment analysis tool built for the Bluesky social network. It aggregates posts about a specific topic and uses machine learning to determine whether the overall sentiment is positive, neutral, or negative. Perfect for tracking public opinion, monitoring brand sentiment, or analyzing trending topics.
- 🔍 Real-time Post Collection - Fetch relevant skeets from Bluesky using search queries
- 🤖 AI-Powered Sentiment Analysis - Classify posts using
cardiffnlp/twitter-roberta-base-sentimentmodel - 📊 Visual Analytics - Interactive charts and visualizations of sentiment distribution
- 📥 Data Export - Download analysis results in multiple formats
- 🎨 Modern UI - Beautiful, responsive interface built with Next.js and Tailwind CSS
- ⚡ Fast Performance - Optimized backend with FastAPI and efficient text processing
- Framework: Next.js 15 with React 19
- Styling: Tailwind CSS with custom animations
- Components: Radix UI component library
- Visualization: Recharts
- Animation: Framer Motion
- Form Handling: React Hook Form with Zod validation
- UI Library: shadcn/ui
- API: FastAPI (Python)
- Bluesky Integration: atproto library
- NLP: Hugging Face Transformers (
cardiffnlp/twitter-roberta-base-sentiment) - CORS: Enabled for frontend communication
bluesk/
├── app/ # Next.js app directory
│ ├── page.tsx # Home/landing page
│ ├── layout.tsx # Root layout
│ ├── globals.css # Global styles
│ ├── search/ # Search page
│ └── results/ # Results page
├── components/ # Reusable React components
├── lib/ # Utility functions
├── hooks/ # Custom React hooks
├── main.py # FastAPI backend server
├── package.json # Node dependencies
├── tailwind.config.js # Tailwind configuration
├── tsconfig.json # TypeScript configuration
└── next.config.mjs # Next.js configuration
- Node.js 18+
- Python 3.9+
- Bluesky account credentials
npm install
# or
npm install --legacy-peer-depspip install fastapi transformers atproto python-dotenvCreate a .env file in the root directory:
BSKY_USERNAME=your_bluesky_username
BSKY_PASSWORD=your_bluesky_passwordStart the frontend (Next.js):
npm run devThe frontend will be available at http://localhost:3000
Start the backend (FastAPI):
python main.pyThe API will be available at http://localhost:8000
npm run build
npm start- Search - User enters a topic of interest on the search page
- Collection - The backend queries Bluesky's API for up to 100 posts matching the search term
- Analysis - Each post is processed and analyzed using the sentiment analysis model
- Text is cleaned (URLs, mentions, special characters removed)
- Sentiment scores are calculated (positive, neutral, negative)
- Dominant sentiment is determined
- Visualization - Results are displayed with:
- Sentiment distribution charts
- Individual post sentiment tags
- Engagement metrics (likes, reposts)
- Sortable/filterable post list
Analyzes posts for a given search term.
Query Parameters:
term(string, required) - The search term to analyze
Response:
{
"data": [
{
"id": "post_uri",
"text": "post content",
"sentiment": {
"sentiment": "positive|neutral|negative",
"score": 0.95
},
"created_at": "2024-01-01T12:00:00Z",
"likes": 42,
"retweets": 10
}
]
}MIT License - see LICENSE file for details
Contributions are welcome! Please feel free to submit a Pull Request.
- Advanced filtering options (date range, engagement filters)
- Historical sentiment tracking
- Custom model training
- Multi-language support
- Real-time sentiment streaming
- User authentication and saved searches