my-homelab-configs/docs/nextpath-architecture.md

155 lines
6.2 KiB
Markdown

# NextPath Arizona architecture
## Product promise
NextPath helps a person answer three separate questions:
- Which kinds of work appear compatible with my interests and constraints?
- Which Arizona education or training paths can move me toward that work?
- What does current public evidence say about demand for that occupation?
It is an exploration and planning tool, not a psychological diagnosis,
guarantee of employment, or replacement for a school or career counselor.
## MVP users
The application supports teenagers and adults. An age band changes language,
education filters, and privacy handling, but does not change the meaning of an
interest score. The initial product supports users aged 13 and older. It does
not accept an exact birth date, street address, school name, or family income.
Registration stores only:
- email address and a display name;
- age band and Arizona ZIP code;
- optional study radius, time, and budget preferences;
- assessment answers and saved career comparisons.
ZIP code is used for approximate distance calculations. Precise location is
neither requested nor stored. Accounts can be exported and deleted.
## Evidence model
NextPath keeps personal fit and market opportunity as independent dimensions.
A career card may show a market **employability outlook percentage**, but must
not describe it as the person's probability of being hired.
### Personal fit
The first assessment uses the RIASEC dimensions represented by the O*NET
Interest Profiler:
- Realistic
- Investigative
- Artistic
- Social
- Enterprising
- Conventional
The question bank, scoring version, and answer scale are versioned. Later
adaptive questions may clarify preferences, but must not silently modify the
validated scoring formula.
### Arizona employability outlook
The initial zero-to-100 percentage is a transparent market comparison. It
answers, approximately, "how much Arizona demand is visible relative to the
number of people completing relevant programs?" It does not account for an
individual's grades, experience, interview performance, network, work
authorization, or employer decisions.
| Component | Weight | Evidence |
| --- | ---: | --- |
| Annual demand coverage | 75 | Projected annual Arizona openings divided by annual Arizona completers |
| Live posting coverage | 25 | Current occupation postings divided by annual Arizona completers |
Each coverage value is capped at 100 before weighting. The UI also shows the
uncapped annual openings-to-graduates ratio, so a shortage is not hidden when
demand exceeds supply. Current postings are a volatile snapshot and influence
only 25 percent of the result. The application displays all three raw counts:
annual graduates, projected annual openings, and active postings today.
Each component includes its observation date, geography, source URL, mapping
coverage, and confidence value. Missing evidence makes the percentage
unavailable instead of silently becoming zero. The UI must label it "rough
market estimate—not your chance of being hired."
## Data contracts
Occupation records use O*NET-SOC identifiers. Education programs use CIP codes.
A versioned SOC-to-CIP mapping connects the two. Source adapters normalize data
from:
- O*NET Web Services and the Interest Profiler;
- Arizona Office of Economic Opportunity projections;
- BLS OEWS wage and employment data;
- College Scorecard field-of-study data;
- Arizona CTE and registered apprenticeship directories;
- Ayla's public feed of government and official-source job postings.
Remote source data is cached with retrieval timestamps and source attribution.
Job listings are short-lived examples, are linked to their publisher, and do
not become training data or evidence of guaranteed employment.
Jeannie refreshes the cache daily without credentials or prompts. It combines
the public College Scorecard API, Department of Labor-sponsored Projections
Central state projections, and Ayla's public feed of government and official
hiring sources. The posting count is therefore a visible sample, not the whole
Arizona job market. A refresh replaces the cache atomically only after every
catalog occupation has all three inputs; failures preserve the last successful
snapshot. With no complete snapshot, the results page says the outlook is
unavailable rather than presenting a synthetic percentage.
## Recommendation boundary
Deterministic code performs assessment scoring, eligibility filtering,
geographic matching, and opportunity-score calculation. An optional language
model may explain already-ranked results, compare options, or create questions
for a counselor. It cannot alter scores, invent programs or jobs, or receive a
direct identifier such as email address.
Every recommendation explains:
- why the occupation matched;
- which evidence increased or decreased its opportunity score;
- education, licensing, time, and cost constraints;
- disadvantages or uncertainties;
- one low-risk way to explore the work before committing.
## Service boundaries
The MVP is a modular monolith with explicit internal boundaries:
```text
web UI / HTTP API
|
+-- accounts and consent
+-- versioned assessment engine
+-- occupation catalog and matching
+-- Arizona opportunity scoring
+-- education and apprenticeship search
+-- job-source adapters
+-- recommendation explanation
+-- provenance and refresh jobs
```
The application starts with a local private data store for family testing. The
persistence interface remains independent so a PostgreSQL implementation can
replace it before a broader pilot.
## Delivery slices
1. Product, privacy, and evidence contract.
2. Versioned RIASEC assessment kernel with deterministic tests.
3. Registration, sessions, assessment UI, save, export, and deletion.
4. Versioned occupation catalog and personal-fit ranking.
5. Arizona public-data ingestion and transparent employability outlook.
6. Nearby education, CTE, and apprenticeship matching.
7. Fresh example job listings with deduplication and source links.
8. Career comparison and what-if planning.
9. Jeannie deployment, backup, health, and status integration.
10. Counselor/parent share report and accessibility review.
Each slice must be usable through a stable interface and independently tested.