How nayira1205/social-media-content-analyzer works
SocialPostLens turns an uploaded social-post draft into extracted text, explainable engagement scores and suggestions, and optional AI insights. The browser validates and submits files; the API chooses PDF parsing or image OCR, runs the core analyzer, optionally requests Groq insights, and returns results for rendering. The README documents validation, error handling, and fallback behavior; sampled source confirms the main request flow. No persistence layer is described or present in the tree.
Main entry points: server.js Express API · script.js Upload and results · llmSuggestions.js AI insights client · index.html Upload page
Components 10
Browser experience
- Upload page
public/index.html - Upload and results
public/script.js
API workflow
- Express API
server.js - File middleware
server.js
Text analysis
- PDF extraction
services/pdfExtractor.js - Image OCR
services/ocrExtractor.js - Engagement scoring
services/engagementAnalyzer.js
External integration
- AI insights client
services/llmSuggestions.js
Other components
- Post author
- Groq API
Connections 17
- Post author → Upload page: uses
- Upload page → Upload and results: loads
- Upload and results → Post author: validates file
- Upload and results → Express API: uploads draft
- Express API → File middleware: processes upload
- Express API → PDF extraction: parses PDF
- Express API → Image OCR: runs OCR
- PDF extraction → Express API: returns text
- Image OCR → Express API: returns text
- Express API → Engagement scoring: scores text
- Engagement scoring → Express API: returns analysis
- Express API → AI insights client: requests insights
- AI insights client → Groq API: requests completion
- Groq API → AI insights client: returns insights
- AI insights client → Express API: returns insights
- Express API → Upload and results: returns JSON
- Upload and results → Post author: renders results