FocusNews is an advanced, AI-powered news aggregator built to combat information overload. Designed as an "Executive News & OSINT Dashboard," it systematically pulls raw intelligence reports directly from real-time sources, uses advanced natural language processing to extract the signal from the noise, and presents a comprehensive overview. The focus is to deliver calm, factual, and strictly validated summaries rather than chaotic streams of updates.
FocusNews was strategically built without heavy frameworks to maintain extreme flexibility, maximize performance, and demonstrate deep fundamental engineering capabilities.
- Vanilla HTML5 & CSS3: Utilized pure HTML and CSS to create a lightweight, blazing-fast client experience.
- Glassmorphism UI: Uses advanced CSS backdrop-filters, custom dynamic background layers, and responsive CSS Grid architecture to render an immersive, high-end "Glassmorphic" interface. Modern styling and fluid micro-animations build a premium aesthetic. Dark and Light themes are supported natively.
- Vanilla JavaScript: Manages asynchronous data fetching, DOM hydration, dynamic localization (Hebrew & English), DOM-based WhatsApp sharing generation, and historical timeline dropdown states.
- Serverless Python (Vercel): Implements custom
BaseHTTPRequestHandlerstructures utilizing Vercel's serverless ecosystem. Highly concurrent scraping loops process gigabytes of unstructured data streams parallelly usingconcurrent.futures.ThreadPoolExecutor. - Google Gemini 2.5 Flash: Acts as the cognitive engine. Raw chronological intercepts from monitored OSINT groups are piped directly into the Gemini model. Gemini uses strict JSON-schema enforcement to parse out redundancy, translate content, generate extensive executive summaries, and construct categorized arrays and verified timelines.
- Upstash Redis: Used as the primary data store for fast-read operations:
- Historical Archiving (ZSET): Maintains a rolling 24-hour history index, dropping records outside the 24-hour TTL using
zremrangebyscorewhile returning precise hour-ago snapshots on demand. - Live Viewers Telemetry: Powers real-time dashboard analytics tracking active users synchronously without spinning up a heavy monolithic database.
- Historical Archiving (ZSET): Maintains a rolling 24-hour history index, dropping records outside the 24-hour TTL using
At the core of the FocusNews architecture is Operational Efficiency and Cost-Optimization.
- Trigger & Fetch: When a user accesses the dashboard, the Edge Network routes the request to the Python Serverless instance.
- Parallel Collection: The backend fires up up to 8 parallel background threads to scrape the latest raw updates directly from monitored Telegram sources within the last 60 minutes.
- Cognitive Parsing: The combined dataset (truncated defensively for optimal context-window management) is piped to Gemini 2.5 Flash with highly structured multi-language prompt instructions.
- Edge Caching & Cost-Saving:
- A critical aspect of the system relies on Vercel's Edge Caching headers (
Cache-Control: s-maxage=3600, stale-while-revalidate=600). - This architectural decision ensures the heavy LLM summarization compute runs exactly once per hour. All subsequent traffic within the hour is served ultra-fast (measured in milliseconds) directly from global edge nodes, eliminating redundant API costs to Google while securing immediate load times for end-users.
- A critical aspect of the system relies on Vercel's Edge Caching headers (
- Historical Ledger: Every successful hour generation pushes the final compiled JSON into an Upstash Redis Ordered Set indexed by a Unix timestamp. The dedicated
/api/historyserverless endpoint serves backward-looking requests, preventing the need to re-process historical OSINT chunks.
- Bilingual Dynamic Support: One-click switching between Hebrew and English, rendering complete translations structurally generated by the LLM without hardcoded dictionaries.
- 24-Hour Time Machine: Dropdown UI integrated directly with the Redis historical state to travel back and view previously generated snapshots from up to 24 hours ago.
- Smart WhatsApp Sharing: Seamlessly constructs beautifully formatted WhatsApp text containing the AI overview, timeline snapshots, and top category events – directly from the active DOM.
- Real-time Live Analytics: Custom session-id-based ping mechanism communicating with the Redis store to reflect currently active users watching the feed.
- Categorized De-duplication: The engine logically fuses 50 different redundant posts about the same incident into a single clean line within specific modules (Security, Politics, Economy, etc.).
This application demonstrates full-stack expertise combining modern UI/UX principles, direct serverless integration, LLM-driven backend processing, stateful caching optimization, and high-performance serverless architecture.