How hxrjt/reachhr works
Project Type and Purpose
• ReachHR is a lightweight, full-stack web application built with Streamlit (Python) that lets users input a company name and location, scrapes relevant LinkedIn recruiter/HR profiles via Google Custom Search, and then generates personalized cold messages using the Cohere API.
• It is not a multi-service microservices architecture: it’s a single Streamlit “app server” process that handles both UI rendering and core business logic.
File Structure
• Top-level:
• app.py → Streamlit entry point, UI + orchestration
• google_search.py → Encapsulates calls to Google CSE API, parses search results
• message_generator.py → Encapsulates calls to Cohere API to generate messages
• requirements.txt → Lists dependencies (streamlit, cohere, google-api-python-client, etc.)
• .devcontainer/devcontainer.json → Configuration for VSCode dev container
• venv/ → Local virtual environment
• .gitignore → Excludes venv, .env, __pycache__
• There is no database or persistent storage layer: all data flows in memory per request.
• External dependencies are strictly two HTTP-based APIs (Google CSE, Cohere).
README
• Confirms single‐page Streamlit UI, no separate frontend (React/Angular) or backend (Flask/Django) services.
• Highlights two external services: Google CSE for web/LinkedIn scraping & Cohere for AI message generation.
• Deployment is on Streamlit Cloud, environment variables stored as secrets.
a. Main Components:
• User’s Browser
• Streamlit App Server (app.py)
– UI Layer (widgets, forms, results view)
– Controller/Orchestration Logic
– Business-logic Modules:
· google_search.py
· message_generator.py
• External Services:
– Google Custom Search API
– Cohere API
b. Relationships & Interactions:
1. User submits company & location in browser.
2. Browser → HTTP POST to Streamlit Server.
3. Streamlit Server invokes google_search.py:
→ HTTP GET to Google CSE → parses response → returns list of LinkedIn profiles.
4. Streamlit Server renders profiles, prompts user for purpose.
5. User submits purpose → Streamlit Server invokes message_generator.py:
→ HTTP POST to Cohere API with prompt → receives AI-generated message.
6. Streamlit Server displays final message to user.
c. Architectural Patterns & Principles:
• Single process, thin-client model: Streamlit handles UI and routing.
• Separation of concerns:
· UI orchestration in app.py
· External API wrappers in dedicated modules
• Dependency injection of API keys via environment variables (.env / Streamlit secrets).
d. Key Technologies & Libraries:
• Python 3.10+
• Streamlit for UI
• google-api-python-client or custom HTTP code in google_search.py
• Cohere Python SDK or HTTP client in message_generator.py