{"repo":"spa5k/nextjs_approuter_electron","free":true,"listed":false,"github":"https://github.com/spa5k/nextjs_approuter_electron","clone":"git clone https://github.com/spa5k/nextjs_approuter_electron.git","description":"This is a template for building Electron apps with Next.js App router, SSR and Server Components","language":"TypeScript","stars":136,"topics":["approuter","electron","nextjs","nextron"],"license":"Apache-2.0","category":"saas-starters-boilerplates","readme_excerpt":"NextJS App Router with Electron, SSR, Server Components, etc. [!CAUTION] This repository is no longer maintained due to ethical concerns regarding Vercel's leadership. Users are advised to migrate to TanStack Start for continued support and development. A migration guide will be provided in the near future. This boilerplate demonstrates a turborepo setup combining Next.js with Electron, allowing you to use the same codebase with SSR (Server-Side Rendering)/ React Server Components(RSC) for Electron applications. Project Structure 1. Next.js App - next.config.mjs - For the Next.js app, configure it by setting the output to \"standalone\": - This configuration produces a minimal bundle usable in Electron. Additionally, this output can be utilized in a Dockerfile to create a containerized version of your app, which is small in size and can run anywhere, not just Vercel. 2. Electron App - package.json - The Electron app uses the Next.js app as the renderer, relying on stock Electron without external libraries. - Electron build configuration in package.json : - The Next.js app output is copied to the Electron app to be used as the renderer during the build process. - Main Electron file ( main.ts ): - Unlike traditional Electron setups where index.html is loaded, this setup runs the Next.js app on a different port and loads it, enabling SSR in Electron. - get-port-please is used to get a free port, starting the Next.js server on that port. This allows the same codebase to be used for","default_branch":null,"files":null,"tree":[],"storefront":"/r/spa5k","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spa5k/nextjs_approuter_electron/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}