Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing a web interface #4

Closed
igorsheg opened this issue Mar 6, 2024 · 4 comments
Closed

Implementing a web interface #4

igorsheg opened this issue Mar 6, 2024 · 4 comments

Comments

@igorsheg
Copy link

igorsheg commented Mar 6, 2024

Hey!

I’m really excited about the goals and tech stack of this project and I’d love to contribute, particularly in developing the web interface. Do you have any specific tech stack in mind for this? I have a good grasp of React (TypeScript) and experience with frameworks like Next.js and Remix. I’m also comfortable with Rust (Leptos) and Go.

Let me know how I can help or if there’s anything specific you need for this part of the project. Looking forward to contributing!

Thanks!

@hgaiser
Copy link
Owner

hgaiser commented Mar 6, 2024

Cool, thanks for reaching out. I have three thoughts about the web interface:

  1. I'm not entirely sure there should be an interface at all. Part of the goal was to have a light and simple application for game streaming. Adding an interface only complicates things. The main functions of an interface would be to fill in the PIN number, and to modify the list of applications. The PIN number can already be filled in by sending a GET request, applications can already be modified through config.toml. Both are not super convenient, however they only happen during configuration. In normal use, you wouldn't need to change any configuration, or re-pair (and therefore wouldn't need an interface).

    I'm not entirely sure if an interface adds a lot of value on top of this. It makes it more convenient to configure, but the way it is currently you barely need to configure applications anyway since it scans for available (Steam) games. Simply restart Moonshine and the new application is added.

  2. If an interface is added, it doesn't need to be big. My original plan was to add a single HTML file (HTML + JS + CSS in one file) for displaying a form for the PIN and compile it into Moonshine using include_bytes. As long as the interface doesn't grow into many files, this would be a simple and clean approach.

  3. Alternatively, an interface could also be created as a separate moonshine-webinterface project. This could interact with Moonshine through either HTTP requests or a websocket, depending on what needs to be communicated. This way the main application remains light, but there's an option to add an interface on top.

Let me know what you think :). Also let me know, do you see other use-cases for a web interface?

ps. I didn't know of Leptos yet, looks cool! Could also be an option. Did you like working with Leptos?

@igorsheg
Copy link
Author

igorsheg commented Mar 6, 2024

Cool, thanks for reaching out. I have three thoughts about the web interface:

  1. I'm not entirely sure there should be an interface at all. Part of the goal was to have a light and simple application for game streaming. Adding an interface only complicates things. The main functions of an interface would be to fill in the PIN number, and to modify the list of applications. The PIN number can already be filled in by sending a GET request, applications can already be modified through config.toml. Both are not super convenient, however they only happen during configuration. In normal use, you wouldn't need to change any configuration, or re-pair (and therefore wouldn't need an interface).
    I'm not entirely sure if an interface adds a lot of value on top of this. It makes it more convenient to configure, but the way it is currently you barely need to configure applications anyway since it scans for available (Steam) games. Simply restart Moonshine and the new application is added.
  2. If an interface is added, it doesn't need to be big. My original plan was to add a single HTML file (HTML + JS + CSS in one file) for displaying a form for the PIN and compile it into Moonshine using include_bytes. As long as the interface doesn't grow into many files, this would be a simple and clean approach.
  3. Alternatively, an interface could also be created as a separate moonshine-webinterface project. This could interact with Moonshine through either HTTP requests or a websocket, depending on what needs to be communicated. This way the main application remains light, but there's an option to add an interface on top.

Let me know what you think :). Also let me know, do you see other use-cases for a web interface?

ps. I didn't know of Leptos yet, looks cool! Could also be an option. Did you like working with Leptos?

Ahhh I see, I totally agree that the service should be lightweight and should continue being so. I actually didn’t have any particular vision for the web interface, I just saw it as a bullet in your roadmap. I am up for executing on the author’s vision :)

I must say that I don’t have much experience with Leptos, but I thought of bringing it up to kinda continue the spirit of Rust.

@hgaiser
Copy link
Owner

hgaiser commented Mar 9, 2024

I think my preference currently goes out to option 2, basically just a very simple form for filling in the pin instead of filling it in as a query param. If you're up for it, feel free to give it a go.

@hgaiser
Copy link
Owner

hgaiser commented Apr 22, 2024

I added a simple form with c1459d0

I think at least for the time being, this will be enough of a webinterface, so I will close this issue. Thanks 👍

@hgaiser hgaiser closed this as completed Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants