Google Cloud SQL connection to flutter - flutter

I'm on the internet for 3 days trying to find something which would help me to set up PostreSQL server on Google Cloud and my flutter app. There is absolutely nothing neither in documentation or anywhere on the internet for flutter app how to connect it, set it up, or even do authentication without firebase. I tried to get help in console support page and it directed me here which I understand is not the best question for SO but I got no other option.. So can anyone help me with it or is flutter only design to work with firebase or is google cloud not ready for flutter yet?

Since SQL Databases should never be accessed over the internet directly, it would be a good idea to have a web endpoint which exposes a limited API, sending http requests for the operations wanted. One way to approach this would be to have your Flutter app trigger Cloud Functions, which would then connect to Cloud SQL (the managed PostgreSQL service on GCP).
Here is documentation on how to connect Cloud Functions to Cloud SQL. Finally, here is an external blog post on how to use Flutter with Cloud Functions. Please note that we cannot guarantee the accuracy of external information, and it should serve as a reference to get you started.

Related

A real-time chat with admin in flutter

commerce app but I need to create a chat just between every user and admin like for problems and etc so anyone has an idea on how it can be done
I've been using AWS services for something similar. The quickest way around it is to use AWS Amplify (think of it as AWS's Firebase).
Here's an article describing how you can build a chat application with Amplify: https://aws.amazon.com/blogs/mobile/building-a-serverless-real-time-chat-application-with-aws-appsync/. Note that this article is from 2018, and it mentions AWS Mobile - which was replaced by AWS Amplify.
The example is for React, but you can easily build your Flutter front end for it. I'd recommend for now using this package, since it supports all the platforms(Android, iOS, Web): https://pub.dev/packages/amazon_cognito_identity_dart_2
If you need only Android and iOS at the moment (and you can wait for the web support), you can also try the official AWS Amplify Flutter: https://pub.dev/packages/amplify_flutter
In any case - you will need some sort of web socket based solution. GraphQL is I think the right way to go (AWS Amplify uses service called AWS Appsync - which is just their implementation of GraphQL).
I think this is a really general question, but I will share my little knowledge about the matter.
Well apart of implementing your own solution, with your own backend and/or websockets, you can also use Firebase to achieve it.
There are some services like getStream that provide some good packages, and all the main functionalities required from a chat, and also UI widgets for it. Of course, is not free.

is there any other way to make backend in flutter without firebase

currently, I am using firebase for the backend but is there any path I have to learn to do backend without using firebase since it's limited free
Yes you can create backend with nodejs and connect nodejs with your flutter app. There are plenty of resources for learning how to connect nodejs backend with flutter app
Yes. You can use Python, node js, PHP-laravel.. It depends on the projects. According to the project, you can choose the backend.
"backend in flutter" ? , Flutter is framework in which we use dart programming language so the question is wrong. But perhaps you want to ask something else, which I was also exploring during my initial years.
For realtime database you can use mongo with polling (with or without even any server since you can even poll and crud in database with flutter itself).
For firebase cloud functions you either make your own APIs (with any backend say nodejs , Django , php..) and call them with Cron jobs or use mongo trigger.
For app performance monitoring , you first need to take data from your app itself and then store it in database and then need to make a web panel for showing that data in interactive manner.
Firebase hosting can't be your case so skipping it.
I hope that clears your doubt.
try supabase or rethinkdb + rust

Is it safe to use Firestore and its features via client only? [duplicate]

This question already has an answer here:
Why is it okay to allow writes into Firebase from the client side?
(1 answer)
Closed 3 years ago.
If I use the prod environment variables in my App and set the server side rules for Firestore, would my app be completely secure to perform CRUD and authentication? I am asking this because I have been seeing Angular tutorials by pretty famous YouTube content creators (Fireship) and they do not touch server side code and still show how to make a production applications. All the tutorials use only Angular and some libraries to produce the apps and features but then the console on Google says not to expose the API keys. Using only client side Angular even in production environment variables exposes the private keys right?
So in short, should I be using Node to CRUD and Auth with Firestore, or server-side rules on the console works safe?
The configuration that you use on the client to get it to communicate directly with Firebase services is does not include a private API key. Much has been said about this in various forums over the past few years. The thing you see that might be labeled an API key is actually public information. It helps the client library locate the project it's working against. The API keys you want to hide are those that exposed direct access to other billed services, including Google Cloud service accounts.
You limit access to Firebase backend services (Cloud Firestore, Realtime Database, Cloud Storage) using security rules to determine what a user can or can not do with the data stored in it. If you don't do this correctly, you could have problems.
Whether or not you want to let the client access the services directly or make the client go through some middleware you write should be decided by other reasons, as discussed in this article.

Where to host Smartsheets API code

I am interested in learning to use the Smartsheets API. In the past I created workflows in Google Apps Script, which has a built in IDE that houses the script. Does Smartsheets have something similar? If not, where is a common place to keep your code and have it react to webhooks/events?
Regards,
Shawn
The API is just a way to communicate between your application and Smartsheet - there is no hosting for your executable code. Smartsheet provides a number of SDKs to help make the calls easier to perform, but in theory you could use any language to make the REST commands. So, pretty much any service that allows executable code would work, such as Amazon AWS, Google Cloud, Microsoft Azure, or others. Here's a brief comparison of services.
You can start developing on your own computer before you worry about cloud deployment. See the getting started guide and samples here: https://github.com/smartsheet-platform/getting-started
If you really need to respond to webhooks, your code will have to run somewhere that accepts incoming HTTP calls from the Internet without being blocked by a firewall. This could be in your data center, any of cloud services, or via a tunnel such as https://ngrok.com/

How to configure a Parse coded app to run on Firebase?

I have an Ionic app which is configured in parse.com backend. How can I change it to work with Firebase backend or is there any alternative for parse.com backend? I tried back4app.com but it can't read my cloud code.
Firebase is totally different from Parse.com so if you want to move to firebase you will need to refactor all your client business logic which interact with Parse.com services. A very good alternative is to use parse-server which is the Parse.com open source. parse-server can be deployed to any cloud which support NodeJS runtime.
Please note if you decided to go with parse-server or with back4app you need to do some modifications to your cloud code and your client side code. The best is to follow the documentation which available under the parse-server github page that i mentioned above. Another good resource is this one which collect all the stuff related to parse-server and how to use parse-server in development or production