A responsive React application built with Vite and Tailwind CSS. It demonstrates component architecture, routing, state management with hooks, a Task Manager persisted to localStorage, and a public API integration with search and pagination. Includes light/dark theme support.
- React 18 + Vite 5
- React Router 6
- Tailwind CSS 3
- Install dependencies:
npm install - Start the dev server:
Open
npm run devhttp://localhost:5173.
src/
App.jsx # Routes and pages
main.jsx # React root
index.css # Tailwind layers
context/ThemeContext.jsx
layouts/RootLayout.jsx
pages/{Home,Tasks,Api}.jsx
sections/TaskManager.jsx
ui/{Button,Card,Navbar,Footer}.jsx
- Reusable UI: Button variants, Card
- Layout: Navbar, Footer, responsive container
- Theme: Light/Dark via context + Tailwind
darkmode - Task Manager: add/complete/delete/filter, persisted to localStorage
- API Page: fetch from JSONPlaceholder, loading/error states, search, pagination
- Animations: subtle fade-in transitions
npm run dev- start dev servernpm run build- production buildnpm run preview- preview built app
- Ensure
netlify.tomlexists (already included):- Build command:
npm run build - Publish directory:
dist - SPA redirects via
public/_redirects
- Build command:
- Push to GitHub and connect the repo in Netlify, or run locally:
Drag-and-drop the
npm run builddist/folder into Netlify Deploys, or usentl deploy.
- Deployed URL: [Add your Netlify deployment URL here]
- Example:
https://your-app-name.netlify.app
- Add screenshots of Home, Tasks, and API pages here.
- Requires Node 18+.
- Tailwind is configured in
tailwind.config.jswithdarkMode: 'class'.