GUI for Servant clients?

I have a project where I'm using Servant to write a server. There will be some admin tasks involved (predominantly manual account sign-up, to restrict who is allowed to access it), and it will be much easier for the actual administrators to do so with a visual interface of some kind (because I somehow don't see them being able to use curl ;-) Whilst I could try and integrate web pages for the admin tasks into the server, from a separation of concerns and security pen-testing point of view, it would be preferable to instead expose the admin tasks as authenticated endpoints and use a client for that. Is there anything close to having a relatively automated solution to "here is the Servant API types, here is the workflow it should follow, now give me some webpages" (which I could preferably either package up using threepenny-gui, Electron or just a few HTML files I can email to the project admins - who all run Windows - to use)? It doesn't have to look pretty, just work. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

On Tue, May 16, 2017 at 2:16 AM Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
Is there anything close to having a relatively automated solution to "here is the Servant API types, here is the workflow it should follow, now give me some webpages" (which I could preferably either package up using threepenny-gui, Electron or just a few HTML files I can email to the project admins - who all run Windows - to use)? It doesn't have to look pretty, just work.
It's nowhere as plug-and-play as what you've envisioned, sadly, but perhaps you could have some success by having your endpoints output a [Siren] hypermedia representation of your server resources and then pointing one of the various API browsers[1][2][3] at it, though they do look like development has been abandoned nowdays, sadly. I even have some (very old, never published, never battle-tested, unmaintained, probably broken, not so well designed) [code] that's handy to generate Siren resource representations; it may serve as a starting point if you decide this is a reasonable way forward. [Siren]: https://github.com/kevinswiber/siren [1]: https://github.com/applicaster/siren-browser [2]: https://github.com/wurlinc/siren-browser [3]: https://github.com/kevinswiber/siren-api-browser [code]: https://github.com/mgomezch/yesod-squealer/blob/master/source/Data/Siren.hs
participants (2)
-
Ivan Lazar Miljenovic
-
Manuel Gómez