DigitalCommons / mykomap

A web application for mapping initiatives in the Solidarity Economy
3 stars 0 forks source link

[CWM] Whiteboarding session for creating the MM backend #266

Closed lin-d-hop closed 2 weeks ago

lin-d-hop commented 3 weeks ago

Track under CWM in Clockify

Description

Let's create the tickets for the first steps in creating the MM backend.

This whiteboarding session is to create tickets that will get us to the point that we have:

Acceptance Criteria

rogup commented 3 weeks ago

In a comment from #265:

@wu-lee: I think the main question left now is what goes on the back-end. (To think about this briefly, I would suggest something which works smoothly with Swagger/OpenAPI and is small and simple and aimed at rapid prototyping. I see that NocoDB says it supports Swagger, and we can run this on our Cloudron server, which simplifies deployment massively)

Are you suggesting that we don't have a backend server at all and use a 'serverless' architecture that just uses a database and a script for each API. Or was it a comment on the DB solution to use with a backend server?

Anyway, this is stuff to discuss in our whiteboard 😊

rogup commented 2 weeks ago

Hapi/Swagger https://github.com/krakenjs/hapi-openapi https://stackoverflow.com/questions/35990191/how-should-i-use-swagger-with-hapi

rogup commented 2 weeks ago

@wu-lee Discussion from whiteboard

Path forwards that we've decided

Target:

rogup commented 2 weeks ago

@wu-lee has done some more investigation into frameworks e.g. Hapi or something else.

SwaggerHub can generate a stub app in NodeJS, but this doesn't work with Hapi. Hapi doesn't seem to have a tool for generating server-side code. There is only a tool for auto-generating openapi specs from Hapi code, which would be useful if the code becomes the "source of truth" later.

Other frameworks which seems to have better support for openapi are:

Fastify seems to do very well in benchmarks compared to other frameworks, it looks like it is fairly simple to use, and development looks like it will be fast if we use fastify-openapi-glue.

So let's go with this. I'll make a ticket for this work.