Implementing Interactive CV Baseline Editing with AI Re-Analysis
Introduction
In the devlog-ist/landing project, we recently focused on empowering users to take full control over their generated content. We introduced a new workflow that allows users to manually edit their CVs in a web-based interface and seamlessly propagate those changes back into our structured data model and ATS (Applicant Tracking System) scoring engine.
The Problem: The Static Document Gap
Previously, once a CV was generated, manual edits within the browser didn't persist in a way that our backend could reliably re-evaluate. We needed a way to bridge the gap between user-provided HTML edits and our structured data processing pipeline.
The Workflow: From Edit to Insight
We implemented a "Save Edits" feature using Laravel and Livewire to manage state. When a user modifies their CV via a contenteditable component, the system now performs three distinct actions:
- Extraction: The edited HTML is sent to an AI service to parse the unstructured text back into our canonical data format.
- Persistence: The newly structured data becomes the new "baseline" for the user's CV.
- Re-Analysis: A background job is dispatched to re-run the ATS analysis, ensuring that the visual edits result in accurate scoring metrics.
Technical Implementation
By leveraging Livewire's ability to sync state with the frontend, we can trigger this complex process without a page refresh. Below is a simplified representation of the event handling logic:
public function saveCvEdits()
{
// 1. Capture the raw HTML state from Alpine.js/Livewire
$rawHtml = $this->editedContent;
// 2. Extract structured data via AI service
$structuredData = $this->aiService->parse($rawHtml);
// 3. Update the application baseline
$this->userCv->update(['content' => $structuredData]);
// 4. Trigger asynchronous re-analysis
ReviewCvAtsJob::dispatch($this->userCv);
$this->dispatch('cv-saved-successfully');
}
This logic keeps the controller thin while ensuring that heavy operations like AI parsing and ATS scoring are offloaded to queue workers, maintaining a responsive UI.
Key Takeaway
When building features that allow for user content manipulation, treat the user-generated view as a source of truth. Use background jobs to normalize that view back into structured data and re-run your analytical processes. This ensures your system stays in sync, regardless of how much the user modifies the output.
Generated with Gitvlg.com