@next-friday/create-app 1.0.0 → 2.1.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.
Files changed (88) hide show
  1. package/README.md +16 -15
  2. package/dist/main.mjs +18 -7
  3. package/package.json +1 -1
  4. package/templates/base/pnpm-workspace.yaml +25 -0
  5. package/templates/payload/README.md +1 -1
  6. package/templates/payload/package.json +0 -1
  7. package/templates/payload/src/payload.config.test.ts +31 -0
  8. package/templates/payload/src/payload.config.ts +3 -0
  9. package/templates/turborepo/.agents/rules/typescript-first.md +7 -0
  10. package/templates/turborepo/.agents/rules.json +41 -0
  11. package/templates/turborepo/.claude/rules/deterministic-testing.md +21 -0
  12. package/templates/turborepo/.claude/rules/typescript-first.md +15 -0
  13. package/templates/turborepo/.cursor/rules/deterministic-testing.mdc +21 -0
  14. package/templates/turborepo/.cursor/rules/typescript-first.mdc +13 -0
  15. package/templates/turborepo/.dockerignore +12 -0
  16. package/templates/turborepo/.editorconfig-checker.json +3 -0
  17. package/templates/turborepo/.env.example +4 -0
  18. package/templates/turborepo/.github/ISSUE_TEMPLATE/bug.yml +66 -0
  19. package/templates/turborepo/.github/ISSUE_TEMPLATE/feature.yml +51 -0
  20. package/templates/turborepo/.github/dependabot.yml +79 -0
  21. package/templates/turborepo/.github/labeler.yml +25 -0
  22. package/templates/turborepo/.github/pull_request_template.md +25 -0
  23. package/templates/turborepo/.github/workflows/ci.yml +212 -0
  24. package/templates/turborepo/.github/workflows/deploy.yml +135 -0
  25. package/templates/turborepo/.github/workflows/sast.yml +46 -0
  26. package/templates/turborepo/.lintstagedrc.json +10 -0
  27. package/templates/turborepo/.prettierignore +5 -0
  28. package/templates/turborepo/AGENTS.md +20 -0
  29. package/templates/turborepo/CONTRIBUTING.md +58 -0
  30. package/templates/turborepo/README.md +102 -0
  31. package/templates/turborepo/_gitignore +53 -0
  32. package/templates/turborepo/apps/app/.dependency-cruiser.json +34 -0
  33. package/templates/turborepo/apps/app/Dockerfile +25 -0
  34. package/templates/turborepo/apps/app/app/favicon.ico +0 -0
  35. package/templates/turborepo/apps/app/app/globals.css +26 -0
  36. package/templates/turborepo/apps/app/app/health/route.test.ts +20 -0
  37. package/templates/turborepo/apps/app/app/health/route.ts +23 -0
  38. package/templates/turborepo/apps/app/app/layout.tsx +29 -0
  39. package/templates/turborepo/apps/app/app/page.test.ts +11 -0
  40. package/templates/turborepo/apps/app/app/page.tsx +8 -0
  41. package/templates/turborepo/apps/app/next.config.ts +40 -0
  42. package/templates/turborepo/apps/app/package.json +41 -0
  43. package/templates/turborepo/apps/app/playwright.config.ts +27 -0
  44. package/templates/turborepo/apps/app/postcss.config.mjs +7 -0
  45. package/templates/turborepo/apps/app/test/home.e2e.test.ts +11 -0
  46. package/templates/turborepo/apps/app/tsconfig.json +33 -0
  47. package/templates/turborepo/apps/app/vitest.config.ts +12 -0
  48. package/templates/turborepo/apps/backoffice/.dependency-cruiser.json +34 -0
  49. package/templates/turborepo/apps/backoffice/Dockerfile +28 -0
  50. package/templates/turborepo/apps/backoffice/next.config.ts +48 -0
  51. package/templates/turborepo/apps/backoffice/package.json +49 -0
  52. package/templates/turborepo/apps/backoffice/playwright.config.ts +27 -0
  53. package/templates/turborepo/apps/backoffice/src/app/(frontend)/layout.tsx +18 -0
  54. package/templates/turborepo/apps/backoffice/src/app/(frontend)/page.test.ts +14 -0
  55. package/templates/turborepo/apps/backoffice/src/app/(frontend)/page.tsx +14 -0
  56. package/templates/turborepo/apps/backoffice/src/app/(frontend)/styles.css +15 -0
  57. package/templates/turborepo/apps/backoffice/src/app/(payload)/admin/[[...segments]]/not-found.tsx +24 -0
  58. package/templates/turborepo/apps/backoffice/src/app/(payload)/admin/[[...segments]]/page.tsx +24 -0
  59. package/templates/turborepo/apps/backoffice/src/app/(payload)/admin/importMap.ts +6 -0
  60. package/templates/turborepo/apps/backoffice/src/app/(payload)/api/[...slug]/route.ts +19 -0
  61. package/templates/turborepo/apps/backoffice/src/app/(payload)/custom.scss +0 -0
  62. package/templates/turborepo/apps/backoffice/src/app/(payload)/layout.tsx +31 -0
  63. package/templates/turborepo/apps/backoffice/src/app/health/route.test.ts +20 -0
  64. package/templates/turborepo/apps/backoffice/src/app/health/route.ts +23 -0
  65. package/templates/turborepo/apps/backoffice/src/collections/media.test.ts +27 -0
  66. package/templates/turborepo/apps/backoffice/src/collections/media.ts +18 -0
  67. package/templates/turborepo/apps/backoffice/src/collections/users.test.ts +10 -0
  68. package/templates/turborepo/apps/backoffice/src/collections/users.ts +10 -0
  69. package/templates/turborepo/apps/backoffice/src/environment.test.ts +32 -0
  70. package/templates/turborepo/apps/backoffice/src/environment.ts +27 -0
  71. package/templates/turborepo/apps/backoffice/src/migrations/20261030_005055_initial.json +969 -0
  72. package/templates/turborepo/apps/backoffice/src/migrations/20261030_005055_initial.ts +134 -0
  73. package/templates/turborepo/apps/backoffice/src/migrations/index.ts +9 -0
  74. package/templates/turborepo/apps/backoffice/src/payload-types.ts +339 -0
  75. package/templates/turborepo/apps/backoffice/src/payload.config.test.ts +31 -0
  76. package/templates/turborepo/apps/backoffice/src/payload.config.ts +50 -0
  77. package/templates/turborepo/apps/backoffice/test/home.e2e.test.ts +16 -0
  78. package/templates/turborepo/apps/backoffice/tsconfig.json +34 -0
  79. package/templates/turborepo/apps/backoffice/vitest.config.ts +19 -0
  80. package/templates/turborepo/eslint.config.ts +40 -0
  81. package/templates/turborepo/knip.json +9 -0
  82. package/templates/turborepo/package.json +70 -0
  83. package/templates/turborepo/pnpm-workspace.yaml +45 -0
  84. package/templates/turborepo/prettier.config.ts +11 -0
  85. package/templates/turborepo/tsconfig.json +16 -0
  86. package/templates/turborepo/turbo.json +50 -0
  87. package/templates/payload/src/app/(payload)/api/graphql/route.ts +0 -8
  88. package/templates/payload/src/app/(payload)/api/graphql-playground/route.ts +0 -7
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "next-friday-template-turborepo",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "description": "Next Friday Turborepo template.",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/next-friday/next-friday-template-turborepo.git"
9
+ },
10
+ "license": "UNLICENSED",
11
+ "author": "Next Friday",
12
+ "type": "module",
13
+ "scripts": {
14
+ "build": "turbo run build --filter=./apps/*",
15
+ "check": "pnpm verify:static && pnpm test:changed",
16
+ "clean": "rm -rf apps/app/.next apps/app/coverage apps/backoffice/.next apps/backoffice/coverage .turbo coverage *.tsbuildinfo .eslintcache node_modules/.cache",
17
+ "depcruise": "turbo run depcruise --filter=./apps/*",
18
+ "dev": "turbo run dev --filter=./apps/*",
19
+ "format": "prettier --write --cache .",
20
+ "format:check": "prettier --check --cache . && editorconfig-checker",
21
+ "gates:check": "node scripts/check-agent-gates.ts",
22
+ "generate:importmap": "pnpm --filter ./apps/backoffice generate:importmap",
23
+ "generate:types": "pnpm --filter ./apps/backoffice generate:types",
24
+ "knip": "knip",
25
+ "lint": "eslint . --fix --cache --max-warnings=0 --no-inline-config",
26
+ "lint:check": "eslint . --cache --max-warnings=0 --no-inline-config",
27
+ "migrate": "pnpm --filter ./apps/backoffice migrate",
28
+ "migrate:create": "pnpm --filter ./apps/backoffice migrate:create",
29
+ "peers:check": "pnpm peers check",
30
+ "prepare": "husky && pnpm --filter ./apps/app exec next typegen && pnpm --filter ./apps/backoffice exec next typegen",
31
+ "rules:check": "node scripts/sync-agent-rules.ts --check",
32
+ "rules:sync": "node scripts/sync-agent-rules.ts",
33
+ "sort-package-json": "sort-package-json package.json apps/app/package.json apps/backoffice/package.json",
34
+ "sort-package-json:check": "sort-package-json --check package.json apps/app/package.json apps/backoffice/package.json",
35
+ "start": "turbo run start --filter=./apps/*",
36
+ "suppressions:check": "bash .agents/hooks/agent-suppression-gate.sh --repo",
37
+ "test": "turbo run test --filter=./apps/*",
38
+ "test:changed": "turbo run test:changed --filter=./apps/*",
39
+ "test:coverage": "turbo run test:coverage --filter=./apps/*",
40
+ "test:e2e": "turbo run test:e2e --filter=./apps/*",
41
+ "test:watch": "turbo run test:watch --filter=./apps/*",
42
+ "typecheck": "tsc --noEmit -p tsconfig.json && turbo run typecheck --filter=./apps/*",
43
+ "verify": "pnpm verify:static && pnpm test:coverage",
44
+ "verify:static": "pnpm suppressions:check && pnpm rules:check && pnpm gates:check && pnpm lint:check && pnpm format:check && pnpm sort-package-json:check && pnpm peers:check && pnpm typecheck && pnpm knip && pnpm depcruise"
45
+ },
46
+ "devDependencies": {
47
+ "@commitlint/cli": "21.2.4",
48
+ "@next-friday/commitlint-config-friday": "4.0.0",
49
+ "@next-friday/eslint-config-friday": "5.1.0",
50
+ "@next-friday/prettier-config-friday": "4.0.0",
51
+ "@next/eslint-plugin-next": "16.4.3",
52
+ "@types/node": "26.6.5",
53
+ "editorconfig-checker": "7.0.0",
54
+ "eslint": "10.13.0",
55
+ "fast-check": "4.10.2",
56
+ "husky": "9.1.7",
57
+ "jiti": "2.7.0",
58
+ "knip": "6.43.0",
59
+ "lint-staged": "17.6.0",
60
+ "prettier": "3.9.10",
61
+ "prettier-plugin-tailwindcss": "0.8.1",
62
+ "sort-package-json": "4.1.0",
63
+ "turbo": "2.11.10",
64
+ "typescript": "7.0.2"
65
+ },
66
+ "packageManager": "pnpm@12.6.0+sha512.3ef68f951cb111ac204b4a5a16f0b2ddf0da56a96e0413e81d855d9f0b55ef926714709028e1cd00c405c2c5fb7b9e8ec4dc46777c805d0373c2f2ff00fd20ec",
67
+ "engines": {
68
+ "node": ">=24.22.1 <25"
69
+ }
70
+ }
@@ -0,0 +1,45 @@
1
+ packages:
2
+ - "apps/*"
3
+ engineStrict: true
4
+ savePrefix: ""
5
+ allowBuilds:
6
+ esbuild: true
7
+ unrs-resolver: true
8
+ overrides:
9
+ "katex@<0.18.2": ^0.18.2
10
+ "fast-uri@<3.1.9": ^3.1.9
11
+ "dompurify@<3.4.17": ^3.4.17
12
+ "esbuild@<0.27.0": ^0.28.2
13
+ "graphql-scalars@<2.0.1": ^2.0.1
14
+ "happy-dom@<21.0.4": ^21.0.4
15
+ "minimatch@<11.0.1": ^11.0.1
16
+ minimumReleaseAgeExclude:
17
+ - "@next-friday/commitlint-config-friday@4.0.0"
18
+ - "@next-friday/eslint-config-friday@5.0.0"
19
+ - "@next-friday/eslint-config-friday@5.1.0"
20
+ - "@next-friday/prettier-config-friday@4.0.0"
21
+ - "@next-friday/eslint-plugin-friday@1.1.3"
22
+ packageExtensions:
23
+ payload:
24
+ peerDependenciesMeta:
25
+ graphql:
26
+ optional: true
27
+ "@payloadcms/next":
28
+ peerDependenciesMeta:
29
+ graphql:
30
+ optional: true
31
+ "@payloadcms/graphql":
32
+ peerDependenciesMeta:
33
+ graphql:
34
+ optional: true
35
+ graphql-http:
36
+ peerDependenciesMeta:
37
+ graphql:
38
+ optional: true
39
+ graphql-scalars:
40
+ peerDependenciesMeta:
41
+ graphql:
42
+ optional: true
43
+ peerDependencyRules:
44
+ ignoreMissing:
45
+ - graphql
@@ -0,0 +1,11 @@
1
+ import friday from "@next-friday/prettier-config-friday";
2
+ import type {Config} from "prettier";
3
+ import type {PluginOptions} from "prettier-plugin-tailwindcss";
4
+
5
+ const prettierConfig: Config & PluginOptions = {
6
+ ...friday,
7
+ tailwindStylesheet: "./apps/app/app/globals.css",
8
+ plugins: [...(friday.plugins ?? []), "prettier-plugin-tailwindcss"],
9
+ };
10
+
11
+ export default prettierConfig;
@@ -0,0 +1,16 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2023",
4
+ "lib": ["esnext"],
5
+ "module": "esnext",
6
+ "moduleResolution": "bundler",
7
+ "esModuleInterop": true,
8
+ "isolatedModules": true,
9
+ "noEmit": true,
10
+ "skipLibCheck": true,
11
+ "strict": true,
12
+ "types": ["node"]
13
+ },
14
+ "include": ["eslint.config.ts", "prettier.config.ts", "scripts/**/*.ts"],
15
+ "exclude": ["node_modules", "apps"]
16
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://turbo.build/schema.json",
3
+ "globalPassThroughEnv": [
4
+ "APP_URL",
5
+ "CI",
6
+ "DATABASE_URL",
7
+ "NEXT_TELEMETRY_DISABLED",
8
+ "PAYLOAD_SECRET",
9
+ "PORT"
10
+ ],
11
+ "tasks": {
12
+ "build": {
13
+ "dependsOn": ["^build"],
14
+ "outputs": [".next/**", "!.next/cache/**"]
15
+ },
16
+ "depcruise": {
17
+ "cache": false
18
+ },
19
+ "dev": {
20
+ "cache": false,
21
+ "persistent": true
22
+ },
23
+ "start": {
24
+ "cache": false,
25
+ "persistent": true
26
+ },
27
+ "test": {
28
+ "cache": false
29
+ },
30
+ "test:changed": {
31
+ "cache": false
32
+ },
33
+ "test:coverage": {
34
+ "cache": false,
35
+ "outputs": ["coverage/**"]
36
+ },
37
+ "test:e2e": {
38
+ "cache": false,
39
+ "dependsOn": ["build"]
40
+ },
41
+ "test:watch": {
42
+ "cache": false,
43
+ "persistent": true
44
+ },
45
+ "typecheck": {
46
+ "dependsOn": ["^typecheck"],
47
+ "outputs": [".next/types/**", "next-env.d.ts"]
48
+ }
49
+ }
50
+ }
@@ -1,8 +0,0 @@
1
- /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
- /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
- import config from '@payload-config'
4
- import { GRAPHQL_POST, REST_OPTIONS } from '@payloadcms/next/routes'
5
-
6
- export const POST = GRAPHQL_POST(config)
7
-
8
- export const OPTIONS = REST_OPTIONS(config)
@@ -1,7 +0,0 @@
1
- /* THIS FILE WAS GENERATED AUTOMATICALLY BY PAYLOAD. */
2
- /* DO NOT MODIFY IT BECAUSE IT COULD BE REWRITTEN AT ANY TIME. */
3
- import config from '@payload-config'
4
- import '@payloadcms/next/css'
5
- import { GRAPHQL_PLAYGROUND_GET } from '@payloadcms/next/routes'
6
-
7
- export const GET = GRAPHQL_PLAYGROUND_GET(config)