leihs / leihs

leihs is an inventory management, procurement and lending system
GNU General Public License v3.0
189 stars 52 forks source link

New Inventory: Setup Reitit as backend router #1753

Open urs-van-binsbergen opened 1 week ago

urs-van-binsbergen commented 1 week ago

Infos for @SeduroDotCom :

The backend is so far just quickly glued together, in order to be runnable. So everything is subject to be changed/modernized by you.

Under src/leihs/inventory there are separate paths and thus namespaces for backend (CLJ), frontend (CLJS) and common (CLJC). This folder structure might be subject of discussion, however it should be good to start. (It is quite easy to do a namespace refactoring later, at least with VS Code...).

I have created a simple mini frontend with plain CLJS which has Reitit as router. (This will be substituted by the new stack from @belafonte later).

The routes are defined in leihs.inventory.common.routes, shared for backend and frontend, in a format compatible with Reitit. There is a adapter function in leihs.inventory.backend.paths which converts the data to the format required by bidi. This can be removed of course as soon as the backend works with Reitit.

Please also substitute the Ring configuration in leihs.inventory.backend.routes with what is wanted from a backend perspective. Probably Madek Auth is the role model. My implementation has the following problems: