Skip to content

DPanvish/Movie-App

Repository files navigation

Welcome to your Expo app 👋

This is an Expo project created with create-expo-app.

Get started

  1. Install dependencies

    npm install
  2. Start the app

    npx expo start

In the output, you'll find options to open the app in a

You can start developing by editing the files inside the app directory. This project uses file-based routing.

Get a fresh project

When you're ready, run:

npm run reset-project

This command will move the starter code to the app-example directory and create a blank app directory where you can start developing.

Learn more

To learn more about developing your project with Expo, look at the following resources:

Join the community

Join our community of developers creating universal apps.


Appwrite: saved_movies collection schema

Create a collection (table) named saved_movies in your Appwrite database with the following attributes and indexes so it works with the save/list/delete helpers:

Attributes (columns)

  • movie_id: integer (required)
    • TMDB numeric movie id used for de-duplication and lookups.
  • title: string (required)
    • Movie title stored for quick display.
  • poster_url: string (required)
    • Pre-built TMDB poster URL. Can be an empty string when no poster is available.
  • createdAt: integer (required)
    • Unix epoch milliseconds (number). Used for sorting newest first.
  • device_id: string (required)
    • A per-device identifier used to scope saved movies when the app has no auth.

Recommended indexes

  • by_movie_device (key index) on [movie_id, device_id]
    • Speeds up queries like: Query.equal("movie_id", ), Query.equal("device_id", ), Query.limit(1).
  • by_device_createdAt (key index) on [device_id, createdAt]
    • Speeds up listSavedMovies: Query.equal("device_id", ), Query.orderDesc("createdAt").
  • Optional: Make by_movie_device a unique index to enforce one saved record per movie per device.

Permissions

  • If you rely on device_id scoping (no user auth), you can set collection-level permissions to allow reads and writes for anyone, or use an API key. In production, prefer authenticated users and store user_id instead of device_id.

Environment variables needed

  • EXPO_PUBLIC_APPWRITE_SAVED_TABLE_ID: The collection ID for saved_movies.
  • EXPO_PUBLIC_APPWRITE_DATABASE_ID: Your Appwrite database ID.

Types in code

  • The SavedMovieDoc interface in interfaces/interfaces.d.ts mirrors these attributes and is used by the client helpers.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published