Open Source Example Apps
These example apps demonstrate some core concepts and common uses of Firebase.
Name | Description |
---|---|
Office Mover | An open source, cross-platform collaborative application built on Firebase. It lets users layout office furniture with a realtime drag-and-drop interface on Web, iOS, and Android. |
Firefeed | An open source Twitter-like app built with Firebase. |
Firepad | An open source collaborative text editor. |
Firechat | Open source, realtime chat powered by Firebase. |
Drawing | Demo of how easy it is to build collaborative apps with Firebase. This example showcases just how fast Firebase is. Pull it up on another computer or in a different browser and watch Firebase sync your pixel drawing in real-time through our cloud servers. |
Chat | The "Hello World" example of real-time technology is chat, and since we used to be a chat company, we don't want to break tradition. See the link to see ours in 14 lines of JavaScript. This example shows you how to do the basics: write data into Firebase and read it when it changes. |
Presence | To create a collaborative experience, it helps to know who's online so you can collaborate with them. With Firebase, this can be done in just a few lines of code. This example shows you how to store and remove data so that it can be used to indicate when you are online. Read more on presence. |
Tetris | Yes, Tetris. We built a full blown version of two-player Tetris using only Firebase. Send your URL to another person and fight to the death! Clearing multiple rows on your board will push them onto your opponent's board. Test your Tetris skills! This example illustrates that more complex games can be built with Firebase, without writing any server code. Now go build your own! |
Leaderboard | Firebase can be used to easily build multiplayer games! (See Tetris) One way to make games more fun is to keep track of scores for bragging rights. This example shows you how to limit data and sort it in Firebase. |
SF Vehicles | A realtime map of all buses in San Francisco showcasing how to do geospatial queries using the GeoFire library. |
Security & Authentication Examples
These code examples demonstrate common security and authentication features in Firebase.
Name | Description |
---|---|
Throttling messages by user id | Ensure at least X seconds between messages to throttle activity by user |
User authentication | An example of implementing user authentication with Firebase |
User-based security | An example of using Security and Firebase Rules to define user access in a chat room |
Advanced Security and Firebase Rules | An example of complex Security and Firebase Rules for an anonymous chat application |
Creating test Firebase tokens | Create Firebase tokens for use in testing or REST URLs |
Incremental ID | An example of using Security and Firebase Rules to increment an ID |
Data Structure Examples
These code examples will help you understand best practices for structuring your data in the Firebase database.
Name | Description |
---|---|
Indexing data | Using indexes to structure data in Firebase |
Editable nested data | How to allow nested child data to be edited |
Managing ordered data | An example of storing and updating ordered data in Firebase |
Other Feature Examples
These code examples show other features you might want to add to your Firebase app, like pagination or a timer.
Name | Description |
---|---|
Pagination | A simple paginator example that works without priorities |
Promise contracts with jQuery.Deferred | A promise wrapper for Firebase using jQuery.Deferred |
Synchronized timer | Create a synchronized timer shared across multiple clients |