nathanielknight / tiddly-wiki-server

An efficient, low-maintenance web server for TiddlyWikis.
Other
33 stars 4 forks source link

Choose backend #12

Open linonetwo opened 1 year ago

linonetwo commented 1 year ago

To make tw data available to be used by other dapp, I want to make a tw plugin for https://github.com/CommunitySolidServer/CommunitySolidServer

It can use plugin mechanism to provide API. So I think we can use tiddly-wiki-server as API layer, and save to that server. This requires switch backend from sqlite to that server, via built-in or ipc or http.

nathanielknight commented 1 year ago

I don't know of a good way to support runtime plugins in Rust apps, but I could certainly add:

This would let you create a project that implements that trait against Solid, pass that to a setup function, and get a functioning web server.

Would that work?

linonetwo commented 1 year ago

This is OK, just use this as a rust crate, and implement all CRUD. After user login at solid, proxy all request to tiddlywiki server, and server save data to solid.

How do you handle auth, do you support header based auth?

nathanielknight commented 1 year ago

So far I've implemented auth in the reverse proxy that I put in front of this service (I use Caddy and Authelia). There's an open issue for auth (#6 ) but I think it should probably be implemented as Tower middleware and I haven't had time to dig into how that works.