Skip to content

[DRAFT] Homebrewery as an Electron App#3502

Draft
G-Ambatte wants to merge 4 commits intonaturalcrit:masterfrom
G-Ambatte:experimentalElectronJS
Draft

[DRAFT] Homebrewery as an Electron App#3502
G-Ambatte wants to merge 4 commits intonaturalcrit:masterfrom
G-Ambatte:experimentalElectronJS

Conversation

@G-Ambatte
Copy link
Copy Markdown
Collaborator

This draft PR is some initial work towards enabling the use of Homebrewery locally as a standalone Electron app.

While this PR produces the base functionality, the following issues have been identified:

  • prompt, alert, confirm all do not work in ElectronJS
    • login system does not work - uses prompt
  • switching to a new page often opens a new window

If you experiment with this and strike any issues, please record them here.

@5e-Cleric
Copy link
Copy Markdown
Member

  • prompt, alert, confirm all do not work in ElectronJS

#1537 was raised, we would need to get rid of those anyway.

login system does not work - uses prompt

If we are really working on a local version, we might as well use a different login system, similar to a OS login, simply username and password, and define a folder to save brews for every user.

switching to a new page often opens a new window

Right, we need to change how links work in local, or change it to a windowless browser instance, with multiple tabs..

@G-Ambatte
Copy link
Copy Markdown
Collaborator Author

G-Ambatte commented May 30, 2024

we need to change how links work in local

Or just specify a new value for NODE_ENV : electron.

EDIT: A quick test of this shows that the forcessl.mw.js file also needed to be updated for this to work. Currently this has been achieved via manual edit, but there should be a better way to achieve the same result with less technical debt going forward.

@G-Ambatte
Copy link
Copy Markdown
Collaborator Author

login system does not work - uses prompt

This makes me think of <dialog> element showModal() method. It's not blocking, but it does present in the top-layer so cannot be behind anything, and all elements outside of the <dialog> are rendered inert while it is present, so the user cannot perform any other actions while it is displayed - but crucially, server side functions can continue as normal.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal

@Gazook89
Copy link
Copy Markdown
Collaborator

Why would there be an account system at all?

@5e-Cleric
Copy link
Copy Markdown
Member

5e-Cleric commented May 30, 2024

Why would there be an account system at all?

For the same reason windows offers different accounts, multiple people might want multiple accounts in the same computer, i say we keep them for the local version.

@G-Ambatte
Copy link
Copy Markdown
Collaborator Author

Why would there be an account system at all?

If we were able to link to file system and thus have a users in their own folders, there might be less need for an account system.

That said, I still expect that some users will want to lock their documents so that it can't be viewed accidentally - and thus if they are exposed in the filesystem, they will not be protected.
I'm not sure which option is the best way forward; at the moment, this is just a small experimental side branch.

@dbolack-ab
Copy link
Copy Markdown
Collaborator

I'm gonna go out on a limb and suggest this move to its own project.

@Sparks01
Copy link
Copy Markdown

Sparks01 commented Mar 5, 2025

Did this ever go anywhere?

@5e-Cleric 5e-Cleric moved this from Backlog to Not planned in @calculuschild's backlog Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Not planned

Development

Successfully merging this pull request may close these issues.

5 participants