This repository contains a personal portfolio and blog-style website built with React, TypeScript, React Router v7 (file-based routes), and PrimeReact components.
The app includes a home/landing page with a gallery, a projects carousel, an experience timeline, a contact page, and per-project detail pages.
- React + TypeScript
- React Router (file-based routes / @react-router/dev)
- PrimeReact + PrimeIcons
- PrimeFlex (layout utilities may be present)
- Vite as the dev tooling
- Install dependencies
npm install- Run the development server
npm run dev
# open http://localhost:5173/- Build for production
npm run build- Preview the production build (if available)
npm run previewNotes: If you see a flash of the wrong theme when loading, the app uses an inline pre-hydration theme script and localStorage to persist theme preference. Keep your browser storage enabled while testing.
app/root.tsx— top-level layout, Menubar, theme toggle, and the where routes render.app/routes.ts— file-based route configuration used by the router codegen. It maps route paths to files underapp/routes/.app/routes/— route components. Notable files:routes/home.tsx— the home/welcome pageroutes/projects.tsx— projects listing (carousel)routes/project.$id.tsx— project detail route (param route). This filename must match the route config mapping forproject/:id.routes/experience.tsx,routes/blog.tsx,routes/contact.tsx— other pages
app/components/ProjectCard.tsx— reusable project card used in the carousel. It usesnavigate('/project/' + id)for Details.app/shared/projectinfo.ts— static project metadata used by the listing and detail page.public/— static assets (images,Jared_Sauve_Resume.pdf, Light.svg/Dark.svg, etc.)
- The route config registers a path like
project/:idand points to a route file such asroutes/project.$id.tsx. The filename and path inapp/routes.tsmust match the router's expectation. If the route file is missing or named differently the route will not be matched. - When navigating from a component use SPA navigation (
useNavigate()or ) and make sure the path you navigate to matches the route config and filename exactly (for example/project/jaredsauve.com).
If you prefer the detail page under /projects/:id instead of /project/:id, rename the route in app/routes.ts and move/rename the file to routes/projects.$id.tsx, and update navigation in ProjectCard accordingly.
- Route returns a blank page or fallback: check
app/routes.tsand confirm the string path (e.g.,route("project/:id", "routes/project.$id.tsx")) points to a correctly-named file underapp/routes/. - Duplicate or garbled file exports: ensure each route file has a single default export component. Remove duplicate imports/exports if present.
- Type errors for imported images: the project includes an
env.d.tsthat declares image modules. If you added images and TypeScript errors appear, confirm.d.tsis present and included by tsconfig. - Theme flash: the app writes a
themevalue to localStorage; if you clear storage, the inline pre-hydration script may set a default. Reload a few times to validate.
- Centralize project data:
app/shared/projectinfo.tsis a good single source of truth; keep it updated so both listing and detail pages remain consistent. - Prefer React Router's
navigate()instead ofwindow.location.hreffor SPA navigation. - If you want
/projects/:idURLs, rename route files and updateapp/routes.tsand component navigation accordingly.
Open a PR or push changes to your branch. Keep changes small and verify via npm run dev.
Personal/Private project — no license declared.