A production-ready Next.js frontend template for projects in the Inkubator IT GitHub organization. Built and maintained by the DevOps team to standardize stack choices, development workflows, and deployment conventions across all client projects.
- Runtime: Bun (scripts, tooling)
- Framework: Next.js 15 (App Router, Turbopack)
- Language: TypeScript
- UI: Tailwind CSS v4
- Icons: lucide-react
- Quality: Biome (lint & format)
.
├─ src/
│ ├─ app/ # App Router (layouts, pages, styles)
│ │ ├─ globals.css # Tailwind v4 + theme tokens
│ │ ├─ layout.tsx # Root layout
│ │ └─ page.tsx # Example landing page
│ ├─ components/ # Reusable React components
│ │ └─ example-card.tsx # Example component
│ └─ lib/
│ └─ utils.ts # Shared utilities (e.g., cn helper)
├─ public/ # Static assets served as-is
│ ├─ logo-iit.png
│ ├─ next-white.svg
│ └─ ...
├─ next.config.ts # Next.js config (output: standalone, static export)
├─ postcss.config.mjs # Tailwind v4 via PostCSS
├─ components.json # shadcn/ui component registry config
├─ biome.json # Biome config (lint/format rules)
├─ tsconfig.json # TypeScript config (path alias `@` → `src`)
└─ package.json # Scripts and dependencies
- Bun installed (
bun --version) - Docker (optional, for container builds)
- Create a new repository from this template in the Inkubator IT organization.
- Clone your new repository.
- Copy
.env.exampleto.env.local(or.env) and fill in values.NEXT_PUBLIC_API_URLis the URL of the API.
- Install dependencies:
bun install- Start the dev server (Turbopack):
bun run dev- Open
http://localhost:3000. - Edit
src/app/page.tsxto try HMR.
Next.js loads env files automatically. Server-side variables are always available via process.env. To expose a variable to the browser, prefix it with NEXT_PUBLIC_.
- Place env files at the project root:
.env.local,.env.development,.env.production, etc. - Use
NEXT_PUBLIC_*for variables needed on the client.
Example .env.local:
NEXT_PUBLIC_API_URL="http://localhost:3001"Use in server code (RSC/route handlers):
const apiUrl = process.env.NEXT_PUBLIC_API_URL;Use in client code (or shared code executed on the client):
const apiBaseUrl = process.env.NEXT_PUBLIC_API_BASE_URL;- dev:
next dev --turbopack - build:
next build --turbopack - start:
next start - lint:
biome check - lint:fix:
biome check --write - format:
biome format --write
Run examples:
bun run dev
bun run build && bun run start
bun run lintTypeScript paths are configured for cleaner imports:
- Alias:
@→./src
Example:
import { cn } from "@/lib/utils";- Tailwind CSS v4 is preconfigured via
@import "tailwindcss"insrc/app/globals.css. - Light/dark design tokens are provided; apply
.darkon<html>or any parent node to switch. - Includes
tw-animate-cssfor simple animations.
This repo provides a multi-stage Dockerfile using Bun for both build and runtime, leveraging Next.js output: "standalone".
Build the production image:
docker build -t inkubatorit/nextjs-template .Run the container:
docker run --rm -p 3000:3000 \
-e NODE_ENV=production \
-e NEXT_TELEMETRY_DISABLED=1 \
inkubatorit/nextjs-templateOpen http://localhost:3000.
Pass environment variables as needed (server-side only) using -e or an env file.
Run Biome locally before commits:
bun run lint
bun run format- Production build emits a standalone server in
.next/standaloneand static assets in.next/static. - Dockerfile copies
public/,.next/standalone, and.next/static, then runsserver.jswith Bun in a minimal image. - Telemetry is disabled in the image via
NEXT_TELEMETRY_DISABLED=1. Remove or change if you prefer. - If hosting behind a sub-path or CDN, configure
basePath/assetPrefixinnext.config.tsand ensure links and asset URLs respect them.
- If native deps fail on Alpine (musl), add
libc6-compatin thedepsstage (see Dockerfile comment). - Tailwind not applying? Ensure classes are in files under
src/and the dev server was restarted after dependency changes. - Type errors from path aliases? Verify
tsconfig.jsonhas"@/*": ["./src/*"]and the dev server was restarted.
Maintained by the Inkubator IT DevOps team. Contributions are welcome via Pull Requests. For significant changes, please open an Issue first for discussion.
For questions or support, contact the Inkubator IT DevOps team.
Copyright (c) Inkubator IT. All rights reserved.