create-tigra 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tigra",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "type": "module",
5
5
  "description": "Create a production-ready full-stack app with Next.js 16 + Fastify 5 + Prisma + Redis",
6
6
  "bin": {
@@ -11,6 +11,7 @@ Every implementation change MUST include a human-readability pass. Add or update
11
11
  - `server/prisma/schema.prisma` is the database-schema source of truth. Use Prisma migrations for schema changes.
12
12
  - `server/src/config/env.ts` and `client/src/lib/env.ts` define valid environment variables. Keep the corresponding `.env.example` files synchronized without real credentials.
13
13
  - Shared route/API constants, response helpers, and security middleware are canonical; extend them instead of creating competing shapes or duplicate policy.
14
+ - Client font preset tokens are declared on `:root`. Apply every referenced `next/font` variable class to `<html>`, never only to `<body>`, so the root-scoped Tailwind tokens can resolve it.
14
15
 
15
16
  ## Naming
16
17
 
@@ -12,6 +12,7 @@
12
12
  - Server-rendered page data belongs in Server Components; client-fetched server data belongs in React Query; Redux is limited to the authenticated-user lifecycle; local and URL state stay local or in search params.
13
13
  - `src/lib/constants/routes.ts` and `api-endpoints.ts` own application and API paths.
14
14
  - `src/styles/themes/default.css` owns color values. Components use semantic Tailwind tokens; do not hardcode palette values or create competing theme variables.
15
+ - If a `next/font` CSS variable is referenced by a token declared on `:root`, apply that font's generated variable class to `<html>`. Never attach it only to `<body>`, where it cannot resolve the root-scoped token.
15
16
  - `src/middleware.ts` is the single source of truth for security headers and nonce-based CSP. Do not add a second CSP in `next.config.ts`.
16
17
 
17
18
  ## Security and deployment
@@ -40,8 +40,15 @@ export default async function RootLayout({
40
40
  const nonce = (await headers()).get('x-nonce') ?? undefined;
41
41
 
42
42
  return (
43
- <html lang="en" suppressHydrationWarning>
44
- <body className={`${inter.variable} ${jetbrainsMono.variable} font-sans antialiased`}>
43
+ // The font preset consumes these next/font variables from :root. Keep the
44
+ // generated classes on <html>; variables introduced only on <body> cannot
45
+ // resolve the root-scoped Tailwind font tokens.
46
+ <html
47
+ lang="en"
48
+ className={`${inter.variable} ${jetbrainsMono.variable}`}
49
+ suppressHydrationWarning
50
+ >
51
+ <body className="font-sans antialiased">
45
52
  <Providers nonce={nonce}>{children}</Providers>
46
53
  </body>
47
54
  </html>
@@ -5,8 +5,10 @@
5
5
  *
6
6
  * To switch fonts:
7
7
  * 1. Update the font imports in layout.tsx (next/font/google)
8
- * 2. Create a new preset file (or edit this one) with matching font-family names
9
- * 3. Update the import in globals.css to point to your preset
8
+ * 2. Apply every referenced next/font variable class to <html>, because these
9
+ * preset tokens are declared on :root and cannot resolve body-only variables
10
+ * 3. Create a new preset file (or edit this one) with matching font-family names
11
+ * 4. Update the import in globals.css to point to your preset
10
12
  */
11
13
 
12
14
  :root {