Split the job tracker out of web_server into its own app
The applications tracker, leads inbox, email pipeline and capture userscript move here from web_server's backend, Python service and Vue app, as one Go binary that serves its own Vue SPA under /jobs/. - The Go services, resolvers and tests move over almost unchanged. - The three Claude calls are ported from Python to Go (internal/claude), with the same prompts, per-model request shaping and error messages. - There is no login: internal/auth asks the site backend's /auth/validate-admin with the visitor's cookies, and relays refreshed cookies back. - A Settings page replaces the admin-panel capture token card and adds the Microsoft sign-in link and a manual email sync. - The userscript is 2.0.0, at /jobs/, and migrates a saved API base. - Dockerfile, a standalone compose with Postgres, Makefile, and a Gitea CI workflow that tests and publishes the image. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"adam-french.co.uk/job-tracker/internal/services"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
// Package handlers holds the REST endpoints and the shared Store that every
|
||||
// request handler — and, through graph.Resolver, every GraphQL resolver —
|
||||
// depends on. It is built once in main and passed around by pointer.
|
||||
type Store struct {
|
||||
DB *gorm.DB
|
||||
// EmailSync is the mailbox pipeline (services/email_sync.go).
|
||||
EmailSync *services.EmailSyncService
|
||||
// JobLeads is the lead fetcher (services/job_leads.go). The GraphQL
|
||||
// resolvers use it to start a run and report on one.
|
||||
JobLeads *services.JobLeadService
|
||||
|
||||
// Extractor reads a posting's page for the capture popup
|
||||
// (handle_job_capture.go).
|
||||
Extractor PostingExtractor
|
||||
|
||||
// Bearer token for the browser capture routes (handle_job_capture.go),
|
||||
// generated from the settings page. Nil, or holding no token, means those
|
||||
// routes are switched off, not open.
|
||||
CaptureToken *services.CaptureToken
|
||||
}
|
||||
Reference in New Issue
Block a user