Skip to content
KubanjaElijahEldredPublic

About

Resources

Stars

5 stars

Watchers

0 watching

Forks

Repository files navigation

Movies App made in Flutter with. api data from TMDB

Movies App made in Flutter with. api data from TMDB,

This is an app that, displays you details of movies that you can search for or browse.

Feature

  • Fetch api data from TMDB asynchronously.
  • Dynamic Theming using Provider
  • Search Functionality
Video Demo: https://youtu.be/5_bDIUYLWzg

Screenshots:
Screenshot 2 Screenshot 1 Screenshot 3
Screenshot 1 Screenshot 2 Screenshot 3

To run this app

  1. Obtain api key from TMDB.
  2. Replace YOUR_API_KEY in api_constants.dart with your api key.
  3. Run the app with flutter run --release

Deploying to Vercel

Vercel has no Flutter runtime, so the app is compiled by the Flutter SDK in CI and the finished static bundle is uploaded to Vercel.

Every push to main runs .github/workflows/deploy.yml, which builds the web app and deploys it to https://play-it-movies.vercel.app.

To deploy from your machine instead, run:

./scripts/deploy_vercel.sh

It performs the identical build and deploy steps. The host/routing rules live in vercel.json, which CI copies into the static bundle before upload.

Required repository secrets

Secret Value
VERCEL_TOKEN Vercel access token
VERCEL_ORG_ID Vercel team id (team_fZRLHANF66J2q79gKeisPDlt)
VERCEL_PROJECT_ID Vercel project id (prj_4TFGQN3cz9AJQyybov9yns4MIYbk)

Why the Vercel Git integration is set to skip builds

The project is connected to this GitHub repository, so Vercel's Git integration would normally also try to build every push. It cannot: there is no Flutter runtime on Vercel, so that build produces an empty deployment and overwrites the good one, taking the site down to a 404.

To prevent that, the project's Ignored Build Step is set to exit 0. A zero exit code tells Vercel to skip the build, so pushes produce no Vercel-side deployment and CI stays the only thing that publishes to production. Verified behaviour on a push: the Git-triggered deployment ends up CANCELED while the Actions deployment is READY and serves production.

If you ever remove that setting, re-add it with:

curl -X PATCH "https://api.vercel.com/v9/projects/prj_4TFGQN3cz9AJQyybov9yns4MIYbk?teamId=team_fZRLHANF66J2q79gKeisPDlt" \
  -H "Authorization: Bearer $VERCEL_TOKEN" -H "Content-Type: application/json" \
  -d '{"commandForIgnoringBuildStep":"exit 0"}'

Web-specific note on remote images

Flutter web loads NetworkImage through XMLHttpRequest, so every remote image host must return Access-Control-Allow-Origin. TMDB's image.tmdb.org does, which is why posters load on the web. A plain <img> would tolerate a missing CORS header, so an image that works on Android or iOS can still fail on web. Keep new remote images on a CORS-enabled host.

About

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages