Skip to content

Front-end application that provides an overview of current game giveaways.

Notifications You must be signed in to change notification settings

Friftycode/game-giveaway-overview

Repository files navigation

Free Game Giveaways

A lightweight React app that displays currently available free games and loot from the GamerPower API. It fetches and displays giveaways across platforms like Steam, Epic Games Store, and Android.

readme.png


Table of Contents


Technologies


Components

The key components are simple, modular, and reusable:

  • FreeGamesPage Loads and displays all available giveaways. Handles loading and error states.
  • Card Displays an individual giveaway with an image, title, platform info, and a link to claim the game.
  • fetchGiveaways Fetches giveaway data from the API using correct headers and error handling.

Installation

Follow these steps to run the project locally:

1. Clone the repository:

git clone https://github.com/Friftycode/game-giveaway-overview.git
cd free-games

2. Install dependencies:

npm install

3. Configure environment variables:

Create a .env file in the root of the project and add your RapidAPI key:

VITE_RAPIDAPI_KEY=your_rapidapi_key

4. Start the development server:

npm run dev

5. Open in your browser:

Go to http://localhost:5173


Usage

  • Viewing Giveaways The app automatically fetches and displays all available free game giveaways.
  • Claiming Games Click the "CLAIM NOW" button to open the giveaway page in a new tab.

Development Process

  1. Project Setup

    • Created using npm create vite@latest with React + TypeScript.
    • Environment variables configured for API authentication.
  2. Basic Layout & Functionality

    • Built FreeGamesPage to fetch and display data.
    • Created Card component for each game.
  3. Styling & UX

    • Styled with Less Modules for scoped and maintainable styles.
    • Loading state and error handling implemented.
  4. Finishing Touches

    • Cleaned up code, added alt text for accessibility.
    • Wrote documentation for future reference.

Links

About

Front-end application that provides an overview of current game giveaways.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published