Skip to content

feat: Implement Interactive Supply Chain Map (Geo-Spatial Tracking)#131

Open
kalyan-1845 wants to merge 9 commits into
daviddprtma:mainfrom
kalyan-1845:feature/supply-chain-map
Open

feat: Implement Interactive Supply Chain Map (Geo-Spatial Tracking)#131
kalyan-1845 wants to merge 9 commits into
daviddprtma:mainfrom
kalyan-1845:feature/supply-chain-map

Conversation

@kalyan-1845

Copy link
Copy Markdown
Contributor

Fixes #130

Hi @daviddprtma! Here is the complete implementation for the Interactive Supply Chain Map feature.

Changes Made

  • New Component: SupplyChainMap.tsx - A fully interactive map built with
    eact-leaflet and OpenStreetMap tiles, centered on Indonesia. Each registered batch is plotted as a pin on the map. Clicking a pin shows a popup with batch name, location, quantity, harvest date, risk level, and a direct link to view the Hedera transaction on HashScan.
  • New Page: MapExplore.tsx - A dedicated /map route that fetches all batch data from Supabase and renders them on the interactive map.
  • Geocoding Utility - A lightweight frontend geocoder that maps common Indonesian agricultural region strings (e.g., Lampung, Sulawesi, Java) to approximate lat/lng coordinates with randomized jitter to prevent marker overlap.
  • Updated Navbar.tsx - Added an "Explore Map" navigation link with a MapPin icon.
  • Updated App.tsx - Added the /map route with lazy loading and authentication protection.
  • Updated �pi.ts - Added getBatches() function to fetch batch records from Supabase.

Testing

  • TypeScript compiles with zero errors.
  • All existing routes and components remain unaffected.

This feature significantly improves supply chain transparency by giving buyers a visual, geo-spatial view of crop origins across Indonesia.

I would really appreciate it if you could review this and add the SSoC'26 labels. Thank you!

kalyan-1845 and others added 4 commits June 18, 2026 19:34
- Add SupplyChainMap component with OpenStreetMap tiles and Indonesian region geocoding
- Add MapExplore page with batch data fetching from Supabase
- Add /map route to App.tsx
- Add Explore Map link to Navbar
- Add getBatches API function

Fixes daviddprtma#130
@vercel

vercel Bot commented Jun 19, 2026

Copy link
Copy Markdown

@kalyan-1845 is attempting to deploy a commit to the daviddprtma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@kalyan-1845

Copy link
Copy Markdown
Contributor Author

Hi @daviddprtma! Thank you for assigning me Issue #130. I understand you mentioned to hold on, so please take your time. Whenever you are ready, the PR is here for your review. I am happy to make any changes you need. Thank you!

@daviddprtma daviddprtma moved this from Todo to In Progress in AgroDex SSoC'26 Project Jun 20, 2026
@daviddprtma

Copy link
Copy Markdown
Owner

hello @kalyan-1845 there's a merge conflicts in your PR's please resolve it first. otherwise I can't see your work. thanks.

@kalyan-1845

Copy link
Copy Markdown
Contributor Author

Hi @daviddprtma! I have resolved all the merge conflicts with the upstream main branch. The PR should be clean and mergeable now. Thank you for the assignment!

Comment thread fix114.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed.

Comment thread issue_body.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed.

Comment thread package-lock.json

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed.

Comment thread pnpm-lock.yaml Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed.

Comment thread pr_body.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed to be pushed in the commit

Comment thread reply117.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed to be pushed in the commit

Comment thread reply118.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed to be pushed in the commit

Comment thread reply118b.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed to be pushed in the commit

Comment thread reply_body.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed to be pushed in the commit

Comment thread req114.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed to be pushed in the commit

Comment thread req118.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed to be pushed in the commit

Comment thread req131.txt Outdated

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete this file as it is not needed to be pushed in the commit

@daviddprtma

daviddprtma commented Jun 22, 2026

Copy link
Copy Markdown
Owner

one question from me is do you already install your react-leaflet module? as the frontend ci said that the module doesn't exist and it can't be passed. also please download it using npm and not pnpm as it is not needed anymore to download the module. thanks.

@daviddprtma

Copy link
Copy Markdown
Owner

hello @kalyan-1845 please resolve the merge conflicts as yesterday there was a new changes for AgroDex and you need to solve it first so I can see your work. and also don't forget to look at the last comment in the above that you need to do that. thanks.

@kalyan-1845

Copy link
Copy Markdown
Contributor Author

Hi @daviddprtma! Sorry about that - I accidentally committed some of my local scratch text files. I have cleaned them all up now!

I also verified that the
eact-leaflet and leaflet dependencies are properly installed using
pm and added to package.json. The merge conflicts are fully resolved and the branch is up to date with the latest main.

@daviddprtma

Copy link
Copy Markdown
Owner

hello @kalyan-1845 please resolve the merge conflicts as today there's a new changes for this project from your last PR. thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

feat: Implement Interactive Supply Chain Map (Geo-Spatial Tracking)

2 participants