Skip to content

Migrate Project to Next.js and Tailwind CSS v4#14

Open
DeveloperAmrit wants to merge 2 commits intoAOSSIE-Org:mainfrom
DeveloperAmrit:fix-13-migrate
Open

Migrate Project to Next.js and Tailwind CSS v4#14
DeveloperAmrit wants to merge 2 commits intoAOSSIE-Org:mainfrom
DeveloperAmrit:fix-13-migrate

Conversation

@DeveloperAmrit
Copy link

@DeveloperAmrit DeveloperAmrit commented Feb 14, 2026

Addressed Issues:

Fixes #13

Screenshots/Recordings:

image image

Additional Notes:

Summary
This PR migrates the project from Vite + React to Next.js (App Router) and updates the styling framework to Tailwind CSS v4. The migration ensures better scalability, server-side rendering (SSR), and modern styling capabilities.

Checklist

  • [ x] My code follows the project's code style and conventions
  • [x ] I have made corresponding changes to the documentation
  • [x ] My changes generate no new warnings or errors
  • [ x] I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • [ x] I have read the Contributing Guidelines

Summary by CodeRabbit

  • New Features

    • Added Next.js app structure, root layout, and a Home hero component plus navbar and footer.
    • Introduced Tailwind-based global styling and PostCSS setup.
  • Chores

    • Migrated project from Vite to Next.js and updated scripts and dependencies.
    • Reworked TypeScript and ESLint configurations to align with Next.js workflow.
  • Removals

    • Removed legacy Vite bootstrap and standalone HTML/React entry points.

@coderabbitai
Copy link

coderabbitai bot commented Feb 14, 2026

📝 Walkthrough

Walkthrough

Replaces a Vite-based React app with a Next.js + Tailwind CSS (v4) app: removes Vite entrypoints/config, adds Next.js app-router layout/pages, PostCSS/Tailwind, Next/TypeScript configs, updates ESLint and package scripts/dependencies, and adds simple shared components.

Changes

