Open younes-io opened 10 months ago
This could also help avoid the overhead of local install, dependencies, etc.. as in https://github.com/enricoros/big-AGI/issues/334
Thanks! The app has currently a frontend (react) and backend (nextjs), all integrated into a single server. What would go into Tauri, Just the frontend, or both fronted and backend?
IMHO, both.. (especially for privacy reasons)
Maybe you can add a proxy option for those who want to go through your servers.. but in my case, I want everything on my machine, and directly connect to the LLM of my choice
Adding to the roadmap a frontend-only big-AGI Electron build. With today's technology running a full nodejs/nextjs inside an Electron application does not seem viable.
Adding to the roadmap a frontend-only big-AGI Electron build. With today's technology running a full nodejs/nextjs inside an Electron application does not seem viable.
What's the issue with next + electron ?
@enricoros : did you consider the Tauri option?
Hi @pacoccino and @pacoccino , I don't know much about JS in desktop clients.
For a full contained build (frontend + backend) the requirement is to be able to run Next.js 14. Big-AGI has latest-and-greatest requirements usually, including using the latest libraries.
Does Electron (Nextron?) support Next 14? Is Tauri a bit option? What do you guys think?
You can take a look at this https://tauri.app/v1/guides/getting-started/setup/next-js/
Nextron doesn't seem to have a big community, I've never used it though so I can't really tell
Seems that Tauri is not an option then. Because it will run the front end, but not the back end (llms calls, image generation, etc.).
So the user will have the additional burden of running a nodejs server for the various backend functions (trpc calls and llm streaming in our case).
OR the backend will be needed to be rewritten in Rust which is not an option given the amount of stuff in the roadmap and the Web (mobile/desktop) version compatibility.
After hours of research, seems to me there's no easy solution to satisfy these requirements:
Seems that either all the backend code needs to be moved to the frontend and disabling CORS, or the backend needs to be rewritten or at least heavily changed to use within-app IPC.
For both those options, Big-AGI will lose today's Web functionality.
@enricoros : I use this app https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/ which also has a web version (https://app.nextchat.dev/) and they seem to use Next.js as well Maybe you can take a look at their repo
Chose Electron - I'll need to run a node backend. First screenshot after 8 hours of working on it:
Electron Frontend is up - misses ALL the backend(s).. will take a while.
@enricoros, that's awesome! Please take your time! I know I added a lot of workload to you 😢
Doubling my other (https://github.com/enricoros/big-AGI/issues/418#issuecomment-1951035069), maybe you could abstract the trpc connection to either call Next tRPC endpoint or Electron main process one using something like https://github.com/janek26/trpc-browser ?
I know I'm late here but a general question:
was the implementation of a Progressive Web App (PWA) considered for the desktop application, given that Electron apps typically require a lot of memory and have long startup times? Shouldn't the functionality of a PWA be sufficient?
@jannesbrunner we are squeezing every inch of performance and functionality out of PWAs. The main reason to have a desktop client would be to: 1. access OS functionality, such as better filesystem or camera integration, and 2. survive the browser closure (e.g. work in background).
What's your take, Electron app or not? this is still on the table.
Why This feature will enable users to get the full computational power of their machine, reduce latency, and enhance data privacy through a dedicated desktop application. It should empower users who require offline capabilities, and restricted data control.
Concise description The request is to create a desktop version of the current web-based AI application using a framework like Tauri that allows for cross-platform desktop applications with enhanced security and performance. The desktop app should maintain feature parity with the web version while taking advantage of native system capabilities.
Requirements
TBD (not yet organized in my head.. seeking help from community 🤣 )