Commit bb8e75

2025-10-14 07:36:54 Vinay Deokar: Implement Gmail adapter in Unified Resume Ingestion Module
Projects/HireGenius/Technical Document (LLD+HLD)).md ..
@@ 44,7 44,35 @@
### 2. Module Breakdown
- #### Module 1: Gmail Module
+ #### Module 1: Unified Resume Ingestion Module
+ **Responsibility:** Multi-source resume ingestion with pluggable adapters
+
+ | Source Type | Adapter | Trigger Method | Priority | Notes |
+ |-----------------|-------------------|--------------------|---------|-------|
+ | Gmail | GmailAdapter | Scheduled (cron) | High | Phase 1 implementation |
+ | Webhook | WebhookAdapter | Real-time (HTTP POST)| High | Future source |
+ | Cloud Storage | CloudStorageAdapter | Polling/Event-driven | Medium | Future source |
+ | Direct Upload | UploadAdapter | On-demand (UI) | Medium | Future source |
+ | ATS Integration | ATSAdapter | API polling | Low | Future source |
+
+ ---
+
+ ###### Core Functions
+ ```javascript
+ // Abstract base adapter
+ class ResumeSourceAdapter {
+ async fetchResumes(config) → Returns ResumeCollection
+ async validateSource(config) → Returns boolean
+ async getSourceMetadata() → Returns SourceInfo
+ }
+
+ // Unified ingestion controller
+ fetchResumesFromAllSources(jobId) → Orchestrates all active sources
+ registerSource(jobId, sourceType, config) → Activates new source
+ deactivateSource(jobId, sourceId) → Stops fetching from source
+ getActiveSourcesForJob(jobId) → Returns list of active sources
+ ```
+ ##### Phase 1: Gmail Module
**Responsibility:** Email integration and resume fetching
**Functions:**
@@ 58,7 86,7 @@
- `downloadAttachment(messageId, attachmentId)` → Returns file buffer
- `getLastFetchTime(jobId)` → Returns timestamp of last successful fetch
- **External Dependencies:** Gmail API, Google OAuth 2.0
+ **External Dependencies:** Gmail API, Google OAuth 2.0
---
@@ 413,7 441,8 @@
### 4. Database Design
#### 4.1 Entity Relationship Diagram (ERD)
- ![](./image-1760374732983.png)
+ ![](./image-1760421542881.png)
+
---
#### 4.2 Table Specifications
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9