Skip to content

Epic Stack catch-up 7/7: react-router-auto-routes + dashboard+ rename #30

Description

@cursor

Parent issue: #23

Parent: search for issue titled “Epic Stack catch-up: tracking”. Last package. Stronger model recommended. Only after packages 5 and 6 are on dev and staging looks healthy.

Goal

Replace remix-flat-routes + @react-router/remix-routes-option-adapter with react-router-auto-routes, and rename this repo’s folder+ routes (including dashboard+) to the new directory convention.

This is the highest-conflict slice. Epic Stack has no dashboard. You must convert app/routes/dashboard+/** yourselves — do not delete it and do not copy marketing from Epic Stack.

Upstream

Convention cheat sheet (from those PRs):

  • app/routes/_auth+/*app/routes/_auth/*
  • webauthn+_auth/webauthn/
  • _marketing+/logos/_marketing/+logos/ (colocation with +)
  • admin+ cache files → admin/cache/... (see #1053 file list)
  • users+/$username_+users/$username/...
  • Shared note editor: __note-editor.tsx+shared/note-editor.tsx style as upstream

This repo also has app/routes/dashboard+/** (layout, projects, skills, about, contacts, __*-editor* files). Convert that tree with the same auto-routes rules (dashboard/ directory, colocated +shared or __ ignores per ignoredRouteFiles in app/routes.ts). Preserve URLs (/dashboard, /dashboard/projects, etc.). Run npx react-router routes before and after and diff.

Do this

Branch off origin/dev. PR into dev.

  1. Add react-router-auto-routes. Remove remix-flat-routes and @react-router/remix-routes-option-adapter.
  2. Replace app/routes.ts with autoRoutes({ ignoredRouteFiles: [...] }) matching Epic Stack (keep ignoring **/__*.*, *.server.*, *.test.*).
  3. Git-move route files to the new layout. Prefer git mv to preserve history.
  4. Update internal imports (#app/routes/...) including cache.server.ts → admin cache helper path after the admin folder move.
  5. Update docs/routing.md to the auto-routes explanation (keep any of this site’s extra notes).
  6. Fix typegen paths (./+types/...) after moves.
  7. Do not restyle or rewrite dashboard/marketing behavior.

Files allowed

  • app/routes.ts, entire app/routes/** (moves + import path fixes)
  • package.json / package-lock.json (routing packages only, unless a leftover import requires a tiny fix)
  • docs/routing.md, docs/decisions/ only if you add a short note that this site followed 045
  • app/utils/cache.server.ts and any #app/routes/... imports elsewhere
  • Tests that import route modules by path

Do not

  • Do not delete dashboard, about, projects, skills, contacts
  • Do not replace _marketing+/index.tsx / about.tsx with Epic Stack’s Epic Notes marketing
  • Do not bump unrelated deps
  • Do not change Fly config
  • Do not skip Playwright because “routes moved”

Acceptance

  • npx react-router routes shows the same public URLs as before (auth, users, notes, settings, admin cache, dashboard CRUD, marketing, SEO, healthcheck)
  • remix-flat-routes and @react-router/remix-routes-option-adapter are gone
  • npm run typecheck, test -- --run, Playwright green
  • PR targets dev

Staging smoke (human) — required, thorough

Walk every area:

  • / marketing, about, privacy/tos/support if present
  • Login / signup / 2FA / passkeys if you use them
  • User profile, notes CRUD + images
  • Settings
  • Dashboard: list/create/edit about, skills, projects, contacts
  • /resources/healthcheck, sitemap/robots
  • Direct loads and client-side navigations (layout routes are the usual breakage)

PR target: dev (never main). Implement only this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions