- Deployment
- Project Overview
- System Architecture
- Frontend Implementation
- Backend Implementation
- LangFlow Integration
- Technical Specifications
- API Documentation
- Data Structure
- Production URL: https://socialanalytics-client.onrender.com/
- Platform: Render
- Status: Active
- Frontend: Render Web Services
- Database: DataStax Astra DB
- AI Integration: Langflow & OpenAI
Build an analytics module that analyzes engagement data from mock social media accounts using Langflow and DataStax integration.
- DataStax Astra DB for database operations
- Langflow for workflow creation and GPT integration
- React-based frontend
- Node.js proxy backend
- OpenAI GPT integration
- Real-time social media analytics
- GPT-powered insights generation
- AI Powered Chat Bot
- Custom metric tracking
- Data visualization
- Post performance analysis
- Engagement metrics calculation
-
Landing Page
- Header with navigation
- Features showcase
- Team information
- Call-to-action elements
-
Analytics Dashboard
- Performance overview cards
- Data visualization section
- Analytics insights panel
- Data grid for detailed view
-
Proxy Server
- WebSocket connections
- Request handling
- Response streaming
- Error management
-
Data Processing
- Text splitting and chunking
- Data parsing
- Vector store implementation
- GPT integration
interface EngagementMetrics {
totalEngagement: number;
engagementRate: number;
performanceScore: number;
}
- Post Performance Chart
- Post Type Comparison
- Engagement Summary Card
- Sortable columns
- Filtering capabilities
- Pagination (50 items/page)
- Search functionality
interface DashboardState {
posts: PostData[];
dateRange: [Date, Date];
selectedPostTypes: string[];
sortBy: string;
sortOrder: 'asc' | 'desc';
currentPage: number;
filters: {
search: string;
minEngagement?: number;
maxEngagement?: number;
};
}
const express = require('express');
const http = require('http');
const WebSocket = require('ws');
const cors = require('cors');
const app = express();
const server = http.createServer(app);
const wss = new WebSocket.Server({ server });
- Unique requestId assignment
- Connection tracking
- Real-time data streaming
- Error handling
- Chat Endpoint
- Handles client requests
- Forwards to Langflow API
- Streams responses
- Error management
-
File Input
- Loads CSV data
- Path:
mock_social_media_data.csv
-
Text Processing
- Chunk size: 1000
- Overlap: 200
- Custom separators
-
Astra DB Integration
- Database:
davedb
- Collection:
engagement
- Embedding Model: Astra Vectorize
- Provider: OpenAI
- Model:
text-embedding-3-small
- Database:
-
OpenAI Integration
- Model:
gpt-4o-mini
- Temperature: 0.1
- Streaming enabled
- Model:
-
Color Palette
- Primary: #2563EB
- Secondary: #3B82F6
- Accent: #EAB308
- Background: #F8FAFC
- Text: #1E293B
-
Typography
- Headings: Inter
- Body: Roboto
- Monospace: Source Code Pro
-
Responsive Design
- Mobile: 320px - 480px
- Tablet: 481px - 768px
- Desktop: 769px+
-
Frontend
- Virtual scrolling
- Response caching
- Lazy loading
- Asset optimization
-
Backend
- Connection pooling
- Request batching
- Response streaming
- Error handling
-
Unit Testing
- Component testing
- Function testing
- State management testing
-
Integration Testing
- API endpoint testing
- WebSocket testing
- Data flow testing
-
End-to-End Testing
- User flow testing
- Performance testing
- Error handling testing
- Chat API
POST /chat
{
"input_value": string,
"requestId": string
}
- Analytics API
GET /api/posts
Query Parameters:
- startDate: ISO date string
- endDate: ISO date string
- postTypes: string[]
- page: number
- limit: number
- sort: string
- order: 'asc' | 'desc'
interface PostData {
Post_ID: string;
Post_Type: 'Reel' | 'Carousel' | 'Static Image';
Likes: number;
Shares: number;
Comments: number;
Date_Posted: string;
}
interface AnalyticsData {
totalEngagement: number;
engagementRate: number;
performanceScore: number;
postTypeDistribution: {
[key: string]: number;
};
timeSeriesData: {
date: string;
engagement: number;
postType: string;
}[];
}
This documentation provides a comprehensive overview of the Social Media Analytics Platform. For specific implementation details or clarification, please refer to the individual sections or contact the development team.