Should I implement getStream on Back-End or Front-End? - django

I'm building my own social network service like Instagram. I'm using React Native for Mobile Front-End and Django RESTful Framework for BackEnd.
In my case, should I implement getStream for my feeds and notification on Back-End or Front-End? (Django-python or React-Native JS)

We recommend using a back-end system to communicate with Stream. Putting logic in the front-end system (or React native) means you'd be storing your API credentials in a public-facing app or in a mobile app, which is easily reverse-engineered.

Related

Adding a Direct Messaging page to react native social media app with Django backend

I am trying to develop a react native social media app with Django backend. I need my app to have a Direct Messaging page. I already have made the Django backend and the React Native frontend without the messaging functions. How can I add the Direct Messaging to my existing backend and frontend?

Is there a django-avatar app with REST API support?

I am working on a django project that uses django avatar. But we also have other clients that are communicating with APIs. Does the django-avatar app have API endpoints or do I have to implement that myself?
You would have to implement endpoint using the Django rest framework or you can write your own custom endpoint, but there is no API endpoint already available in the market.

Flutter app with Django backend and google authentication

i would like to create a flutter app, with social authentication (Facebook & Google) connected to a Django DRF backend.
I could not find any examples for handling the social authentication at the back-end coming from a flutter app, i only found firebase based tutorials.
Any libraries that work this way? in case there aren't, how could i send the required social account from the phone to my backend?
Thanks!!
I suggest you to use the Google Auth Library for Ruby (because you are using Django) and expose a service that wrap the API and consume the google libraries.
With your API created you can create a Provider / BLoC or whatever State Management you use in Flutter using the Dart Package Http to consume your own Django backend API
If you have any trouble using HTTP Dart/flutter package let me now to create and example

How should I implement reCaptcha v3 if my front and backend live on different domains?

I have several websites (SPAs), each one running on it's own domain. All these SPAs use the same API, which is hosted on another domain.
I'd like to implement reCaptcha v3 on my SPAs, but I'm not really sure how exactly the entire validation process would work.
Who would be in charge of receiving the callback from Google's service? If the backend, how does the frontend validate itself to the backend?
The SPAs are made with Vue and the backend is a Django app with Django Rest Framework. The backend is stateless, so there are no cookies.

Is django a restful api?

I am confused. Some say it is a Restful API and some say it is not.
How do we define a RESTful API? GET,PUT,POST and DELETE commands ?
Can I call any web application which is built using django Web framework a Restful API?
I am confused. Some say it is a Restful API and some say it is not.
Two different kinds of Django:
Django - a web application framework to rapidly develop web applications
Django REST Framework (DRF) - a powerful framework to create RESTful APIs.
Both framework are in Python.
How do we define a RESTful API? GET,PUT,POST and DELETE commands ?
You create an API on your backend application that defines its purpose. If you use DRF for example, and the URL of your API is yourdomain.com/customers/, you can have it to:
return all the customers information by implementing GET method
create a customer information by implementing POST method
... and so on
Can I call any web application which is built using django Web framework a Restful API?
You call it as backend
Django is a web framework to create web backend while REST (REpresentational State Transfer) is an architectural style for developing web services.
You can use django to create REST apis.
You can explore further here:
Django: https://www.djangoproject.com/
REST: https://youtu.be/llpr5924N7E
What I understood from the web is here:
It should have some commands like PUT, GET, POST and DELETE etc., commands
The URL of the API should be user/machine understandable
It should have OAuth secret key and token for each client to access from his
application.
The URL should be www.api.xyz.com. But I am not sure about it to have api in the URL. Can someone confirm it?
And few more constraints to be a RESTful API. Hope all these points are correct.