diff --git a/packages/cloud_firestore/cloud_firestore_web/CHANGELOG.md b/packages/cloud_firestore/cloud_firestore_web/CHANGELOG.md
new file mode 100644
index 000000000000..e53776993662
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/CHANGELOG.md
@@ -0,0 +1,3 @@
+## 0.1.0
+
+- Initial release
\ No newline at end of file
diff --git a/packages/cloud_firestore/cloud_firestore_web/LICENSE b/packages/cloud_firestore/cloud_firestore_web/LICENSE
new file mode 100644
index 000000000000..000b4618d2bd
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/LICENSE
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
diff --git a/packages/cloud_firestore/cloud_firestore_web/README.md b/packages/cloud_firestore/cloud_firestore_web/README.md
new file mode 100644
index 000000000000..b9d0e93f883d
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/README.md
@@ -0,0 +1,52 @@
+# cloud_firestore_web
+
+The web implementation of [`cloud_firestore`][1].
+
+## Usage
+
+### Import the package
+
+To use this plugin in your Flutter app on the web, simply add it as a
+dependency in your `pubspec.yaml` alongside the base `cloud_firestore`
+plugin.
+
+_(This is only temporary: in the future we hope to make this package
+an "endorsed" implementation of `cloud_firestore`, so it will automatically
+be included in your app when you run your Flutter app on the web.)_
+
+Add this to your `pubspec.yaml`:
+
+```yaml
+...
+dependencies:
+ ...
+ cloud_firestore: ^0.13.1
+ cloud_firestore_web: ^0.1.0
+ ...
+```
+
+### Updating `index.html`
+
+Due to [this bug in dartdevc][2], you will need to manually add the Firebase
+JavaScript files to your `index.html` file.
+
+In your app directory, edit `web/index.html` to add the line:
+
+```html
+
+ ...
+
+
+
+
+
+
+```
+
+### Using the plugin
+
+Once you have added the `cloud_firebase_web` dependency to your pubspec,
+you can use `package:cloud_firebase` as normal.
+
+[1]: ../cloud_firestore
+[2]: https://github.com/dart-lang/sdk/issues/33979
diff --git a/packages/cloud_firestore/cloud_firestore_web/android/.gitignore b/packages/cloud_firestore/cloud_firestore_web/android/.gitignore
new file mode 100644
index 000000000000..c6cbe562a427
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/android/.gitignore
@@ -0,0 +1,8 @@
+*.iml
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+/captures
diff --git a/packages/cloud_firestore/cloud_firestore_web/android/build.gradle b/packages/cloud_firestore/cloud_firestore_web/android/build.gradle
new file mode 100644
index 000000000000..e3db786e3805
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/android/build.gradle
@@ -0,0 +1,33 @@
+group 'io.flutter.plugins.cloud_firestore_web'
+version '1.0'
+
+buildscript {
+ repositories {
+ google()
+ jcenter()
+ }
+
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.5.0'
+ }
+}
+
+rootProject.allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion 28
+
+ defaultConfig {
+ minSdkVersion 16
+ }
+ lintOptions {
+ disable 'InvalidPackage'
+ }
+}
diff --git a/packages/cloud_firestore/cloud_firestore_web/android/gradle.properties b/packages/cloud_firestore/cloud_firestore_web/android/gradle.properties
new file mode 100644
index 000000000000..3148384dab31
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/android/gradle.properties
@@ -0,0 +1,2 @@
+org.gradle.jvmargs=-Xmx1536M
+android.enableR8=true
\ No newline at end of file
diff --git a/packages/cloud_firestore/cloud_firestore_web/android/gradle/wrapper/gradle-wrapper.properties b/packages/cloud_firestore/cloud_firestore_web/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 000000000000..019065d1d650
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
diff --git a/packages/cloud_firestore/cloud_firestore_web/android/settings.gradle b/packages/cloud_firestore/cloud_firestore_web/android/settings.gradle
new file mode 100644
index 000000000000..6bbf9cba49da
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/android/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = 'cloud_firestore_web'
diff --git a/packages/cloud_firestore/cloud_firestore_web/android/src/main/AndroidManifest.xml b/packages/cloud_firestore/cloud_firestore_web/android/src/main/AndroidManifest.xml
new file mode 100644
index 000000000000..ff4f493a984c
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/android/src/main/AndroidManifest.xml
@@ -0,0 +1,3 @@
+
+
diff --git a/packages/cloud_firestore/cloud_firestore_web/android/src/main/java/io/flutter/plugins/cloud_firestore_web/FirestoreWebPlugin.java b/packages/cloud_firestore/cloud_firestore_web/android/src/main/java/io/flutter/plugins/cloud_firestore_web/FirestoreWebPlugin.java
new file mode 100644
index 000000000000..af02befd488e
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/android/src/main/java/io/flutter/plugins/cloud_firestore_web/FirestoreWebPlugin.java
@@ -0,0 +1,15 @@
+package io.flutter.plugins.cloud_firestore_web;
+
+import io.flutter.embedding.engine.plugins.FlutterPlugin;
+import io.flutter.plugin.common.PluginRegistry.Registrar;
+
+/** FirebaseAuthWebPlugin */
+public class FirestoreWebPlugin implements FlutterPlugin {
+ @Override
+ public void onAttachedToEngine(FlutterPluginBinding flutterPluginBinding) {}
+
+ public static void registerWith(Registrar registrar) {}
+
+ @Override
+ public void onDetachedFromEngine(FlutterPluginBinding binding) {}
+}
diff --git a/packages/cloud_firestore/cloud_firestore_web/ios/cloud_firestore_web.podspec b/packages/cloud_firestore/cloud_firestore_web/ios/cloud_firestore_web.podspec
new file mode 100644
index 000000000000..2e9b05c81076
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/ios/cloud_firestore_web.podspec
@@ -0,0 +1,21 @@
+#
+# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
+#
+Pod::Spec.new do |s|
+ s.name = 'cloud_firestore_web'
+ s.version = '0.1.0'
+ s.summary = 'No-op implementation of cloud_firestore_web web plugin to avoid build issues on iOS'
+ s.description = <<-DESC
+ temp fake firebase_auth_web plugin
+ DESC
+ s.homepage = 'https://github.com/FirebaseExtended/flutterfire/tree/master/packages/cloud_firestore/cloud_firestore_web'
+ s.license = { :file => '../LICENSE' }
+ s.author = { 'Flutter Team' => 'flutter-dev@googlegroups.com' }
+ s.source = { :path => '.' }
+ s.source_files = 'Classes/**/*'
+ s.public_header_files = 'Classes/**/*.h'
+ s.dependency 'Flutter'
+
+ s.ios.deployment_target = '8.0'
+ end
+
diff --git a/packages/cloud_firestore/cloud_firestore_web/lib/cloud_firestore_web.dart b/packages/cloud_firestore/cloud_firestore_web/lib/cloud_firestore_web.dart
new file mode 100644
index 000000000000..291880726be8
--- /dev/null
+++ b/packages/cloud_firestore/cloud_firestore_web/lib/cloud_firestore_web.dart
@@ -0,0 +1,96 @@
+// Copyright 2017, the Chromium project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart';
+import 'package:firebase/firebase.dart' as firebase;
+import 'package:firebase/firestore.dart' show Firestore, Settings;
+import 'package:firebase_core/firebase_core.dart';
+import 'package:flutter_web_plugins/flutter_web_plugins.dart';
+
+import 'package:cloud_firestore_web/src/collection_reference_web.dart';
+import 'package:cloud_firestore_web/src/field_value_factory_web.dart';
+import 'package:cloud_firestore_web/src/document_reference_web.dart';
+import 'package:cloud_firestore_web/src/query_web.dart';
+import 'package:cloud_firestore_web/src/transaction_web.dart';
+import 'package:cloud_firestore_web/src/write_batch_web.dart';
+
+/// Web implementation for [FirestorePlatform]
+/// delegates calls to firestore web plugin
+class FirestoreWeb extends FirestorePlatform {
+ /// instance of Firestore from the web plugin
+ final Firestore _webFirestore;
+
+ /// Called by PluginRegistry to register this plugin for Flutter Web
+ static void registerWith(Registrar registrar) {
+ FirestorePlatform.instance = FirestoreWeb();
+ }
+
+ /// Builds an instance of [CloudFirestoreWeb] with an optional [FirebaseApp] instance
+ /// If [app] is null then the created instance will use the default [FirebaseApp]
+ FirestoreWeb({FirebaseApp app})
+ : _webFirestore = firebase
+ .firestore(firebase.app((app ?? FirebaseApp.instance).name)),
+ super(app: app ?? FirebaseApp.instance) {
+ FieldValueFactoryPlatform.instance = FieldValueFactoryWeb();
+ }
+
+ @override
+ FirestorePlatform withApp(FirebaseApp app) => FirestoreWeb(app: app);
+
+ @override
+ CollectionReferencePlatform collection(String path) {
+ return CollectionReferenceWeb(this, _webFirestore, path.split('/'));
+ }
+
+ @override
+ QueryPlatform collectionGroup(String path) {
+ return QueryWeb(this, path, _webFirestore.collectionGroup(path),
+ isCollectionGroup: true);
+ }
+
+ @override
+ DocumentReferencePlatform document(String path) =>
+ DocumentReferenceWeb(_webFirestore, this, path.split('/'));
+
+ @override
+ WriteBatchPlatform batch() => WriteBatchWeb(_webFirestore.batch());
+
+ @override
+ Future enablePersistence(bool enable) async {
+ if (enable) {
+ await _webFirestore.enablePersistence();
+ }
+ }
+
+ @override
+ Future settings(
+ {bool persistenceEnabled,
+ String host,
+ bool sslEnabled,
+ int cacheSizeBytes}) async {
+ if (host != null && sslEnabled != null) {
+ _webFirestore.settings(Settings(
+ cacheSizeBytes: cacheSizeBytes ?? 40000000,
+ host: host,
+ ssl: sslEnabled));
+ } else {
+ _webFirestore
+ .settings(Settings(cacheSizeBytes: cacheSizeBytes ?? 40000000));
+ }
+ if (persistenceEnabled) {
+ await _webFirestore.enablePersistence();
+ }
+ }
+
+ @override
+ Future