lapis-community icon indicating copy to clipboard operation
lapis-community copied to clipboard

How to integrate lapis-community in other projects

Open daelvn opened this issue 6 years ago • 3 comments

Is it possible to integrate lapis-community, even if it takes a small amount of work, with other projects? There is no documentation, and it would be a great benefit to get this running. Any luck? Thanks in advance!

daelvn avatar Dec 06 '18 20:12 daelvn

I would love to be using Lua to run a community board on the web.

Count this as another vote for some docs, @leafo. If we can at least get a howto that gets a basic site up using lapis-community, maybe some PR's would be inbound shortly thereafter ..

seclorum avatar Dec 29 '19 17:12 seclorum

streak.club is the only opensource project using lapis-community right now. I don't have time to write docs at the moment, but you can try grepping the repository for places where modules starting with "community" are required

https://github.com/leafo/streak.club

https://github.com/leafo/streak.club/search?q=require+community&unscoped_q=require+community

The necessary components are:

  • Run the migrations with require("community.schema").run_migrations(version)
  • Use the flows in community.flows. inside of your own actions to handle all the crud operations for community related things
  • You have to provide your own views
    • You will have to review the flow code to see what kind of form params are necessary to handle submitting posts/topics/etc.

leafo avatar Jan 06 '20 20:01 leafo

Thanks, this is very helpful nevertheless, hope you will have a slight bit of attention for future notes, but in the meantime anyway I've gotten a site built locally .. I am having a lot o' fun with the flows, indeed .. (will inform you if we put things online)

seclorum avatar Jan 08 '20 19:01 seclorum