How h-strangeone/easy_reject works
What this project is (type + purpose)
JobTracker is a local-first desktop tool (single-machine application) that:
• Authenticates to Gmail via Google OAuth (Desktop App flow),
• Reads emails via the Gmail API (read-only),
• Extracts/infers “job application events” (applied / rejected / assessment / interview),
• Stores and organizes results in a local database,
• Optionally enriches classification/extraction using an LLM API (README mentions Groq + llama-3.1-8b-instant, but it’s pluggable).
The project is small and likely monolithic (one Python process) with clear internal modules:
• app.py (entrypoint + UI + orchestration)
• gmail_scanner.py (Gmail API interaction + email parsing/classification)
• database.py (local persistence abstraction)
Build/deploy artifacts:
• JobTracker.spec, build_exe.bat (packaging into an .exe, likely via PyInstaller)
• Run JobTracker.bat, install.bat (local execution + dependency install)
Core runtime (single process)
• app.py
Treat as the Application Layer: UI, settings, “Scan Gmail Now” action, wiring together scanner + DB, config handling, possibly token/credential selection.
• gmail_scanner.py
Treat as the Integration + Domain Logic: Gmail OAuth/token usage, Gmail API calls, message retrieval, filtering, extraction, optional LLM callouts.
• database.py
Treat as the Persistence Layer: schema, CRUD for companies/applications/events/status history.
• requirements.txt (runtime deps)
• JobTracker.spec + build_exe.bat (packaging pipeline)
• Run JobTracker.bat + install.bat (execution + install shortcuts)
External / user-provided artifacts (implied by README)
• credentials.json (Google OAuth client secret for Desktop App)
• OAuth tokens (often token.json or similar; not listed, but typically generated at runtime)
• Local DB file (SQLite file likely; name unknown)
• Local settings/config (accounts to scan, credential path, optional LLM key)
When drawing, it’s OK (and recommended) to include these “implied” runtime artifacts because they are essential to how the system actually works.
What to put
Actors / external systems:
• User (local machine)
• Google OAuth Authorization Server (login/consent in browser)
• Gmail API (Google)
• Optional LLM Provider API (Groq / OpenAI / Anthropic etc.)
System:
• JobTracker Desktop App (local)
Key flows:
• User triggers scan
• OAuth consent happens in browser; app receives/loads tokens
• App reads emails from Gmail API
• App optionally calls LLM API for classification/context extraction
• App writes results to local DB
• App displays results to user
JobTracker App (Python process / packaged EXE)
• UI + orchestration (app.py)
• Gmail scanning module (gmail_scanner.py)
• Database module (database.py)
Local Storage
• DB (SQLite/file-based)
• OAuth tokens (file)
• Settings/config (file)
• credentials.json (user-provided)
Outside
LLM API (optional)
• App → Google OAuth: “Request user consent / auth code”
• Google OAuth → App: “Token (refresh/access)”
• App → Gmail API: “Fetch message metadata/content”
• App → LLM API (optional): “Classify / extract job status”
• App → Local DB: “Persist application/company/status timeline”
• App → UI: “Render tracking dashboard”
UI / Controller (app.py)
• Settings screen (select credentials.json, add accounts)
• Scan action (“Scan Gmail Now”)
• Results views (companies/status)
• Error handling + progress
Gmail Scanner (gmail_scanner.py)
• Auth/token handling (load/refresh token)
• Gmail query builder (job-related heuristics)
• Message fetcher (list messages, get content)
• Parser/classifier (rules + optional LLM)
• Event normalizer (map to statuses: applied/rejected/interview/etc.)
Database Access Layer (database.py)
• Schema (tables: companies, applications, messages/events)
• Upserts/dedup (avoid reprocessing)
• Queries for UI
Optional subcomponent
• Provider adapter (Groq now, but “pluggable”)
If needed, OAuth happens
• Browser opens to Google OAuth
• User consents
• App stores token locally
For each email
• Parse subject/sender/body
• Classify status (rules and/or LLM API call)
• Store/update records in local DB
UI queries DB and renders updated tracking view
• Local-first / privacy-preserving: no email content is sent anywhere except:
• Gmail API (obviously), and
• Layered monolith:
• Presentation (UI) → Domain/Integration (scanner) → Persistence (DB)
• External integration via OAuth2 + REST APIs:
• Gmail API access is gated by OAuth tokens
• Optional “provider adapter” pattern for LLM:
Technologies/frameworks to label (only what’s materially architectural)
• Python 3.9+
• Google OAuth 2.0 (Desktop App) + Gmail API
• Local DB (likely SQLite) via database.py
• Optional LLM API (Groq / llama-3.1-8b-instant) as an external service
• PyInstaller packaging (in a separate “Build/Distribution” lane): JobTracker.spec, build_exe.bat
Build/Packaging Pipeline
requirements.txt → install.bat/pip; JobTracker.spec + build_exe.bat → EXE; Run JobTracker.bat → launches EXE/python.
Suggested component list (don’t omit)
• JobTracker UI/Orchestrator (app.py)
• Gmail Scanner (gmail_scanner.py)
• Database Layer (database.py)
• Local DB file
• credentials.json
• OAuth token store
• Google OAuth endpoint
• Gmail API endpoint
• LLM Provider API endpoint
• Build pipeline (PyInstaller spec + batch scripts)