prettier-plugin-tailwindcss: Automatically sorts Tailwind classNames using the official recommended order. Prevents "class soup" and makes CSS debugging 10x faster.
ESLint React Plugin: Catches common React mistakes (like missing keys in loops) before they become bugs.
This project is organized as a Professional Monorepo using npm Workspaces. It centralizes developer experience (DX) tooling while keeping individual projects isolated and lightweight.
- Core: React 19 + Tailwind CSS v4 + Vite 8
- Monorepo: npm Workspaces (
projects/*) - Formatting: Prettier +
prettier-plugin-tailwindcss(Official) - Class Ordering: Automated "outside-in" sorting (Layout → Box Model → Typography → Visuals).
Always run commands from the root folder. Use the -w (workspace) flag followed by the project name (from its package.json).
# Start a specific project
npm run dev -w weather-app
# Build a specific project
npm run build -w weather-app- Project-Specific (Runtime): Use for libraries the browser needs (React, Lucide, etc.).
npm install lucide-react -w weather-app
- Global Tooling (Dev): Use for build tools, linters, or formatters at the root.
npm install -D vitest
To ensure every file in the entire monorepo is perfectly clean and Tailwind classes are sorted:
npm run formatAll code review are done by CodeRabbit, a AI code reviewer.
The workflow will go like this:
- Create a branch from
main
git checkout main
git pull origin main # Ensures you are branching from the newest version
git checkout -b project/project-name- Build and project on that branch
git add .
git commit -m "Add FastAPI app with health endpoint and CORS"- Push and open a PR on the GH website
git push -u origin project/project-nameGo to the repository page on GitHub (github.com/JustinShawAcademy/front-end).
Since we've just pushed, GitHub will show a yellow notification at the top of the code list that says:
project/project-name had recent pushes less than a minute ago.
We can click the green [Compare & pull request] button on that yellow bar to review the Diff before giving a title and creating pull request
We could have also created the PR request usign CLI:
gh pr create --fillBut I prefer Github's GUI :)
- Learn from CodeRabbit's PR review, and push back any suggestions
git add .
git commit -m "Tighten CORS origins and add useCallback to health check"
git push# On GitHub: click "Merge pull request"
# Then locally:
git checkout main
git pullWhen we then start a new project, we run:
git checkout -b project/project-nameWe use a Two-Layer Dependency system:
- Root
devDependencies: Contains shared tools (Prettier, Tailwind Plugin). This ensures a consistent code style across all projects. - Project
dependencies: Contains only what that specific app needs to run (e.g., React).
This repo uses Tailwind v4. Unlike v3, it does not require a tailwind.config.js. The Prettier plugin automatically detects the @import "tailwindcss"; entry point in the CSS and handles class ordering.
.prettierrc: Located at the root to enforce a single source of truth for all projects..vscode/settings.json: Included in the repo to enable "Format on Save" for anyone who clones the project. This guarantees "Senior-level" code cleanliness instantly.
If node_modules becomes desynced or Prettier stops sorting, run this "Nuclear Reset" from the root:
# 1. Delete all node_modules and lockfiles
rm -rf node_modules projects/*/node_modules package-lock.json
# 2. Reinstall and re-link everything
npm install
# 3. Reload VS Code (Cmd+Shift+P > Developer: Reload Window)To add a new project (001-dashboard) to this monorepo:
- cd projects
- npm create vite@latest 001-dashboard
- cd ..
- rm -rf projects/001-dashboard/node_modules
- rm projects/001-dashboard/package-lock.json
- npm install
I wanted all my small pet projects to just be in one repo :)