Questions tagged [firebase]
Firebase is a real-time application platform, optimized for building collaborative, asynchronous applications with mostly client-side code.
64
questions
2
votes
0
answers
52
views
MVVM signing in using firebase
I'm new to MVVM architecture. I want to have authentication with email + password, google and Facebook. I'm not sure if there should be separate view models for each authentication way:
...
0
votes
0
answers
21
views
User id assignment in cloud functions
I made Firebase cloud function that assigns id to each registered user. However, I am not sure if this is an optimal way of achieving my goal.
When user details document added to "users" ...
0
votes
0
answers
184
views
Promise to save an image to Firebase and obtain the resulting URL
I'm trying to write a promise that will return me the image URL value that I'm getting from firebase once It is saved to the firebase storage.
After some time I wrote the following code and it is ...
1
vote
0
answers
941
views
Add to Favourite List example - working but with performance issues
I am building a small framework for e-commerce or blog app using React.
One of the features of this framework is an "Add to Favourite List" function.
The ...
1
vote
1
answer
261
views
React Native login, sign up and sign out using Firebase project
I have built a basic app which uses firebase for authentication.
The app is pretty simple.
Sign up the user to firebase using email and password.
Sign in the user
Sign out the user
Also, I have ...
1
vote
0
answers
32
views
Implementing a REST API that uploads a document and it's information to the drive and database
I want to develop an applications where users (students in my university) can upload documents (some sort of a GUI for the drive). I have a Vue application and a NodeJS server which is used as a REST ...
4
votes
3
answers
108
views
Destructuring with map and assigning to a constant
I don't know exactly what to name this, but I was refactoring a code snippet and looking at this constant users I thought I'd do this destructuring:
Before:
...
1
vote
0
answers
97
views
My First React JS Portfolio Web App : A Restaurant Website
I have written my first react js web app. It is a portfolio project which is a restaurant website. I have used firebase to authenticate users and to host my website. I am asking the Code Review ...
1
vote
0
answers
162
views
Advice converting an onCreate firebase cloud function trigger with FCM Messaging to support async/await and database reads
I initially had a simple firebase cloud function that sent out a push notification to a topic when a new message child was created in my real-time database. But I wanted to add message filtering where ...
0
votes
1
answer
54
views
Angular observables piping
I wanted to check and see if this was as efficient as can be. The goal is to get a user's data from a group of documents that contains references to users in Firestore.
ngOnInit
...
1
vote
0
answers
37
views
JavaScript async/await function performance improvement
I have a simple async/await function which gets data from a firebase endpoint. I would like to know if there is any room for improvement performance wise.
...
1
vote
1
answer
199
views
Private desktop and mobile WebSocket connections with Node.js
Background info
To learn a new branch of my dev career, I've started a new project in my spare time (I've never used WebSockets before and I also want to learn more about common authentication flows). ...
3
votes
1
answer
143
views
Swift iOS rewrite a function that use Firebase database without updating a global variable
I'm learning swift programming and i built a music trivia app for iOS that use firebase real time database.
I have a function that before the game start get the number of record for each category of ...
2
votes
0
answers
141
views
Firestore async function with array and object transform for jquery datatables - improve efficiency and maintainability
How could this Firestore function be improved, please? This is a question to help us learn to write better code. So by improved, I don't mean made shorter... I mean made clearer as to what it is doing,...
4
votes
1
answer
136
views
Search filter for words in dart
I need to add search filters for firebase So that I can get search result easily and precisely
I was altering the code from hereThis Medium Post
I would like to optimize this code.
...
4
votes
1
answer
762
views
@angular/fire Firestore cached service
I've written a service for firebase that handles all my Firestore calls. The goal is to only read the database once on app init( load() function) and then keep a copy of the database inside local ...
2
votes
1
answer
53
views
ZooRater mobile app. This code is responsible for displaying and handling zoo dashboard. Need general advice
Context: gitlab link
I know, it's a lot of code but I need your help ladies and gentleman. I'm not sure if I can ask for code review for the whole project so I just ask to review this activity. I ...
6
votes
1
answer
1k
views
Handling google authentication with firebase in nextjs web app
Background info
I have just started using/ learning how to use Next.js and developed a basic application which allows users to view several pages, some of which are authentication protected. Users ...
5
votes
1
answer
205
views
Cloud Function: Deleting from both Firestorage and Firestore in a kind of "batch"
I've written code that deletes a "post" the user has sent with my Android app. A "post" is made of an image (stored in Firestorage) named A, of a Firestore document named B which is the user UID (this ...
3
votes
0
answers
202
views
Fulfillment webhook with Dialogflow to operate on a Firestore database
I'm currently calling a fulfillment webhook with dialogflow in my node backend, performing crud operations on a firestore db. Is there a better, cleaner way to ...
5
votes
2
answers
156
views
Managing Angular subscriptions
There are different methods to get data from server in Angular application:
Get Observable from the service and subscribe to it at component
Create Subject at the service and subscribe to the Subject ...
2
votes
0
answers
90
views
Google Play billing + Firebase functions: Creating a one-time product, server-side
My Android app must request my Cloud Functions server to create in-app products at runtime ; then, the server responds with the created one-time product. I've written the server Cloud Function that ...
1
vote
0
answers
19
views
Functions to handle async calls and also handle loading and error status in React component
I've got the following component structure:
Component hierarchy:
<AdminBlogPostContainer>
<AdminBlogPostPage>
<BlogPostForm>
...
2
votes
0
answers
234
views
Angular polling and plotting component using Firebase
I could use some help refactoring my component and service. I have a lot of nested logic and wasn't sure what I could do to improve this. I'm new to Angular 7 and their piping syntax. I suspect this ...
2
votes
0
answers
28
views
Simplifying a firestore querying function
I have this function where it queries through the database and returns a random user if the requirement is met if not then try it again. It works and all but I feel like the code could be better/...
2
votes
0
answers
84
views
Firebase login/registration process for a dating app
I am developing another bigger project, I want to try a simple DatingApp and currently I try to develop a Login and Registration Form. There is no special register / login button, the code will later ...
1
vote
1
answer
2k
views
Destroy Singleton pattern in kotlin
I am practicing Singleton pattern in kotlin.
It is a quiz app which has question tile with four options and one correctIndex.
McqOldActivity.classs
...
0
votes
2
answers
175
views
NoSQL data model design for players in a game
I am modelling a game which can be single (player1 vs player2) or double (pair 1 vs pair 2, where each pair contains 2 players) and each game has a score. The game is group and date based e.g. Group A ...
-2
votes
1
answer
636
views
Updating text with JavaScript and Firebase [closed]
My problem is this causes more lag as time goes on. I use this commonly to chat with my friends, and I need it the site to update in real-time whenever a message gets edited/deleted/added. Any ...
2
votes
1
answer
127
views
How can this swift, firebase image fetching, function be made more concise?
I am trying to fetch a group of images within a place in Firebase database ref. I then loop through each image adding it to an array which is then supposed to be added to a tableview cell. I was ...
4
votes
2
answers
76
views
Loading items for an eCommerce site
I am attempting to make an eCommerce site from scratch. Right now I have the following code that gets all the items from a Firebase Firestore database and then adds HTML into an items div element ...
1
vote
1
answer
112
views
Swift UITableViewCell class to show cameras, ratings for a car wash and other information
I have an UITableViewCell class that written in Swift. And it seems to me that I did it the wrong way. It works fine, but I want improve the code or refactor it somehow to make it look better.
Any ...
2
votes
0
answers
800
views
Firebase server-side auth with persistent websocket connection
I've been diving a bit into JavaScript for the first time in forever, generally trying things out, and getting acquainted.
I gave my toy project the following requirements:
single-page react app
...
6
votes
0
answers
2k
views
Authenticate ASP.NET Web Api 2 using OWIN and Firebase
I'm about to go live with an app, and would, therefore, appreciate a review of my firebase authentication setup. I haven't been able to find many resources describing how to perform such ...
1
vote
2
answers
55
views
Parameter guards for Firebase calls
I have code to ensure parameters existence all over the place. Is there a better way to do it? So that I do not have so many repeated codes inside different functions
...
7
votes
2
answers
116
views
Controlling Finances with Web Development
Purpose
First, let me explain the title: I previously had managed my finances like an old fashioned company might, and it worked wonders for making financial decisions (at least for me). I wanted my ...
4
votes
1
answer
853
views
Maintainable networking layer architecture
There are so many different solutions and examples on how to build a proper networking layer, but every app has different constraints, and design decisions are made based off trade-offs, leaving me ...
4
votes
1
answer
669
views
Vue + Vuex + Firebase serverless realtime chat
I am "discovering" Firebase and I'm trying create simple chat with Vue, Vuex and Firebase. But because I'm just starting out with Vue, I need code review or advices from more experienced programmers. ...
3
votes
2
answers
85
views
Uploading photos of various sizes
In my solution I've implemented transaction-like methods of uploading posts media. For example I'm adding new post with photo. I want to have 700x700, 200x200, 70x70, 10x10 px sizes in my storage and ...
1
vote
0
answers
69
views
Make methods shorter when parsing Firebase data
I have a simple parsing method from firebase. How i can do it smaller?The fact is that after the data is changed I will need to update my View so that the code can be added, which also does not sound ...
0
votes
1
answer
433
views
Simple networking layer in Swift using Strategy design pattern
Does the following code demonstrate proper use of Strategy design pattern for a simple networking layer in swift 3?
Some code smells I'm unsure about:
violates Single responsibiility principle. ...
3
votes
1
answer
327
views
Fetch nearby chat users using Firebase and nested completion handlers
I have a method that calls three functions that each make a request to Firebase and pass back data in a completion handler. Once the data from 2 of the completion handlers is sent back, I call another ...
4
votes
2
answers
627
views
Angular Guards - Firebase loggedInAndVerified
I have an app that I want to limit to both logged in and verified users. I was able to make two separate guards (logged-in.guard.ts and ...
2
votes
0
answers
73
views
Chrome Extension Code: LOL Link Sharer
I made a hacky version of a chrome extension to compliment a weekly literary/arts publication. The extension helps me curate links from my publication's readers since there's only so much I can curate ...
3
votes
1
answer
373
views
Populating a UITableView with staff members using Firebase data
The end user will be able to see a list of staff that works at a church. The staff consists of 5 individuals with 5 different position titles (Minister, Pastor, etc.). This data is pulled from ...
6
votes
1
answer
116
views
HackerNews news fetcher
The following code is part of a big application. I am new to Go, and appreciate feedback on the best practices and improvements. Please consider styling and comments as well.
Every 30 minutes, this ...
1
vote
0
answers
92
views
Collecting a user's Stripe information
I am new to both asynchronous programming and Android development. I am allowing the user to sign in with either their email/password or their Google account. Upon successfully signing in, the user's ...
1
vote
0
answers
2k
views
Populate country-province-city dropdowns from Firebase query
I'm new to Firebase and am a recovering SQL developer, so I haven't quite wrapped my mind around all aspects of firebase querying. I have an app that has basic functionality in place, but some aspects ...
1
vote
0
answers
52
views
Authenticating voting
My aim is to prevent authenticated users from voting more than once. I am using angularfire2. The code gives me the expected behavior and I was wondering the better way of doing this. The ...
2
votes
0
answers
1k
views
Firebase many to many relationship structure
I'm trying to create a logical and scalable many to many relationship data structure in Firebase. A user can authenticate with Facebook/Google, upload 3 photos, and a video. Users can also "star" ...