create-tigra 3.1.0 → 3.2.0

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/README.md CHANGED
@@ -40,7 +40,7 @@ npx create-tigra my-app
40
40
 
41
41
  ### Codex Development
42
42
 
43
- Includes concise Codex-native `AGENTS.md` guidance at the project root and scoped guidance inside `client/` and `server/`. Generated projects also include Cloudflare's MIT-licensed `security-audit` repository skill. Meaningful server changes must use its focused guidance and, when the Codex Security plugin is installed, complete a `security-diff-scan` of the working-tree patch before completion.
43
+ Includes concise `AGENTS.md` guidance at the project root and scoped guidance inside `client/` and `server/`, with matching `CLAUDE.md` files that import them so Claude Code reads the same rules. Generated projects also include Cloudflare's MIT-licensed `security-audit` repository skill (in `.agents/skills/` for Codex, with a thin pointer in `.claude/skills/` for Claude Code). Meaningful server changes must use its focused guidance and, before completion, scan the working-tree patch: `security-diff-scan` when the Codex Security plugin is installed, or `/security-review` in Claude Code.
44
44
 
45
45
  The security workflow falls back to the bundled skill when Codex Security is unavailable, while full or deep repository audits remain explicit operations rather than an automatic cost on every edit.
46
46
 
@@ -23,6 +23,7 @@ const JWT_SECRET_PLACEHOLDER = 'CHANGE_ME_generate_with_openssl_rand_hex_48';
23
23
 
24
24
  // Files that contain template variables and need replacement
25
25
  const FILES_TO_REPLACE = [
26
+ 'AGENTS.md',
26
27
  'server/package.json',
27
28
  'server/.env.example',
28
29
  'server/docker-compose.yml',
@@ -104,10 +105,10 @@ async function copyTemplate(templateDir, targetDir) {
104
105
  continue;
105
106
  }
106
107
 
107
- // The repository stores the gitignore without a leading dot so npm reliably
108
- // includes it in the published template; generated projects receive the dotfile.
109
- let destName = entry.name;
110
- if (entry.name === 'gitignore') destName = '.gitignore';
108
+ // The repository stores the gitignore without a leading dot so npm reliably
109
+ // includes it in the published template; generated projects receive the dotfile.
110
+ let destName = entry.name;
111
+ if (entry.name === 'gitignore') destName = '.gitignore';
111
112
 
112
113
  const destPath = path.join(targetDir, destName);
113
114
 
@@ -404,7 +405,7 @@ async function main() {
404
405
  }
405
406
  }
406
407
 
407
- spinner.succeed('Project scaffolded successfully!');
408
+ spinner.succeed('Project scaffolded successfully!');
408
409
  } catch (error) {
409
410
  spinner.fail('Failed to scaffold project');
410
411
  console.error(chalk.red(`\n ${error.message}\n`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-tigra",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
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": {
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: security-audit
3
+ description: Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
4
+ ---
5
+
6
+ # Security Audit (pointer)
7
+
8
+ This is a thin pointer so Claude Code discovers the skill. The real skill is shared with Codex and lives in `.agents/skills/security-audit/` (vendored from Cloudflare's `security-audit-skill`; see its `SOURCE.md`). Do not copy it here, so the two agents never drift.
9
+
10
+ Read `.agents/skills/security-audit/SKILL.md` in full and follow it exactly. Resolve every relative file it references (for example `HUNTING.md`, `report-schema.json`, the `validate-*.cjs` scripts) against `.agents/skills/security-audit/`, not this directory. Its "Task tool" is Claude Code's subagent mechanism.
@@ -4,6 +4,22 @@
4
4
 
5
5
  Every implementation change MUST include a human-readability pass. Add or update concise comments or doc comments for important functionality and for non-obvious contracts, invariants, edge cases, business rules, security boundaries, deployment constraints, performance choices, and workarounds. Explain why and what must remain true; do not narrate obvious syntax. Keep comments accurate and remove stale ones.
6
6
 
7
+ <!-- project-facts:start -->
8
+ ## Project facts
9
+
10
+ > Maintained by the `seed-project-facts` skill: run it once to fill the TODOs. This section is the source of truth for this project: keep it true. If your work changes any line (deployment, URLs, hosting, databases, Redis, integrations, rules), update it and the seed-plugins registry row in the same change. If it conflicts with reality, trust reality, fix it, and tell Tornike. No secrets here.
11
+
12
+ - **Name:** {{PROJECT_NAME}}
13
+ - **Purpose:** TODO
14
+ - **Production:** TODO (client URL / server URL, or "not deployed")
15
+ - **Hosting:** TODO (Coolify instance, or none)
16
+ - **Local MySQL:** `{{DATABASE_NAME}}` on TODO (central-mysql | per-project container)
17
+ - **Production MySQL:** TODO (`db` on shared MySQL on <instance> | dedicated Coolify MySQL | none)
18
+ - **Redis:** TODO (local yes/no / production yes/no)
19
+ - **Talks to:** TODO
20
+ - **Special rules:** none
21
+ <!-- project-facts:end -->
22
+
7
23
  ## Architecture and sources of truth
8
24
 
9
25
  - `client/` is a Next.js App Router application; `server/` is a Fastify API backed by Prisma/MySQL and Redis. They deploy independently.
@@ -11,6 +27,7 @@ Every implementation change MUST include a human-readability pass. Add or update
11
27
  - `server/prisma/schema.prisma` is the database-schema source of truth. Use Prisma migrations for schema changes.
12
28
  - `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
29
  - Shared route/API constants, response helpers, and security middleware are canonical; extend them instead of creating competing shapes or duplicate policy.
30
+ - 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
31
 
15
32
  ## Naming
16
33
 
@@ -35,8 +52,8 @@ Every implementation change MUST include a human-readability pass. Add or update
35
52
  ## Required server security workflow
36
53
 
37
54
  - For every meaningful server implementation, bug fix, refactor, dependency update, or configuration change, use the repository-local `security-audit` skill in guidance mode while designing and reviewing the change. Treat authentication, authorization, validation, database access, outbound requests, uploads, cookies, CORS/origin handling, rate limits, environment configuration, and deployment behavior as security-sensitive surfaces.
38
- - Before completion, use the Codex Security plugin's `codex-security:security-diff-scan` skill to review the current working-tree patch when that plugin skill is available. Scope the review to the changed server behavior and the supporting code needed to establish impact; do not expand it into an unrelated repository audit.
39
- - If Codex Security is unavailable, perform an equivalent focused patch review with the bundled `security-audit` skill and explicitly report that the plugin scan was unavailable. Do not skip the security gate silently.
55
+ - Before completion, review the current working-tree patch with the agent's own security scan when available: in Codex use the Codex Security plugin's `codex-security:security-diff-scan` skill; in Claude Code run `/security-review`. Scope the review to the changed server behavior and the supporting code needed to establish impact; do not expand it into an unrelated repository audit.
56
+ - If that scan is unavailable, perform an equivalent focused patch review with the bundled `security-audit` skill and explicitly report that the scan was unavailable. Do not skip the security gate silently.
40
57
  - A full or deep repository audit remains explicit work: do not start one merely because ordinary server code changed. Fix confirmed in-scope findings, rerun affected checks, and disclose any unresolved or unverified security concern before claiming completion.
41
58
  - Documentation-only, comment-only, and formatting-only changes may skip the patch scan when they cannot affect runtime behavior, permissions, deployment, or security policy.
42
59
 
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -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
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -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 {
@@ -0,0 +1 @@
1
+ @AGENTS.md