Open dmjio opened 6 years ago
Edit - Just updated README roadmap based on your suggestions
Miso was actually the first front-end I wanted to use, but I'm building this mostly internally right now for some Elm apps. If there is an ideal Miso scaffold to work off of I could probably get that in fairly quickly. The way I'm structuring this now is that each pluggable part of the framework (for back-end and front-end) will point to an ideal templated/scaffold repo (see e.g. haskstar-elm).
This project is a bit hacked together ATM (as you can probably see by the turtle script), but I would love all that you suggested and I do plan on making this highly usable for as many people as possible. I am not very familiar with deployment scripts via nix but I'll start studying them as that does seem preferable. Responses to other points:
Login/Register views - Definitely going to do this for all front-ends. Am debating allowing a 3rd party service here (like firebase auth) but potentially creates a lot of moving pieces and a simple servant auth with username and password is probably the ideal starting place. I have also had really bad experiences some 3rd party services (cough cough Auth0)
User/Session tables - Agreed. I also want to auto build an Admin part with accompanying GUI for creating Users etc
OAuth - Yup, that is in the immediate plans
Cookie / JWT - Yes, I plan on doing this with servant-auth soon
Isomorphic - I'll leave that to you as I know that's one of Miso's specialties ;)
Bulma- Yes, though I'm weird and actually like building custom frameworks with Flex in css, though I have some of my own prebuilt ones with Elm Css that I will use there. I have seen Bulma though and I think it's time to convert :)
Re DB - You're telling me, I used Opaleye in production with my last company and - though it is very powerful - it is loaded with boilerplate. From the looks of it, Selda to me looks like the cleanest API with the best feature set. Funny enough, as you were writing this I saw your selda-servant repo and I am just now playing with how Servant will interact with Selda (there is a github issue open for it currently) I'm not sure about Beam - have seen it before but can't remember where I landed on it. My dream scenario is that I can roughly autogenerate ORM table setups from the migrations, and that the db will actually be type-checked against the haskell models. Persistent/Esquelito is another option
The Context type is exactly what I was thinking....will see how well it works in practice but I think it should be quite doable. I will probably be a bit partial to get it working well with one library first (like Selda), and then start abstracting out what is needed to plugin other libs.
One other thing I'm adding to the roadmap is an auto built GUI for one click deployments and doing things like capturing db stats before and after. Have a lot of ideas around that
I'll start studying up on nix ops tonight, unless you have a quick way of doing it and want to PR it. I'll be working on this heavily over the next month, and if you want to contribute any of the above would be amazing :)
I'd like this for
miso
, would be cool to have the following wrapped-up in one command:scrypt
fb
/twitter
/google
, etc.) (OAuth provider)servant-auth
)config.nix
/module.nix
(free SSL certs via letsencrypt.org) w/nginx
miso/examples/haskell-miso.org
for theseGET
inservant-auth
for this.Choosing which db library to use will be tough, have heard good things about
beam
though...acid-state
with the remote backend could be an option. Either way making aContext
datatype (like a mock of db operations to get inversion of control) would be ideal. So the user could swap out backend implementations.But yea, a scaffolding using
nix
would be ideal, where the user could just do anixops
deploy would be huge.