Skip to content

kotenkodev/react-game-catalog

Repository files navigation

React Game Catalog

A responsive game discovery app built with React, TypeScript, and Chakra UI. It integrates with the RAWG API to browse games, search titles, filter by genre/platform, sort results, and view game details.

Features

  • Browse games in a responsive card grid
  • Infinite scrolling on the home feed
  • Filter by genre and parent platform
  • Sort by multiple RAWG ordering options
  • Search from the navbar
  • Dark/light color mode toggle
  • Game details page with description, metadata, trailer, and screenshots

Tech Stack

  • React + TypeScript + Vite
  • Chakra UI
  • TanStack Query (React Query)
  • React Router
  • Zustand
  • Axios

Getting Started

  1. Install dependencies:
npm install
  1. Create a .env.local file in the project root:
VITE_RAWG_KEY=your_rawg_api_key
  1. Start the development server:
npm run dev
  1. Open http://localhost:5173

To get an API key, create an account at RAWG API Docs.

Available Scripts

  • npm run dev - Start Vite dev server
  • npm run build - Type-check and build for production
  • npm run preview - Preview production build locally
  • npm run lint - Run ESLint
  • npm run format - Run Prettier

Routing

  • / - Home page (catalog with filters and infinite scroll)
  • /games/:slug - Game detail page

Project Structure

src/
├── components/
│   ├── common/      # shared UI (navbar, search, loader, etc.)
│   ├── filters/     # genre/platform/sort controls
│   └── game/        # game cards, grid, detail helpers
├── data/            # static bootstrap data (genres, platforms)
├── entities/        # TypeScript entity models
├── hooks/           # query hooks for games, game details, screenshots, trailers
├── pages/           # route pages (layout, home, game detail, error)
├── services/        # API client and image utilities
├── routes.tsx       # router definition
├── store.ts         # Zustand game query state
└── theme.ts         # Chakra theme config

Notes

  • API base URL is configured in src/services/api-client.ts.
  • The API key is passed as the key query param through Axios default params.
  • React Query Devtools are enabled in development.

Acknowledgments

About

A responsive game discovery app built with React, TypeScript, and the RAWG API. Browse and search titles with genre/platform filters, sorting, and infinite scroll, then open detailed game pages with trailers, screenshots, and key metadata. Includes dark mode, fast client-side routing, and a clean mobile-friendly UI for exploring games.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages