How jpedroschmitz/typescript-nextjs-starter works
Project type and purpose
• This is a full-stack, TypeScript-based Next.js starter/template.
• It provides a React 19 frontend with Next.js App Router (SSR/SSG), plus built-in tooling (linting, formatting, commit hooks, CI/CD, env management, redirects, CSP).
File structure
• Top level: configuration and tooling
• .github/workflows/ci.yml (CI pipeline)
• .husky/* (Git hooks)
• commitlint, ESLint, Prettier, Renovate, lint-staged
• next.config.ts (Next.js settings incl. CSP, redirects.ts)
• Public/static assets: public/
• Source: src/
• src/app/ – Next.js App Router components (layout.tsx, page.tsx, globals.css)
• src/lib/env/ – T3 Env definitions (client.ts, server.ts) for type-safe env vars
• Build & lock files: package.json, pnpm-lock.yaml, tsconfig.json
README insights
• Features SSR/SSG via Next.js 15
• Uses T3 Env for environment schemas
• Redirects configured in redirects.ts (typed)
• CSP configured in next.config.ts
• Emphasis on DX: Cursor rules, ESLint, Prettier, Husky, commitlint, Renovate
Main components
a. Browser (Client)
b. Next.js Server (Node runtime)
c. React Components & App Router
d. Static Assets / Public Directory
e. Environment Variables Layer (T3 Env)
f. Redirects & CSP (Next.js config)
g. DevOps & Tooling (GitHub Actions CI, Husky, commitlint, ESLint/Prettier)
Relationships & interactions
• Browser → Next.js Server
– HTTP requests for pages → App Router → SSR/SSG
– Requests for static assets → served from public/
• Next.js Server → src/lib/env
– Reads .env.local via T3 Env for runtime config
• Next.js Server (build step)
– Applies redirects.ts rules
– Applies CSP rules from next.config.ts
• DevOps & Tooling
– Commits trigger Husky hooks → commitlint / lint-staged → ESLint/Prettier
– Pushes / PRs trigger GitHub Actions CI → ts-check & linters
Architectural patterns & principles
• Component-based UI (React)
• App Router pattern (Next.js, SSR/SSG)
• Type-safe env management (T3 Env)
• Strict DX pipeline (lint-staged, Husky, commit conventions)
• CI/CD as code (GitHub Actions)
Technologies to call out
• Next.js 15 (App Router)
• React 19, TypeScript
• T3 Env (src/lib/env)
• ESLint, Prettier, Commitlint, Husky, Renovate
• pnpm (package manager)
• GitHub Actions (CI)