Create a Next.js TorizonCore Project

Next.js is a quite popular framework to create full-stack Web applications.
It comes packaged with Node, which handles its server-side rendering, but it also has a React-based templating engine.
It seems nice and powerful, and I’m going to use it for my TorizonCore-based application.
Searching online I found some documentation on how to create docker container for Next.js application (as an example this one, or this other one.
All of them start from node:18-alpine container

FROM node:18-alpine

and I’m not sure if this is a good idea, or is better starting from a Torizon Node.js Typescrypt Application Template.
@matheus.tx can you suggest me the best approach?
Is there an easy way to “generate” a TC Next.js project, starting from those documentation?
Do you think that a (community supported) Next.js Template would be possible/useful?

Hey @vix

I think that you should be able to create a template based on the Node.js Typescript Application. I would start from this one because so we can follow the same versioning and integrate with other images from our ecosystem if needed. Let me know any question that you have during the process.

It is certainly worth creating a Next.js template, we are continually monitoring the creation of projects based on community templates to move the most used ones to Toradex supported.

Best Regards,

Hello @vix ,
Do you have any updates on this topic?

Best regards,

Not yet.
It’s on my todo list, but after I solved everything related to M7/HMP (other topics on this community).

I’ve opened a PR on Github first attempt of next.js template.
It’s only prelimianry and I know that something doesn’t work yet, but I hope that it can be reviewed by someone much more expert than me.
Thanks in advance