Skip to content

teo-garcia/react-template-next

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

268 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Template Next

Production-ready Next.js starter with TypeScript, Tailwind CSS, and modern testing

License: MIT Node pnpm Next.js React

Part of the @teo-garcia/templates ecosystem


Features

Category Technologies
Framework Next.js 16 with App Router and Turbopack
UI React 19, Tailwind CSS 4, Lucide Icons
Data TanStack Query for server state
Type Safety TypeScript with strict mode
Testing Vitest, Testing Library, Playwright, MSW
Code Quality ESLint, Prettier, Husky, lint-staged

Requirements

  • Node.js 24+
  • pnpm 10+

Quick Start

pnpm install
cp .env.example .env
pnpm dev

The app starts on http://localhost:3000.


Scripts

Command Description
pnpm dev Start development server with Turbopack
pnpm build Create production build
pnpm start Run production server
pnpm test Run unit tests
pnpm test:browser Run browser tests
pnpm test:e2e Run Playwright E2E tests
pnpm coverage Run tests with coverage
pnpm check Run lint, typecheck, format, and tests
pnpm lint:es Lint and fix with ESLint
pnpm lint:ts TypeScript type checking
pnpm format Format with Prettier

Project Structure

Path Purpose
app/ Next.js App Router pages
app/components/ Shared UI components
app/lib/ Configuration and utilities
public/ Static assets
e2e/ Playwright E2E tests

Route States

Next.js App Router conventions own route-state wiring:

File Purpose
app/loading.tsx Route loading fallback
app/error.tsx Segment-level error boundary
app/global-error.tsx Root application error boundary
app/not-found.tsx Unmatched route UI
app/components/route-state/route-state Shared local state UI

Shared Governance

Area Tooling
Dependency updates Renovate
Issue intake GitHub issue templates
Change review Pull request template
CI GitHub Actions for lint, typecheck, test, and build
Delivery Vercel deployment workflow

Security Headers

next.config.ts applies the governed web header baseline to every route: Content Security Policy, Cross-Origin-Opener-Policy, Permissions-Policy, Referrer-Policy, X-Content-Type-Options, and X-Frame-Options.

HSTS is intentionally deployment-owned because TLS termination and domain preload policy belong to the hosting layer.


Shared Configs

Package Role
@teo-garcia/eslint-config-shared ESLint rules
@teo-garcia/prettier-config-shared Prettier formatting
@teo-garcia/tsconfig-shared TypeScript settings
@teo-garcia/vitest-config-shared Test configuration

Related Templates

Template Description
react-template-rr React Router + Vite SPA
react-native-template-expo Expo mobile app
nest-template-monolith NestJS backend
nest-template-microservice NestJS microservice
fastapi-template-monolith FastAPI backend

License

MIT


Built by teo-garcia

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors