@idealyst/cli 1.0.89 → 1.0.90

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 (208) hide show
  1. package/dist/generators/index.js +3 -40
  2. package/dist/generators/index.js.map +1 -1
  3. package/dist/generators/init.js +273 -0
  4. package/dist/generators/init.js.map +1 -0
  5. package/dist/generators/utils.js +5 -0
  6. package/dist/generators/utils.js.map +1 -1
  7. package/dist/index.js +20 -202
  8. package/dist/index.js.map +1 -1
  9. package/dist/scripts/configure-react-native-monorepo.js +144 -0
  10. package/dist/scripts/configure-react-native-monorepo.js.map +1 -0
  11. package/dist/{templates/workspace → template}/README.md +66 -12
  12. package/dist/template/package.json +45 -0
  13. package/{templates → dist/template/packages}/api/package.json +3 -1
  14. package/{templates → dist/template/packages}/database/package.json +1 -1
  15. package/dist/{templates/native → template/packages/mobile}/babel.config.js +1 -0
  16. package/{templates/native → dist/template/packages/mobile}/metro.config.js +4 -4
  17. package/{templates/native → dist/template/packages/mobile}/package.json +5 -2
  18. package/{templates → dist/template/packages}/shared/package.json +2 -2
  19. package/{templates → dist/template/packages}/web/package.json +4 -1
  20. package/dist/types/generators/index.d.ts +1 -7
  21. package/dist/types/generators/init.d.ts +5 -0
  22. package/dist/types/scripts/configure-react-native-monorepo.d.ts +23 -0
  23. package/dist/types/types.d.ts +0 -4
  24. package/package.json +1 -1
  25. package/dist/generators/api.js +0 -31
  26. package/dist/generators/api.js.map +0 -1
  27. package/dist/generators/database.js +0 -31
  28. package/dist/generators/database.js.map +0 -1
  29. package/dist/generators/fullstack.js +0 -418
  30. package/dist/generators/fullstack.js.map +0 -1
  31. package/dist/generators/native.js +0 -112
  32. package/dist/generators/native.js.map +0 -1
  33. package/dist/generators/shared.js +0 -29
  34. package/dist/generators/shared.js.map +0 -1
  35. package/dist/generators/web.js +0 -45
  36. package/dist/generators/web.js.map +0 -1
  37. package/dist/generators/workspace.js +0 -83
  38. package/dist/generators/workspace.js.map +0 -1
  39. package/dist/templates/api/package.json +0 -54
  40. package/dist/templates/database/package.json +0 -49
  41. package/dist/templates/native/metro.config.js +0 -27
  42. package/dist/templates/native/package.json +0 -49
  43. package/dist/templates/native/src/App.tsx +0 -8
  44. package/dist/templates/shared/package.json +0 -62
  45. package/dist/templates/shared/src/components/App.tsx +0 -47
  46. package/dist/templates/shared/src/components/HelloWorld.tsx +0 -307
  47. package/dist/templates/shared/src/navigation/AppRouter.tsx +0 -98
  48. package/dist/templates/web/package.json +0 -66
  49. package/dist/templates/web/src/App.tsx +0 -14
  50. package/dist/templates/workspace/package.json +0 -35
  51. package/dist/types/generators/api.d.ts +0 -2
  52. package/dist/types/generators/database.d.ts +0 -2
  53. package/dist/types/generators/fullstack.d.ts +0 -2
  54. package/dist/types/generators/native.d.ts +0 -2
  55. package/dist/types/generators/shared.d.ts +0 -2
  56. package/dist/types/generators/web.d.ts +0 -2
  57. package/dist/types/generators/workspace.d.ts +0 -2
  58. package/templates/api/.env.example +0 -6
  59. package/templates/api/README.md +0 -274
  60. package/templates/api/__tests__/api.test.ts +0 -26
  61. package/templates/api/jest.config.js +0 -23
  62. package/templates/api/jest.setup.js +0 -9
  63. package/templates/api/src/context.ts +0 -19
  64. package/templates/api/src/controllers/TestController.ts +0 -0
  65. package/templates/api/src/index.ts +0 -9
  66. package/templates/api/src/lib/crud.ts +0 -150
  67. package/templates/api/src/lib/database.ts +0 -23
  68. package/templates/api/src/router/index.ts +0 -163
  69. package/templates/api/src/routers/test.ts +0 -59
  70. package/templates/api/src/routers/user.example.ts +0 -83
  71. package/templates/api/src/server.ts +0 -50
  72. package/templates/api/src/trpc.ts +0 -28
  73. package/templates/api/tsconfig.json +0 -43
  74. package/templates/database/README.md +0 -162
  75. package/templates/database/prisma/seed.ts +0 -64
  76. package/templates/database/schema.prisma +0 -107
  77. package/templates/database/src/index.ts +0 -15
  78. package/templates/database/src/validators.ts +0 -10
  79. package/templates/database/tsconfig.json +0 -18
  80. package/templates/native/README.md +0 -86
  81. package/templates/native/__tests__/App.test.tsx +0 -156
  82. package/templates/native/__tests__/components.test.tsx +0 -300
  83. package/templates/native/app.json +0 -5
  84. package/templates/native/babel.config.js +0 -10
  85. package/templates/native/index.js +0 -6
  86. package/templates/native/jest.config.js +0 -21
  87. package/templates/native/jest.setup.js +0 -12
  88. package/templates/native/src/App-with-trpc.tsx +0 -30
  89. package/templates/native/src/App.tsx +0 -8
  90. package/templates/native/src/utils/trpc.ts +0 -7
  91. package/templates/native/tsconfig.json +0 -28
  92. package/templates/shared/README.md +0 -135
  93. package/templates/shared/__tests__/shared.test.ts +0 -51
  94. package/templates/shared/jest.config.js +0 -22
  95. package/templates/shared/src/components/index.ts +0 -1
  96. package/templates/shared/src/index.ts +0 -14
  97. package/templates/shared/src/trpc/client.ts +0 -44
  98. package/templates/shared/tsconfig.json +0 -22
  99. package/templates/web/README.md +0 -131
  100. package/templates/web/__tests__/App.test.tsx +0 -342
  101. package/templates/web/__tests__/components.test.tsx +0 -564
  102. package/templates/web/index.html +0 -13
  103. package/templates/web/jest.config.js +0 -27
  104. package/templates/web/jest.setup.js +0 -24
  105. package/templates/web/src/App-with-trpc.tsx +0 -32
  106. package/templates/web/src/App.tsx +0 -14
  107. package/templates/web/src/components/TestDemo.tsx +0 -164
  108. package/templates/web/src/main.tsx +0 -25
  109. package/templates/web/src/utils/trpc.ts +0 -7
  110. package/templates/web/tsconfig.json +0 -26
  111. package/templates/web/vite.config.ts +0 -98
  112. package/templates/workspace/.devcontainer/Dockerfile +0 -26
  113. package/templates/workspace/.devcontainer/devcontainer.json +0 -113
  114. package/templates/workspace/.devcontainer/docker-compose.yml +0 -59
  115. package/templates/workspace/.devcontainer/figma-mcp.sh +0 -32
  116. package/templates/workspace/.devcontainer/setup.sh +0 -45
  117. package/templates/workspace/.dockerignore +0 -151
  118. package/templates/workspace/.env.example +0 -36
  119. package/templates/workspace/.env.production +0 -56
  120. package/templates/workspace/DOCKER.md +0 -0
  121. package/templates/workspace/Dockerfile +0 -111
  122. package/templates/workspace/README.md +0 -179
  123. package/templates/workspace/docker/nginx/prod.conf +0 -238
  124. package/templates/workspace/docker/nginx.conf +0 -131
  125. package/templates/workspace/docker/postgres/init.sql +0 -41
  126. package/templates/workspace/docker/prometheus/prometheus.yml +0 -52
  127. package/templates/workspace/docker-compose.prod.yml +0 -146
  128. package/templates/workspace/docker-compose.yml +0 -143
  129. package/templates/workspace/jest.config.js +0 -20
  130. package/templates/workspace/package.json +0 -38
  131. package/templates/workspace/setup.sh +0 -30
  132. package/templates/workspace/tsconfig.json +0 -31
  133. /package/dist/{templates/workspace → template}/.devcontainer/Dockerfile +0 -0
  134. /package/dist/{templates/workspace → template}/.devcontainer/devcontainer.json +0 -0
  135. /package/dist/{templates/workspace → template}/.devcontainer/docker-compose.yml +0 -0
  136. /package/dist/{templates/workspace → template}/.devcontainer/figma-mcp.sh +0 -0
  137. /package/dist/{templates/workspace → template}/.devcontainer/setup.sh +0 -0
  138. /package/dist/{templates/workspace → template}/.dockerignore +0 -0
  139. /package/dist/{templates/workspace → template}/.env.example +0 -0
  140. /package/dist/{templates/workspace → template}/DOCKER.md +0 -0
  141. /package/dist/{templates/workspace → template}/Dockerfile +0 -0
  142. /package/dist/{templates/workspace → template}/docker/nginx/prod.conf +0 -0
  143. /package/dist/{templates/workspace → template}/docker/nginx.conf +0 -0
  144. /package/dist/{templates/workspace → template}/docker/postgres/init.sql +0 -0
  145. /package/dist/{templates/workspace → template}/docker/prometheus/prometheus.yml +0 -0
  146. /package/dist/{templates/workspace → template}/docker-compose.prod.yml +0 -0
  147. /package/dist/{templates/workspace → template}/docker-compose.yml +0 -0
  148. /package/dist/{templates/workspace → template}/jest.config.js +0 -0
  149. /package/dist/{templates → template/packages}/api/.env.example +0 -0
  150. /package/dist/{templates → template/packages}/api/README.md +0 -0
  151. /package/dist/{templates → template/packages}/api/__tests__/api.test.ts +0 -0
  152. /package/dist/{templates → template/packages}/api/jest.config.js +0 -0
  153. /package/dist/{templates → template/packages}/api/jest.setup.js +0 -0
  154. /package/dist/{templates → template/packages}/api/src/context.ts +0 -0
  155. /package/dist/{templates → template/packages}/api/src/controllers/TestController.ts +0 -0
  156. /package/dist/{templates → template/packages}/api/src/index.ts +0 -0
  157. /package/dist/{templates → template/packages}/api/src/lib/crud.ts +0 -0
  158. /package/dist/{templates → template/packages}/api/src/lib/database.ts +0 -0
  159. /package/dist/{templates → template/packages}/api/src/router/index.ts +0 -0
  160. /package/dist/{templates → template/packages}/api/src/routers/test.ts +0 -0
  161. /package/dist/{templates → template/packages}/api/src/routers/user.example.ts +0 -0
  162. /package/dist/{templates → template/packages}/api/src/server.ts +0 -0
  163. /package/dist/{templates → template/packages}/api/src/trpc.ts +0 -0
  164. /package/dist/{templates → template/packages}/api/tsconfig.json +0 -0
  165. /package/dist/{templates → template/packages}/database/README.md +0 -0
  166. /package/dist/{templates → template/packages}/database/prisma/seed.ts +0 -0
  167. /package/dist/{templates → template/packages}/database/schema.prisma +0 -0
  168. /package/dist/{templates → template/packages}/database/src/index.ts +0 -0
  169. /package/dist/{templates → template/packages}/database/src/validators.ts +0 -0
  170. /package/dist/{templates → template/packages}/database/tsconfig.json +0 -0
  171. /package/dist/{templates/native → template/packages/mobile}/README.md +0 -0
  172. /package/dist/{templates/native → template/packages/mobile}/__tests__/App.test.tsx +0 -0
  173. /package/dist/{templates/native → template/packages/mobile}/__tests__/components.test.tsx +0 -0
  174. /package/dist/{templates/native → template/packages/mobile}/app.json +0 -0
  175. /package/dist/{templates/native → template/packages/mobile}/index.js +0 -0
  176. /package/dist/{templates/native → template/packages/mobile}/jest.config.js +0 -0
  177. /package/dist/{templates/native → template/packages/mobile}/jest.setup.js +0 -0
  178. /package/dist/{templates/native → template/packages/mobile}/src/App-with-trpc-and-shared.tsx +0 -0
  179. /package/dist/{templates/native → template/packages/mobile}/src/App-with-trpc.tsx +0 -0
  180. /package/{templates/native/src/App-with-trpc-and-shared.tsx → dist/template/packages/mobile/src/App.tsx} +0 -0
  181. /package/dist/{templates/native → template/packages/mobile}/src/utils/trpc.ts +0 -0
  182. /package/dist/{templates/native → template/packages/mobile}/tsconfig.json +0 -0
  183. /package/dist/{templates → template/packages}/shared/README.md +0 -0
  184. /package/dist/{templates → template/packages}/shared/__tests__/shared.test.ts +0 -0
  185. /package/dist/{templates → template/packages}/shared/jest.config.js +0 -0
  186. /package/{templates → dist/template/packages}/shared/src/components/App.tsx +0 -0
  187. /package/{templates → dist/template/packages}/shared/src/components/HelloWorld.tsx +0 -0
  188. /package/dist/{templates → template/packages}/shared/src/components/index.ts +0 -0
  189. /package/dist/{templates → template/packages}/shared/src/index.ts +0 -0
  190. /package/{templates → dist/template/packages}/shared/src/navigation/AppRouter.tsx +0 -0
  191. /package/dist/{templates → template/packages}/shared/src/trpc/client.ts +0 -0
  192. /package/dist/{templates → template/packages}/shared/tsconfig.json +0 -0
  193. /package/dist/{templates → template/packages}/web/README.md +0 -0
  194. /package/dist/{templates → template/packages}/web/__tests__/App.test.tsx +0 -0
  195. /package/dist/{templates → template/packages}/web/__tests__/components.test.tsx +0 -0
  196. /package/dist/{templates → template/packages}/web/index.html +0 -0
  197. /package/dist/{templates → template/packages}/web/jest.config.js +0 -0
  198. /package/dist/{templates → template/packages}/web/jest.setup.js +0 -0
  199. /package/dist/{templates → template/packages}/web/src/App-with-trpc-and-shared.tsx +0 -0
  200. /package/dist/{templates → template/packages}/web/src/App-with-trpc.tsx +0 -0
  201. /package/{templates/web/src/App-with-trpc-and-shared.tsx → dist/template/packages/web/src/App.tsx} +0 -0
  202. /package/dist/{templates → template/packages}/web/src/components/TestDemo.tsx +0 -0
  203. /package/dist/{templates → template/packages}/web/src/main.tsx +0 -0
  204. /package/dist/{templates → template/packages}/web/src/utils/trpc.ts +0 -0
  205. /package/dist/{templates → template/packages}/web/tsconfig.json +0 -0
  206. /package/dist/{templates → template/packages}/web/vite.config.ts +0 -0
  207. /package/dist/{templates/workspace → template}/setup.sh +0 -0
  208. /package/dist/{templates/workspace → template}/tsconfig.json +0 -0
