-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
156 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
Oops, something went wrong.