Cohort / File(s) Summary
Build & Tooling removed
vite.config.ts, tsconfig.app.json, tsconfig.node.json, index.html
Removed Vite config, Vite-specific TypeScript configs, and HTML entrypoint as part of migration away from Vite/CRA-style bootstrap.
Next.js config & types
next.config.ts, next-env.d.ts, .gitignore
Added typed Next.js config, Next.js type declarations, and ignored .next build directory.
TypeScript Root Config
tsconfig.json
Replaced references-based TS setup with explicit compilerOptions, include/exclude, Next plugin and path aliasing (@/* → ./src/*).
Package & deps
package.json
Swapped scripts and dependencies from Vite setup to Next.js + Tailwind ecosystem; updated devDependencies and lint tooling.
ESLint
eslint.config.js
Changed export shape to tseslint.config(...), added ignore patterns (including .next), added react-hooks plugin and merged its recommended rules; removed react-refresh usage.
PostCSS / Tailwind
postcss.config.mjs, src/app/globals.css
Added PostCSS config and global CSS integrating Tailwind, theme variables, and dark-mode media query.
App-router files added
src/app/layout.tsx, src/app/page.tsx
Added Next.js root layout (with exported metadata) and page entry rendering new Hero component.
Removed Vite app files
src/main.tsx, src/App.tsx, src/App.css, src/index.css
Removed React bootstrap, main App component and legacy global CSS tied to the Vite scaffold.
New UI components
src/components/Home/Hero.tsx, src/components/Shared/Navbar.tsx, src/components/Shared/Footer.tsx
Added simple presentational components (Hero, Navbar, Footer) exported as defaults.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • Zahnentferner

Poem

🐰 Hopped through folders, swapped Vite for Next,

Tailwind stitched styles, configs now text.
Pages and layout in a fresh new stead,
Hello OrgExplorer — on to SSR ahead!

🚥 Pre-merge checks | ✅ 5 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Migrate Project to Next.js and Tailwind CSS v4' directly and clearly summarizes the main change: migrating from Vite+React to Next.js and updating Tailwind CSS.
Linked Issues check ✅ Passed The PR fully addresses the objectives in issue #13: it migrates from Vite+React to Next.js with App Router, implements server-side rendering capabilities, upgrades to Tailwind CSS v4, and establishes proper project structure.
Out of Scope Changes check ✅ Passed All changes are directly related to the Next.js and Tailwind CSS v4 migration objectives: configuration updates, dependency management, file structure reorganization, and component scaffolding align with the stated scope.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
src/components/Home/Hero.tsx (1)

1-1: Unnecessary React import with Next.js.

Next.js (with the new JSX transform enabled by default since React 17+) doesn't require import React from 'react' in files that only use JSX. You can safely remove this line from all new components.

♻️ Suggested diff
-import React from 'react'
-
 const Hero = () => {
src/components/Shared/Footer.tsx (1)

1-9: Same unnecessary React import as noted in Hero.tsx.

Same optional nit applies — the import React from 'react' can be dropped. Otherwise, this placeholder stub looks fine.


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 and usage tips.

@DeveloperAmrit
Copy link
Author

Hey @Zahnentferner Please review this

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Fix all issues with AI agents
In @.gitignore:
- Line 409: Remove the duplicate ".next" entry from .gitignore: locate the
redundant ".next" line (the duplicate entry shown in the diff) and delete it,
leaving the existing ".next/" entry in the Vite / React / Next cache section
(the original ".next/" entry) intact so the repository only contains one ignore
for Next's build cache.

In `@package.json`:
- Line 27: Remove the Vite-specific ESLint plugin "eslint-plugin-react-refresh"
from package.json and any ESLint configuration references (e.g., the "plugins"
array or "extends" that mention "react-refresh"); then run your package manager
to update lockfiles (npm/yarn/pnpm install) and regenerate
package-lock.json/yarn.lock to ensure the dependency is gone. Ensure there are
no remaining references to "react-refresh" in .eslintrc.* or eslintConfig in
package.json and remove them if present.
- Line 10: The "lint" npm script currently uses the removed Next.js command
("lint": "next lint"); update the package.json "lint" script to call the ESLint
CLI directly (e.g., set the "lint" script to run eslint .) and, if you want
Next.js recommended rules, add the devDependency "eslint-config-next" and
reference it in your ESLint configuration (e.g., extend "next" in .eslintrc) so
linting continues to work under Next.js 16.

In `@tsconfig.json`:
- Around line 2-19: Update the TypeScript compiler options to be compatible with
Next.js by changing the "jsx" option from "react-jsx" to "preserve" and the
"target" option from "es5" to "ES2017"; locate the compilerOptions block and
modify the "jsx" and "target" entries accordingly so TypeScript does not perform
JSX transformation and the emitted lib target matches Next.js recommendations.
🧹 Nitpick comments (3)
package.json (1)

13-18: Move build-only dependencies (@tailwindcss/postcss, postcss, tailwindcss) to devDependencies.

These are PostCSS/Tailwind build tools that are not needed at runtime. In a Next.js project, they should be in devDependencies to keep the production install lean.

Proposed restructuring
  "dependencies": {
-   "@tailwindcss/postcss": "^4.1.18",
    "next": "^16.1.6",
-   "postcss": "^8.5.6",
    "react": "^19.2.4",
-   "react-dom": "^19.2.4",
-   "tailwindcss": "^4.0.0"
+   "react-dom": "^19.2.4"
  },
  "devDependencies": {
+   "@tailwindcss/postcss": "^4.1.18",
    "@eslint/js": "^9.17.0",
    ...
+   "postcss": "^8.5.6",
+   "tailwindcss": "^4.0.0",
eslint.config.js (2)

12-13: Consider adding Node.js globals alongside browser globals.

Next.js App Router components can run on the server (Server Components are the default). Having only globals.browser means server-side code referencing Node globals (e.g., process, Buffer) would trigger ESLint's no-undef rule. Consider merging in globals.node or globals.nodeBuiltin as well, or scoping browser globals only to client component files.


6-22: Add @next/eslint-plugin-next for Next.js-specific lint rules.

This is a Next.js project (v16.1.6), but the standard Next.js ESLint plugin is not configured. Consider adding @next/eslint-plugin-next to catch framework-specific issues such as using <img> instead of next/image, <a> instead of next/link, or missing metadata exports. This plugin is the recommended approach for Next.js projects.

*.key
*.crt
*.local
.next
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Duplicate .next entry in .gitignore.

.next/ already exists on line 368. This new entry on line 409 is redundant. Remove one of the two — preferably keep the existing .next/ on line 368 (within the organized "Vite / React / Next cache" section) and drop this one.

Proposed fix
-.next
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.next
🤖 Prompt for AI Agents
In @.gitignore at line 409, Remove the duplicate ".next" entry from .gitignore:
locate the redundant ".next" line (the duplicate entry shown in the diff) and
delete it, leaving the existing ".next/" entry in the Vite / React / Next cache
section (the original ".next/" entry) intact so the repository only contains one
ignore for Next's build cache.

"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat package.json

Repository: AOSSIE-Org/OrgExplorer

Length of output: 825


🏁 Script executed:

rg -n 'eslint-config-next' .

Repository: AOSSIE-Org/OrgExplorer

Length of output: 48


🌐 Web query:

Next.js 16 next lint eslint-config-next required peer dependency

💡 Result:

In Next.js 16, next lint is removed, so you shouldn’t be trying to satisfy next lint-related dependency behavior anymore—linting is done by running ESLint directly (CLI). Next.js 16 also removed the eslint option in next.config.* and next build no longer runs linting. [1]

If you want the “Next.js recommended rules”, you must add the config yourself:

  • Install:
    • eslint
    • eslint-config-next (this is the shareable config that includes @next/eslint-plugin-next and other related lint plugins/config) [2]

Example (pnpm):

pnpm add -D eslint eslint-config-next
pnpm exec eslint .

[2]

If you’re migrating from next lint, Next provides a codemod to switch to ESLint CLI:

npx `@next/codemod`@canary next-lint-to-eslint-cli .

[1]

About “required peer dependency” warnings: those come from eslint-config-next being a shareable ESLint config package, which expects you (the app) to provide compatible peer deps (primarily ESLint itself, and TypeScript if you’re using TS linting). The official Next.js ESLint docs now explicitly instruct installing eslint alongside eslint-config-next. [2]

Sources: [1] Next.js “Upgrading: Version 16”; [2] Next.js ESLint configuration docs.


Update lint script for Next.js 16 — next lint command was removed.

In Next.js 16, next lint is deprecated and removed. The "lint": "next lint" script will fail. Update it to use ESLint CLI directly: eslint .

-   "lint": "next lint"
+   "lint": "eslint ."

Optionally, to use Next.js recommended ESLint rules, add eslint-config-next to devDependencies and include it in your ESLint config.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"lint": "next lint"
"lint": "eslint ."
🤖 Prompt for AI Agents
In `@package.json` at line 10, The "lint" npm script currently uses the removed
Next.js command ("lint": "next lint"); update the package.json "lint" script to
call the ESLint CLI directly (e.g., set the "lint" script to run eslint .) and,
if you want Next.js recommended rules, add the devDependency
"eslint-config-next" and reference it in your ESLint configuration (e.g., extend
"next" in .eslintrc) so linting continues to work under Next.js 16.

"@types/react-dom": "^19.0.2",
"eslint": "^9.17.0",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.16",
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Remove Vite leftover: eslint-plugin-react-refresh.

This plugin is specific to Vite's React Fast Refresh and serves no purpose in a Next.js project.

Proposed fix
  "devDependencies": {
    ...
-   "eslint-plugin-react-refresh": "^0.4.16",
    ...
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"eslint-plugin-react-refresh": "^0.4.16",
🤖 Prompt for AI Agents
In `@package.json` at line 27, Remove the Vite-specific ESLint plugin
"eslint-plugin-react-refresh" from package.json and any ESLint configuration
references (e.g., the "plugins" array or "extends" that mention
"react-refresh"); then run your package manager to update lockfiles
(npm/yarn/pnpm install) and regenerate package-lock.json/yarn.lock to ensure the
dependency is gone. Ensure there are no remaining references to "react-refresh"
in .eslintrc.* or eslintConfig in package.json and remove them if present.

Comment on lines +2 to +19
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n tsconfig.json

Repository: AOSSIE-Org/OrgExplorer

Length of output: 1051


🌐 Web query:

Next.js tsconfig.json jsx preserve react-jsx settings

💡 Result:

  • In a Next.js app, keep compilerOptions.jsx as "preserve". Next.js expects TypeScript to not transform JSX because Next (SWC/Babel) performs the optimized JSX transform, and it may automatically rewrite your tsconfig.json back to "jsx": "preserve". [1]
  • "react-jsx" vs "preserve" (TypeScript behavior):
    • "preserve": TypeScript keeps JSX intact in the output for another tool to transform. [2]
    • "react-jsx": TypeScript transforms JSX using the “new” React JSX runtime. (Useful when TypeScript is the thing emitting final JS.) [2]
  • If you want "react-jsx" for a separate build/tooling flow, use a second tsconfig (e.g. tsconfig.build.json) and point Next.js to whichever config you want via typescript.tsconfigPath (or run tsc -p tsconfig.build.json for non-Next builds). [3]

Sources: Next.js TypeScript configuration docs [1], TypeScript JSX compiler option docs [2], Next.js typescript.tsconfigPath docs [3].


🌐 Web query:

Next.js 16 target ES2017 compiler options requirements

💡 Result:

For Next.js 16, the default TypeScript template generated by create-next-app 16.0.0 sets these tsconfig.json compilerOptions (including target: "ES2017") as the recommended baseline: target: "ES2017", lib: ["dom","dom.iterable","esnext"], module: "esnext", moduleResolution: "bundler", jsx: "react-jsx", noEmit: true, isolatedModules: true, plus common flags like strict, skipLibCheck, esModuleInterop, resolveJsonModule, incremental, and a default paths alias. It also includes Next-generated types in include (notably .next/types/**/*.ts). [1]

