Nothing Special   »   [go: up one dir, main page]

Skip to content

pirateIV/movies

Repository files navigation

React TMDB Client

A React Movies application using The Movie Database (TMDb) API.

Quick Setup

  1. Clone the repository:

    git clone https://github.com/pirateIV/movies.git
    cd movies or cd custom-path
  2. Create and configure the environment file:

    • Rename your .env.sample file to .env.
  3. Obtain API keys:

  4. Enter the API keys into the .env file:

    VITE_TMDB_API_KEY=your_tmdb_api_key
    VITE_YOUTUBE_API_KEY=your_youtube_api_key

Running the Application

  1. Install dependencies:

    npm install
  2. Start the development server at localhost:5173:

    npm run dev

Project Structure

react-movies/
β”œβ”€β”€ .husky/                 # Husky config. for Git hooks.
β”œβ”€β”€ public/                 # Static files.
β”œβ”€β”€ src/                    # Source files.
β”‚   β”œβ”€β”€ assets/             # Assets like images, icons, etc.
β”‚   β”œβ”€β”€ components/         # React components.
β”‚   β”œβ”€β”€ config/             # Configuration files.
β”‚   β”œβ”€β”€ constants/          # Constants and enums.
β”‚   β”œβ”€β”€ pages/              # Application pages.
β”‚   β”œβ”€β”€ locales/            # Translations.
β”‚   β”œβ”€β”€ routes/             # Routes configuration.
β”‚   β”œβ”€β”€ services/           # Service utilities and API calls.
β”œβ”€β”€ .env.sample             # Sample environment variables.
β”œβ”€β”€ .gitignore              # Git ignore file.
β”œβ”€β”€ package.json            # NPM package configuration.
β”œβ”€β”€ README.md               # Project documentation.

Available Scripts

  • npm run dev: Starts the development server.

API Integration Overview

TMDb API

  • Base URL: https://api.themoviedb.org/3
  • Authentication: API Key (stored in .env file)

YouTube API (Optional)

  • Base URL: https://www.googleapis.com/youtube/v3
  • Authentication: API Key (stored in .env file)

Contributing

  1. Fork the repository.
  2. Create your feature branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a pull request.

Credits

This project idea is gotten from the foundational work by jason.codes

License

This project is licensed under the MIT License - see the LICENSE file for details.