create-m5kdev 0.4.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 (87) hide show
  1. package/dist/src/__tests__/create.smoke.test.d.ts +1 -0
  2. package/dist/src/__tests__/create.smoke.test.js +56 -0
  3. package/dist/src/__tests__/create.test.d.ts +1 -0
  4. package/dist/src/__tests__/create.test.js +55 -0
  5. package/dist/src/__tests__/runCli.test.d.ts +1 -0
  6. package/dist/src/__tests__/runCli.test.js +44 -0
  7. package/dist/src/__tests__/strings.test.d.ts +1 -0
  8. package/dist/src/__tests__/strings.test.js +24 -0
  9. package/dist/src/constants.d.ts +3 -0
  10. package/dist/src/constants.js +9 -0
  11. package/dist/src/create.d.ts +7 -0
  12. package/dist/src/create.js +36 -0
  13. package/dist/src/fs.d.ts +5 -0
  14. package/dist/src/fs.js +60 -0
  15. package/dist/src/index.d.ts +2 -0
  16. package/dist/src/index.js +9 -0
  17. package/dist/src/paths.d.ts +1 -0
  18. package/dist/src/paths.js +14 -0
  19. package/dist/src/prompts.d.ts +2 -0
  20. package/dist/src/prompts.js +55 -0
  21. package/dist/src/runCli.d.ts +9 -0
  22. package/dist/src/runCli.js +107 -0
  23. package/dist/src/strings.d.ts +6 -0
  24. package/dist/src/strings.js +47 -0
  25. package/dist/src/types.d.ts +18 -0
  26. package/dist/src/types.js +2 -0
  27. package/dist/tsconfig.tsbuildinfo +1 -0
  28. package/package.json +38 -0
  29. package/templates/minimal-app/.gitignore.tpl +9 -0
  30. package/templates/minimal-app/AGENTS.md.tpl +29 -0
  31. package/templates/minimal-app/README.md.tpl +35 -0
  32. package/templates/minimal-app/apps/email/package.json.tpl +27 -0
  33. package/templates/minimal-app/apps/email/src/components/BaseEmail.tsx.tpl +117 -0
  34. package/templates/minimal-app/apps/email/src/emails/accountDeletionEmail.tsx.tpl +26 -0
  35. package/templates/minimal-app/apps/email/src/emails/organizationInviteEmail.tsx.tpl +31 -0
  36. package/templates/minimal-app/apps/email/src/emails/passwordResetEmail.tsx.tpl +25 -0
  37. package/templates/minimal-app/apps/email/src/emails/verificationEmail.tsx.tpl +26 -0
  38. package/templates/minimal-app/apps/email/src/index.ts.tpl +32 -0
  39. package/templates/minimal-app/apps/email/tsconfig.json.tpl +11 -0
  40. package/templates/minimal-app/apps/server/AGENTS.md.tpl +30 -0
  41. package/templates/minimal-app/apps/server/drizzle/seed.ts.tpl +111 -0
  42. package/templates/minimal-app/apps/server/drizzle/sync.ts.tpl +18 -0
  43. package/templates/minimal-app/apps/server/drizzle.config.ts.tpl +38 -0
  44. package/templates/minimal-app/apps/server/package.json.tpl +50 -0
  45. package/templates/minimal-app/apps/server/src/db.ts.tpl +33 -0
  46. package/templates/minimal-app/apps/server/src/index.ts.tpl +34 -0
  47. package/templates/minimal-app/apps/server/src/lib/auth.ts.tpl +172 -0
  48. package/templates/minimal-app/apps/server/src/lib/localEmailService.ts.tpl +58 -0
  49. package/templates/minimal-app/apps/server/src/modules/posts/posts.db.ts.tpl +23 -0
  50. package/templates/minimal-app/apps/server/src/modules/posts/posts.repository.ts.tpl +106 -0
  51. package/templates/minimal-app/apps/server/src/modules/posts/posts.service.ts.tpl +150 -0
  52. package/templates/minimal-app/apps/server/src/modules/posts/posts.trpc.ts.tpl +44 -0
  53. package/templates/minimal-app/apps/server/src/repository.ts.tpl +6 -0
  54. package/templates/minimal-app/apps/server/src/service.ts.tpl +12 -0
  55. package/templates/minimal-app/apps/server/src/trpc.ts.tpl +11 -0
  56. package/templates/minimal-app/apps/server/src/types.ts.tpl +3 -0
  57. package/templates/minimal-app/apps/server/src/utils/trpc.ts.tpl +27 -0
  58. package/templates/minimal-app/apps/server/tsconfig.json.tpl +13 -0
  59. package/templates/minimal-app/apps/server/tsup.config.ts.tpl +9 -0
  60. package/templates/minimal-app/apps/shared/.env.example.tpl +17 -0
  61. package/templates/minimal-app/apps/shared/.env.tpl +19 -0
  62. package/templates/minimal-app/apps/shared/package.json.tpl +24 -0
  63. package/templates/minimal-app/apps/shared/src/modules/posts/posts.constants.ts.tpl +5 -0
  64. package/templates/minimal-app/apps/shared/src/modules/posts/posts.schema.ts.tpl +76 -0
  65. package/templates/minimal-app/apps/shared/tsconfig.json.tpl +12 -0
  66. package/templates/minimal-app/apps/webapp/AGENTS.md.tpl +18 -0
  67. package/templates/minimal-app/apps/webapp/index.html.tpl +22 -0
  68. package/templates/minimal-app/apps/webapp/package.json.tpl +52 -0
  69. package/templates/minimal-app/apps/webapp/src/App.tsx.tpl +13 -0
  70. package/templates/minimal-app/apps/webapp/src/Layout.tsx.tpl +139 -0
  71. package/templates/minimal-app/apps/webapp/src/Providers.tsx.tpl +28 -0
  72. package/templates/minimal-app/apps/webapp/src/Router.tsx.tpl +53 -0
  73. package/templates/minimal-app/apps/webapp/src/components/TrpcQueryProvider.tsx.tpl +61 -0
  74. package/templates/minimal-app/apps/webapp/src/hero.ts.tpl +99 -0
  75. package/templates/minimal-app/apps/webapp/src/index.css.tpl +75 -0
  76. package/templates/minimal-app/apps/webapp/src/main.tsx.tpl +26 -0
  77. package/templates/minimal-app/apps/webapp/src/modules/posts/PostsRoute.tsx.tpl +650 -0
  78. package/templates/minimal-app/apps/webapp/src/utils/i18n.ts.tpl +13 -0
  79. package/templates/minimal-app/apps/webapp/src/utils/trpc.ts.tpl +4 -0
  80. package/templates/minimal-app/apps/webapp/src/vite-env.d.ts.tpl +1 -0
  81. package/templates/minimal-app/apps/webapp/translations/en/blog-app.json.tpl +107 -0
  82. package/templates/minimal-app/apps/webapp/tsconfig.json.tpl +16 -0
  83. package/templates/minimal-app/apps/webapp/vite.config.ts.tpl +31 -0
  84. package/templates/minimal-app/biome.json.tpl +76 -0
  85. package/templates/minimal-app/package.json.tpl +21 -0
  86. package/templates/minimal-app/pnpm-workspace.yaml.tpl +58 -0
  87. package/templates/minimal-app/turbo.json.tpl +26 -0
