earth-genome / foodtwin-global-app

Repository for our work on the global foodtwin application.
MIT License
1 stars 0 forks source link

Validate Prisma ORM #8

Closed vgeorge closed 2 months ago

vgeorge commented 2 months ago

We discussed that Prisma ORM could be a great fit for this project because it provides modern tooling (migrations, preview studio) and type safety between API routes and frontend components.

However, it lacks out-of-the-box support for geospatial features using PostGIS. The documentation page on Custom & type-safe queries provides an example of implementing a basic PostGIS schema and query. We should investigate how we can implement the features needed to build the visualization.

Current changes:

Proposed Exercise:

This should cover the most critical aspects of integrating Prisma ORM with PostGIS for our project.

@willemarcel @oliverroick please let me know if you have comments.

cc @wrynearson

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
foodtwin-global-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2024 5:49pm
vgeorge commented 2 months ago

Changes added:

Steps to provide feedback:

Known issues: It seems there is some projection or clipping issue in the MVT route. If you switch the data URL in lines 16-17 of the sandbox/mvt-test files to use a remote URL, the tiles are rendered correctly.

@oliverroick can you please do a first review?

vgeorge commented 2 months ago

The projection issue was fixed in the last commit, tiles should be rendered correctly.

vgeorge commented 2 months ago

@oliverroick thanks for the review. I believe the migration issue is fixed. I introduced other changes:

Could you do another review? If you are able to ingest the data and browse the MVT map, this should be good to go. There is some odd behavior when rendering MVT in the globe view, but we can discuss this in another ticket.