AppFlowy-IO / AppFlowy-Cloud

AppFlowy is an open-source alternative to Notion. You are in charge of your data and customizations. Built with Flutter and Rust.
GNU Affero General Public License v3.0
1.05k stars 219 forks source link

[Bug] Self-hosted : bundle web app in Cloud distribution #873

Open almereyda opened 3 weeks ago

almereyda commented 3 weeks ago

Describe the bug

The release of v0.7.1 has seen the ascent of a feature to collaborate on the web. With the frontend in the apps and for a local build needing to adapt to a self-hosted AppFlowy-Cloud instance at runtime https://github.com/AppFlowy-IO/AppFlowy/issues/6539 comes also the need, that the web app is bundled with the Cloud distribution.

Right now for #680 it is possible to work around the present limitations in the client https://github.com/AppFlowy-IO/AppFlowy/issues/5920 with building a heavily monkey-patched app that is able to show the static content of a published page.

Ideally the manual build-time modifications aren't necessary and AppFlowy-Cloud comes with a web app (build pipeline), that allows to adapt to the URL of the AppFlowy instance it is published with.

To Reproduce Steps to reproduce the behavior:

  1. Open the AppFlowy App
  2. Click on Invite to collaborate and copy the link.
  3. Paste the link into the browser's address bar and replace appflowy.com with your custom URL of the web frontend
  4. Click on one of the enabled authentication providers and be redirected into the app.

Expected behavior

AppFlowy opens in the browser and it is possible to edit the document.

Desktop (please complete the following information):

Additional Context

We have four highly related tracking issues for two features in two projects now:

Feature AppFlowy AppFlowy Cloud
Share to web https://github.com/AppFlowy-IO/AppFlowy/issues/5920 https://github.com/AppFlowy-IO/AppFlowy-Cloud/issues/680
Collaborate on web https://github.com/AppFlowy-IO/AppFlowy/issues/6539 \<this one>
khorshuheng commented 3 weeks ago

Yes, this is indeed a popular request. For the first step, i will need to setup the github action to build and publish the docker image for appflowy web. After that i will add the additional service to docker compose.

Changes to AppFlowy Flutter app to provide a setting for custom appflowy web url will come later, though, as that will require additional effort.

almereyda commented 1 week ago

There are more aspects, which can be considered for dynamic configuration of the Flutter app:

Also I would like to continue to encourage a less "inviting" ("nudging") stance for published pages, providing less/no sign up or log in links. https://github.com/AppFlowy-IO/AppFlowy/issues/5920#issuecomment-2409106343

Following on with

it appears useful to consider

as well. The Flutter app could adapt to the available authentication options when using a self-hosted AppFlowy-Cloud instance with custom authentication configuration.