@@ -0,0 +1,107 @@
1
+ {
2
+ "layout": {
3
+ "brand": {
4
+ "eyebrow": "Framework Starter",
5
+ "tagline": "Opinionated enough to ship, compact enough to understand in one sitting."
6
+ },
7
+ "workspace": {
8
+ "eyebrow": "Included by Default",
9
+ "title": "Auth, modules, and one honest feature.",
10
+ "body": "This starter keeps the stack visible: Better Auth, Drizzle, tRPC, React Router, HeroUI, and a single editorial posts module.",
11
+ "local": "Local SQLite",
12
+ "auth": "Better Auth"
13
+ },
14
+ "navigation": {
15
+ "posts": "Posts"
16
+ },
17
+ "account": {
18
+ "eyebrow": "Signed In As",
19
+ "light": "Light mode",
20
+ "dark": "Dark mode",
21
+ "signOut": "Sign out"
22
+ },
23
+ "header": {
24
+ "eyebrow": "Minimal Blog Platform",
25
+ "title": "Editorial control panel",
26
+ "runtime": "tRPC + URL state + HeroUI"
27
+ }
28
+ },
29
+ "posts": {
30
+ "hero": {
31
+ "eyebrow": "Posts Module",
32
+ "title": "Build, refine, and publish without losing the shape of the stack.",
33
+ "body": "The example module is intentionally complete: filtered list queries, modal-driven create and edit flows, publish actions, soft deletion, and a live preview pane.",
34
+ "new": "Create post",
35
+ "syncing": "Refreshing",
36
+ "synced": "Live against the local database"
37
+ },
38
+ "stats": {
39
+ "total": "Total",
40
+ "published": "Published",
41
+ "drafts": "Drafts"
42
+ },
43
+ "filters": {
44
+ "searchLabel": "Search posts",
45
+ "searchPlaceholder": "Search by title, slug, excerpt, or body",
46
+ "statusLabel": "Status",
47
+ "all": "All posts",
48
+ "draft": "Draft",
49
+ "published": "Published"
50
+ },
51
+ "meta": {
52
+ "updated": "Updated",
53
+ "published": "Published"
54
+ },
55
+ "actions": {
56
+ "edit": "Edit",
57
+ "publish": "Publish",
58
+ "delete": "Delete"
59
+ },
60
+ "empty": {
61
+ "eyebrow": "Nothing yet",
62
+ "title": "Your editorial desk is ready for the first post.",
63
+ "body": "Create a first entry to see the full loop: draft creation, inline editing, publishing, and soft deletion. Seed data appears after you run the scaffolded seed script.",
64
+ "action": "Write the first post"
65
+ },
66
+ "pagination": {
67
+ "summary": "Page {{page}} of {{pageCount}}",
68
+ "previous": "Previous",
69
+ "next": "Next"
70
+ },
71
+ "preview": {
72
+ "eyebrow": "Selected Draft",
73
+ "emptyTitle": "Preview panel",
74
+ "emptyBody": "Choose a post from the list to inspect the current draft or published copy.",
75
+ "updated": "Updated",
76
+ "openEditor": "Open in editor"
77
+ },
78
+ "editor": {
79
+ "newEyebrow": "New draft",
80
+ "editEyebrow": "Update draft",
81
+ "newTitle": "Shape a new post",
82
+ "editTitle": "Refine this post",
83
+ "fields": {
84
+ "title": "Title",
85
+ "slug": "Slug",
86
+ "excerpt": "Excerpt",
87
+ "content": "Content"
88
+ },
89
+ "cancel": "Cancel",
90
+ "save": "Save changes",
91
+ "create": "Create draft"
92
+ },
93
+ "deleteDialog": {
94
+ "title": "Archive this post?",
95
+ "body": "The post will be soft-deleted and removed from the main list.",
96
+ "confirm": "Archive post",
97
+ "cancel": "Keep it"
98
+ },
99
+ "toast": {
100
+ "created": "Draft created.",
101
+ "updated": "Post updated.",
102
+ "published": "Post published.",
103
+ "deleted": "Post archived.",
104
+ "validation": "Title and content are required."
105
+ }
106
+ }
107
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "@m5kdev/config/tsconfig.vite.json",
3
+ "compilerOptions": {
4
+ "baseUrl": ".",
5
+ "rootDir": ".",
6
+ "outDir": "dist",
7
+ "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
8
+ "paths": {
9
+ "@/components/*": ["./src/components/*"],
10
+ "@/modules/*": ["./src/modules/*"],
11
+ "@/utils/*": ["./src/utils/*"]
12
+ }
13
+ },
14
+ "include": ["src"],
15
+ "exclude": ["dist", "node_modules"]
16
+ }
@@ -0,0 +1,31 @@
1
+ import path from "node:path";
2
+ import tailwindcss from "@tailwindcss/vite";
3
+ import react from "@vitejs/plugin-react";
4
+ import { defineConfig } from "vite";
5
+ import i18nextLoader from "vite-plugin-i18next-loader";
6
+ import tsconfigPaths from "vite-tsconfig-paths";
7
+
8
+ export default defineConfig({
9
+ root: __dirname,
10
+ plugins: [
11
+ tailwindcss(),
12
+ react({
13
+ babel: {
14
+ plugins: ["babel-plugin-react-compiler"],
15
+ },
16
+ }),
17
+ tsconfigPaths(),
18
+ i18nextLoader({
19
+ include: ["**/*.json"],
20
+ paths: [
21
+ path.resolve(__dirname, "./node_modules/@m5kdev/web-ui/dist/translations"),
22
+ path.resolve(__dirname, "./translations"),
23
+ ],
24
+ namespaceResolution: "basename",
25
+ }),
26
+ ],
27
+ resolve: {
28
+ dedupe: ["react", "react-dom", "react-i18next", "react-router", "nuqs"],
29
+ },
30
+ envDir: "../shared",
31
+ });
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "https://biomejs.dev/schemas/2.2.0/schema.json",
3
+ "vcs": {
4
+ "enabled": false,
5
+ "clientKind": "git",
6
+ "useIgnoreFile": false
7
+ },
8
+ "files": {
9
+ "ignoreUnknown": false,
10
+ "includes": ["**", "!**/node_modules/**", "!**/dist/**", "!**/.react-router/**"]
11
+ },
12
+ "formatter": {
13
+ "enabled": true,
14
+ "indentWidth": 2,
15
+ "indentStyle": "space",
16
+ "lineWidth": 100,
17
+ "lineEnding": "crlf"
18
+ },
19
+ "linter": {
20
+ "enabled": true,
21
+ "rules": {
22
+ "nursery": {},
23
+ "recommended": true,
24
+ "correctness": {
25
+ "noUnusedVariables": "warn",
26
+ "useExhaustiveDependencies": "warn",
27
+ "noEmptyPattern": "warn",
28
+ "useUniqueElementIds": "warn"
29
+ },
30
+ "suspicious": {
31
+ "noExplicitAny": "warn",
32
+ "noArrayIndexKey": "warn"
33
+ },
34
+ "style": {
35
+ "useTemplate": "warn",
36
+ "noNonNullAssertion": "warn",
37
+ "noParameterAssign": "error",
38
+ "useAsConstAssertion": "error",
39
+ "useDefaultParameterLast": "error",
40
+ "useEnumInitializers": "error",
41
+ "useSelfClosingElements": "error",
42
+ "useSingleVarDeclarator": "error",
43
+ "noUnusedTemplateLiteral": "error",
44
+ "useNumberNamespace": "error",
45
+ "noInferrableTypes": "error",
46
+ "noUselessElse": "error"
47
+ },
48
+ "complexity": {
49
+ "noForEach": "warn"
50
+ },
51
+ "a11y": {
52
+ "useKeyWithClickEvents": "warn",
53
+ "useAnchorContent": "warn",
54
+ "useValidAnchor": "warn",
55
+ "useButtonType": "warn",
56
+ "noSvgWithoutTitle": "warn",
57
+ "useAltText": "warn"
58
+ }
59
+ }
60
+ },
61
+ "javascript": {
62
+ "formatter": {
63
+ "quoteStyle": "double",
64
+ "trailingCommas": "es5",
65
+ "semicolons": "always"
66
+ }
67
+ },
68
+ "assist": {
69
+ "enabled": true,
70
+ "actions": {
71
+ "source": {
72
+ "organizeImports": "on"
73
+ }
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "{{APP_SLUG}}",
3
+ "private": true,
4
+ "description": "{{APP_DESCRIPTION}}",
5
+ "scripts": {
6
+ "build": "turbo run build",
7
+ "dev": "turbo run dev",
8
+ "lint": "turbo run lint",
9
+ "lint:fix": "turbo run lint:fix",
10
+ "check-types": "turbo run check-types"
11
+ },
12
+ "devDependencies": {
13
+ "@biomejs/biome": "catalog:",
14
+ "turbo": "catalog:",
15
+ "typescript": "catalog:"
16
+ },
17
+ "packageManager": "pnpm@10.13.1",
18
+ "engines": {
19
+ "node": ">=22"
20
+ }
21
+ }
@@ -0,0 +1,58 @@
1
+ packages:
2
+ - apps/**
3
+
4
+ catalog:
5
+ '@biomejs/biome': 2.2.0
6
+ '@heroui/react': 2.8.8
7
+ '@libsql/client': 0.17.0
8
+ '@m5kdev/backend': 0.3.3
9
+ '@m5kdev/commons': 0.3.3
10
+ '@m5kdev/config': 0.3.3
11
+ '@m5kdev/frontend': 0.3.3
12
+ '@m5kdev/web-ui': 0.3.3
13
+ '@react-email/components': 1.0.1
14
+ '@tailwindcss/vite': 4.1.11
15
+ '@tanstack/react-query': 5.83.0
16
+ '@tanstack/react-query-devtools': 5.83.0
17
+ '@trpc/client': 11.4.3
18
+ '@trpc/server': 11.4.3
19
+ '@trpc/tanstack-react-query': 11.4.3
20
+ '@types/cors': 2.8.17
21
+ '@types/express': 4.17.21
22
+ '@types/node': 20.19.11
23
+ '@types/react': 19.2.7
24
+ '@types/react-dom': 19.2.3
25
+ '@vitejs/plugin-react': 4.2.0
26
+ babel-plugin-react-compiler: 1.0.0
27
+ better-auth: 1.4.18
28
+ cors: 2.8.5
29
+ dotenv: 16.6.1
30
+ drizzle-kit: 0.31.4
31
+ drizzle-orm: 0.44.3
32
+ express: 4.21.2
33
+ i18next: 25.3.2
34
+ lucide-react: 0.488.0
35
+ neverthrow: 8.2.0
36
+ nuqs: 2.4.3
37
+ posthog-js: 1.258.2
38
+ react: 19.2.1
39
+ react-dom: 19.2.1
40
+ react-email: 5.0.5
41
+ react-hook-form: 7.61.1
42
+ react-i18next: 15.6.1
43
+ react-router: 7.10.1
44
+ sonner: 1.7.4
45
+ tailwindcss: 4.1.11
46
+ tslib: 2.8.1
47
+ tsup: 8.4.0
48
+ tsx: 4.19.2
49
+ turbo: 2.5.6
50
+ tw-animate-css: 1.3.6
51
+ typescript: 5.9.2
52
+ uuid: 11.0.5
53
+ vite: 7.0.4
54
+ vite-plugin-i18next-loader: 3.1.2
55
+ vite-tsconfig-paths: 5.1.4
56
+ zod: 4.2.1
57
+
58
+ catalogMode: strict
@@ -0,0 +1,26 @@
1
+ {
2
+ "$schema": "https://turborepo.com/schema.json",
3
+ "ui": "tui",
4
+ "tasks": {
5
+ "build": {
6
+ "dependsOn": ["^build"],
7
+ "inputs": ["$TURBO_DEFAULT$", ".env*"],
8
+ "outputs": ["dist/**"]
9
+ },
10
+ "lint": {
11
+ "dependsOn": ["^lint"]
12
+ },
13
+ "lint:fix": {
14
+ "dependsOn": ["^lint:fix"]
15
+ },
16
+ "check-types": {
17
+ "dependsOn": ["^check-types"],
18
+ "inputs": ["$TURBO_DEFAULT$", "tsconfig.json", "tsconfig.*.json"],
19
+ "outputs": ["tsconfig.tsbuildinfo", "**/*.tsbuildinfo", "dist/tsconfig.lib.tsbuildinfo"]
20
+ },
21
+ "dev": {
22
+ "cache": false,
23
+ "persistent": true
24
+ }
25
+ }
26
+ }