@@ -1,164 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { View, Text, Card, Button, Input } from '@idealyst/components';
3
- import { trpc } from '../utils/trpc';
4
-
5
- export const TestDemo: React.FC = () => {
6
- const [newTestName, setNewTestName] = useState('');
7
- const [newTestMessage, setNewTestMessage] = useState('');
8
-
9
- // tRPC queries and mutations
10
- const { data: tests, isLoading, refetch } = trpc.test.getAll.useQuery();
11
- const createTestMutation = trpc.test.create.useMutation({
12
- onSuccess: () => {
13
- refetch();
14
- setNewTestName('');
15
- setNewTestMessage('');
16
- },
17
- });
18
- const deleteTestMutation = trpc.test.delete.useMutation({
19
- onSuccess: () => {
20
- refetch();
21
- },
22
- });
23
-
24
- const handleCreateTest = async () => {
25
- if (!newTestName || !newTestMessage) return;
26
-
27
- await createTestMutation.mutateAsync({
28
- name: newTestName,
29
- message: newTestMessage,
30
- status: 'active',
31
- });
32
- };
33
-
34
- const handleDeleteTest = async (id: string) => {
35
- await deleteTestMutation.mutateAsync({ id });
36
- };
37
-
38
- if (isLoading) {
39
- return (
40
- <Card variant="outlined" padding="lg">
41
- <Text size="md">Loading tests...</Text>
42
- </Card>
43
- );
44
- }
45
-
46
- return (
47
- <View style={{ gap: 16 }}>
48
- {/* Header */}
49
- <Card variant="elevated" padding="lg" intent="primary">
50
- <View style={{ alignItems: 'center' }}>
51
- <Text style={{ fontSize: 24, marginBottom: 8 }}>🧪</Text>
52
- <Text size="lg" weight="bold" style={{ marginBottom: 8, textAlign: 'center' }}>
53
- tRPC + Database Test
54
- </Text>
55
- <Text size="md" style={{ textAlign: 'center' }}>
56
- This demonstrates end-to-end type-safe API calls from the web app to the database.
57
- </Text>
58
- </View>
59
- </Card>
60
-
61
- {/* Create Test Form */}
62
- <Card variant="outlined" padding="lg">
63
- <Text size="md" weight="bold" style={{ marginBottom: 16 }}>
64
- Create New Test
65
- </Text>
66
-
67
- <View style={{ gap: 12 }}>
68
- <Input
69
- label="Test Name"
70
- value={newTestName}
71
- onChangeText={setNewTestName}
72
- placeholder="Enter test name"
73
- />
74
- <Input
75
- label="Test Message"
76
- value={newTestMessage}
77
- onChangeText={setNewTestMessage}
78
- placeholder="Enter test message"
79
- multiline
80
- />
81
- <Button
82
- variant="contained"
83
- intent="primary"
84
- onPress={handleCreateTest}
85
- disabled={!newTestName || !newTestMessage || createTestMutation.isPending}
86
- >
87
- {createTestMutation.isPending ? 'Creating...' : 'Create Test'}
88
- </Button>
89
- </View>
90
- </Card>
91
-
92
- {/* Test Results */}
93
- <Card variant="outlined" padding="lg">
94
- <Text size="md" weight="bold" style={{ marginBottom: 16 }}>
95
- Test Entries ({tests?.count || 0})
96
- </Text>
97
-
98
- {tests?.data && tests.data.length > 0 ? (
99
- <View style={{ gap: 12 }}>
100
- {tests.data.map((test) => (
101
- <Card key={test.id} variant="filled" padding="md">
102
- <View style={{
103
- flexDirection: 'row',
104
- justifyContent: 'space-between',
105
- alignItems: 'flex-start',
106
- gap: 12
107
- }}>
108
- <View style={{ flex: 1 }}>
109
- <Text size="md" weight="semibold" style={{ marginBottom: 4 }}>
110
- {test.name}
111
- </Text>
112
- <Text size="sm" style={{ marginBottom: 8, opacity: 0.8 }}>
113
- {test.message}
114
- </Text>
115
- <View style={{ flexDirection: 'row', alignItems: 'center', gap: 8 }}>
116
- <Card
117
- variant="filled"
118
- padding="sm"
119
- intent={test.status === 'active' ? 'success' : 'neutral'}
120
- >
121
- <Text size="sm" weight="semibold">
122
- {test.status}
123
- </Text>
124
- </Card>
125
- <Text size="sm" style={{ opacity: 0.6 }}>
126
- {new Date(test.createdAt).toLocaleDateString()}
127
- </Text>
128
- </View>
129
- </View>
130
- <Button
131
- variant="outlined"
132
- intent="error"
133
- size="sm"
134
- onPress={() => handleDeleteTest(test.id)}
135
- disabled={deleteTestMutation.isPending}
136
- >
137
- Delete
138
- </Button>
139
- </View>
140
- </Card>
141
- ))}
142
- </View>
143
- ) : (
144
- <Card variant="filled" padding="md" style={{ opacity: 0.6 }}>
145
- <Text size="sm" style={{ textAlign: 'center' }}>
146
- No tests found. Create one above to get started!
147
- </Text>
148
- </Card>
149
- )}
150
- </Card>
151
-
152
- {/* Type Safety Info */}
153
- <Card variant="filled" intent="success" padding="md">
154
- <Text size="sm" weight="semibold" style={{ marginBottom: 4 }}>
155
- ✨ Type Safety Features:
156
- </Text>
157
- <Text size="sm">
158
- • Full TypeScript types from database to frontend • tRPC ensures API type safety •
159
- Prisma provides database schema validation • Real-time type checking across the stack
160
- </Text>
161
- </Card>
162
- </View>
163
- );
164
- };
@@ -1,25 +0,0 @@
1
- import '@idealyst/navigation/examples/unistyles';
2
-
3
- import * as React from 'react';
4
- import ReactDOM from 'react-dom/client';
5
- import App from './App.tsx';
6
-
7
- // Hydrate the app if it's SSR, otherwise render normally
8
- const container = document.getElementById('root')!;
9
-
10
- if (container.hasChildNodes()) {
11
- // If the container has child nodes, it means we're hydrating SSR content
12
- ReactDOM.hydrateRoot(container,
13
- <React.StrictMode>
14
- <App />
15
- </React.StrictMode>
16
- );
17
- } else {
18
- // Otherwise, render normally (for development)
19
- const root = ReactDOM.createRoot(container);
20
- root.render(
21
- <React.StrictMode>
22
- <App />
23
- </React.StrictMode>
24
- );
25
- }
@@ -1,7 +0,0 @@
1
- // Import tRPC client utilities from shared package
2
- export {
3
- trpc,
4
- createTRPCClient,
5
- createVanillaTRPCClient
6
- } from '@{{workspaceScope}}/shared';
7
- export type { TRPCClientConfig, AppRouter } from '@{{workspaceScope}}/shared';
@@ -1,26 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "lib": ["ES2020", "DOM", "DOM.Iterable"],
5
- "module": "ESNext",
6
- "skipLibCheck": true,
7
- "allowImportingTsExtensions": true,
8
- "isolatedModules": true,
9
- "moduleDetection": "force",
10
- "noEmit": true,
11
- "jsx": "react-jsx",
12
- "strict": true,
13
- "noUnusedLocals": true,
14
- "noUnusedParameters": true,
15
- "noFallthroughCasesInSwitch": true,
16
- "noUncheckedIndexedAccess": true,
17
- "baseUrl": ".",
18
- "paths": {
19
- "@/*": ["./src/*"],
20
- "react-native": ["node_modules/react-native-web"]
21
- },
22
- "types": ["vite/client"]
23
- },
24
- "include": ["src/**/*"],
25
- "exclude": ["node_modules", "dist"]
26
- }
@@ -1,98 +0,0 @@
1
- import react from "@vitejs/plugin-react";
2
- import path from "path";
3
- import { defineConfig } from "vite";
4
- import babel from "vite-plugin-babel";
5
-
6
- // https://vitejs.dev/config/
7
- export default defineConfig({
8
- plugins: [
9
- babel({
10
- filter: (id) =>
11
- id.includes("node_modules/@idealyst/") ||
12
- (id.includes("/packages/") &&
13
- !id.includes("/packages/web/") &&
14
- /\.(tsx?|jsx?)$/.test(id)),
15
- babelConfig: {
16
- presets: [
17
- ["@babel/preset-react", { runtime: "automatic" }],
18
- [
19
- "@babel/preset-typescript",
20
- {
21
- isTSX: true,
22
- allExtensions: true,
23
- },
24
- ],
25
- ],
26
- plugins: [
27
- [
28
- "react-native-unistyles/plugin",
29
- {
30
- root: "src",
31
- autoProcessPaths: [
32
- "@idealyst/components",
33
- "@idealyst/navigation",
34
- "@idealyst/theme",
35
- ],
36
- },
37
- ],
38
- ["@idealyst/components/plugin/web", { root: "src" }],
39
- ],
40
- },
41
- }),
42
- // Then process everything else with React plugin
43
- react(),
44
- ],
45
- resolve: {
46
- alias: {
47
- // Use absolute path to resolve react-native-web properly
48
- "react-native": path.resolve(__dirname, "node_modules/react-native-web"),
49
- "@react-native/normalize-colors": path.resolve(
50
- __dirname,
51
- "../../node_modules/@react-native/normalize-colors"
52
- ),
53
- },
54
- // Platform-specific file resolution
55
- extensions: [".web.tsx", ".web.ts", ".tsx", ".ts", ".js", ".jsx"],
56
- // Ensure proper resolution of package exports
57
- conditions: ["browser", "import", "module", "default"],
58
- // Ensure workspace dependencies resolve properly
59
- preserveSymlinks: false,
60
- },
61
- define: {
62
- global: "globalThis",
63
- __DEV__: JSON.stringify(true),
64
- },
65
- optimizeDeps: {
66
- include: [
67
- "react-native-web",
68
- "react-native-unistyles",
69
- "react-native-unistyles/web",
70
- "@mdi/react",
71
- "@mdi/js",
72
- ],
73
- exclude: [
74
- "react-native-edge-to-edge",
75
- "react-native-nitro-modules",
76
- "@idealyst/components",
77
- "@idealyst/navigation",
78
- "@idealyst/theme",
79
- "@test/shared",
80
- ],
81
- esbuildOptions: {
82
- loader: {
83
- ".tsx": "tsx",
84
- ".ts": "ts",
85
- ".jsx": "jsx",
86
- ".js": "jsx", // Important: treat .js files as JSX for React Native compatibility
87
- },
88
- alias: {
89
- "react-native": path.resolve(__dirname, "node_modules/react-native-web"),
90
- "@react-native/normalize-colors": path.resolve(__dirname, "../../node_modules/@react-native/normalize-colors"),
91
- },
92
- },
93
- },
94
- server: {
95
- host: "0.0.0.0",
96
- port: 5173,
97
- },
98
- });
@@ -1,26 +0,0 @@
1
- FROM node:20-bullseye
2
-
3
- # Install additional tools including gosu for proper user switching
4
- RUN apt-get update && apt-get install -y \
5
- git \
6
- postgresql-client \
7
- && rm -rf /var/lib/apt/lists/*
8
-
9
- # Enable corepack for yarn
10
- RUN corepack enable
11
-
12
- # Install global tools that might be useful
13
- RUN npm install -g @expo/cli @anthropic-ai/claude-code
14
-
15
- # Set up git (will be configured in setup script)
16
- RUN git config --global init.defaultBranch main
17
-
18
- # Create workspace directory
19
- RUN mkdir -p /workspace
20
- WORKDIR /workspace
21
- RUN chown -R node:node /workspace
22
-
23
- # Note: We don't switch to node user here anymore - entrypoint.sh will do it
24
- # This allows the entrypoint to fix permissions as root first
25
-
26
- USER node
@@ -1,113 +0,0 @@
1
- {
2
- "name": "{{projectName}} Development",
3
- "dockerComposeFile": "docker-compose.yml",
4
- "service": "app",
5
- "workspaceFolder": "/workspace",
6
-
7
- // Forward ports
8
- "forwardPorts": [
9
- 3000, // Api server
10
- 5173, // Vite dev server
11
- 8081, // Metro Bundler
12
- 19006, // Expo dev tools
13
- 5432, // PostgreSQL
14
- 6379, // Redis
15
- 3333 // Figma MCP server
16
- ],
17
-
18
- // Port attributes
19
- "portsAttributes": {
20
- "3000": {
21
- "label": "API Server",
22
- "onAutoForward": "notify"
23
- },
24
- "5173": {
25
- "label": "Vite Dev Server",
26
- "onAutoForward": "openBrowser"
27
- },
28
- "8081": {
29
- "label": "Metro Bundler",
30
- "onAutoForward": "notify"
31
- },
32
- "19006": {
33
- "label": "Expo Dev Tools",
34
- "onAutoForward": "openBrowser"
35
- },
36
- "5432": {
37
- "label": "PostgreSQL Database",
38
- "onAutoForward": "silent"
39
- },
40
- "6379": {
41
- "label": "Redis Cache",
42
- "onAutoForward": "silent"
43
- },
44
- "3333": {
45
- "label": "Figma MCP Server",
46
- "onAutoForward": "openBrowser"
47
- }
48
- },
49
-
50
- // VS Code customizations
51
- "customizations": {
52
- "vscode": {
53
- "extensions": [
54
- // React Native/React development
55
- "ms-vscode.vscode-react-native",
56
- "msjsdiag.vscode-react-native",
57
-
58
- // TypeScript/JavaScript
59
- "ms-vscode.vscode-typescript-next",
60
- "dbaeumer.vscode-eslint",
61
- "esbenp.prettier-vscode",
62
- "bradlc.vscode-tailwindcss",
63
-
64
- // General development
65
- "ms-vscode.vscode-json",
66
- "redhat.vscode-yaml",
67
- "ms-vscode.vscode-docker",
68
- "ms-vscode.vscode-markdown",
69
- "christian-kohler.path-intellisense",
70
- "formulahendry.auto-rename-tag",
71
-
72
- // Testing
73
- "orta.vscode-jest",
74
- "ms-vscode.test-adapter-converter",
75
-
76
- // Git
77
- "mhutchie.git-graph",
78
- "eamodio.gitlens",
79
- "github.vscode-pull-request-github",
80
- "github.copilot",
81
- "github.copilot-chat"
82
- ],
83
- "settings": {
84
- "terminal.integrated.defaultProfile.linux": "bash",
85
- "typescript.preferences.includePackageJsonAutoImports": "auto",
86
- "editor.formatOnSave": true,
87
- "editor.defaultFormatter": "esbenp.prettier-vscode",
88
- "editor.codeActionsOnSave": {
89
- "source.fixAll.eslint": "explicit",
90
- "source.organizeImports": "explicit"
91
- },
92
- "files.watcherExclude": {
93
- "**/node_modules/**": true,
94
- "**/.git/**": true,
95
- "**/dist/**": true,
96
- "**/coverage/**": true
97
- },
98
- "search.exclude": {
99
- "**/node_modules": true,
100
- "**/dist": true,
101
- "**/coverage": true,
102
- "**/.yarn": true
103
- },
104
- "jest.jestCommandLine": "yarn test",
105
- "jest.autoRun": "off"
106
- }
107
- }
108
- },
109
- "remoteUser": "node",
110
-
111
- // Post-create command to set up the development environment
112
- "postCreateCommand": "bash .devcontainer/setup.sh"
113
- }
@@ -1,59 +0,0 @@
1
- services:
2
- # PostgreSQL Database
3
- postgres:
4
- image: postgres:15-alpine
5
- environment:
6
- POSTGRES_DB: idealyst_db
7
- POSTGRES_USER: postgres
8
- POSTGRES_PASSWORD: postgres
9
- ports:
10
- - "5432:5432"
11
- volumes:
12
- - postgres_data:/var/lib/postgresql/data
13
-
14
- # Redis Cache
15
- redis:
16
- image: redis:7-alpine
17
- ports:
18
- - "6379:6379"
19
- volumes:
20
- - redis_data:/data
21
-
22
- # Development Service (for devcontainer)
23
- app:
24
- build:
25
- context: .
26
- dockerfile: Dockerfile
27
- environment:
28
- NODE_ENV: development
29
- DATABASE_URL: postgresql://postgres:postgres@postgres:5432/idealyst_db
30
- REDIS_URL: redis://redis:6379
31
- ports:
32
- - "3000:3000"
33
- - "5173:5173"
34
- - "8081:8081"
35
- - "19006:19006"
36
- volumes:
37
- - ..:/workspace
38
- depends_on:
39
- - postgres
40
- - redis
41
- command: sleep infinity
42
-
43
- # Figma MCP Server
44
- figma-mcp:
45
- image: node:18-alpine
46
- working_dir: /app
47
- environment:
48
- - FIGMA_ACCESS_TOKEN=${FIGMA_ACCESS_TOKEN:-}
49
- ports:
50
- - "3333:3333"
51
- volumes:
52
- - ./figma-mcp.sh:/app/figma-mcp.sh:ro
53
- - figma_mcp_data:/app/node_modules
54
- command: ["sh", "/app/figma-mcp.sh"]
55
-
56
- volumes:
57
- postgres_data:
58
- redis_data:
59
- figma_mcp_data:
@@ -1,32 +0,0 @@
1
- #!/bin/bash
2
- set -e
3
-
4
- echo "Starting Figma MCP Server..."
5
-
6
- # Check if FIGMA_ACCESS_TOKEN is provided
7
- if [ -z "$FIGMA_ACCESS_TOKEN" ]; then
8
- echo "❌ No FIGMA_ACCESS_TOKEN provided"
9
- echo "💡 Add your token to .devcontainer/.env to enable Figma integration"
10
- echo " Example: echo 'FIGMA_ACCESS_TOKEN=fig_your_token_here' > .devcontainer/.env"
11
- echo ""
12
- echo "🔄 Keeping container alive (waiting for token)..."
13
- sleep infinity
14
- exit 0
15
- fi
16
-
17
- echo "✅ Figma token found, installing figma-developer-mcp..."
18
-
19
- # Install figma-developer-mcp if not already installed
20
- if ! command -v figma-developer-mcp &> /dev/null; then
21
- npm install -g figma-developer-mcp
22
- echo "📦 figma-developer-mcp installed successfully"
23
- else
24
- echo "📦 figma-developer-mcp already installed"
25
- fi
26
-
27
- echo "🚀 Starting Figma MCP server on port 3333..."
28
- echo "🎨 Figma designs will be available to AI tools like Claude"
29
-
30
- # Start the MCP server with the correct environment variable
31
- export FIGMA_API_KEY="$FIGMA_ACCESS_TOKEN"
32
- exec npx figma-developer-mcp --port 3333
@@ -1,45 +0,0 @@
1
- #!/bin/bash
2
-
3
- echo "🚀 Setting up Idealyst development environment..."
4
-
5
- # Create environment file if it doesn't exist
6
- if [ ! -f ".env" ]; then
7
- echo "📝 Creating .env file..."
8
- cat > .env << EOF
9
- # Database Configuration
10
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/idealyst_db
11
- POSTGRES_DB=idealyst_db
12
- POSTGRES_USER=postgres
13
- POSTGRES_PASSWORD=postgres
14
-
15
- # Redis Configuration
16
- REDIS_URL=redis://redis:6379
17
-
18
- # API Configuration
19
- API_PORT=3000
20
- JWT_SECRET=your-jwt-secret-here
21
-
22
- # Web Configuration
23
- WEB_PORT=3000
24
-
25
- # Development Configuration
26
- NODE_ENV=development
27
- LOG_LEVEL=debug
28
-
29
- # Project Configuration
30
- PROJECT_NAME={{packageName}}
31
- EOF
32
- fi
33
-
34
- # Wait for database to be ready
35
- echo "⏳ Waiting for database to be ready..."
36
- until pg_isready -h postgres -p 5432 -U postgres; do
37
- echo "Database is unavailable - sleeping"
38
- sleep 1
39
- done
40
-
41
- echo "Add Figma MCP to Claude Code"
42
- claude mcp add -t sse figma-mcp http://figma-mcp:3333/sse
43
-
44
- echo "✅ Development environment is ready!"
45
- echo "🎉 You can now start developing your Idealyst application!"