@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,135 +0,0 @@
1
- # {{projectName}}
2
-
3
- {{description}}
4
-
5
- ## Getting Started
6
-
7
- This is a shared component library built with the Idealyst Framework that can be used across React Native and React web applications. It exports source TypeScript files directly for seamless integration in monorepo setups.
8
-
9
- ### Prerequisites
10
-
11
- - Node.js 18+
12
- - Yarn
13
-
14
- ### Installation
15
-
16
- Install dependencies:
17
- ```bash
18
- yarn install
19
- ```
20
-
21
- ### Development
22
-
23
- Run tests:
24
- ```bash
25
- yarn test
26
- ```
27
-
28
- Type checking:
29
- ```bash
30
- yarn type-check
31
- ```
32
-
33
- ## Usage
34
-
35
- Import the HelloWorld component in your React or React Native app:
36
-
37
- ```typescript
38
- import { HelloWorld } from '@{{workspaceName}}/shared';
39
-
40
- function App() {
41
- return <HelloWorld name="Developer" />;
42
- }
43
- ```
44
-
45
- ## Component
46
-
47
- ### HelloWorld
48
-
49
- A simple welcome component that works on both web and mobile platforms.
50
-
51
- **Props:**
52
- - `name?: string` - Name to display in the greeting (defaults to "World")
53
-
54
- **Example:**
55
- ```typescript
56
- <HelloWorld name="Alice" />
57
- ```
58
-
59
- ### Project Structure
60
-
61
- ```
62
- {{projectName}}/
63
- ├── src/
64
- │ ├── components/ # Shared components
65
- │ ├── utils/ # Utility functions
66
- │ ├── types/ # TypeScript types
67
- │ └── index.ts # Main export file
68
- ├── dist/ # Built library (generated)
69
- ├── rollup.config.js # Build configuration
70
- └── tsconfig.json # TypeScript configuration
71
- ```
72
-
73
- ### Features
74
-
75
- - **Cross-platform**: Works on both React Native and React web
76
- - **TypeScript**: Full type safety
77
- - **Tree-shakeable**: Optimized for bundle size
78
- - **Peer Dependencies**: Lightweight by design
79
- - **Idealyst Theme Integration**: Compatible with the Idealyst theming system
80
-
81
- ### Usage
82
-
83
- After building, you can import and use the library in your projects:
84
-
85
- ```tsx
86
- import { SharedComponent, toTitleCase, ComponentProps } from '{{packageName}}';
87
-
88
- // Use the shared component
89
- <SharedComponent
90
- title="Hello World"
91
- description="This works on both web and mobile!"
92
- />
93
-
94
- // Use utility functions
95
- const formatted = toTitleCase('hello world'); // "Hello World"
96
- ```
97
-
98
- ### Building for Production
99
-
100
- Build the library:
101
- ```bash
102
- yarn build
103
- ```
104
-
105
- This creates:
106
- - `dist/index.js` - CommonJS build
107
- - `dist/index.esm.js` - ES modules build
108
- - `dist/index.d.ts` - TypeScript declarations
109
-
110
- ### Publishing
111
-
112
- Before publishing, make sure to:
113
-
114
- 1. Update the version in `package.json`
115
- 2. Build the library: `yarn build`
116
- 3. Publish to npm: `npm publish`
117
-
118
- ### Development in Monorepo
119
-
120
- If you're using this in a monorepo, you can reference it directly:
121
-
122
- ```json
123
- {
124
- "dependencies": {
125
- "{{packageName}}": "workspace:*"
126
- }
127
- }
128
- ```
129
-
130
- ### Learn More
131
-
132
- - [Idealyst Framework Documentation](https://github.com/your-username/idealyst-framework)
133
- - [React Native Documentation](https://reactnative.dev/)
134
- - [React Documentation](https://react.dev/)
135
- - [Rollup Documentation](https://rollupjs.org/)
@@ -1,51 +0,0 @@
1
- import { HelloWorld } from '../src/index';
2
-
3
- describe('Shared Library', () => {
4
- it('should export HelloWorld component', () => {
5
- expect(HelloWorld).toBeDefined();
6
- expect(typeof HelloWorld).toBe('function');
7
- });
8
- });
9
-
10
- describe('HelloWorld Component', () => {
11
- it('should be a React component', () => {
12
- expect(HelloWorld).toBeDefined();
13
- expect(typeof HelloWorld).toBe('function');
14
- });
15
-
16
- it('should accept props', () => {
17
- // Test that the component function exists and can be called
18
- // Note: Full component testing would require a React testing environment
19
- expect(() => HelloWorld({ name: 'Test' })).not.toThrow();
20
- });
21
- });
22
-
23
- describe('Sample Shared Tests', () => {
24
- it('should pass a basic test', () => {
25
- expect(1 + 1).toBe(2);
26
- });
27
-
28
- it('should handle string operations', () => {
29
- const testString = 'Hello World';
30
- expect(testString).toContain('World');
31
- expect(testString.length).toBe(11);
32
- });
33
-
34
- it('should work with objects', () => {
35
- const testObj = { name: 'test', value: 42 };
36
- expect(testObj).toHaveProperty('name');
37
- expect(testObj).toHaveProperty('value', 42);
38
- });
39
-
40
- it('should handle arrays', () => {
41
- const testArray = [1, 2, 3, 4, 5];
42
- expect(testArray).toHaveLength(5);
43
- expect(testArray).toContain(3);
44
- expect(testArray.filter(x => x > 3)).toEqual([4, 5]);
45
- });
46
-
47
- it('should work with async operations', async () => {
48
- const result = await Promise.resolve('async test');
49
- expect(result).toBe('async test');
50
- });
51
- });
@@ -1,22 +0,0 @@
1
- /** @type {import('jest').Config} */
2
- module.exports = {
3
- preset: 'ts-jest',
4
- testEnvironment: 'node',
5
- roots: ['<rootDir>/src', '<rootDir>/__tests__'],
6
- testMatch: [
7
- '**/__tests__/**/*.{ts,tsx,js}',
8
- '**/*.{test,spec}.{ts,tsx,js}'
9
- ],
10
- transform: {
11
- '^.+\\.tsx?$': 'ts-jest',
12
- },
13
- collectCoverageFrom: [
14
- 'src/**/*.{ts,tsx}',
15
- '!src/**/*.d.ts',
16
- '!src/**/index.ts',
17
- ],
18
- coverageDirectory: 'coverage',
19
- coverageReporters: ['text', 'lcov'],
20
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
21
- testTimeout: 10000,
22
- };
@@ -1 +0,0 @@
1
- export { App } from './App';
@@ -1,14 +0,0 @@
1
- // Export the unified App component
2
- export { App } from './components';
3
-
4
- // Export navigation router
5
- export { default as AppRouter } from './navigation/AppRouter';
6
-
7
- // Export tRPC client utilities
8
- export { trpc, createTRPCClient, createVanillaTRPCClient } from './trpc/client';
9
- export type { TRPCClientConfig, AppRouter } from './trpc/client';
10
-
11
- // Simple type for the HelloWorld component props
12
- export interface HelloWorldProps {
13
- name?: string;
14
- }
@@ -1,44 +0,0 @@
1
- import { createTRPCProxyClient, httpBatchLink } from "@trpc/client";
2
- import { createTRPCReact } from "@trpc/react-query";
3
- import type { AppRouter } from "@{{workspaceScope}}/api";
4
-
5
- // Create the tRPC React hooks with full type safety
6
- export const trpc: ReturnType<typeof createTRPCReact<AppRouter>> =
7
- createTRPCReact<AppRouter>();
8
-
9
- // Configuration for tRPC client
10
- export interface TRPCClientConfig {
11
- apiUrl: string;
12
- headers?: () => Record<string, string>;
13
- }
14
-
15
- // Create tRPC client factory
16
- export function createTRPCClient(
17
- config: TRPCClientConfig
18
- ): ReturnType<typeof trpc.createClient> {
19
- return trpc.createClient({
20
- links: [
21
- httpBatchLink({
22
- url: config.apiUrl,
23
- headers: config.headers,
24
- }),
25
- ],
26
- });
27
- }
28
-
29
- // Create a vanilla client (for use outside of React components)
30
- export function createVanillaTRPCClient(
31
- config: TRPCClientConfig
32
- ): ReturnType<typeof createTRPCProxyClient<AppRouter>> {
33
- return createTRPCProxyClient<AppRouter>({
34
- links: [
35
- httpBatchLink({
36
- url: config.apiUrl,
37
- headers: config.headers,
38
- }),
39
- ],
40
- });
41
- }
42
-
43
- // Export types
44
- export type { AppRouter } from "@{{workspaceScope}}/api";
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2020",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "lib": ["ES2020"],
7
- "esModuleInterop": true,
8
- "allowSyntheticDefaultImports": true,
9
- "strict": true,
10
- "skipLibCheck": true,
11
- "forceConsistentCasingInFileNames": true,
12
- "declaration": true,
13
- "jsx": "react-jsx",
14
- "noEmit": true
15
- },
16
- "include": [
17
- "src/**/*"
18
- ],
19
- "exclude": [
20
- "node_modules"
21
- ]
22
- }
@@ -1,131 +0,0 @@
1
- # {{projectName}}
2
-
3
- {{description}}
4
-
5
- ## Getting Started
6
-
7
- This is a React web application built with the Idealyst Framework and Vite, with full-stack capabilities including database and API integration.
8
-
9
- ### Prerequisites
10
-
11
- - Node.js 18+
12
- - Yarn
13
-
14
- ### Installation
15
-
16
- Install dependencies:
17
- ```bash
18
- yarn install
19
- ```
20
-
21
- ### Database Setup
22
-
23
- If your project includes a database, set it up:
24
-
25
- ```bash
26
- # Navigate to the database package
27
- cd packages/database
28
-
29
- # Install dependencies
30
- yarn install
31
-
32
- # Generate Prisma client
33
- yarn prisma:generate
34
-
35
- # Run database migrations
36
- yarn prisma:migrate
37
-
38
- # Seed the database with sample data
39
- yarn prisma:seed
40
- ```
41
-
42
- ### API Setup
43
-
44
- If your project includes an API, start the API server:
45
-
46
- ```bash
47
- # Navigate to the API package
48
- cd packages/api
49
-
50
- # Install dependencies
51
- yarn install
52
-
53
- # Start the API server (usually on port 3000)
54
- yarn dev
55
- ```
56
-
57
- ### Development
58
-
59
- Start the web development server:
60
- ```bash
61
- yarn dev
62
- ```
63
-
64
- The app will be available at `http://localhost:3000`
65
-
66
- If you have both database and API packages, make sure to start them first before starting the web app for full functionality.
67
-
68
- ### Building for Production
69
-
70
- Build the app:
71
- ```bash
72
- yarn build
73
- ```
74
-
75
- Preview the production build:
76
- ```bash
77
- yarn preview
78
- ```
79
-
80
- ### Project Structure
81
-
82
- ```
83
- {{projectName}}/
84
- ├── packages/
85
- │ ├── database/ # Database schema and migrations (if included)
86
- │ ├── api/ # tRPC API server (if included)
87
- │ ├── shared/ # Shared components and utilities
88
- │ └── web/ # React web application
89
- ├── src/
90
- │ ├── App.tsx # Main app component
91
- │ ├── main.tsx # App entry point
92
- │ ├── components/ # React components
93
- │ └── utils/ # Utility functions and tRPC client
94
- ├── index.html # HTML template
95
- ├── vite.config.ts # Vite configuration
96
- └── tsconfig.json # TypeScript configuration
97
- ```
98
-
99
- ### Features
100
-
101
- - **Full-Stack Type Safety**: End-to-end TypeScript from database to frontend
102
- - **tRPC Integration**: Type-safe API calls with automatic TypeScript inference
103
- - **Database Integration**: Prisma ORM with SQLite for development
104
- - **Idealyst Components**: Cross-platform UI components
105
- - **Idealyst Navigation**: Consistent navigation system
106
- - **Idealyst Theme**: Unified theming across platforms
107
- - **React 19.1**: Latest React version
108
- - **Vite**: Fast build tool and dev server
109
- - **React Native Web**: Use React Native components on the web
110
-
111
- ### API Demo
112
-
113
- If your project includes the API demo, you can access it at `/test-demo` to see:
114
- - Real-time database queries
115
- - CRUD operations (Create, Read, Update, Delete)
116
- - Type-safe tRPC integration
117
- - Form handling with validation
118
-
119
- ### Development
120
-
121
- The app uses the Idealyst Framework for consistent UI and navigation that works across web and mobile platforms.
122
-
123
- Edit `src/App.tsx` to start building your application.
124
-
125
- ### Learn More
126
-
127
- - [Idealyst Framework Documentation](https://github.com/your-username/idealyst-framework)
128
- - [tRPC Documentation](https://trpc.io/)
129
- - [Prisma Documentation](https://prisma.io/)
130
- - [React Documentation](https://react.dev/)
131
- - [Vite Documentation](https://vitejs.dev/)