Skip to content

Commit

Permalink
minify css and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
pirateIV committed Jul 19, 2024
1 parent 9e9b0b8 commit a2b1dcc
Show file tree
Hide file tree
Showing 2 changed files with 156 additions and 369 deletions.
98 changes: 93 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,96 @@
# React + Vite
# React TMDB Client

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
A React Movies application using [The Movie Database (TMDb)](https://developers.themoviedb.org) API.

Currently, two official plugins are available:
## Quick Setup

- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
1. **Clone the repository:**

```bash
git clone https://github.com/pirateIV/react.movies.git
cd react-movies
```

2. **Create and configure the environment file:**

- Rename your `.env.sample` file to `.env`.

3. **Obtain API keys:**

- Get your [TMDb API key](https://developers.themoviedb.org/3/getting-started/introduction).
- (Optional) Get your [YouTube API key](https://developers.google.com/youtube/v3/getting-started) for video data.

4. **Enter the API keys into the `.env` file:**
```env
VITE_TMDB_API_KEY=your_tmdb_api_key
VITE_YOUTUBE_API_KEY=your_youtube_api_key
```

## Running the Application

1. **Install dependencies:**

```bash
npm install
```

2. **Start the development server at `localhost:5173`:**
```bash
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.
<!-- - `npm run build`: Builds the application for production.
- `npm run lint`: Lints the code for errors and warnings.
- `npm run test`: Runs the test suite. -->
## 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](https://movies.jason.codes/)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Loading

0 comments on commit a2b1dcc

Please sign in to comment.