Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ lib/generated_plugin_registrant.dart
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages


constants.dart

20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@

Before using this project, you will need to have Appwrite instance with Almost Netflix project ready. You can visit Project setup [GitHub repository](https://github.com/Meldiron/almost-netflix-project-setup) or [Dev.to post](https://dev.to/appwrite/did-we-just-build-a-netflix-clone-with-appwrite-28ok).

## Usage
## Setup

```bash
$ git clone https://github.com/appwrite/demo-almost-netflix-for-flutter.git
$ cd demo-almost-netflix-for-flutter
$ open -a Simulator.app
$ flutter run
```
1. Create `constants.dart` using `constants.dart.example` as a template and update the values with your own.
2. Add a new Flutter Platform to your Appwrite Project:
- Android: `io.appwrite.netflix_clone`
- iOS: `io.appwrite.netflixClone`

Make sure to update Endpoint and ProjectID in `lib/api/client.dart`.
## Run the App

The application will be listening on port `3000`. You can visit in on URL `http://localhost:3000`.
```shell
flutter pub get
flutter run
```

## Project Structure

### `assets`

Expand Down
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion flutter.compileSdkVersion
compileSdkVersion 33

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
Expand Down
301 changes: 301 additions & 0 deletions appwrite.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,301 @@
{
"projectId": "almost-netflix",
"projectName": "Almost Netflix",
"databases": [
{
"$id": "default",
"name": "default",
"$createdAt": "2023-03-29T00:16:26.726+00:00",
"$updatedAt": "2023-03-29T00:16:26.726+00:00"
}
],
"collections": [
{
"$id": "movies",
"$permissions": [
"read(\"any\")"
],
"databaseId": "default",
"name": "Movies",
"enabled": true,
"documentSecurity": false,
"attributes": [
{
"key": "genres",
"type": "string",
"status": "available",
"required": false,
"array": true,
"size": 255,
"default": null
},
{
"key": "ageRestriction",
"type": "string",
"status": "available",
"required": true,
"array": false,
"elements": [
"AR7",
"AR13",
"AR16",
"AR18"
],
"format": "enum",
"default": null
},
{
"key": "trendingIndex",
"type": "double",
"status": "available",
"required": true,
"array": false,
"min": -1.7976931348623157e+308,
"max": 1.7976931348623157e+308,
"default": null
},
{
"key": "tags",
"type": "string",
"status": "available",
"required": false,
"array": true,
"size": 255,
"default": null
},
{
"key": "releaseDate",
"type": "datetime",
"status": "available",
"required": false,
"array": false,
"format": "",
"default": null
},
{
"key": "isOriginal",
"type": "boolean",
"status": "available",
"required": true,
"array": false,
"default": null
},
{
"key": "netflixReleaseDate",
"type": "datetime",
"status": "available",
"required": false,
"array": false,
"format": "",
"default": null
},
{
"key": "name",
"type": "string",
"status": "available",
"required": true,
"array": false,
"size": 255,
"default": null
},
{
"key": "thumbnailImageId",
"type": "string",
"status": "available",
"required": true,
"array": false,
"size": 255,
"default": null
},
{
"key": "durationMinutes",
"type": "integer",
"status": "available",
"required": true,
"array": false,
"min": 1,
"max": 1000,
"default": null
},
{
"key": "cast",
"type": "string",
"status": "available",
"required": false,
"array": true,
"size": 255,
"default": null
},
{
"key": "description",
"type": "string",
"status": "available",
"required": false,
"array": false,
"size": 5000,
"default": null
}
],
"indexes": [
{
"key": "isOriginalDESC",
"type": "key",
"status": "available",
"attributes": [
"isOriginal"
],
"orders": [
"DESC"
]
},
{
"key": "releaseDateDESC",
"type": "key",
"status": "available",
"attributes": [
"releaseDate"
],
"orders": [
"DESC"
]
},
{
"key": "nameFULLTEXT",
"type": "fulltext",
"status": "available",
"attributes": [
"name"
],
"orders": [
"ASC"
]
},
{
"key": "genresFULLTEXT",
"type": "fulltext",
"status": "available",
"attributes": [
"genres"
],
"orders": [
"ASC"
]
},
{
"key": "trendingIndexDESC",
"type": "key",
"status": "available",
"attributes": [
"trendingIndex"
],
"orders": [
"DESC"
]
},
{
"key": "castFULLTEXT",
"type": "fulltext",
"status": "available",
"attributes": [
"cast"
],
"orders": [
"ASC"
]
},
{
"key": "tagsFULLTEXT",
"type": "fulltext",
"status": "available",
"attributes": [
"tags"
],
"orders": [
"ASC"
]
},
{
"key": "durationMinutesDESC",
"type": "key",
"status": "available",
"attributes": [
"durationMinutes"
],
"orders": [
"DESC"
]
}
]
},
{
"$id": "watchlists",
"$permissions": [
"create(\"users\")"
],
"databaseId": "default",
"name": "Watchlists",
"enabled": true,
"documentSecurity": true,
"attributes": [
{
"key": "movie",
"type": "relationship",
"status": "available",
"required": false,
"array": false,
"relatedCollection": "movies",
"relationType": "manyToOne",
"twoWay": false,
"twoWayKey": "watchlists",
"onDelete": "setNull",
"side": "parent"
},
{
"key": "userId",
"type": "string",
"status": "available",
"required": true,
"array": false,
"size": 255,
"default": null
}
],
"indexes": [
{
"key": "userIdASC",
"type": "key",
"status": "available",
"attributes": [
"userId"
],
"orders": [
"ASC"
]
}
]
}
],
"buckets": [
{
"$id": "posters",
"$createdAt": "2023-04-07T21:23:16.876+00:00",
"$updatedAt": "2023-04-07T21:23:16.876+00:00",
"$permissions": [
"read(\"any\")"
],
"fileSecurity": false,
"name": "Posters",
"enabled": true,
"maximumFileSize": 5000000,
"allowedFileExtensions": [
"jpg",
"png",
"heic",
"jpeg"
],
"compression": "none",
"encryption": true,
"antivirus": true
}
]
}
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>9.0</string>
<string>11.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
Loading