Skip to content

feat: add react-react-router extension - #314

Merged
ulises-jeremias merged 2 commits into
Create-Node-App:mainfrom
Tanmay-lanjewar:feat/react-router-extension
Jul 18, 2026
Merged

ulises-jeremias merged 2 commits into
Create-Node-App:mainfrom
Tanmay-lanjewar:feat/react-router-extension

Conversation

@Tanmay-lanjewar

@Tanmay-lanjewar Tanmay-lanjewar commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR adds a new react-react-router extension for React templates and moves React Router configuration out of the base React template.

Changes

Base React Template

  • Removed react-router-dom dependency.
  • Removed BrowserRouter from the base template.
  • Removed AppRoutes.tsx.
  • Updated the landing page to remove React Router-specific content.

React Router Extension

  • Added react-router-dom dependency.
  • Added BrowserRouter configuration.
  • Added AppRoutes.tsx.
  • Added a sample About page.
  • Added navigation between Home and About.
  • Updated extension documentation.

Testing

  • ✅ Ran node scripts/validate-templates.js
  • ✅ Generated a project using the local extension
  • ✅ Installed dependencies successfully
  • ✅ Verified the application builds and runs
  • ✅ Verified routing between Home and About pages
  • ✅ Verified the base React template works without the extension

Closes #279

Summary by CodeRabbit

  • New Features

    • Added a React Router v7 extension for React projects, including client-side routing plus sample Landing and About pages.
    • Registered the extension in the template catalog.
  • Documentation

    • Added README and quick-start docs with routing and navigation examples.
  • Bug Fixes

    • Improved Windows handling for local file:// templates and scaffold subprocess execution.
  • Updates

    • Simplified the React Vite starter landing experience (removed React Router wiring/dependency) and refreshed landing page feature highlights/hero text.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: dd29c487-b3ff-4c9d-a8c7-ffa6f21a3a00

📥 Commits

Reviewing files that changed from the base of the PR and between bb9f393 and 737f9ce.

📒 Files selected for processing (5)
  • extensions/react-react-router/[src]/pages/About.tsx.template
  • extensions/react-react-router/[src]/pages/Landing.tsx.template
  • extensions/react-react-router/package.json
  • templates.json
  • templates/react-vite-starter/[src]/pages/Landing.tsx.template
🚧 Files skipped from review as they are similar to previous changes (4)
  • templates/react-vite-starter/[src]/pages/Landing.tsx.template
  • extensions/react-react-router/[src]/pages/About.tsx.template
  • extensions/react-react-router/[src]/pages/Landing.tsx.template
  • templates.json

📝 Walkthrough

Walkthrough

Adds a React Router v7 extension with BrowserRouter wiring, sample Landing and About pages, route documentation, and template metadata. The default React Vite starter renders Landing without routing. Windows scaffold checks gain shell execution and file URL path normalization.

Changes

React Router v7 extension

Layer / File(s) Summary
Routed extension templates
extensions/react-react-router/...
Adds React Router dependencies, BrowserRouter app wiring, Landing and About pages, /about routing, and usage documentation.
Default starter routing removal
templates/react-vite-starter/...
Removes routing from the default starter, renders Landing directly, removes react-router-dom, and updates landing content.
Extension registration and scaffold support
templates.json, scripts/ci/run-scaffold-check.js
Registers the React Router extension and updates Windows subprocess and local file URL handling.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant BrowserRouter
  participant AppRoutes
  participant Page
  App->>BrowserRouter: Mount with BASE_URL basename
  BrowserRouter->>AppRoutes: Render routes
  AppRoutes->>Page: Resolve / or /about
  Page-->>App: Render page
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly names the new react-react-router extension and matches the main change set.
Linked Issues check ✅ Passed The PR adds the React Router v7 extension, routing setup, sample pages, and templates.json entry for React Tooling, matching #279.
Out of Scope Changes check ✅ Passed The remaining base-template, docs, and scaffold-check updates directly support extracting routing into the new extension.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Align About with landing styles, tighten Doc typing, drop empty
devDependencies, and restore templates.json trailing newline.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ulises-jeremias

Copy link
Copy Markdown
Member

Review notes — thank you @Tanmay-lanjewar! 🙏

Really solid contribution. Moving React Router out of the base react-vite-starter and into a proper extension is exactly what #279 asked for, and the Windows fixes in scripts/ci/run-scaffold-check.js (shell: win32 + drive-letter pathname handling) are a thoughtful bonus.

What looks great

  • Clean extraction: base template no longer depends on react-router-dom / BrowserRouter / AppRoutes
  • Extension wiring (App.tsx + AppRoutes + sample About route + Landing Link) is clear and easy to extend
  • Catalog entry matches the issue (type: react, category Tooling)
  • L1 base template and L2 react-react-router @ react-vite-starter were already green on the original commit

Small follow-ups I pushed (maintainer edits)

Pushed 737f9ce to your branch with light polish only:

  1. About page — reuse cna-landing styles so the demo route matches the starter UI
  2. Landing docs links — discriminated Doc union instead of optional isRouterLink
  3. package.json — drop empty devDependencies (same shape as peer extensions)
  4. templates.json — restore trailing newline
  5. Prettier wrap on the Landing lead sentence (avoids format churn)

No blockers found beyond that. Waiting on CI for the follow-up commit, then I'll approve and merge.

Thanks again for shipping this — appreciated!

@ulises-jeremias ulises-jeremias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — thank you again @Tanmay-lanjewar!

The extension cleanly delivers #279, CI is green across L0–L3 (including L2 · react-react-router @ react-vite-starter), and the follow-up polish commit looks good. Merging now.

@ulises-jeremias
ulises-jeremias merged commit 49e5913 into Create-Node-App:main Jul 18, 2026
94 checks passed
@ulises-jeremias

ulises-jeremias commented Jul 23, 2026 •

Copy link
Copy Markdown
Member

Hey @Tanmay-lanjewar!

Thanks again for contributing here.

I recently put together a Discord for the OSS work around Create Awesome (Node / Python / V), agentic tooling, and a few related repos. Idea is to make collab a bit easier and slowly grow a small community around these projects.

Invite if you want to join: https://discord.gg/bR5VyATgka

We've got project channels (CNA, CPA, CVA, agentic-workstation, agentic-harness, recoil-devtools, dotfiles, rxv, etc), general chat, ideas/feedback, events, interest roles, and some voice rooms for hangouts or pairing.

Totally optional. If you'd rather hang out somewhere lighter than GitHub issues, come say hi :)

@Tanmay-lanjewar
Tanmay-lanjewar deleted the feat/react-router-extension branch July 23, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add react-react-router extension for React templates

2 participants