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

138 lines
4.9 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, hiring
prediction, 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 must never turn them into a purported hiring probability.
### 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 Opportunity Score
The initial zero-to-100 score is deterministic and reports each component:
| Component | Weight | Evidence |
| --- | ---: | --- |
| Projected growth | 25 | Arizona employment projections |
| Annual openings | 25 | Arizona employment projections |
| Current demand | 20 | Fresh, deduplicated public job listings |
| Wage position | 15 | Arizona or metro occupational wages |
| Training access | 15 | Nearby programs and registered apprenticeships |
Each component includes its observation date, geography, source URL, and a
confidence value. Missing evidence lowers confidence instead of being treated
as zero. The UI must say "opportunity score," never "employability rate" or
"chance of getting 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;
- CareerOneStop job search.
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.
## 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 opportunity scoring.
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.