This project is a movie search and favorites application built using The Movie Database (TMDB) API. It consists of a React frontend and an Express.js backend. Users can search for movies and mark their favorite ones.
- Frontend: React 19 + React Router DOM
- Backend: Node.js + Express 5
- Build Tool: Vite
- Environment Configuration: dotenv
git clone <your-repo-url>
cd <project-name>
cd server
npm install
cd ../frontend
npm install
You need to create a .env
file inside the server
folder and add your TMDB API key:
# server/.env
API_KEY=your_tmdb_api_key
Note: You can get your API key from TMDB's API settings page.
cd server
node index.js
The backend will run on port 6000
.
In a new terminal tab:
cd frontend
npm run dev
The frontend will be available at http://localhost:5173
and will proxy API requests to http://localhost:6000
.
├── server/ # Express.js backend
│ ├── index.js # Server entry point
| ├── package-lock.json
| ├── package.json
│ └── .env # Contains API_KEY
├── frontend/ # React frontend
│ ├── src/ # Main React files
│ └── vite.config.js
- Search for movies using the TMDB API
- View detailed movie information
- Mark and manage favorite movies
- Simple and responsive user interface
- Uses
dotenv
to manage API keys securely - Frontend and backend are fully decoupled
proxy
setting in Vite handles API routing during development
This project is licensed under the ISC License.