Do I need a backend for a firebase web app? [closed] - node.js

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am curious with all the features of firebase, cloud functions, and client-side authentication, Firestore, etc. options, does it make sense to even use a 'backend' with a firebase web app? The reason I am asking is that I started a project with a react app and a node.js backend rest API service. I started to realize that with all of firebases features, it might make sense to scratch my backend entirely. What are everyone's thoughts? Thanks

You can use firebase directly without a backend (if it is just a simple project) but i'd recommend you to use it with a backend to be more secure, since the backend lets you check the recieved data if it is fake or not correct, also in order to hide your firebase's api key and other stuff like that, i have a firebase app on github (with front-end of react and backend of nodejs+firebase) i can leave the link of the repo if you are interested to check it out, thanks

Firebase is definitely a very good option for you. Since you are adept at using Javascript, you can use the Firebase JavaScript SDK and your backend is up and running
Google’s Firebase offers the following:
A very robust authentication service(Currently supports Google, Facebook, Twitter, Github, Email/Password and Anonymous authentication).
Realtime Database
Storage
Hosting
Cloud Messaging
Notifications
Analytics
Hope this help...

Related

Best method to deploy a react app on azure [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 13 hours ago.
Improve this question
I have a react app and I am trying to figure out the best method to deploy it on azure. From what I see there are 2 methods but please let me know if there are others worth considering:
Azure App Service
Azure Static Web App
I can't work out what would be best for my scenario. I have authentication set up with MSAL library so I don't need to make use of static web apps built in Auth. I also do not forsee myself using the built in functions that come with static web apps. As such will they both be equally as good? Trying to figure out if there are any other differences I need to consider before depoloying.
React Single-Page Application is simply a bunch of files. You don't need a full App Service for this. Just serving static files is enough.
I can just quote an official doc:
Static web apps are commonly built using libraries and web frameworks like Angular, React, Svelte, Vue, or Blazor where server-side rendering isn't required. These apps include HTML, CSS, JavaScript, and image assets that make up the application. With a traditional web server, these assets are served from a single server alongside any required API endpoints.
https://learn.microsoft.com/en-us/azure/static-web-apps/overview
Here is the full set of documentation on Azure Static Web Apps:
https://learn.microsoft.com/en-us/azure/static-web-apps/

How to start building a cross platform app? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
My friend and I are working on creating a product from scratch. We aim to build a cross platform application using react-native. We've planned to use firebase as our server hosting application.
Although, we both have fair amount of knowledge in react and have gone through some videos on react-native and firebase, mobile app development from scratch is still pretty new to us. We're having trouble to answer the following questions:
Where to start developement ?
Should we write our server in nodeJS and deploy it on firebase and my app can call the endpoints or should we connect to firebase directly from client side ?
How to setup configuration files and different environments for developement ?
These are among the many questions we have and we feel lost in this sea of infinite information.
Could anyone guide us here ? Please help me if I can frame my question in a better way.
React Native is a great place to start. With today's ecosystem lead by flutter and react, Angular has unfortunately fallen behind.
Both, Cloud functions are Firebase's solution to server instances, these create short-lived functions that do complex or secure tasks such as handle payments, delete/manage users, etc. While the bulk of your app and its logic with firebase should be handled on the client, including accessing the data so long as you have secure rules.
this depends entirely on your framework of choice but in general, there should be a build option that enables you to configure which settings to compile with.

Is where a way we can integrate google dialogflow chat bot with our WebApps? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
Is where a way we can integrate google dialogflow chat bot with our WebApps?
I would like to create a chat bot and integrate in our webapp, so that when user type something on that page, that would reply with data stored in DB.
Please suggest if it can be done and steps. Or any other easy integration and chat bot design can be done.
I am new to this.
There is an API which you can use to integrate dialogflow chatbot in webapps
https://cloud.google.com/dialogflow/docs/quick/api
Above link shows you how to interact with an agent by using the REST API using the client libraries.
https://cloud.google.com/dialogflow/docs/reference/rest/v2-overview
If you want to integrate with your own backend (to store or provide responses) a very popular approach is to use the DialogFlow Fulfillment.
create a DialogFlow Agent
configure the Webhook URL with your application/service implementing the webhook or use the inline capabilities (Cloud Functions for Firebase)
In terms of integrating on your web site (or web application) you have various options:
DialogFlow web widget (for testing the integration only)
use a Web plugin like Kommunicate or Botcopy
build your own web widget, indeed possible with the Google api (see other answer)
The Dialogflow app of https://board.support/dialogflow should work fine. You have the full source code and the license allows you to edit it.
In your case, you may need to contact the author for a custom license due it looks like you want to integrate it into an app that is sold/shared publicly.
Disclaimer: I work for Support Board

Who's responsible for Authentication in multi-client MEAN stack? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
my situation is the following:
I have a REST API Node.js server using MongoDB, which will serve data to the clients.
I have one web client which will fetch data from the API service and provide social authentication.
For the purposes of my question, let's assume that I have two different clients - both web apps. In this situation, who should be responsible for social authentication, sessions, cookies, etc? The user database should be shared between all clients, but I feel like authentication and API should be two separate services.
What is the most common approach in this situation?
Client will be built with AngularJS, REST API service is built with Node.js, Express, MongoDB, Mongoose and eventually Passport.js when I figure it out.
Thanks
but I feel like authentication and API should be two separate services.
If you have to ask, you don't want 2 separate services. (services meaning independent network daemons/express apps)
Start with just 2 separate modules within your single express app. You can have an auth.js module that uses passport to handle authentication and session issues and then one module file for each entity in your API. If you need more than 1000 lines of code in your auth.js file considering passport is doing most of the hard work for you, something is going wrong. Take a step back and ask for a code review.
If you want each of your 2 web apps to have it's own Express server, just factor the auth.js module out into its own shareable npm module and require it from each web app.
Splitting things out into microservices is for large team projects at scale. Stick with a single simple express server for the first several years (or forever for projects that don't support a rapid-growth startup).

Coffescript + Ionic [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am looking to build a hybrid mobile app using Ionic framework in CoffeeScript.
The functionality that the app would have is login/signup; take and upload picture to store in mongodb.
What is the full stack recommendations for this app?
https://github.com/diegonetto/generator-ionic covers the client side (except it is in JavaScript and I will find a way to make it work with CoffeeScript)
On the server-side; Mongoose + Passport + what else do I need?
https://github.com/malikov/Authenticate.me-client-cordova-ionic
https://github.com/malikov/Authenticate.me-Node-Server
I recommend simply using firebase.com for the backend, which it self run on NodeJS, in addition to Scala, Netty.io and Javascript. Their authentification service, Simple Login, is key in hand and you don't really have to write any backend code.
You can authenticate your users through
Facebook
Twitter
Github
Google
Anonymous
A simple email and password authentication
Custom authentication
You can always store images in base64-encoded format. If your images are larger than 10 mb, which is their limit, you can always split them up in 10 mb chunks.
Another point worth mentionning is that Ionic being based on AngularJS, you can use AngularFire which is the officially supported AngularJS binding for Firebase. The combination of Angular and Firebase provides a three-way data binding between HTML, JavaScript, and your Firebase backend.
https://www.firebase.com/docs/web/libraries/angular/quickstart.html
I did 2-3 ionic apps using Firebase as my backend and it saved me a lot of time.

Resources