I'll build this premium career-path platform systematically. Let me start by exploring the project structure, then create a comprehensive plan before scaffolding.
Let me first understand the current project setup.
Let me examine the key files to understand the setup.
I have a clear understanding of the setup. Important note: this is a Vite + React SPA (not Next.js), using Tailwind v4 with CSS-based config, and vite-plugin-singlefile (which bundles everything into a single HTML file). This means I need a client-side router (react-router-dom in SPA mode) rather than Next.js App Router. Let me account for this.
Note: noUnusedLocals and noUnusedParameters are on, so I must be careful. Also strict mode is on.
Let me present my plan as a design artifact first, then build. Let me start by installing the needed packages.
The stack: React + Vite + TypeScript + Tailwind v4 + Framer Motion + lucide-react + react-router-dom.
Let me install packages first (these are all within the suggested stack — and react-router is the SPA-appropriate equivalent of Next's routing).
Packages installed. Now let me present my design plan as an artifact, then build.
📋 Design & Architecture Plan
Chosen Direction — "Craft & Compass"
A refined editorial-consultancy register. Think a high-end cartography atelier or a boutique strategy firm: confident, serious, warmly restrained. Inspired by vintage survey maps and modern independent publishing — where navigation is a craft.
Core metaphor: career paths as mapped routes — contours, waypoints, compass bearings. The visual language borrows from topographic maps and print editorial, but in a clean, modern execution.
Palette (named tokens)
A terracotta / clay accent on a warm paper light theme and a deep ink-green dark theme. No neon, no purple-blue gradients.
| Token | Light | Dark |
|---|
--paper bg | #FBFAF7 warm off-white | #121413 near-black green |
--surface | #FFFFFF / #F1EEE7 | #1A1D1B / #232724 |
--ink text | #1C1B17 warm near-black | #ECEAE3 warm paper |
--muted | #6B675F | #A39F94 |
--line border | #E4DFD4 | #313531 |
--clay accent | #B4552D terracotta | #D97A4A warm clay |
--clay-ink on-accent | #FFFFFF | #1A0E07 |
--moss secondary | #4C5D43 | #93A583 |
--sand tertiary | #C9962E | #C9962E |
Type Pairing
- Display/Heading: Fraunces — a warm, high-contrast "old-style" serif with character (optical sizes). Feels editorial and premium.
- Body/UI: Public Sans — a clean, neutral-grotesque sans (deliberately not Inter). Numerals and labels read well.
Loaded via Google Fonts with font-display: swap.
Spacing / Radius / Scale
- Spacing: Tailwind default scale (4px base), tight vertical rhythm in prose.
- Radius:
2rem cards → 1rem inputs → 0.6rem chips/buttons (distinct hierarchy).
- Type scale:
clamp() fluid headings via custom Tailwind tokens.
Motion Principles
- Directional & slow: content slides/fades along its own axis (y-up for entry), easing
cubic-bezier(0.22, 1, 0.36, 1) (easeOutQuint-like).
- Only transform/opacity animated — GPU-friendly.
- Scroll reveals via Framer Motion
whileInView with a shared viewport config, honoring prefers-reduced-motion through a global detector that disables transforms.
- Progress-responsive: page transitions fade/slide subtly.
- Distinct accent element: a "compass rose" drawn in SVG that rotates slightly on each nav region.
Sitemap
/ — Home (hero + scroll sequence, value prop, how-it-works, CTA)
/assessment — multi-step flow (10 questions)
/results — top matches with rationale (guarded, retake option)
/careers — Explore Careers (search + filters)
/careers/:slug — Career Detail
- Optional
/about — Mission/About
* — 404 fallback
Assessment (10 questions, weighted scoring)
Dimensions each mapped to career attribute weights: Head (analytical/logic), Heart (empathy/communication), Making (build/tactile), Systems (structure/process), Growth (risk/vision), Care (social impact). Each question scores 1–5 on a facet; answers accumulate a profile vector. Careers store a target vector per facet + weight; score = weighted cosine / dot similarity. Top 5 returned with per-facet rationale.
Matching Logic
- Profile vector
P[6], career vector C[6] with facet importance weights.
- Score =
Σ P[f] · C[f] normalized; percentage = softmax-scaled.
- Rationale = top-3 strongest facets shared.
Component List
Layout (header nav, footer, theme toggle, scroll-restoration, route transitions)
ThemeProvider (system default, localStorage, no-flash inline script)
Reveal / motion primitives, Compass svg mark
HomeHero (scroll sequence), HowItWorks, ValueProps
AssessmentFlow (Stepper, ProgressBar, QuestionCard)
ResultsList, MatchCard
CareerCard, CareerFilters, CareerSearch
CareerDetail sections
- Data:
careers.ts, questions.ts, design-tokens.css, scoring.ts
Now let me build. Milestone 1: Design tokens, theme system, fonts, and global styles.
First, the index.html (title, fonts, no-flash theme script, meta):
Now the design tokens and global CSS. Tailwind v4 uses CSS-based config via @theme. I'll define custom tokens and use @layer for base and utilities.
Now the theme provider and its script. Let me create the theme hook/context.
I need to handle the systemPref unused variable. Since I decided explicit override takes precedence (no auto-switching), I can simplify by removing systemPref entirely. Let me fix that.
Now let me create the motion primitives (Reveal with reduced-motion support) and the compass SVG mark.
Now let me build the shared Layout with navigation, footer, theme toggle. First, the data layer — careers and questions (this defines the whole product).
Let me create src/data/careers.ts with the career dataset and facet vectors.
Now the questions dataset for the assessment.
Now the scoring engine. It computes a profile vector from answers, then scores each career with transparent weighted similarity, producing rationale.
I need to add the headline field to each match. Let me fix the scoring function to include it.
Now let me build the shared Layout with navigation, footer, and theme toggle. First, the ThemeToggle component.
Now the Navigation and Footer. I'll create the Layout component with header, footer, scroll restoration, and route transitions. Let me build a Header component:
I used a custom radius class rounded-corner-sm that doesn't exist. Let me use standard classes instead. Let me fix those occurrences in the header.
Also the mobile menu button should show on smaller screens. Let me review my header. The mobile Link for assessment is hidden on small (sm:inline-flex was changed to md:inline-flex). Good. Now the Footer:
Now the Layout with scroll restoration and page transition orchestration. Let me create it:
I referenced a module that doesn't exist. Let me create src/lib/useReducedMotion.ts with the safe hook, reusing the one from motion.tsx.
I have two reduced-motion hooks now. Let me consolidate — I'll update motion.tsx to export the hook so there's only one source of truth, and update Layout to import from there. Actually simpler: delete the duplicate in motion.tsx usage. Let me just update Layout to import from lib/useReducedMotion (done). Now motion.tsx has its own useMotionSafe — that's fine as a separate internal helper, but let me keep it.
Let me now build the Home page with the hero scroll sequence. This is the centrepiece. I'll create components for the home page. First, let me create a reusable Button and Section primitives for consistency.
Now the hero. This is the centrepiece — I want a scroll-triggered sequence. I'll use a full-height hero with a compelling headline, a compass/contour illustration that transforms on scroll (using useScroll and useTransform with transform/opacity only), and staggered text reveals.
Let me create the Home page with its sub-components. I'll build the hero as a separate component file.
I accidentally left a stray prop style_override_marker. Let me fix that. Also, I have a conflict: I want both an entrance (animate) and a scroll-linked y: titleY on the same element. Combining animate with a scroll style motion value on y conflicts. Since I'm using entrance for opacity/y animation AND scroll y: titleY, that's a conflict on y.
Let me restructure: use the scroll-linked y on an outer wrapper and the entrance animation on the inner content. Let me rewrite the Hero more cleanly.
I need to close the new divs properly. Let me view the current state of the file around that section to fix the structure.
I see. The </motion.div> on line 75 closes the title wrapper. Line 90 has </motion.p> but I need to add a </motion.div> to close the subY wrapper. Let me fix lines 85-90 region.
The entrance function spreads initial/animate with a style object. But I'm passing both style and initial/animate — for the CTA div that's fine (no scroll style). Let me also handle the entrance — since the title/sub wrappers no longer use entrance, the CTA uses entrance(0.4) which results in initial/animate — fine.
However, there's a subtle issue: the entrance function returns an object that gets spread, but TypeScript infers the union type with style possibly undefined. The CTA div only spreads entrance, no conflicting style prop. Good.
Let me also simplify — the {...(reduce ? {} : {})} empty spreads on h1/p are pointless but harmless. Let me remove them for cleanliness. Actually they may cause no type errors now. Let me run a build check after fixing. Let me view the full hero to ensure no leftover issues.
Let me remove the empty {...(reduce ? {} : {})} spreads for cleanliness and to avoid type friction. Let me view the title block again and clean up.
Now let me build the rest of the Home page: ValuePropositions, HowItWorks, and a Careers preview section. Let me create these as home sub-components, then assemble the Home page.
I used rounded-card utility which maps to --radius-card. In Tailwind v4, I defined --radius-card in @theme, so rounded-card should be generated automatically as a utility. Let me verify Tailwind v4 generates rounded-* from --radius-* tokens — yes, Tailwind v4 auto-generates rounded-{name} utilities from --radius-* theme keys. Good.
Now the HowItWorks section:
Now a careers preview section for the homepage, showing a few featured careers linking to the directory/detail pages.
Now let me create the Home page assembling these sections plus an about/mission strip.
Milestone check: ✅ Design tokens, fonts, theme system, shared layout/nav/theme toggle, Home page (hero + sections). Now let me build the Assessment flow — the stateful multi-step flow.
Let me create the Assessment page. It needs: progress indicator, back/forward nav, answers persist in state (across back-nav), and on completion compute matches.
Let me fix these errors: remove unused imports (buildProfile, scoreCareers not used here since results are computed on the Results page), remove unused answeredCount, and fix the restart && always-true condition.
Now fix the IntroCard restart && condition — restart is always a function. Let me look at that part.
The restart prop passed to IntroCard is now unused. Let me remove it from both the call site and the component signature.
All Assessment errors fixed. Now the Results page. It computes matches and shows top matches with rationale + retake option.
I used different function names in my scoreCareers module. Let me check what I actually exported: buildProfile, scoreCareers, headlineFor. I need to align. Let me update the Results page to use the actual exports and also derive profile.top (ranked facets with values).
Let me update the scoring module to also export a profileSummary helper, and fix the Results page imports. First, let me add a helper to scoring.ts.
Now let me rewrite the Results page to use the correct exports: buildProfile, scoreCareers, summarizeProfile.
I have a leftover placeholder "Card title" and unused ArrowRight. Let me fix the link to use "Why this fits — full guide" with the ArrowRight icon.
Let me replace the placeholder text with the intended label and use ArrowRight.
Now the Explore Careers page — browsable, filterable, searchable directory. Let me build it.
I referenced a Facet component that doesn't exist. Let me create a small Facet indicator component that shows which facet a role uses (a small glyph). This adds a nice visual system. Let me create it.
I named the file Facet.tsx but imported from @/components/FacetBar. Let me fix the import in Careers.tsx.
Now, the Results page and others won't compile until all imports resolve. Let me now build the Career Detail page. It uses useParams, fetches the career by slug, and shows day-to-day, skills, routes, outlook, plus a facet profile bar.
Let me create the Career detail page with a facet profile visualization.
Now the CareerDetail page:
I imported SectionLabel but didn't use it. Let me check the imports and remove it.
Now let me create the About/Mission page and a 404 NotFound page, then wire up the router in App.tsx.
Files built: index.html, src/index.css, src/lib/theme.tsx, src/lib/motion.tsx, src/components/Compass.tsx, src/data/careers.ts, src/data/questions.ts, src/lib/scoring.ts, src/components/ThemeToggle.tsx, src/components/Header.tsx, src/components/Footer.tsx, src/components/Layout.tsx, src/lib/useReducedMotion.ts, src/components/ui.tsx, src/components/home/Hero.tsx, src/components/home/ValueProps.tsx, src/components/home/HowItWorks.tsx, src/components/home/CareersPreview.tsx, src/pages/Home.tsx, src/pages/Assessment.tsx, src/pages/Results.tsx, src/pages/Careers.tsx, src/components/Facet.tsx, src/components/FacetProfile.tsx, src/pages/CareerDetail.tsx, src/pages/About.tsx, src/pages/NotFound.tsx