What’s actually “required” vs. just “recommended”:

  • Next.js uses SWC to compile TypeScript/TSX (so TS target mainly affects type-checking/editor diagnostics, not the JS that Next outputs). [2]
  • If you want Next’s generated type definitions (e.g. for typed routes, etc.) to be picked up by TypeScript, your tsconfig.json must include .next/types/**/*.ts (create-next-app does this automatically). [3]

Reference (create-next-app 16.0.0 default tsconfig.json): see the full template config in the source. [1]

Sources: [1] [2] [3]


Change jsx to "preserve" and target to "ES2017" for Next.js compatibility.

Two compiler options need correction:

  1. "jsx": "react-jsx" (line 18) — Next.js requires "jsx": "preserve" because Next.js handles JSX transformation via SWC. Setting it to "react-jsx" causes TypeScript to transform JSX, conflicting with Next.js's own JSX handling.

  2. "target": "es5" (line 3) — Next.js 16 recommends "target": "ES2017". ES5 is unnecessarily restrictive and doesn't match the create-next-app template.

Proposed fix
 "compilerOptions": {
-    "target": "es5",
+    "target": "ES2017",
     "lib": [
       "dom",
       "dom.iterable",
       "esnext"
     ],
     "allowJs": true,
     "skipLibCheck": true,
     "strict": true,
     "noEmit": true,
     "esModuleInterop": true,
     "module": "esnext",
     "moduleResolution": "bundler",
     "resolveJsonModule": true,
     "isolatedModules": true,
-    "jsx": "react-jsx",
+    "jsx": "preserve",
     "incremental": true,
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"incremental": true,
"compilerOptions": {
"target": "ES2017",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
🤖 Prompt for AI Agents
In `@tsconfig.json` around lines 2 - 19, Update the TypeScript compiler options to
be compatible with Next.js by changing the "jsx" option from "react-jsx" to
"preserve" and the "target" option from "es5" to "ES2017"; locate the
compilerOptions block and modify the "jsx" and "target" entries accordingly so
TypeScript does not perform JSX transformation and the emitted lib target
matches Next.js recommendations.

@github-actions github-actions bot added size/XL and removed size/XL labels Feb 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Migrate from Vite react to Nextjs and tailwind v4

1 participant