Skip to content
The officially supported adapter for using Firebase with Ember
TypeScript JavaScript HTML Shell
Branch: master
Clone or download

Latest commit

reggietheroman and jamesdaniels Changed command to create emberfire session-store for ember-simple-au…
…th to create session-store/application.js instead of session-store/session-store.js (#595)
Latest commit 0c7b67f Oct 17, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Cleanup Feb 9, 2019
.opensource Update project.json Feb 23, 2019
.vscode Upgrading Firebase Oct 4, 2019
addon-test-support WIP support Firestore and Firebase JS SDK 5 (#553) Feb 8, 2019
addon Cleaned up and perf mixin nits Oct 12, 2019
app fix: unexported files and extra files (#575) May 6, 2019
blueprints working on blueprints Oct 8, 2019
config WIP support Firestore and Firebase JS SDK 5 (#553) Feb 8, 2019
docs Changed command to create emberfire session-store for ember-simple-au… Oct 17, 2019
mixins Cleaned up and perf mixin nits Oct 12, 2019
tests WIP realtime relationships (#594) Oct 12, 2019
tools Moving back to emberfire package May 22, 2019
types WIP support Firestore and Firebase JS SDK 5 (#553) Feb 8, 2019
vendor WIP support Firestore and Firebase JS SDK 5 (#553) Feb 8, 2019
.editorconfig WIP support Firestore and Firebase JS SDK 5 (#553) Feb 8, 2019
.ember-cli WIP support Firestore and Firebase JS SDK 5 (#553) Feb 8, 2019
.eslintrc.js Firebase v6 & dynamic imports (#577) May 31, 2019
.gitignore Cleaned up and perf mixin nits Oct 12, 2019
.npmignore WIP support Firestore and Firebase JS SDK 5 (#553) Feb 8, 2019
.nvmrc Firebase v6 & dynamic imports (#577) May 31, 2019
.travis.yml Drop EMBER_CLI_IGNORE_ADDON_NAME_MISMATCH from Travis May 22, 2019
.watchmanconfig Upgrade to ember-cli/ember/ember-data 2.5.1 (#386) Jun 4, 2016
LICENSE Removed support@firebase.com and updated LICENSE (#395) Jun 18, 2016
README.md WIP realtime relationships (#594) Oct 12, 2019
changelog.txt Flushed out changelog and fixed the extra semicolon Feb 11, 2019
cloudbuild.yaml Adding a CI/CD process using Cloud Build May 19, 2019
ember-cli-build.js Firebase v6 & dynamic imports (#577) May 31, 2019
express.js Realtime database support in realtime route mixin Feb 10, 2019
index.js Firebase v6 & dynamic imports (#577) May 31, 2019
package-lock.json WIP realtime relationships (#594) Oct 12, 2019
package.json WIP realtime relationships (#594) Oct 12, 2019
testem.js WIP support Firestore and Firebase JS SDK 5 (#553) Feb 8, 2019
tsconfig.json Firebase v6 & dynamic imports (#577) May 31, 2019
typedoc.js Updating typedocs for rc.1 Feb 11, 2019

README.md

EmberFire Build Status Version Monthly Downloads Ember Observer Score

EmberFire is the officially supported adapter for using Firebase with Ember

Join the Firebase Google Group to ask technical questions, share apps you've built, and chat with other developers in the community. You can also find us in the Firebase Community Slack (look for the #ember room) or Stack Overflow.


WARNING: Master branch is the work in progress for version 3 of Emberfire. You can find version 2 here, if you're looking for documentation or to contribute to stable. Learn more about the rewrite effort here.


Why EmberFire?

  • Offically supported - Maintained by the Firebase team
  • Ember Data Adapters - Cloud Firestore and Realtime Database adapters for Ember Data allow you to persist your models in Firebase
  • Ember Services - firebase and firebase-app services allow direct access to the underlying Firebase SDK instance
  • Realtime Bindings - Listen for realtime updates to your Firebase backed Ember Data models using the provided realtime-listener service or the RealtimeRouteMixin
  • Authentication Providers - Integrate Firebase Authentication with your Ember application easily with providers for Ember Simple Auth and Torii
  • Analytics Collection - The AnalyticsRouteMixin adds Google Analytics screen tracking to your Ember Router.
  • Offline Enabled - Persist Ember Data models offline automatically with FirestoreAdapter
  • Fastboot Compatible - Perform initial rendering and fetching of your models server-side to increase application performance

Installation

$ ember install emberfire@next

Example use

// app/adapters/application.js
import FirestoreAdapter from 'emberfire/adapters/firestore';

export default FirestoreAdapter.extend({
    enablePersistence: true,
    persistenceSettings: { synchronizeTabs: true }
});
// app/models/article.js
import DS from 'ember-data';
const { attr, belongsTo, hasMany } = DS;

export default DS.Model.extend({
    title: attr('string'),
    body: attr('string'),
    publishedAt: attr('date'),
    author: belongsTo('user'),
    comments: hasMany('comments', { subcollection: true }),
});
// app/routes/articles.js
import Route from '@ember/routing/route';
import RealtimeRouteMixin from 'emberfire/mixins/realtime-route';
import PerformanceRouteMixin from 'emberfire/mixins/performance-route';

export default Route.extend(RealtimeRouteMixin, PerformanceRouteMixin, {
    model() {
        return this.store.query('article', { orderBy: 'publishedAt' });
    }
});
// app/routes/application.js
import AnalyticsRouteMixin from 'emberfire/mixins/analytics-route';
import Route from '@ember/routing/route';

export default Route.extend(AnalyticsRouteMixin);

Documentation

Compatibility

Please consult this table when selecting your version of EmberFire and Firebase SDK:

Ember Data EmberFire Firebase SDK
3.0+ 3.x 5.x
2.3+ 2.x 3.x
2.0 - 2.2 1.6.x 2.x
1.13 1.5.x 2.x

Migration Guides

Contributing

If you'd like to contribute to EmberFire, please first read through our contribution guidelines. Local setup instructions are available here.

You can’t perform that action at this time.