A modern React application for exploring TV shows from the TV Maze API. Search, browse, and view detailed information about thousands of TV shows with an intuitive and responsive interface.
- 🔍 Real-time Search — Search TV shows with instant results
- 📺 Show Details — View comprehensive information including ratings, networks, schedules, and summaries
- 📄 Pagination — Browse through large result sets efficiently
- 🎨 Theme Support — Dark and light mode with Radix UI
- 📱 Responsive Design — Works seamlessly on desktop, tablet, and mobile
- ⚡ Fast & Efficient — Vite-powered development with HMR
- 🧪 Well-Tested — Comprehensive unit and integration tests with Vitest
- 🏗️ Type-Safe — Full TypeScript support for reliability
- 📦 Redux State Management — Centralized state with RTK Query for API calls
| Category | Technology |
|---|---|
| Framework | React 19 with TypeScript |
| Build Tool | Vite |
| State Management | Redux Toolkit + RTK Query |
| UI Components | Radix UI Themes |
| Routing | React Router v7 |
| Testing | Vitest + React Testing Library |
| Code Quality | ESLint + Prettier |
| Icons | Lucide React |
| Utilities | DOMPurify (HTML sanitization) |
- Node.js 18.x or 20.x
- npm
npm installnpm run devOpen http://localhost:5173 in your browser.
npm run buildProduction-ready files will be in the dist/ directory.
npm run previewsrc/
├── app/ # Application setup
│ ├── router.tsx # Route configuration with lazy loading
│ ├── store.ts # Redux store with RTK Query
│ └── routes.ts # Route constants
│
├── pages/ # Page components
│ ├── shows/ # Shows browse page with search & filtering
│ ├── show/ # Individual show detail page
│ ├── terms/ # Terms and conditions page
│ └── privacy/ # Privacy policy page
│
├── features/ # Feature modules (isolated, reusable)
│ ├── search-bar/ # Search input component
│ ├── shows/ # Shows list component
│ ├── show-card/ # Individual show card display
│ ├── show/ # Show details components (hero, summary, schedule)
│ ├── pagination/ # Pagination controls
│ ├── sort-panel/ # Sorting/filtering options
│ └── loading/ # Loading UI
│
├── entities/ # Business logic entities
│ └── Show.ts # Show interface definition
│
├── shared/ # Shared resources
│ ├── api/ # RTK Query API definitions
│ │ ├── showsApi.ts # Shows CRUD operations
│ │ └── themeApi.ts # Theme preferences API
│ ├── hooks/ # Custom hooks
│ │ ├── useShowSearch.ts # Search logic hook
│ │ └── useThemeMode.ts # Theme toggle hook
│ ├── providers/ # Context providers
│ ├── ui/ # Layout components
│ ├── types/ # TypeScript interfaces
│ └── styles/ # Global styles
│
├── lib/ # Utility functions
│ └── errors.ts # Error handling utilities
│
└── styles/ # Global CSS
| Command | Description |
|---|---|
npm run dev |
Start development server with HMR |
npm run build |
Type-check & build for production |
npm run preview |
Preview production build locally |
npm run lint |
Run ESLint code quality checks |
npm run test |
Run test suite with Vitest |
npm run test:ui |
Run tests with interactive UI dashboard |
The application uses the TV Maze API with no authentication required.
GET /shows— List all shows (paginated)GET /shows/{id}— Get detailed information about a showGET /search/shows?q={query}— Search shows by name
All API calls are handled through Redux Toolkit Query for automatic caching, deduplication, and state management.
# Run all tests
npm run test
# Watch mode
npm run test -- --watch
# Interactive UI
npm run test:ui
# Coverage report
npm run test -- --coveragenpm run lintESLint enforces TypeScript best practices and React conventions.
Prettier automatically formats code on commit via lint-staged git hooks.
GitHub Actions workflows automate:
- CI (
.github/workflows/ci.yml) — Linting, type-checking, and tests on every PR and push tomain/dev - Build & Deploy (
.github/workflows/build-deploy.yml) — Build artifacts on pushes tomain - Security (
.github/workflows/security.yml) — Dependency vulnerability scans
- Code splitting with React lazy loading
- RTK Query caching and deduplication
- Vite fast module replacement
- Image optimization in show cards
- Responsive component design
- Create a branch from
dev:git checkout -b feature/your-feature - Make your changes and commit:
git commit -am 'Add feature' - Push to your branch:
git push origin feature/your-feature - Open a Pull Request to
dev
All PRs must pass CI checks (linting, type-checking, and tests).
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)