# Django + Flutter to mobile and desktop

**URL:** <https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699>\
**Category:** Getting Started\
**Created:** [November 23, 2024, 10:04pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699 "2024-11-23T22:04:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 23, 2024, 10:04pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/1 "2024-11-23T22:04:36Z")

</div>

Here is what am trying to do:

We are building an application that has two forms, mobile and a desktop application for an inventory management system. Now, what we want is that the mobile application should be built with Flutter, but the backend should be a Django-based application.

The Django-based application is such that when you install the Flutter application, the Django backend - the Django is converted such that it can be embeded in the flutter app and it is being executed - such that the backend is within , the Flutter application. At the end the flutter should be installed on an android os

So, for example, when you install the Flutter application, it starts up the Django application, and when you close the Flutter application, it closes the Django backeend . Somehow, the Flutter application is containing the Django backend, and somehow the backend is not hosted separately.

This is because we don’t want to host the backend separately. Now, for the desktop application, we want it to be built with Django, and the frontend also with HTML and CSS, that means a full-stack Django single application, but converted to an executable, such that we can just with a single click or two clicks, we can install the application (same backend as on the fullter application)on any Windows laptop or desktop Windows desktop, and the application runs smoothly without usually configuring the backend separately and the frontend separately.

We just need one click, and then it’s gone - the entire application. Now, the system is supposed to have a centralized database system, where the Jungle, the desktop, and the mobile, that have their own backends, are synchronized with a central database system online, and they also have local databases for both the mobile application and the desktop application

any idea how feasible this is

---

<div class="post-metadata">

**Author:** ![philgyford](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/philgyford/32/14295_2.png) [@philgyford](https://forum.djangoproject.com/u/philgyford)\
**Post date:** [November 24, 2024, 9:37am UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/2 "2024-11-24T09:37:55Z")

</div>

Why do you want to build desktop and mobile apps, but no website, using technology designed for making websites?

---

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 24, 2024, 11:50am UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/3 "2024-11-24T11:50:02Z")

</div>

i want a firendly technology, the client want desktop, he cant pay for far apart technologies

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [November 24, 2024, 12:06pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/4 "2024-11-24T12:06:39Z")

</div>

> [@AlkaloidWells](#):
>
> he cant pay for far apart technologies

Good luck with that. (Seriously - this is _not_ a sarcastic comment.)

Yes, it can be done, at least as far as the desktop environment is concerned. I’m not sure how practical this is with mobile - and it’s going to depend upon whether you’re talking about iPhone or Android, because each of _those_ is going to require their own solution.

But I’d be willing to wager that trying to make this work appropriately across these platforms is going to take **at least** as long in development time as it would to develop them each of them individually using the appropriate tools (not counting the time necessary to learn those tools).

Also, creating a “Browser-based” app for the Windows desktop seems extremely limiting from a UI/UX perspective. Is the client going to be happy with a native application built on html as opposed to the native Windows UI?

---

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 24, 2024, 12:14pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/5 "2024-11-24T12:14:15Z")

</div>

thanks for your response; th client is concentrating the out put and sim to to concern himself what happens but we have four months an application that has a desktop version, and mobile version function both online and offline, inventory management including things like bar code scans and we cant build two separate apps will it be advisable to just use flutter ?/ but Django does make development easy

---

<div class="post-metadata">

**Author:** ![AnatoliyViktorovich](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/anatoliyviktorovich/32/20294_2.png) [@AnatoliyViktorovich](https://forum.djangoproject.com/u/AnatoliyViktorovich)\
**Post date:** [November 24, 2024, 12:15pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/6 "2024-11-24T12:15:11Z")

</div>

I’m not an expert in any way, but Django web app (as a Progressive Web Application) would cover all described requirements. No need in Flutter.

---

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 24, 2024, 12:17pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/7 "2024-11-24T12:17:03Z")

</div>

so what u are saying is Django can be exported as the mobile and Desktop app?/

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [November 24, 2024, 12:17pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/8 "2024-11-24T12:17:06Z")

</div>

How large is your staff? Does your staff have the necessary expertise for supporting these three (four) platforms?

Four months seems extremely aggressive to me for all this for a small shop.

Like I said before - good luck, I think you’re going to need it.

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [November 24, 2024, 12:17pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/9 "2024-11-24T12:17:44Z")

</div>

> [@AnatoliyViktorovich](#):
>
> but Django web app (as a Progressive Web Application) would cover all described requirements.

Sorry, I don’t see how this handles an offline / standalone implementation as described in the original post.

---

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 24, 2024, 12:18pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/10 "2024-11-24T12:18:18Z")

</div>

yes my staff is okay using flutter for mobile development and Django for web development

---

<div class="post-metadata">

**Author:** ![AnatoliyViktorovich](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/anatoliyviktorovich/32/20294_2.png) [@AnatoliyViktorovich](https://forum.djangoproject.com/u/AnatoliyViktorovich)\
**Post date:** [November 24, 2024, 12:18pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/11 "2024-11-24T12:18:21Z")

</div>

No. But it can be installed as PWA.

---

<div class="post-metadata">

**Author:** ![AnatoliyViktorovich](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/anatoliyviktorovich/32/20294_2.png) [@AnatoliyViktorovich](https://forum.djangoproject.com/u/AnatoliyViktorovich)\
**Post date:** [November 24, 2024, 12:19pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/12 "2024-11-24T12:19:40Z")

</div>

> [@KenWhitesell](#):
>
> Sorry, I don’t see how this handles an offline / standalone implementation as described in the original post.

I probably didn’t quite understand. Sorry.

---

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 24, 2024, 12:31pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/13 "2024-11-24T12:31:40Z")

</div>

PWA! it looks like away to go due some of the requirements are not meet can u please refer me to some work i can follow

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [November 24, 2024, 12:34pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/14 "2024-11-24T12:34:47Z")

</div>

I’d start here: [Progressive web apps | MDN](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps), it provides links to further resources.

---

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 24, 2024, 12:57pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/15 "2024-11-24T12:57:11Z")

</div>

okay after looking at PWA we be unable to perform dynamic action that require sever side actions like login registration or server side actions this posses a problem cause the app should be able to work independently offline and synchronize with the online database when connected to the internet, for both desktop and android

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [November 24, 2024, 1:03pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/16 "2024-11-24T13:03:12Z")

</div>

> [@AlkaloidWells](#):
>
> okay after looking at PWA we be unable to perform dynamic action that require sever side actions like login registration

I’m not sure you’ve looked deeply enough. A PWA _is_ a web app, and can do anything that any other web application can do.

The use of service workers and local storage also allows you to work offline when the online connection is unavailable.

See [What is a progressive web app? - Progressive web apps | MDN](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/Guides/What_is_a_progressive_web_app)

---

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 24, 2024, 2:31pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/17 "2024-11-24T14:31:41Z")

</div>

what about interacting with the server

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [November 24, 2024, 2:45pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/18 "2024-11-24T14:45:04Z")

</div>

What about it? I’m not sure I understand the question.

---

<div class="post-metadata">

**Author:** ![AlkaloidWells](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/alkaloidwells/32/25369_2.png) [@AlkaloidWells](https://forum.djangoproject.com/u/AlkaloidWells)\
**Post date:** [November 24, 2024, 3:26pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/19 "2024-11-24T15:26:30Z")

</div>

with PWA is like a hybrid but to do things like login or registration u need the server our app needs to be able to do that offline

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [November 24, 2024, 3:36pm UTC](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699/20 "2024-11-24T15:36:08Z")

</div>

> [@AlkaloidWells](#):
>
> to do things like login or registration u need the server

For it to make any sense, that’s correct. But it doesn’t make sense to try and force a login or user registration with a desktop or local application - the user has already authenticated to get the desktop.  
(You could replicate the User’s instance of the User model in to the local storage of the app, with a process to re-hash the password for the user’s environment, but that really doesn’t make sense to me.)

All data replicated to the user’s system is going to be available to that user. What do you think you’re protecting by requiring user-local login?

[Next page](https://forum.djangoproject.com/t/django-flutter-to-mobile-and-desktop/36699.md?page=2)
