All Projects → FrangSierra → Firestore Cloud Functions Typescript

FrangSierra / Firestore Cloud Functions Typescript

Licence: apache-2.0
Firebase cloud functions in typescript with Firestore. Using a social network as example

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Firestore Cloud Functions Typescript

Hify
Social network powered by firebase
Stars: ✭ 115 (-32.75%)
Mutual labels:  firebase-functions, firebase, firebase-cloud-messaging, social-network
React Firebase Starter
Boilerplate (seed) project for creating web apps with React.js, GraphQL.js and Relay
Stars: ✭ 4,366 (+2453.22%)
Mutual labels:  firebase-functions, firebase, firestore
Firebase Instagram
📸 Instagram clone with Firebase Cloud Firestore, Expo, and React Native 😁😍
Stars: ✭ 389 (+127.49%)
Mutual labels:  firebase, firestore, social-network
Combinefirebase
Combine wrapper on Google's iOS Firebase library.
Stars: ✭ 126 (-26.32%)
Mutual labels:  firebase-functions, firebase, firestore
Internalappstore
📦 Manage your own internal Android App Store.
Stars: ✭ 295 (+72.51%)
Mutual labels:  firebase-functions, firebase, firebase-cloud-messaging
Rxfirebase
Rxjava 2.0 wrapper on Google's Android Firebase library.
Stars: ✭ 509 (+197.66%)
Mutual labels:  firebase-functions, firebase, firebase-cloud-messaging
Integrify
🤝 Enforce referential and data integrity in Cloud Firestore using triggers
Stars: ✭ 74 (-56.73%)
Mutual labels:  firebase-functions, firebase, firestore
Whatsup
**Deprecated** Real time chat app written in Swift 4 using Firebase and OTP Authentication
Stars: ✭ 39 (-77.19%)
Mutual labels:  firebase, firebase-cloud-messaging, social-network
Chatapp
Chat App with all functionality private chat, contacts, friends request, find friends,for profile settings image cropper functionality, settings, logout also send text, image and all type of files, delete your files for you and everyone , login with email and mobile number and real time database firebase and for notification purpose Node Js used.
Stars: ✭ 25 (-85.38%)
Mutual labels:  firebase-functions, firebase, firebase-cloud-messaging
Thenetwork Open
TheNetwork is a blog cum chat app. It's completely built using firebase. Users can post, comment, like and bookmark the blogs, also users can send follow requests to connect with people. Users can create events and also prepare an event roadmap. Pagination for realtime data is also included in chats, blogs and events.
Stars: ✭ 17 (-90.06%)
Mutual labels:  firebase, firestore, firebase-cloud-messaging
Kotlin Firebase Group Chat
Group and OneonOne chat using firebase built in Kotlin similar to whatsapp.
Stars: ✭ 44 (-74.27%)
Mutual labels:  firebase-functions, firebase, firebase-cloud-messaging
Firebase Php
Unofficial Firebase Admin SDK for PHP
Stars: ✭ 1,657 (+869.01%)
Mutual labels:  firebase, firestore, firebase-cloud-messaging
Firebase Android Sdk
Firebase Android SDK
Stars: ✭ 1,704 (+896.49%)
Mutual labels:  firebase-functions, firebase
Materialabout
It's a material-design about screen to use on your Android apps. A developer profile and application information easy to integrate. 🔖
Stars: ✭ 1,511 (+783.63%)
Mutual labels:  social-network, social-media
Fireo
Google Cloud Firestore modern and simplest convenient ORM package in Python. FireO is specifically designed for the Google's Firestore
Stars: ✭ 163 (-4.68%)
Mutual labels:  firebase, firestore
Quickstart Cpp
Firebase Quickstart Samples for C++
Stars: ✭ 123 (-28.07%)
Mutual labels:  firebase, firebase-cloud-messaging
Fcmsharp
Firebase Cloud Messaging (FCM) with .NET
Stars: ✭ 115 (-32.75%)
Mutual labels:  firebase, firebase-cloud-messaging
Firebasecrud
Rich UI and animation flutter app backed by firebase
Stars: ✭ 121 (-29.24%)
Mutual labels:  firebase, firestore
Fcm
Firebase Cloud Messaging (FCM) notifications channel for Laravel
Stars: ✭ 169 (-1.17%)
Mutual labels:  firebase, firebase-cloud-messaging
Socialblocklists
Blocklists to block the communication to social networking sites and privacy harming services
Stars: ✭ 161 (-5.85%)
Mutual labels:  social-network, social-media

Cloud Functions for Firebase: Typescript with Firebase Firestore

This is an example Firebase project for using TypeScript with Cloud Functions for Firebase and Firestore

Before start

This cloud functions represent one of my last works with cloud functions: Implement a basic social media representation with posts, followers and feed, together with likes and comments. What will our cloud functions control?

  • Update the feed of the users when they follow/un-follow another user
  • Send notifications and update the Events data for an user when one of their posts receive a like or comment.
  • Send notifications when we have a new follower
  • In Progress : Update all the denormalized data from the user when he change his profile(username or profile picture)

I'm not an expert in noSQL data models or Typescript, but I have been working with Firebase approximately for the last two years. For that reason, feel free to suggest changes or just send a pull request. You can find an example of the database structure in the project.

At the moment there is not to much information or example about work with Typescript and Firestore. If you want to learn more I suggest you to visit the profile of Thomas Bouldin, aka Inlined who did a great talk in #FirebaseSummit about write quality cloud functions with Typescript. Also don't forget to give a look to the Firebase Functions samples.

Why Firestore?

Cloud Firestore is a cloud-hosted, NoSQL database that your iOS, Android, and web apps can access directly via native SDKs. Cloud Firestore is also available in native Node.js, Java, Python, and Go SDKs, in addition to REST and RPC APIs.

Following Cloud Firestore's NoSQL data model, you store data in documents that contain fields mapping to values. These documents are stored in collections, which are containers for your documents that you can use to organize your data and build queries.

Additionally, querying in Cloud Firestore is expressive, efficient, and flexible. Create shallow queries to retrieve data at the document level without needing to retrieve the entire collection, or any nested subcollections. Add sorting, filtering, and limits to your queries or cursors to paginate your results. To keep data in your apps current, without retrieving your entire database each time an update happens, add realtime listeners. Adding realtime listeners to your app notifies you with a data snapshot whenever the data your client apps are listening to changes, retrieving only the new changes.

Why TypeScript?

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.

One of the biggest challenges with developing in JavaScript is that it is very easy to write code that has runtime errors. TypeScript enables the fast development of JavaScript with optional types. When types are used, supported editors provide auto-suggest for methods and properties along with syntax highlighting of errors, which speeds development.

TypeScript supports targeting different browsers, and optimizes the resulting JavaScript. It is much easier to write clean, consistent code across a project and development team. TypeScript offers support for the latest and evolving JavaScript features like async functions and decorators, to help build robust components.

For a nice intro to TypeScript, check out the TypeScript PlayGround.

Instructions

Prerequisites

  1. The latest copy of the firebase-tools.
  2. The latest version of firebase-admin and firebase-functions

Setup

  1. Clone this repo.
  2. Set firebase-tools to use your project with firebase use <YOUR_PROJECT>
  3. Move inside your functions\ folder
  4. Update your dependencies with npm install
  5. Deploy your functions with npm run deploy

Note: with TypeScript you need to build the JavaScript files before deploying, so there's an npm script that does the steps. You can see that and a few other handy shortcuts in package.json

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].