https://github.com/deve-sh/firebase-js-boilerplate
Small Code Snippets useful for setting up Firebase for your JavaScript/TypeScript projects.
https://github.com/deve-sh/firebase-js-boilerplate
firebase
Last synced: 2 months ago
JSON representation
Small Code Snippets useful for setting up Firebase for your JavaScript/TypeScript projects.
- Host: GitHub
- URL: https://github.com/deve-sh/firebase-js-boilerplate
- Owner: deve-sh
- Created: 2021-12-21T18:15:09.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-26T12:19:42.000Z (over 4 years ago)
- Last Synced: 2025-04-06T10:44:50.618Z (about 1 year ago)
- Topics: firebase
- Language: JavaScript
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Firebase JavaScript Boilerplate
Small Code Snippets useful for the two variants of the Firebase SDK for JavaScript and TypeScript.
### Index
#### v8 SDK
The v8 SDK is the side-effect based SDK, i.e: All the functionality you need will be bundled in one single export and will be imported.
A Pro of this SDK is that it's simpler to use and everything that's needed is simpler to find and replicate from the docs, but then the con is that it's bulkier since you're importing everything, even stuff you don't need.
- [Initializing SDK](/v8/index.js)
- [Authentication](/v8/authentication.js)
- [Firestore](/v8/firestore.js)
- [Cloud Storage](/v8/storage.js)
- [Realtime Database](/v8/database.js)
- [Cloud Functions](/v8/functions.js)
- [Firebase Analytics](/v8/analytics.js)
- [Cloud Messaging](/v8/messaging.js)
- [Performance Monitoring](/v8/performance.js)
- [Remote Config](/v8/remoteConfig.js)
#### v9 SDK
The v9 SDK is the application/functionality-based SDK, i.e: You import only the funtionality you need, everything that's needed can be abstracted to helper functions.
So the bundle sizes are much-much smaller than the v8 SDK, but in terms of splitting, I personally feel that Firebase has overcompensated for the v9 SDK since now the use of the SDK is just much much more difficult (I.E: The syntax to use v9 is just not very intuitive relative to JavaScript convention).
The v9 boilerplate also contains certain functions that can help you abstract the need for passing refs to v9 calls every single time you have to use the SDK.
- [Initializing SDK](/v9/index.js)
- [Authentication](/v9/authentication.js)
- [Firestore](/v9/firestore.js) - In Progress
- [Cloud Storage](/v9/storage.js)
- [Firebase Analytics](/v8/analytics.js)
- [Cloud Messaging](/v8/messaging.js)
- [Performance Monitoring](/v8/performance.js)
- [Remote Config](/v8/remoteConfig.js)
#### Admin SDK
The Firebase Admin SDK, also known as the Firebase Server SDK, is to accomplish maintenance tasks, perform actions that should not require any security rules intervention, or things like marking a user's email as verified without sending out a verification email, changing their password on their behalf, deleting collections etc.
I.E: It's basically you operating Firebase in god mode.
##### v8 Admin SDK
- [Regular - Common.js Syntax since you'll be using this with Node.js on the Server Side](/admin/v8-regular.js)
- [ES6 and Above/TypeScript](/admin/v8-es6.js)
##### v9 Admin SDK
- [Regular - Common.js](/admin/v9-regular.js)
- [ES6 and Above/TypeScript](/admin/v9-es6.js)