hofstadter-io / hof

Framework that joins data models, schemas, code generation, and a task engine. Language and technology agnostic.
https://docs.hofstadter.io
Apache License 2.0
519 stars 36 forks source link

A real example? #68

Open frederikhors opened 3 years ago

frederikhors commented 3 years ago

I am very happy to have just discovered this ambitious project.

Is there any real application example (maybe GraphQL) made with hof?

verdverm commented 3 years ago

@frederikhors I am currently working on such an example. It will be Golang & REST, though GraphQL would not be difficult to add on.

Would you be interested in helping out with that? I'd be happy to sync up / video call to kick off the work

I do have a much more advanced JS / Apollo / React / Node / GraphQL example, but it is based on the old style code gen and currently closed source. We could pull the templates out... 🤔

verdverm commented 3 years ago

It will be this repository: https://github.com/hofstadter-io/hofmod-server

I have some code locally I'm looking to polish up and push in the next week or so.

verdverm commented 3 years ago

@frederikhors the https://github.com/hofstadter-io/hofmod-server has come quite a ways

How does it look as an example now?

bbkane commented 3 years ago

Not the issue opener, but there seems to be a lot going on in that example. Could you make an even simpler (absolutely trivial) example? Maybe something like the classic TODO list app. Just generate the HTTP client and server. Leave it unauthenticated, just use a []string in memory to hold TODOs instead of a db and write a blog post about how you built this app starting from scratch? Then folks like me could more easily follow it and refer back to hofmod-server once we're comfortable with the basics and need more advanced examples. See https://github.com/kyleconroy/sqlc (Getting Started section) for what I mean by trivial examples.

verdverm commented 3 years ago

You can turn off some of the options (in theory, not sure how much in practice though I could fix that) and then generate the code to see something simpler. Not using a DB would require changing / switching the templates to something trivial which hof aims to avoid in practice. I'd be more than happy to accept that work but I'm unlikely to do it myself.

I'm actually working on a post somewhere in the middle of what you want and where hofmod-server is going. Been focussing on Cuelang for a bit and am now taking a pass back over hof & docs for a while.

bbkane commented 3 years ago

cuetutorials looks really nice, I hadn't seen it before! I'll check out your links, thanks!

verdverm commented 2 years ago

@bbkane I've started writing a series of sections based on your input.

The following show you how to both create and use a generator

In a separate area, I plan to outline the advanced features and production ready modules that are directly usable without having to write any generators.

bbkane commented 2 years ago

This is much easier for me to follow. Looking forward to seeing more sections. Thank you!