feat(ui): separate career and connected accounts

This commit is contained in:
cesnimda
2026-07-15 10:37:02 +02:00
parent dab39bd570
commit d7d7e70d08
7 changed files with 221 additions and 28 deletions
+53
View File
@@ -0,0 +1,53 @@
# Jobbjakt Architecture Evolution
## Guiding constraints
- Preserve the existing single-master-profile model.
- Keep job applications and their workflow at the centre of the domain.
- Make AI providers replaceable and optional.
- Add SaaS foundations without prematurely building a billing platform or team product.
- Keep feature slices small while reducing the current controller concentration.
## Target boundaries
```text
Web UI
-> Application APIs
-> Application workflow domain
-> Career profile and document domain
-> Discovery provider adapters
-> Connected-account adapters
-> AI provider boundary
-> Entitlements and usage policy
```
### Career profile and documents
`ApplicationUser.ProfileCvStructureJson` remains the canonical master profile during the transition. A later migration may normalize high-change sections (projects and portfolio items) into user-owned tables, but generated CVs and application-specific drafts must remain immutable copies with a profile-version reference.
### Discovery
Create an `IJobDiscoveryProvider` contract with normalized query and result types. Providers own authentication, source-specific filters, terms-aware attribution, and mapping. The UI and import flow must not know provider payload shapes. Cache public results briefly, do not persist an external job until the user imports it.
### AI
Extract AI prompts and model transport from controllers behind task-focused interfaces: CV extraction, CV tailoring, draft generation, interview preparation, and summarization. Each request records provider, model, input profile version, job context, and user review state. Local and online providers implement the same boundary.
### Entitlements
Introduce account-level plan, entitlement, and usage-ledger records before payment integration. Product code checks named capabilities (for example `ai.tailor_cv`, `cv.premium_theme`, `storage.attachments`) rather than payment-provider state. This supports trials, manual access, subscriptions, and future organisation plans.
## Incremental engineering work
1. Add targeted feature services beside the existing controllers for every touched feature; do not attempt a big-bang controller rewrite.
2. Replace local-only preferences that affect behaviour with user-owned persisted settings.
3. Replace the in-memory CV queue with a database-backed work item before horizontal hosting.
4. Use PostgreSQL for hosted multi-tenant deployment; retain SQLite for self-hosted/single-user deployments.
5. Add provider health, job processing, AI usage, and entitlement audit telemetry before paid hosting.
## Explicit non-goals for the first SaaS release
- Teams/organisations and shared candidate data.
- Auto-apply automation or scraping-proxy infrastructure.
- A browser-extension marketplace release.
- A billing-provider integration before commercial policy is decided.
+81
View File
@@ -0,0 +1,81 @@
# Jobbjakt Product Evolution Plan
> Confirmed 2026-07-15. This document is the product decision record for the career-management evolution.
## Product position
Jobbjakt is a job-tracking and career-management product. The application workflow remains the core loop:
```text
Discover opportunity -> Track application -> Prepare application -> Follow up -> Learn and progress
```
Career profile, CV generation, cover letters, portfolio, interview preparation, and discovery support this loop. They must not displace it or turn Jobbjakt into a CV-builder-first product.
## Confirmed decisions
| Decision | Direction |
| --- | --- |
| Primary discovery market | Nordics and Europe; global later |
| Discovery sources | Permitted provider APIs and existing URL capture; no scraping or browser extension in the first release |
| Career workspace | Dedicated top-level navigation item |
| Add-job flow | Wizard; create the application after job review, then keep preparation steps optional and resumable |
| Portfolio | Lightweight links and project items connected to the master career profile |
| AI | Retain local and online capability behind a provider boundary and explicit user controls |
| SaaS priority | Hosted subscriptions and feature entitlements before organisations/teams |
| Brand | Keep the Jobbjakt name |
## Target information architecture
| Area | Purpose | Initial destinations |
| --- | --- | --- |
| Dashboard | Daily direction | priorities, follow-ups, recent activity |
| Applications | Core tracker | list, board, companies, application workspace |
| Career Workspace | Reusable career source of truth | master profile, CV builder, portfolio, interview preparation |
| Discover Jobs | Find then act | provider search, saved searches later, import into tracker |
| Settings | Product preferences | general, follow-ups, notifications, connected accounts, data |
| Account | Identity and security | personal details, password, providers, sessions, 2FA |
## Delivery roadmap
### Phase 1 — Workflow clarity
1. Create the Career Workspace and move CV-facing functionality out of Account Profile.
2. Move Gmail, Outlook, and IMAP management to Settings > Connected Accounts.
3. Reorganise Settings: remove normal-user export/import controls, hide admin-only status controls, and improve follow-up explanations.
4. Simplify application workspace navigation into task-oriented sections.
### Phase 2 — Application preparation
1. Replace the dense Add Job modal with a six-step wizard.
2. URL capture and extraction lead the flow; manual details remain an easy fallback.
3. Save the application after review; CV, cover letter, portfolio, and documents are explicitly optional.
4. Link job-specific CV copies and draft material to the application without mutating the master profile.
### Phase 3 — Career workspace completion
1. Strengthen the structured master career profile: experience, education, skills, projects, certifications, languages, achievements, and portfolio links.
2. Turn the existing template system into a guided three-step CV builder: theme, preview/customise, save defaults.
3. Keep five professional templates and persisted visual preferences; add drag-and-drop ordering after the underlying configuration is durable.
### Phase 4 — Nordic/European discovery
1. Introduce a provider-adapter contract and a normalized result model.
2. Implement approved public/provider APIs beginning with Nordic sources; add European sources only when their terms permit product use.
3. Provide search, filters, source attribution, map/distance enrichment where data permits, and one-click import to the wizard.
4. Add fuzzy role matching locally through a role/skill synonym catalog before any external AI ranking.
### Phase 5 — Hosted SaaS foundations
1. Add account-level entitlement and usage records independent of a billing provider.
2. Gate premium themes, AI allowances, storage, and discovery quotas through policy checks.
3. Integrate a billing provider only after pricing, tax, trial, cancellation, and support policy decisions are recorded.
4. Move restart-sensitive CV processing to durable storage before multi-instance hosting.
## Success measures
- A new user can create a tracked application from a URL in under two minutes.
- A user can find their master profile, create a CV, and manage email connections without visiting Account Profile.
- Optional preparation never blocks capture of an opportunity.
- Every AI-generated output visibly states its source profile/job context and requires user review before it is saved or sent.
- Discovery always preserves source attribution and sends users to the original job advert to apply.