- About The Project
- Features
- Tech Stack
- Project Structure
- Getting Started
- Environment Variables
- Appwrite Setup
- Deployment
Movie App is a full-stack web application that allows users to discover, search, and explore movies using data from The Movie Database (TMDB) API. It features a smart trending system powered by Appwrite — movies that are searched more frequently automatically appear in the trending section, giving users a real-time popularity feed.
This project demonstrates modern React development practices including component-based architecture, API integration, real-time database interactions, and production deployment.
| Feature | Description |
|---|---|
| 🔍 Real-time Search | Instantly search from thousands of movies via TMDB API |
| 📈 Smart Trending | Trending section updates based on actual user search frequency |
| 🎥 Movie Discovery | Browse popular and top-rated movies on the homepage |
| 🖼️ Movie Details | View poster, rating, release year, and overview |
| 📱 Responsive Design | Fully optimized for mobile, tablet, and desktop |
| ⚡ Blazing Fast | Built with Vite for near-instant load times |
| ☁️ Cloud Database | Search metrics tracked and stored in Appwrite cloud |
- React 18 — Component-based UI library
- Vite — Next-generation frontend build tool
- Tailwind CSS — Utility-first CSS framework
- Appwrite — Open-source backend as a service (BaaS)
- Database for storing search metrics
- Real-time trending algorithm based on search count
- TMDB API — Movie data, posters, ratings, and metadata
- Vercel — Frontend hosting and CI/CD
movie-app/
├── public/
│ └── assets/ # Static assets (icons, images)
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── MovieCard.jsx # Individual movie card
│ │ ├── Search.jsx # Search input component
│ │ └── Spinner.jsx # Loading spinner
│ ├── App.jsx # Root component & main logic
│ ├── appwrite.js # Appwrite client & database functions
│ └── main.jsx # App entry point
├── .env # Environment variables (not committed)
├── .env.example # Environment variable template
├── .gitignore
├── index.html
├── package.json
├── tailwind.config.js
└── vite.config.js
Make sure you have the following installed:
- Node.js v18 or higher — Download
- npm v9 or higher
- Git — Download
- An Appwrite account — Sign up free
- A TMDB API key — Get one free
-
Clone the repository
git clone https://github.com/your-username/movie-app.git cd movie-app -
Install dependencies
npm install
-
Set up environment variables (see section below)
-
Start the development server
npm run dev
-
Open http://localhost:5173 in your browser 🎉
Create a .env file in the root of your project and add the following:
# TMDB API
VITE_TMDB_API_KEY=your_tmdb_api_key_here
# Appwrite
VITE_APPWRITE_PROJECT_ID=your_appwrite_project_id
VITE_APPWRITE_DATABASE_ID=your_appwrite_database_id
VITE_APPWRITE_COLLECTION_ID=metrics
⚠️ Never commit your.envfile to GitHub. It is already listed in.gitignore.
Follow these steps to configure your Appwrite backend:
-
Create a new project at cloud.appwrite.io
- Project Name:
Movie_App
- Project Name:
-
Create a Database
- Database Name:
Movie_DB - Copy the Database ID to your
.env
- Database Name:
-
Create a Collection named
metricswith these columns:Column Name Type Required searchTermString Yes countInteger No poster_urlString No -
Set Collection Permissions
- Go to
metrics→ Settings → Permissions - Add
Anywithreadandwriteaccess (for development)
- Go to
-
Add your Platform
- Go to Project Settings → Platforms → Add Platform
- Choose Web and enter your domain (e.g.,
https://your-app.vercel.app)
This app is configured for seamless deployment on Vercel:
-
Push your code to GitHub
git add . git commit -m "initial commit" git push origin main
-
Go to vercel.com → Add New Project → Import your repo
-
Add all environment variables in Vercel dashboard under Settings → Environment Variables
-
Click Deploy — Vercel auto-detects Vite and handles the build ✅
-
Copy your Vercel URL and add it to Appwrite Platforms (step 5 above)
⭐ Star this repo if you found it helpful!