ProvableHQ / sdk

A Software Development Kit (SDK) for Zero-Knowledge Transactions
https://provable.tools
GNU General Public License v3.0
584 stars 468 forks source link

Update nextjs-ts template #879

Open oguzutku1745 opened 4 months ago

oguzutku1745 commented 4 months ago

Motivation

The old Next.js template lacked a deploy function, and worker logic was not defined, unlike in the React example. This new template is more properly defined.

Test Plan

image

I encountered a circular dependency error that I couldn't identify using the tools I've previously used, such as circular-dependency-plugin and madge.

 ⚠ Circular dependency between chunks with runtime (_app-pages-browser_node_modules_aleohq_sdk_dist_index_js-_app-pages-browser_node_modules_aleo-25fba6, _app-pages-browser_src_app_workers_worker_ts, runtime)
This prevents using hashes of each other and should be avoided.

The potential impacts of this error should be analyzed for large-scale applications; however, I haven't observed any effects on the Next.js example that I designed to demonstrate how to interact with the network through on-chain executions. You can check the live demo.

For local development, I believe the new template will serve as a better starting point for Next.js users.

Related PRs

No related PRs.