How tej-sharma/horizon-overlay works
Project type and purpose
• This is a native macOS client application written in Swift/SwiftUI (“Constella Horizon”).
• Its main purpose is to capture screen content (OCR), send it to a backend AI service for context, and display that context in floating overlays. It also handles note/tag management via a REST/WebSocket API.
File structure
• Top-level Swift modules:
• AI: manages OCR/screenshots and AI service connections (AIContextManager, AIConnectionManager, TagWebSocketManager).
• API: REST client (APIClient, APIConfig) and WebSocket manager plus endpoints (ContextSearchAPI, NotesAPI).
• Auth: authentication/token management.
• ScreenParsing: captures windows/screenshots.
• InputEvent: global keyboard shortcut handling.
• Overlay: the various floating windows and views (AIAssist, QuickCapture, ExternalWindowOverlay).
• Setup & Settings: onboarding, permission flow, and preferences UI.
• SystemMenu: menu bar integration.
• CustomView, Utility, Models: shared widgets and data types.
• The entry point is ConstellaHorizonApp.swift.
README for additional insights
• Core features:
• Horizon Overlay – detection-free windows for privacy.
• AI Context Manager – OCR + screenshot pipeline.
• Window Overlay Managers – display logic for each overlay.
• Input Manager – keyboard event capture.
• Onboarding – permission prompts and user guide.
Diagramming recommendations
• Shortcut → Capture → OCR → REST/WS → Overlay UI
• AuthManager → APIClient/WebSocketManager
• Blue = UI/Overlay
• Green = Processing (OCR, Context)
• Orange = API/Auth
• Gray = System (Input, ScreenCapture)