You are v0, an AI assistant.
Generate a React + Vite web application named "Tu Armario Virtual" using plain JavaScript (no TypeScript) with .jsx extensions for all components. Use Tailwind CSS, shadcn/ui and react‑router‑dom for client‑side routing.
Requirements:
- Complete project scaffold, including directory and file structure exactly as shown below.
- Entry point & global styles:
- /src/main.jsx that renders <App /> wrapped in <BrowserRouter>
- /src/index.css importing @tailwind base, components, utilities
- Pages / Views (each as its own .jsx in /src/pages):
- Home.jsx (Landing / Home with register & login CTAs)
- Register.jsx (email, password, live validation, “Accept Terms”)
- Login.jsx (email/password + “Forgot password?”)
- Dashboard.jsx (cards: total items, categories count, “Upload new item”)
- Upload.jsx (file upload + category selector)
- Closet.jsx (responsive grid of items, infinite scroll/pagination)
- Categories.jsx (filter bar, list of categories)
- Recommendations.jsx (auto‑generate outfit suggestions based on color‑matching rules and garment types)
- Profile.jsx (edit user info, change password, toggle light/dark theme)
- NotFound.jsx (404 page)
- Shared Components (in /src/components):
- Header.jsx, Footer.jsx, Layout.jsx (wraps Header/Main/Footer), ItemCard.jsx, CategoryFilter.jsx, etc.
- Routing (in /src/routes/Routes.jsx):
- Define all <Route> mappings, include a “*” route to NotFound.jsx
- State & Context:
- /src/contexts/AuthContext.jsx to manage user authentication and protected routes
- Custom hooks in /src/hooks: useAuth.jsx, useFetchItems.jsx, useTheme.jsx
- Services:
- /src/services/api.js for API calls using import.meta.env.VITE_API_URL
- Environment & config:
- .env.example with VITE_API_URL
- .gitignore (node_modules, dist, .env)
- README.md with setup & run instructions
- ESLint (.eslintrc.js) and Prettier (prettier.config.js) configs
- Tests:
- /src/tests/App.test.jsx (basic smoke test with Vitest/React Testing Library)
- Assets & PWA basics:
- /public/favicon.ico
- /public/manifest.json
- Color Scheme (balanced – fresh but not overpowering):
- Background:
#F0F0F5 (soft light gray)
- Primary Accent:
#FF7F50 (coral)
- Secondary Accent:
#00CED1 (turquoise)
- Text Primary:
#333333 (dark gray)
- Surface / Card BG:
#FFFFFF (white)
- Border / Divider:
#E0E0E0 (light gray)
Project Structure (must be generated exactly):
/
├─ public/
│ ├─ index.html
│ ├─ favicon.ico
│ └─ manifest.json
├─ src/
│ ├─ index.css
│ ├─ main.jsx
│ ├─ App.jsx
│ ├─ components/
│ │ ├─ Header.jsx
│ │ ├─ Footer.jsx
│ │ ├─ Layout.jsx
│ │ ├─ ItemCard.jsx
│ │ └─ CategoryFilter.jsx
│ ├─ pages/
│ │ ├─ Home.jsx
│ │ ├─ Register.jsx
│ │ ├─ Login.jsx
│ │ ├─ Dashboard.jsx
│ │ ├─ Upload.jsx
│ │ ├─ Closet.jsx
│ │ ├─ Categories.jsx
│ │ ├─ Recommendations.jsx
│ │ ├─ Profile.jsx
│ │ └─ NotFound.jsx
│ ├─ routes/
│ │ └─ Routes.jsx
│ ├─ contexts/
│ │ └─ AuthContext.jsx
│ ├─ hooks/
│ │ ├─ useAuth.jsx
│ │ ├─ useFetchItems.jsx
│ │ └─ useTheme.jsx
│ ├─ services/
│ │ └─ api.js
│ └─ tests/
│ └─ App.test.jsx
├─ .env.example
├─ .gitignore
├─ README.md
├─ vite.config.js
├─ tailwind.config.js
├─ postcss.config.js
├─ eslintrc.js
├─ prettier.config.js
└─ package.json
Use the defined color scheme in your Tailwind theme extensions and apply consistently to backgrounds, text, buttons, cards, and borders. Ensure all components are modular, responsive (mobile + desktop), and accessible (proper aria attributes).