How ro-han12/neha-test works
Project Type and Purpose
• This is a full‐stack (monolithic) analytics dashboard built with Python and Streamlit.
• Purpose: extract data from YouTube (via API), store it locally in Excel, analyze comments and video stats, schedule future posts, and present results in interactive pages.
File Structure
Top‐level files & directories:
• app.py – entrypoint (Streamlit main).
• analyze_comments.py – comment‐analysis logic.
• channelDataExtraction.py / channelVideoDataExtraction.py – scripts to call YouTube Data API and persist results.
• pages/🎥_Video_Data.py, pages/📅_Post_Scheduler.py – Streamlit multipage UI.
• Excel files (all_comments.xlsx, all_video_Data.xlsx, scheduled_posts.xlsx) – local data stores.
• requirements.txt – dependencies.
• all_video_Data.xlsx – raw video metadata; all_comments.xlsx – raw comment data.
README for Insights
• Built on Streamlit (v1.42.2) and deployed as a Hugging Face Space.
• No external microservices beyond the YouTube API.
Main Components & Interactions
a. Frontend/UI Layer
• Streamlit app (app.py) loads the sidebar/nav, integrates pages folder.
• UI Pages:
– Video Data Page (🎥_Video_Data.py)
– Post Scheduler Page (📅_Post_Scheduler.py)
b. Data Extraction Layer
• channelDataExtraction.py → fetches channel metadata → writes to all_video_Data.xlsx
• channelVideoDataExtraction.py → fetches per‐video details & comments → writes to all_comments.xlsx
c. Analysis Layer
• analyze_comments.py → reads all_comments.xlsx, performs sentiment/topic analysis, outputs results (in memory or new file)
d. Data Stores
• Local Excel files for raw and scheduled data
e. External Services
• YouTube Data API
f. Deployment Environment
• Hugging Face Spaces (hosted Streamlit)
Relationships & Data Flows
• User (Browser) ↔ Streamlit Frontend
• Frontend triggers extraction scripts or calls pre‐run data layer on each load
• Extraction scripts ↔ YouTube API → Excel files
• Analysis script → reads Excel → returns processed metrics
• Frontend reads both raw and processed data → visualizations, tables
• Scheduler page writes to scheduled_posts.xlsx → used by future extraction/notifications (if extended)
Architectural Patterns & Design Principles
• Monolithic MVC‐like separation (UI “views” in pages/, business logic in extraction & analysis scripts, data in Excel)
• Single process web server (Streamlit) hosting both backend logic and UI
• File‐based persistence (no database—Excel files as data layer)
• Extensibility: new pages or scripts can be added under pages/ or as new modules