How bharath-541/social_media_insights works
Project type and purpose
• This is a data-pipeline project that fetches Instagram post metrics via the Instagram Graph API, persists them in AstraDB, and then runs analytical flows using Langflow integrated with the Google Gemini API.
• Key use case: ETL of social-media performance data and AI-driven analysis of engagement trends.
File structure
• Top-level files:
• InstaGetData.py – the ETL script
• instagram_data.csv – output of the ETL step
• Insta_Insights.json – (possibly saved API response or config)
• README.md – project overview
• Pre-Hackathon Assignment_ Social Media Performance Analysis.pdf – documentation/assignment specification
• No frontend/backend separation in code; the architecture consists of an extraction component (Python script), a storage layer (AstraDB), and a processing layer (Langflow + Google Gemini).
README for additional insights
• The README describes three major steps:
1. Instagram Graph API extraction via Python + OAuth token
2. CSV creation + upload to AstraDB
3. Langflow pipeline that reads from AstraDB, calls Google Gemini, and renders results
Main components
a. Instagram Graph API (External Service)
b. ETL Script (InstaGetData.py)
c. Data Artifacts (CSV file, JSON file)
d. AstraDB (Cassandra-compatible cloud database)
e. Langflow Application (Pipeline definition and runtime)
f. Google Gemini API (External LLM/AI service)
g. Langflow Playground / End-user Interface
Relationships and interactions
• InstaGetData.py → calls → Instagram Graph API → returns → JSON data
• InstaGetData.py → writes → instagram_data.csv
• InstaGetData.py → uploads → CSV → AstraDB
• Langflow → reads → data from AstraDB (AstraDB Tool node)
• Langflow → sends data → Google Gemini API → receives → AI-driven insights
• Langflow Playground → displays → insights to user
Architectural patterns & design principles
• ETL pipeline for ingestion and persistence
• Separation of concerns: extraction layer, storage layer, processing/analysis layer, and presentation layer
• Use of managed external services (AstraDB, Google Gemini API) to minimize operational overhead
• Declarative flow composition via Langflow as a low-code orchestration layer