DEV Community

Gerardo Andrés Ruiz Castillo
Gerardo Andrés Ruiz Castillo

Posted on • Originally published at geanruca.gitvlg.com

Automating Job Applications with Go: A Deep Dive

Tired of manually applying for jobs? Imagine a system that automates the process, tailoring your CV and cover letter to each position. That's exactly what we built using Go, Filament, and a few clever integrations. This post explores the architecture and implementation of our auto-apply feature.

The Challenge

Applying for jobs can be a tedious and time-consuming task. It involves searching for relevant positions, tailoring your resume and cover letter, and filling out numerous online forms. We aimed to streamline this process by automating several key steps.

The Solution: AutoApplyOrchestrator

At the heart of our solution lies the AutoApplyOrchestrator service. This service is responsible for:

  1. Fetching job postings: Integrating with Greenhouse and Lever job boards to retrieve new job postings.
  2. Tech matching: Analyzing job descriptions and comparing them against a database of technologies.
  3. Location filtering: Ensuring that the job location matches the applicant's preferences.
  4. Application submission: Automatically submitting applications via the Greenhouse and Lever APIs.

Here's a simplified Go code example illustrating the core logic of the AutoApplyOrchestrator:

package main

import "fmt"

func AutoApply(jobDescription string, cv string, coverLetter string) {
  // Placeholder for job application logic
  fmt.Println("Applying for job with description:", jobDescription)
  fmt.Println("Using CV:", cv)
  fmt.Println("Using Cover Letter:", coverLetter)
}

func main() {
  job := "Software Engineer"
  cv := "Example CV"
  coverLetter := "Example Cover Letter"
  AutoApply(job, cv, coverLetter)
}
Enter fullscreen mode Exit fullscreen mode

Models and Resources

We created several models to manage job postings, CV examples, and cover letter examples:

  • JobPosting: Stores job posting details fetched from external job boards. This model is presented as a read-only Filament resource, allowing users to view job details, filters based on source, application status and skip reason, and infolists for comprehensive information.
  • CvExample and CoverLetterExample: Store example CVs and cover letters, respectively. These models are managed via full CRUD Filament resources, following a PostExampleResource pattern for consistency.

Random Mode for Diversity

To introduce variety in applications, we implemented a random mode for selecting CV and cover letter examples. This mode randomly picks from active examples instead of always using the most recent versions. This feature is controlled via an AutomationSettings page and is available to premium users only.

Queued Jobs and Tenant Checks

The entire auto-apply process is handled by a queued job (AutoApplyToJobsJob) to prevent blocking the main application thread. This job also includes tenant and subscription checks to ensure that only authorized users can access the feature.

Comprehensive Testing

We ensured the reliability of the auto-apply feature with comprehensive test coverage, including resource CRUD operations, filters, orchestrator example selection, job integration, and automation settings. 83 tests were created in total to validate the different pieces of the solution.

Conclusion

Automating job applications can significantly reduce the time and effort required to find employment. By leveraging Go, Filament, and careful design, we created a robust and efficient system that automates key steps in the application process. The main takeaway is to consider how automation can improve your workflows.

Top comments (0)