A modern, responsive project management dashboard built with React 18, TypeScript, and Vite. This mini-app demonstrates best practices for state management, routing, testing, and accessibility.
- Project List View: Display all projects with search/filter functionality
- Project Detail View: Detailed view of individual projects with team information and progress tracking
- Real-time Search: Filter projects by name, description, or team members
- Dark/Light/System Theme: Beautiful theme toggle with smooth transitions (bottom-right corner)
- Smooth Animations: Professional shimmer effects, fade-in, and slide animations
- Responsive Design: Beautiful UI that works on all screen sizes
- Accessibility: ARIA labels, keyboard navigation, and semantic HTML
- Custom Hooks: Clean state management with
useProjectshook - Routing: Client-side routing with React Router v6
- Testing: Comprehensive test coverage with Vitest and React Testing Library
- React 18+ - Modern React with hooks
- TypeScript - Type-safe code
- Vite - Fast build tool and dev server
- React Router v6 - Client-side routing
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - High-quality UI components
- next-themes - Theme management (dark/light/system mode)
- Vitest - Fast unit testing
- React Testing Library - User-centric testing
- Lucide React - Beautiful icon library
src/
├── components/ # Reusable UI components
│ ├── ProjectCard.tsx # Individual project card with shimmer effects
│ ├── ProjectList.tsx # Grid of project cards
│ ├── SearchBar.tsx # Search input component
│ ├── TaskList.tsx # Task list component
│ ├── ThemeToggle.tsx # Dark/light/system theme switcher
│ └── ui/ # shadcn/ui components
├── hooks/ # Custom React hooks
│ └── useProjects.ts # Project data management
├── pages/ # Route pages
│ ├── ListPage.tsx # Main project list view
│ ├── DetailPage.tsx # Project detail view
│ └── NotFound.tsx # 404 page
├── __tests__/ # Test files
│ └── ProjectsList.test.tsx
└── App.tsx # Main app component with routing and theme provider
- Node.js 18+ and npm installed
- Git (optional)
- Clone the repository (or download the code):
git clone <repository-url>
cd vite-react-mini-app- Install dependencies:
npm install- Start the development server:
npm run devThe app will be available at http://localhost:8080
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run test- Run testsnpm run test:ui- Run tests with UInpm run lint- Run ESLint
The project includes comprehensive tests using Vitest and React Testing Library. Tests cover:
- Component rendering
- Search/filter functionality
- Empty states
- Accessibility features
- User interactions
Run tests with:
npm run test- Semantic HTML elements (
<main>,<header>,<nav>) - ARIA labels for interactive elements
- ARIA live regions for dynamic content updates
- Keyboard navigation support
- Focus management
- Screen reader friendly
- Theme toggle with accessible dropdown menu
- Color scheme attributes for proper browser rendering
The app uses a modern design system with:
- Standard Professional Colors: Blue primary, green success, amber warning, red destructive
- Dark/Light Mode: Full theme support with system preference detection
- Smooth Animations: Shimmer hover effects, fade-in, and slide animations
- Card-based Layouts: Consistent card sizing with subtle shadows and borders
- Status-based Colors: Visual indicators matching project status (active=blue, completed=green, on-hold=gray)
- Responsive Grid System: Perfectly aligned cards across all screen sizes
- Consistent Spacing: Professional typography and spacing system
The dashboard is fully responsive and works beautifully on:
- Mobile devices (320px+)
- Tablets (768px+)
- Desktops (1024px+)
- Large screens (1400px+)
State is managed using React hooks and a custom useProjects hook that:
- Provides mock project data
- Implements filtering logic
- Exposes helper functions (getProjectById)
- Uses memoization for performance
/- Main project list view/project/:id- Individual project detail view*- 404 Not Found page
The useProjects hook encapsulates all project data logic:
const { projects, getProjectById, filterProjects } = useProjects();All form inputs are controlled components with proper state management:
<SearchBar value={searchQuery} onChange={setSearchQuery} />- Memoized filter results with
useMemo - Efficient re-renders with proper dependency arrays
- Optimized theme transitions (no flickering)
- Staggered animations for better perceived performance
- CSS-based animations for smooth 60fps performance
The app uses next-themes for seamless theme switching:
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
{/* Your app */}
</ThemeProvider>- Light Mode: Clean, professional white backgrounds
- Dark Mode: Modern dark slate backgrounds with proper contrast
- System Mode: Automatically follows OS preference
- Smooth Transitions: Fast, flicker-free theme changes
The app features smooth, professional animations:
- Shimmer Effects: Elegant hover shimmer on project cards and detail cards
- Entrance Animations: Fade-in and slide-up animations for cards and components
- Staggered Animations: Sequential animations for list items (50ms delay per item)
- Hover Interactions: Scale effects on buttons, badges, and icons
- Smooth Transitions: 300ms duration for all interactive elements
- Theme Transitions: Fast, flicker-free theme switching (150ms)
This project demonstrates several React best practices:
- Functional Components - Modern React without classes
- Custom Hooks - Reusable stateful logic
- TypeScript - Type safety and better DX
- Testing - User-centric testing approach
- Accessibility - Building inclusive applications
- Performance - Optimizing render cycles
- Theme Management - Dark/light mode implementation
- Animations - CSS-based smooth animations
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - feel free to use this project for learning or as a template for your own applications.
- Built with Vite
- UI components from shadcn/ui
- Icons from Lucide
- Theme management with next-themes
Note: This is a demonstration project built as part of a React assessment. The project data is mocked and stored in memory. In a production application, you would connect to a real backend API.
