Grain Chain Data Visualization

Available Pages:

/test

Displays the first 10 records from the database in a table format.

/test-viz

Shows a bar chart visualization of grain deliveries by region.

How Static Generation Works

This application uses Next.js static generation to create pre-rendered pages at build time:

  • The /test page fetches data during build time and generates a static HTML table.
  • The /test-viz page uses Chart.js to create an interactive visualization with pre-loaded data.
  • All database queries are executed at build time, making the deployed site fast and secure.

This approach ensures optimal performance and allows the site to be deployed as a static export.