{"id":50334308,"url":"https://github.com/weaponsforge/nextjs-v16-template","last_synced_at":"2026-05-29T12:30:21.310Z","repository":{"id":338543056,"uuid":"1158218533","full_name":"weaponsforge/nextjs-v16-template","owner":"weaponsforge","description":"NextJS v16 app router simple starter template + Docker configs","archived":false,"fork":false,"pushed_at":"2026-05-02T09:00:46.000Z","size":194,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"dev","last_synced_at":"2026-05-02T11:06:42.526Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nextjs-v16-template.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weaponsforge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-15T01:32:23.000Z","updated_at":"2026-05-02T09:00:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"e7198e6c-0e1d-40a4-8277-d5deae68f4e4","html_url":"https://github.com/weaponsforge/nextjs-v16-template","commit_stats":null,"previous_names":["weaponsforge/nextjs-v16-template"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/weaponsforge/nextjs-v16-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fnextjs-v16-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fnextjs-v16-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fnextjs-v16-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fnextjs-v16-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaponsforge","download_url":"https://codeload.github.com/weaponsforge/nextjs-v16-template/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fnextjs-v16-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33652976,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-29T12:30:19.470Z","updated_at":"2026-05-29T12:30:21.292Z","avatar_url":"https://github.com/weaponsforge.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## nextjs-v16-template\n\nBarebones NextJS v16 React app template using the **App Router** with custom ESLint rules and Docker configurations.\n\n\u003e Next application code lives inside the `/src` directory.\n\n\u003e [!TIP]\n\u003e You may use this project as a **GitHub Template** for quick setup.\u003cbr\u003e\n\u003e Click **Use this template** (upper right), then select **Create a new repository**\n\n## 📋 Requirements\n\n1. NodeJS (recommended: \u003e= 24.11.0)\n   ```\n   node: 24.11.0\n   npm: 11.6.1\n   ```\n\n2. Docker (optional)\n\n## 📦 Core Libraries / Frameworks\n\n\u003cdetails\u003e\n\u003csummary\u003eThis app uses the following libraries and frameworks\u003c/summary\u003e\n\n| Library | Version | Description |\n| --- | --- | --- |\n| Next | 16.2.0 | A React framework |\n| React | 19.2.4 | Library for creating reusable/composable and interactive components |\n| Tailwind CSS | 4.2.1 | Generic, composable utility classes for CSS styling |\n| ESLint | 9+ | Enforces coding formats, rules and preferences |\n\n\u003c/details\u003e\n\n## 🛠️ Installation\n\n#### 1. Clone this repository or your fork/template.\n\n```sh\ngit clone https://github.com/weaponsforge/next-v16-template.git\n```\n\n#### 2. Install dependencies.\n\n```sh\ncd nextapp\nnpm install\n```\n\n#### 3. Create a `.env.local` file from the `.env.example` file inside the `/nextapp` directory.\n\n\u003e ⚠️ Ensure only one of `IS_BUILD_STATIC` or `IS_BUILD_DOCKER` has a value of `1` to avoid build conflicts.\n\n| Variable | Description |\n| --- | --- |\n| IS_BUILD_DOCKER | If value is `1`, builds the NextJS app for Docker in production using the standalone mode build into the `/nextapp/.next/standalone` and `/nextapp/.next/static` directories. |\n| IS_BUILD_STATIC | If value is `1`, builds and exports the NextJS app into a static build in the `/nextapp/out` directory when running `\"npm run build\"`.\u003cbr\u003e\u003cbr\u003e⚠️ Next.js apps that use heavy React Server Components (RSC) and Next.js server features will fail to build as a static output. Te enable true static export, [adjust necessary settings](https://nextjs.org/docs/app/guides/static-exports) in the `next.config.ts` file and the overall app before export. |\n| IS_WEBPACK | Set to `1` to run the app in development mode using **Webpack**. \u003cbr\u003e\u003cbr\u003e⭐ **IMPORTANT**: When running the app via **Docker** on Windows OS (`docker compose up`), this must be set to `1` to enable hot reload.|\n| WATCHPACK_POLLING | Set to `true` to enable Webpack-based hot reloading when running the app in Docker on Windows. Required because Turbopack hot reload is currently unreliable in this setup (Docker + Windows). |\n\n## 📖 Usage\n\nUsing Node\n\n#### 1. Run the React app for local development.\n\n```sh\ncd nextapp\nnpm run dev\n```\n\n#### 2. Launch the local app website in a web browser at:\n\n```\nhttp://localhost:3000\n```\n\n#### 3. Edit the source code and wait for changes to display in the web browser.\n\nView the [STRUCTURE.md](/docs/STRUCTURE.md) for guidance on how to structure project folders and files within this project.\n\n#### 4. To build the React app\n\n- For [static export](https://nextjs.org/docs/app/getting-started/deploying#static-export) (only frontend HTML/CSS/JS), set the environment variables `IS_BUILD_STATIC=1` and `IS_BUILD_DOCKER=0`.\n- For [Docker standalone mode](https://nextjs.org/docs/app/getting-started/deploying#docker), set the environment variables `IS_BUILD_STATIC=0` and `IS_BUILD_DOCKER=1`.\n\n- Run\n\n   ```sh\n   npm run build\n   ```\n\n   - This command exports the build artifacts to the `/nextapp/out` directory for **STATIC EXPORT** (`IS_BUILD_STATIC=1`).\n\n   - This command exports the build artifacts to the `/nextapp/.next/standalone ` and `/nextapp/.next/.static` directories for **DOCKER STANDALONE MODE** (`IS_BUILD_DOCKER=1`).\n\n## ⚡Alternate Usage\n\n\u003e [!TIP]\n\u003e Set `IS_WEBPACK=1` and `WATCHPACK_POLLING=true` to enable hot reloading in development mode when running in Docker on Windows, as Turbopack is currently unreliable in this setup.\n\n\u003cdetails\u003e\n\u003csummary\u003eUsing Docker\u003c/summary\u003e\n\u003cbr\u003e\n\nUsage with Docker is an alternate option to using Node directly from the [Usage](#-usage) section.\n\n\u003e **IMPORTANT**\n\u003e Ensure that port `3000` is free before proceeding.\n\n### Build the Development Docker Image\n\n#### 1. Set up the environment variables for the `/nextapp` directory.\n\n- Refer to the [Installation](#️-installation) section **# 3** for more information.\n\n#### 2. Build the image for local development.\n\n```sh\ndocker compose build --no-cache\n```\n\n\u003e 💡 **INFO:** Do this step only once during initial installation. Re-run this step if there will be changes to the Dockerfile or after installing new Node libraries.\n\n#### 3. Run the container for local development.\n\n```sh\ndocker compose up\n```\n\n#### 4. Launch the local app website in a web browser at:\n\n```\nhttp://localhost:3000\n```\n\n#### 5. Edit the source code and wait for changes to display in the web browser.\n\n### Other Docker Builds\n\n1. **`docker-compose.prod.yml`** - packages the NextJS app into a standalone mode for Docker NextJS (app router) deployment.\n\n   \u003e Outputs build files in the `/nextapp/.next/standalone` and `/nextapp/.next/.static` directories.\n\n2. **`docker-compose.static.yml`** - packages the frontend-only NextJS app into a static export.\n\n   \u003e Outputs build files in the `/nextapp/out` directory.\n\n\u003c/details\u003e\n\u003cbr\u003e\n\n## 📜 Available Scripts\n\nThese scripts, compatible with running in Node and Docker, run various TypeScript scripts and tests.\n\n\u003cdetails\u003e\n\u003csummary\u003e👉 Click to expand the list of available scripts\u003c/summary\u003e\n\n### `npm start`\n\nRuns the NextJS app in production mode. Requires running `\"npm run build\"` first.\n\n### `npm run dev`\n\n- Runs the NextJS app in development mode with hot-reload using Turbopack and NodeJS.\n- Set `IS_WEBPACK=1` then run `\"docker compose up\"` to run the NextJS app in development mode with hot-reload using Docker from a Windows host.\n\n### `npm run build`\n\nBuilds the NextJS app for production mode.\n\n\u003e ⚠️ **WARNING**: Ensure only one of `IS_BUILD_STATIC` or `IS_BUILD_DOCKER` has a value of `1` to avoid build conflicts.\n\n- **Static export**\u003cbr\u003e\n   When `IS_BUILD_STATIC=1`: exports the frontend-only build artifacts to the `/nextapp/out` directory.\u003cbr\u003e\n\n   \u003e⚠️ **NOTE**: Next.js apps that use Next.js server features will fail to build as a **static output**. Te enable true static export, [adjust necessary settings](https://nextjs.org/docs/app/guides/static-exports) in the `next.config.ts` file and the overall app before export.\n\n- **Docker standalone mode**\u003cbr\u003e\n   When `IS_BUILD_DOCKER=1`: exports the NextJS app (uses app router) build artifacts to the `/nextapp/.next/standalone ` and `/nextapp/.next/.static` directories for Docker deployment.\n\n   \u003e ℹ️ **INFO**: See the `\"npm run docker:build\"` script to build the NextJS app for production mode using Docker (NextJS standalone mode build).\n\n### `npm run lint`\n\nLints TypeScript source codes and files, checking for linting errors.\n\n### `npm run lint:fix`\n\nFixes lint errors.\n\n### `npm run types:check`\n\n- Checks for TS type errors by generating run-time next-specific types via `\"next typegen\"` first.\n\n\u003c/details\u003e\n\u003cbr\u003e\n\n## 📦 Docker Scripts\n\nThese scripts are called within the `Dockerfile` for building images.\n\n\u003cdetails\u003e\n\u003csummary\u003e👉 Click to expand the list of available scripts\u003c/summary\u003e\n\n### `npm run docker:webpack`\n\n- Runs the NextJS app in development mode inside Docker using Webpack and NodeJS.\n- Requires `IS_WEBPACK=1` in `.env.local`.\n- Uses the `docker-compose.yml` Docker compose file.\n\n\u003e 💡 **NOTE**: To enable hot reloading, set `WATCHPACK_POLLING=true` in `.env.local`. This is required because Turbopack hot reload is not yet reliable for Next.js apps running in Docker on Windows.\n\n### `npm run docker:build`\n\n- Sets `IS_BUILD_DOCKER=1` and builds a Docker image containing a standalone NextJS build.\n- Uses the `docker-compose.prod.yml` Docker compose file.\n\n### `npm run docker:static`\n\n- Sets `IS_BUILD_STATIC=1` and builds a Docker image containing a NextJS static export.\n- Uses the `docker-compose.static.yml` Docker compose file.\n\n\u003e 💡 **INFO**: When running `docker compose up`\n\u003e\n\u003e You can also run `docker exec -it weaponsforge-next-v16-template-dev npm run docker:static` to build a static output.\n\n## References\n\n- Next (Turbopack) currently doesn't work in Docker \u003csup\u003e[[1]](https://github.com/ymeskini/ai-app/issues/1)\u003c/sup\u003e\n\n\u003c/details\u003e\n\u003cbr\u003e\n\n@weaponsforge\u003cbr\u003e\n20260216\u003cbr\u003e\n20260403\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fnextjs-v16-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaponsforge%2Fnextjs-v16-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fnextjs-v16-template/lists"}