@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.
- package/dist/generators/index.js +3 -40
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/init.js +273 -0
- package/dist/generators/init.js.map +1 -0
- package/dist/generators/utils.js +5 -0
- package/dist/generators/utils.js.map +1 -1
- package/dist/index.js +20 -202
- package/dist/index.js.map +1 -1
- package/dist/scripts/configure-react-native-monorepo.js +144 -0
- package/dist/scripts/configure-react-native-monorepo.js.map +1 -0
- package/dist/{templates/workspace → template}/README.md +66 -12
- package/dist/template/package.json +45 -0
- package/{templates → dist/template/packages}/api/package.json +3 -1
- package/{templates → dist/template/packages}/database/package.json +1 -1
- package/dist/{templates/native → template/packages/mobile}/babel.config.js +1 -0
- package/{templates/native → dist/template/packages/mobile}/metro.config.js +4 -4
- package/{templates/native → dist/template/packages/mobile}/package.json +5 -2
- package/{templates → dist/template/packages}/shared/package.json +2 -2
- package/{templates → dist/template/packages}/web/package.json +4 -1
- package/dist/types/generators/index.d.ts +1 -7
- package/dist/types/generators/init.d.ts +5 -0
- package/dist/types/scripts/configure-react-native-monorepo.d.ts +23 -0
- package/dist/types/types.d.ts +0 -4
- package/package.json +1 -1
- package/dist/generators/api.js +0 -31
- package/dist/generators/api.js.map +0 -1
- package/dist/generators/database.js +0 -31
- package/dist/generators/database.js.map +0 -1
- package/dist/generators/fullstack.js +0 -418
- package/dist/generators/fullstack.js.map +0 -1
- package/dist/generators/native.js +0 -112
- package/dist/generators/native.js.map +0 -1
- package/dist/generators/shared.js +0 -29
- package/dist/generators/shared.js.map +0 -1
- package/dist/generators/web.js +0 -45
- package/dist/generators/web.js.map +0 -1
- package/dist/generators/workspace.js +0 -83
- package/dist/generators/workspace.js.map +0 -1
- package/dist/templates/api/package.json +0 -54
- package/dist/templates/database/package.json +0 -49
- package/dist/templates/native/metro.config.js +0 -27
- package/dist/templates/native/package.json +0 -49
- package/dist/templates/native/src/App.tsx +0 -8
- package/dist/templates/shared/package.json +0 -62
- package/dist/templates/shared/src/components/App.tsx +0 -47
- package/dist/templates/shared/src/components/HelloWorld.tsx +0 -307
- package/dist/templates/shared/src/navigation/AppRouter.tsx +0 -98
- package/dist/templates/web/package.json +0 -66
- package/dist/templates/web/src/App.tsx +0 -14
- package/dist/templates/workspace/package.json +0 -35
- package/dist/types/generators/api.d.ts +0 -2
- package/dist/types/generators/database.d.ts +0 -2
- package/dist/types/generators/fullstack.d.ts +0 -2
- package/dist/types/generators/native.d.ts +0 -2
- package/dist/types/generators/shared.d.ts +0 -2
- package/dist/types/generators/web.d.ts +0 -2
- package/dist/types/generators/workspace.d.ts +0 -2
- package/templates/api/.env.example +0 -6
- package/templates/api/README.md +0 -274
- package/templates/api/__tests__/api.test.ts +0 -26
- package/templates/api/jest.config.js +0 -23
- package/templates/api/jest.setup.js +0 -9
- package/templates/api/src/context.ts +0 -19
- package/templates/api/src/controllers/TestController.ts +0 -0
- package/templates/api/src/index.ts +0 -9
- package/templates/api/src/lib/crud.ts +0 -150
- package/templates/api/src/lib/database.ts +0 -23
- package/templates/api/src/router/index.ts +0 -163
- package/templates/api/src/routers/test.ts +0 -59
- package/templates/api/src/routers/user.example.ts +0 -83
- package/templates/api/src/server.ts +0 -50
- package/templates/api/src/trpc.ts +0 -28
- package/templates/api/tsconfig.json +0 -43
- package/templates/database/README.md +0 -162
- package/templates/database/prisma/seed.ts +0 -64
- package/templates/database/schema.prisma +0 -107
- package/templates/database/src/index.ts +0 -15
- package/templates/database/src/validators.ts +0 -10
- package/templates/database/tsconfig.json +0 -18
- package/templates/native/README.md +0 -86
- package/templates/native/__tests__/App.test.tsx +0 -156
- package/templates/native/__tests__/components.test.tsx +0 -300
- package/templates/native/app.json +0 -5
- package/templates/native/babel.config.js +0 -10
- package/templates/native/index.js +0 -6
- package/templates/native/jest.config.js +0 -21
- package/templates/native/jest.setup.js +0 -12
- package/templates/native/src/App-with-trpc.tsx +0 -30
- package/templates/native/src/App.tsx +0 -8
- package/templates/native/src/utils/trpc.ts +0 -7
- package/templates/native/tsconfig.json +0 -28
- package/templates/shared/README.md +0 -135
- package/templates/shared/__tests__/shared.test.ts +0 -51
- package/templates/shared/jest.config.js +0 -22
- package/templates/shared/src/components/index.ts +0 -1
- package/templates/shared/src/index.ts +0 -14
- package/templates/shared/src/trpc/client.ts +0 -44
- package/templates/shared/tsconfig.json +0 -22
- package/templates/web/README.md +0 -131
- package/templates/web/__tests__/App.test.tsx +0 -342
- package/templates/web/__tests__/components.test.tsx +0 -564
- package/templates/web/index.html +0 -13
- package/templates/web/jest.config.js +0 -27
- package/templates/web/jest.setup.js +0 -24
- package/templates/web/src/App-with-trpc.tsx +0 -32
- package/templates/web/src/App.tsx +0 -14
- package/templates/web/src/components/TestDemo.tsx +0 -164
- package/templates/web/src/main.tsx +0 -25
- package/templates/web/src/utils/trpc.ts +0 -7
- package/templates/web/tsconfig.json +0 -26
- package/templates/web/vite.config.ts +0 -98
- package/templates/workspace/.devcontainer/Dockerfile +0 -26
- package/templates/workspace/.devcontainer/devcontainer.json +0 -113
- package/templates/workspace/.devcontainer/docker-compose.yml +0 -59
- package/templates/workspace/.devcontainer/figma-mcp.sh +0 -32
- package/templates/workspace/.devcontainer/setup.sh +0 -45
- package/templates/workspace/.dockerignore +0 -151
- package/templates/workspace/.env.example +0 -36
- package/templates/workspace/.env.production +0 -56
- package/templates/workspace/DOCKER.md +0 -0
- package/templates/workspace/Dockerfile +0 -111
- package/templates/workspace/README.md +0 -179
- package/templates/workspace/docker/nginx/prod.conf +0 -238
- package/templates/workspace/docker/nginx.conf +0 -131
- package/templates/workspace/docker/postgres/init.sql +0 -41
- package/templates/workspace/docker/prometheus/prometheus.yml +0 -52
- package/templates/workspace/docker-compose.prod.yml +0 -146
- package/templates/workspace/docker-compose.yml +0 -143
- package/templates/workspace/jest.config.js +0 -20
- package/templates/workspace/package.json +0 -38
- package/templates/workspace/setup.sh +0 -30
- package/templates/workspace/tsconfig.json +0 -31
- /package/dist/{templates/workspace → template}/.devcontainer/Dockerfile +0 -0
- /package/dist/{templates/workspace → template}/.devcontainer/devcontainer.json +0 -0
- /package/dist/{templates/workspace → template}/.devcontainer/docker-compose.yml +0 -0
- /package/dist/{templates/workspace → template}/.devcontainer/figma-mcp.sh +0 -0
- /package/dist/{templates/workspace → template}/.devcontainer/setup.sh +0 -0
- /package/dist/{templates/workspace → template}/.dockerignore +0 -0
- /package/dist/{templates/workspace → template}/.env.example +0 -0
- /package/dist/{templates/workspace → template}/DOCKER.md +0 -0
- /package/dist/{templates/workspace → template}/Dockerfile +0 -0
- /package/dist/{templates/workspace → template}/docker/nginx/prod.conf +0 -0
- /package/dist/{templates/workspace → template}/docker/nginx.conf +0 -0
- /package/dist/{templates/workspace → template}/docker/postgres/init.sql +0 -0
- /package/dist/{templates/workspace → template}/docker/prometheus/prometheus.yml +0 -0
- /package/dist/{templates/workspace → template}/docker-compose.prod.yml +0 -0
- /package/dist/{templates/workspace → template}/docker-compose.yml +0 -0
- /package/dist/{templates/workspace → template}/jest.config.js +0 -0
- /package/dist/{templates → template/packages}/api/.env.example +0 -0
- /package/dist/{templates → template/packages}/api/README.md +0 -0
- /package/dist/{templates → template/packages}/api/__tests__/api.test.ts +0 -0
- /package/dist/{templates → template/packages}/api/jest.config.js +0 -0
- /package/dist/{templates → template/packages}/api/jest.setup.js +0 -0
- /package/dist/{templates → template/packages}/api/src/context.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/controllers/TestController.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/index.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/lib/crud.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/lib/database.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/router/index.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/routers/test.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/routers/user.example.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/server.ts +0 -0
- /package/dist/{templates → template/packages}/api/src/trpc.ts +0 -0
- /package/dist/{templates → template/packages}/api/tsconfig.json +0 -0
- /package/dist/{templates → template/packages}/database/README.md +0 -0
- /package/dist/{templates → template/packages}/database/prisma/seed.ts +0 -0
- /package/dist/{templates → template/packages}/database/schema.prisma +0 -0
- /package/dist/{templates → template/packages}/database/src/index.ts +0 -0
- /package/dist/{templates → template/packages}/database/src/validators.ts +0 -0
- /package/dist/{templates → template/packages}/database/tsconfig.json +0 -0
- /package/dist/{templates/native → template/packages/mobile}/README.md +0 -0
- /package/dist/{templates/native → template/packages/mobile}/__tests__/App.test.tsx +0 -0
- /package/dist/{templates/native → template/packages/mobile}/__tests__/components.test.tsx +0 -0
- /package/dist/{templates/native → template/packages/mobile}/app.json +0 -0
- /package/dist/{templates/native → template/packages/mobile}/index.js +0 -0
- /package/dist/{templates/native → template/packages/mobile}/jest.config.js +0 -0
- /package/dist/{templates/native → template/packages/mobile}/jest.setup.js +0 -0
- /package/dist/{templates/native → template/packages/mobile}/src/App-with-trpc-and-shared.tsx +0 -0
- /package/dist/{templates/native → template/packages/mobile}/src/App-with-trpc.tsx +0 -0
- /package/{templates/native/src/App-with-trpc-and-shared.tsx → dist/template/packages/mobile/src/App.tsx} +0 -0
- /package/dist/{templates/native → template/packages/mobile}/src/utils/trpc.ts +0 -0
- /package/dist/{templates/native → template/packages/mobile}/tsconfig.json +0 -0
- /package/dist/{templates → template/packages}/shared/README.md +0 -0
- /package/dist/{templates → template/packages}/shared/__tests__/shared.test.ts +0 -0
- /package/dist/{templates → template/packages}/shared/jest.config.js +0 -0
- /package/{templates → dist/template/packages}/shared/src/components/App.tsx +0 -0
- /package/{templates → dist/template/packages}/shared/src/components/HelloWorld.tsx +0 -0
- /package/dist/{templates → template/packages}/shared/src/components/index.ts +0 -0
- /package/dist/{templates → template/packages}/shared/src/index.ts +0 -0
- /package/{templates → dist/template/packages}/shared/src/navigation/AppRouter.tsx +0 -0
- /package/dist/{templates → template/packages}/shared/src/trpc/client.ts +0 -0
- /package/dist/{templates → template/packages}/shared/tsconfig.json +0 -0
- /package/dist/{templates → template/packages}/web/README.md +0 -0
- /package/dist/{templates → template/packages}/web/__tests__/App.test.tsx +0 -0
- /package/dist/{templates → template/packages}/web/__tests__/components.test.tsx +0 -0
- /package/dist/{templates → template/packages}/web/index.html +0 -0
- /package/dist/{templates → template/packages}/web/jest.config.js +0 -0
- /package/dist/{templates → template/packages}/web/jest.setup.js +0 -0
- /package/dist/{templates → template/packages}/web/src/App-with-trpc-and-shared.tsx +0 -0
- /package/dist/{templates → template/packages}/web/src/App-with-trpc.tsx +0 -0
- /package/{templates/web/src/App-with-trpc-and-shared.tsx → dist/template/packages/web/src/App.tsx} +0 -0
- /package/dist/{templates → template/packages}/web/src/components/TestDemo.tsx +0 -0
- /package/dist/{templates → template/packages}/web/src/main.tsx +0 -0
- /package/dist/{templates → template/packages}/web/src/utils/trpc.ts +0 -0
- /package/dist/{templates → template/packages}/web/tsconfig.json +0 -0
- /package/dist/{templates → template/packages}/web/vite.config.ts +0 -0
- /package/dist/{templates/workspace → template}/setup.sh +0 -0
- /package/dist/{templates/workspace → template}/tsconfig.json +0 -0
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
# Dockerignore file for Idealyst workspace
|
|
2
|
-
# Excludes files and directories from Docker build context
|
|
3
|
-
|
|
4
|
-
# Node.js
|
|
5
|
-
node_modules/
|
|
6
|
-
npm-debug.log*
|
|
7
|
-
yarn-debug.log*
|
|
8
|
-
yarn-error.log*
|
|
9
|
-
.pnpm-debug.log*
|
|
10
|
-
|
|
11
|
-
# Environment files (use .env.example instead)
|
|
12
|
-
.env
|
|
13
|
-
.env.local
|
|
14
|
-
.env.development.local
|
|
15
|
-
.env.test.local
|
|
16
|
-
.env.production.local
|
|
17
|
-
|
|
18
|
-
# Build outputs
|
|
19
|
-
dist/
|
|
20
|
-
build/
|
|
21
|
-
out/
|
|
22
|
-
.next/
|
|
23
|
-
coverage/
|
|
24
|
-
|
|
25
|
-
# Development tools
|
|
26
|
-
.vscode/
|
|
27
|
-
.idea/
|
|
28
|
-
*.swp
|
|
29
|
-
*.swo
|
|
30
|
-
*~
|
|
31
|
-
|
|
32
|
-
# OS generated files
|
|
33
|
-
.DS_Store
|
|
34
|
-
.DS_Store?
|
|
35
|
-
._*
|
|
36
|
-
.Spotlight-V100
|
|
37
|
-
.Trashes
|
|
38
|
-
ehthumbs.db
|
|
39
|
-
Thumbs.db
|
|
40
|
-
|
|
41
|
-
# Git
|
|
42
|
-
.git/
|
|
43
|
-
.gitignore
|
|
44
|
-
.gitattributes
|
|
45
|
-
|
|
46
|
-
# Docker
|
|
47
|
-
Dockerfile*
|
|
48
|
-
docker-compose*.yml
|
|
49
|
-
.dockerignore
|
|
50
|
-
|
|
51
|
-
# CI/CD
|
|
52
|
-
.github/
|
|
53
|
-
.gitlab-ci.yml
|
|
54
|
-
.travis.yml
|
|
55
|
-
.circleci/
|
|
56
|
-
|
|
57
|
-
# Logs
|
|
58
|
-
logs/
|
|
59
|
-
*.log
|
|
60
|
-
|
|
61
|
-
# Runtime data
|
|
62
|
-
pids/
|
|
63
|
-
*.pid
|
|
64
|
-
*.seed
|
|
65
|
-
*.pid.lock
|
|
66
|
-
|
|
67
|
-
# Coverage directory used by tools like istanbul
|
|
68
|
-
coverage/
|
|
69
|
-
.nyc_output/
|
|
70
|
-
|
|
71
|
-
# Test files and directories
|
|
72
|
-
__tests__/
|
|
73
|
-
*.test.js
|
|
74
|
-
*.test.ts
|
|
75
|
-
*.test.tsx
|
|
76
|
-
*.spec.js
|
|
77
|
-
*.spec.ts
|
|
78
|
-
*.spec.tsx
|
|
79
|
-
test/
|
|
80
|
-
tests/
|
|
81
|
-
|
|
82
|
-
# Documentation
|
|
83
|
-
README.md
|
|
84
|
-
CHANGELOG.md
|
|
85
|
-
LICENSE
|
|
86
|
-
*.md
|
|
87
|
-
|
|
88
|
-
# Package manager files
|
|
89
|
-
package-lock.json
|
|
90
|
-
# yarn.lock - DO NOT IGNORE: Required for immutable installs
|
|
91
|
-
pnpm-lock.yaml
|
|
92
|
-
|
|
93
|
-
# Development scripts
|
|
94
|
-
scripts/dev*
|
|
95
|
-
scripts/test*
|
|
96
|
-
|
|
97
|
-
# Temporary files
|
|
98
|
-
tmp/
|
|
99
|
-
temp/
|
|
100
|
-
.tmp/
|
|
101
|
-
|
|
102
|
-
# Editor directories and files
|
|
103
|
-
.vscode/
|
|
104
|
-
.idea/
|
|
105
|
-
*.suo
|
|
106
|
-
*.ntvs*
|
|
107
|
-
*.njsproj
|
|
108
|
-
*.sln
|
|
109
|
-
*.sw?
|
|
110
|
-
|
|
111
|
-
# Runtime configuration
|
|
112
|
-
.editorconfig
|
|
113
|
-
.eslintrc*
|
|
114
|
-
.prettierrc*
|
|
115
|
-
.stylelintrc*
|
|
116
|
-
jest.config.*
|
|
117
|
-
tsconfig.json
|
|
118
|
-
tsconfig.*.json
|
|
119
|
-
|
|
120
|
-
# Mobile development
|
|
121
|
-
android/
|
|
122
|
-
ios/
|
|
123
|
-
.expo/
|
|
124
|
-
.expo-shared/
|
|
125
|
-
|
|
126
|
-
# Backup files
|
|
127
|
-
*.backup
|
|
128
|
-
backups/
|
|
129
|
-
|
|
130
|
-
# Database files
|
|
131
|
-
*.db
|
|
132
|
-
*.sqlite
|
|
133
|
-
*.sqlite3
|
|
134
|
-
|
|
135
|
-
# Cache directories
|
|
136
|
-
.cache/
|
|
137
|
-
.parcel-cache/
|
|
138
|
-
.eslintcache
|
|
139
|
-
|
|
140
|
-
# Storybook
|
|
141
|
-
.storybook/
|
|
142
|
-
storybook-static/
|
|
143
|
-
|
|
144
|
-
# IDE files
|
|
145
|
-
.project
|
|
146
|
-
.classpath
|
|
147
|
-
.c9/
|
|
148
|
-
*.launch
|
|
149
|
-
.settings/
|
|
150
|
-
*.sublime-workspace
|
|
151
|
-
*.sublime-project
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Environment variables for Docker Compose
|
|
2
|
-
# Copy this file to .env and customize for your environment
|
|
3
|
-
|
|
4
|
-
# Project Configuration
|
|
5
|
-
PROJECT_NAME={{packageName}}
|
|
6
|
-
NODE_ENV=development
|
|
7
|
-
|
|
8
|
-
# Database Configuration
|
|
9
|
-
POSTGRES_DB=idealyst_db
|
|
10
|
-
POSTGRES_USER=postgres
|
|
11
|
-
POSTGRES_PASSWORD=postgres
|
|
12
|
-
POSTGRES_PORT=5432
|
|
13
|
-
|
|
14
|
-
# Redis Configuration
|
|
15
|
-
REDIS_PORT=6379
|
|
16
|
-
|
|
17
|
-
# API Configuration
|
|
18
|
-
API_PORT=3000
|
|
19
|
-
JWT_SECRET=your-jwt-secret-change-this-in-production
|
|
20
|
-
|
|
21
|
-
# Web Configuration
|
|
22
|
-
WEB_PORT=3000
|
|
23
|
-
|
|
24
|
-
# Monitoring Configuration (optional)
|
|
25
|
-
GRAFANA_PASSWORD=admin
|
|
26
|
-
|
|
27
|
-
# SSL Configuration (for production)
|
|
28
|
-
DOMAIN_NAME=localhost
|
|
29
|
-
SSL_EMAIL=admin@localhost
|
|
30
|
-
|
|
31
|
-
# Logging
|
|
32
|
-
LOG_LEVEL=info
|
|
33
|
-
|
|
34
|
-
# Rate Limiting
|
|
35
|
-
RATE_LIMIT_WINDOW_MS=900000
|
|
36
|
-
RATE_LIMIT_MAX_REQUESTS=100
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# Production Environment Variables
|
|
2
|
-
# Copy this file to .env for production deployment
|
|
3
|
-
|
|
4
|
-
# Project Configuration
|
|
5
|
-
PROJECT_NAME={{packageName}}
|
|
6
|
-
NODE_ENV=production
|
|
7
|
-
|
|
8
|
-
# Database Configuration (use strong passwords!)
|
|
9
|
-
POSTGRES_DB={{packageName}}_production
|
|
10
|
-
POSTGRES_USER={{packageName}}_user
|
|
11
|
-
POSTGRES_PASSWORD=CHANGE_THIS_STRONG_PASSWORD
|
|
12
|
-
POSTGRES_PORT=5432
|
|
13
|
-
|
|
14
|
-
# Redis Configuration
|
|
15
|
-
REDIS_PORT=6379
|
|
16
|
-
|
|
17
|
-
# API Configuration
|
|
18
|
-
API_PORT=3001
|
|
19
|
-
JWT_SECRET=CHANGE_THIS_VERY_STRONG_JWT_SECRET_MINIMUM_32_CHARACTERS
|
|
20
|
-
|
|
21
|
-
# Web Configuration
|
|
22
|
-
WEB_PORT=80
|
|
23
|
-
|
|
24
|
-
# SSL/Domain Configuration
|
|
25
|
-
DOMAIN_NAME=yourdomain.com
|
|
26
|
-
SSL_EMAIL=admin@yourdomain.com
|
|
27
|
-
|
|
28
|
-
# Monitoring
|
|
29
|
-
GRAFANA_PASSWORD=CHANGE_THIS_STRONG_PASSWORD
|
|
30
|
-
|
|
31
|
-
# Logging
|
|
32
|
-
LOG_LEVEL=warn
|
|
33
|
-
|
|
34
|
-
# Rate Limiting (more restrictive for production)
|
|
35
|
-
RATE_LIMIT_WINDOW_MS=900000
|
|
36
|
-
RATE_LIMIT_MAX_REQUESTS=50
|
|
37
|
-
|
|
38
|
-
# Security Settings
|
|
39
|
-
SESSION_SECRET=CHANGE_THIS_VERY_STRONG_SESSION_SECRET
|
|
40
|
-
ENCRYPTION_KEY=CHANGE_THIS_32_CHARACTER_ENCRYPTION_KEY
|
|
41
|
-
|
|
42
|
-
# External Services (configure as needed)
|
|
43
|
-
# SMTP_HOST=smtp.yourdomain.com
|
|
44
|
-
# SMTP_PORT=587
|
|
45
|
-
# SMTP_USER=noreply@yourdomain.com
|
|
46
|
-
# SMTP_PASS=smtp_password
|
|
47
|
-
|
|
48
|
-
# AWS/Cloud Storage (if using)
|
|
49
|
-
# AWS_ACCESS_KEY_ID=your_access_key
|
|
50
|
-
# AWS_SECRET_ACCESS_KEY=your_secret_key
|
|
51
|
-
# AWS_REGION=us-east-1
|
|
52
|
-
# S3_BUCKET=your-bucket-name
|
|
53
|
-
|
|
54
|
-
# Analytics/Monitoring
|
|
55
|
-
# SENTRY_DSN=your_sentry_dsn
|
|
56
|
-
# GOOGLE_ANALYTICS_ID=your_ga_id
|
|
File without changes
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
# Multi-stage Dockerfile for Idealyst Workspace
|
|
2
|
-
# Supports web apps, API services, and can be used for staging/production
|
|
3
|
-
|
|
4
|
-
# Base stage with Node.js and build tools
|
|
5
|
-
FROM node:20-bullseye-slim AS base
|
|
6
|
-
RUN apt-get update && apt-get install -y \
|
|
7
|
-
libc6-dev \
|
|
8
|
-
git \
|
|
9
|
-
&& rm -rf /var/lib/apt/lists/*
|
|
10
|
-
WORKDIR /app
|
|
11
|
-
|
|
12
|
-
# Enable corepack for yarn
|
|
13
|
-
RUN corepack enable
|
|
14
|
-
|
|
15
|
-
# Dependencies stage - install all dependencies
|
|
16
|
-
FROM base AS deps
|
|
17
|
-
COPY package.json yarn.lock .yarnrc.yml ./
|
|
18
|
-
COPY .yarn .yarn
|
|
19
|
-
|
|
20
|
-
# Create packages directory structure and copy package.json files
|
|
21
|
-
RUN mkdir -p packages/api packages/app packages/components packages/web
|
|
22
|
-
COPY packages/api/package.json ./packages/api/
|
|
23
|
-
COPY packages/app/package.json ./packages/app/
|
|
24
|
-
COPY packages/components/package.json ./packages/components/
|
|
25
|
-
COPY packages/web/package.json ./packages/web/
|
|
26
|
-
|
|
27
|
-
RUN yarn install
|
|
28
|
-
|
|
29
|
-
# Build stage - build all packages
|
|
30
|
-
FROM base AS builder
|
|
31
|
-
COPY --from=deps /app/node_modules ./node_modules
|
|
32
|
-
COPY . .
|
|
33
|
-
|
|
34
|
-
# Build all packages
|
|
35
|
-
RUN yarn build:all
|
|
36
|
-
|
|
37
|
-
# Production API stage
|
|
38
|
-
FROM base AS api-runner
|
|
39
|
-
RUN addgroup --system --gid 1001 nodejs
|
|
40
|
-
RUN adduser --system --uid 1001 apiuser
|
|
41
|
-
|
|
42
|
-
# Copy built API and dependencies
|
|
43
|
-
COPY --from=builder /app/packages/*/dist ./packages/
|
|
44
|
-
COPY --from=builder /app/node_modules ./node_modules
|
|
45
|
-
COPY --from=builder /app/package.json ./
|
|
46
|
-
|
|
47
|
-
USER apiuser
|
|
48
|
-
EXPOSE 3000
|
|
49
|
-
ENV NODE_ENV=production
|
|
50
|
-
ENV PORT=3000
|
|
51
|
-
|
|
52
|
-
# Health check for API
|
|
53
|
-
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
54
|
-
CMD node -e "require('http').get('http://localhost:3000/health', (res) => { process.exit(res.statusCode === 200 ? 0 : 1) })"
|
|
55
|
-
|
|
56
|
-
CMD ["node", "packages/api/dist/server.js"]
|
|
57
|
-
|
|
58
|
-
# Production Web stage
|
|
59
|
-
FROM nginx:alpine AS web-runner
|
|
60
|
-
COPY --from=builder /app/packages/web/dist /usr/share/nginx/html
|
|
61
|
-
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
|
62
|
-
|
|
63
|
-
EXPOSE 80
|
|
64
|
-
CMD ["nginx", "-g", "daemon off;"]
|
|
65
|
-
|
|
66
|
-
# Development stage - for use with dev containers
|
|
67
|
-
FROM base AS dev
|
|
68
|
-
|
|
69
|
-
# Install additional tools for development
|
|
70
|
-
RUN apt-get update && apt-get install -y \
|
|
71
|
-
sudo \
|
|
72
|
-
postgresql-client \
|
|
73
|
-
&& rm -rf /var/lib/apt/lists/*
|
|
74
|
-
|
|
75
|
-
# Create dev user with proper permissions
|
|
76
|
-
RUN groupadd --gid 1000 devuser \
|
|
77
|
-
&& useradd --uid 1000 --gid devuser --shell /bin/bash --create-home devuser \
|
|
78
|
-
&& echo 'devuser ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
79
|
-
|
|
80
|
-
# Set up workspace directory with proper ownership
|
|
81
|
-
RUN mkdir -p /app && chown -R devuser:devuser /app
|
|
82
|
-
|
|
83
|
-
# Switch to dev user for remaining setup
|
|
84
|
-
USER devuser
|
|
85
|
-
WORKDIR /app
|
|
86
|
-
|
|
87
|
-
# Copy package files
|
|
88
|
-
COPY --chown=devuser:devuser package.json yarn.lock .yarnrc.yml ./
|
|
89
|
-
COPY --chown=devuser:devuser .yarn .yarn
|
|
90
|
-
|
|
91
|
-
# Create packages directory structure and copy package.json files
|
|
92
|
-
RUN mkdir -p packages/api packages/app packages/components packages/web
|
|
93
|
-
COPY --chown=devuser:devuser packages/api/package.json ./packages/api/
|
|
94
|
-
COPY --chown=devuser:devuser packages/app/package.json ./packages/app/
|
|
95
|
-
COPY --chown=devuser:devuser packages/components/package.json ./packages/components/
|
|
96
|
-
COPY --chown=devuser:devuser packages/web/package.json ./packages/web/
|
|
97
|
-
|
|
98
|
-
# Install dependencies including dev dependencies
|
|
99
|
-
RUN yarn install
|
|
100
|
-
|
|
101
|
-
EXPOSE 3000 5173 1 19006
|
|
102
|
-
|
|
103
|
-
CMD ["tail", "-f", "/dev/null"]
|
|
104
|
-
|
|
105
|
-
# Test runner stage
|
|
106
|
-
FROM base AS test-runner
|
|
107
|
-
COPY --from=deps /app/node_modules ./node_modules
|
|
108
|
-
COPY . .
|
|
109
|
-
|
|
110
|
-
# Run tests
|
|
111
|
-
CMD ["yarn", "test:ci"]
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# {{projectName}}
|
|
2
|
-
|
|
3
|
-
{{description}}
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
This workspace contains your Idealyst Framework packages and applications.
|
|
8
|
-
|
|
9
|
-
### Structure
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
{{projectName}}/
|
|
13
|
-
├── packages/ # Shared packages
|
|
14
|
-
│ ├── theme/ # Theme configuration
|
|
15
|
-
│ ├── components/ # UI components
|
|
16
|
-
│ └── utils/ # Shared utilities
|
|
17
|
-
├── mobile-app/ # React Native app (generated)
|
|
18
|
-
├── web-app/ # React web app (generated)
|
|
19
|
-
└── shared-lib/ # Shared library (generated)
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Testing
|
|
23
|
-
|
|
24
|
-
This workspace is pre-configured with Jest testing framework across all packages. Each package includes sample tests and Jest configuration.
|
|
25
|
-
|
|
26
|
-
### Quick Start
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
# Run all tests across all packages
|
|
30
|
-
yarn test
|
|
31
|
-
|
|
32
|
-
# Run tests in watch mode
|
|
33
|
-
yarn test:watch
|
|
34
|
-
|
|
35
|
-
# Run tests with coverage reports
|
|
36
|
-
yarn test:coverage
|
|
37
|
-
|
|
38
|
-
# Run tests in CI mode (for automated builds)
|
|
39
|
-
yarn test:ci
|
|
40
|
-
|
|
41
|
-
# Run tests for a specific package
|
|
42
|
-
node scripts/test-runner.js test:package <package-name>
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Test Structure
|
|
46
|
-
|
|
47
|
-
Each package contains:
|
|
48
|
-
- `jest.config.js` - Jest configuration tailored to the project type
|
|
49
|
-
- `__tests__/` - Directory for test files with comprehensive examples
|
|
50
|
-
- Sample tests demonstrating testing patterns specific to each template
|
|
51
|
-
|
|
52
|
-
### Package-Specific Testing
|
|
53
|
-
|
|
54
|
-
- **API packages**: Node.js environment, async/database testing patterns
|
|
55
|
-
- **Web packages**: React Testing Library, DOM testing, user interactions
|
|
56
|
-
- **Native packages**: React Native Testing Library, component rendering
|
|
57
|
-
- **Shared packages**: TypeScript utility testing patterns
|
|
58
|
-
|
|
59
|
-
### Adding Tests
|
|
60
|
-
|
|
61
|
-
1. Create test files in the `__tests__` directory or alongside your source files with `.test.ts` or `.spec.ts` extension
|
|
62
|
-
2. Tests are automatically discovered and run by Jest
|
|
63
|
-
3. Each template includes comprehensive sample tests as starting points
|
|
64
|
-
4. See the Component Testing Guide for detailed patterns and best practices
|
|
65
|
-
|
|
66
|
-
### Development
|
|
67
|
-
|
|
68
|
-
Install dependencies:
|
|
69
|
-
```bash
|
|
70
|
-
yarn install
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Build all packages:
|
|
74
|
-
```bash
|
|
75
|
-
yarn build:all
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Test all packages:
|
|
79
|
-
```bash
|
|
80
|
-
yarn test:all
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### Adding Applications
|
|
84
|
-
|
|
85
|
-
Generate a new React Native app:
|
|
86
|
-
```bash
|
|
87
|
-
idealyst create mobile-app --type native
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Generate a new React web app:
|
|
91
|
-
```bash
|
|
92
|
-
idealyst create web-app --type web
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Generate a new shared library:
|
|
96
|
-
```bash
|
|
97
|
-
idealyst create shared-lib --type shared
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**Note:** The CLI will automatically add new projects to the workspace configuration when run from the workspace root.
|
|
101
|
-
|
|
102
|
-
### Publishing
|
|
103
|
-
|
|
104
|
-
Publish all packages:
|
|
105
|
-
```bash
|
|
106
|
-
yarn publish:all
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### Version Management
|
|
110
|
-
|
|
111
|
-
Update patch version for all packages:
|
|
112
|
-
```bash
|
|
113
|
-
yarn version:patch
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
Update minor version for all packages:
|
|
117
|
-
```bash
|
|
118
|
-
yarn version:minor
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
Update major version for all packages:
|
|
122
|
-
```bash
|
|
123
|
-
yarn version:major
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Docker & Containerization
|
|
127
|
-
|
|
128
|
-
This workspace includes comprehensive Docker support for development, staging, and production environments.
|
|
129
|
-
|
|
130
|
-
### Quick Start with Docker
|
|
131
|
-
|
|
132
|
-
```bash
|
|
133
|
-
# Use the Docker build helper (recommended)
|
|
134
|
-
./scripts/docker-build.sh dev
|
|
135
|
-
|
|
136
|
-
# Or manually:
|
|
137
|
-
# Development environment
|
|
138
|
-
cp .env.example .env
|
|
139
|
-
./scripts/docker/deploy.sh development
|
|
140
|
-
|
|
141
|
-
# Production deployment
|
|
142
|
-
cp .env.production .env
|
|
143
|
-
# Edit .env with your settings
|
|
144
|
-
./scripts/docker/deploy.sh production
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
**Docker Build Helper**: The `./scripts/docker-build.sh` script automatically handles common issues like missing yarn.lock files and environment configuration.
|
|
148
|
-
|
|
149
|
-
### VS Code Dev Container
|
|
150
|
-
|
|
151
|
-
Open this workspace in VS Code and select "Reopen in Container" for a fully configured development environment with:
|
|
152
|
-
- Node.js, TypeScript, and all development tools pre-installed
|
|
153
|
-
- PostgreSQL and Redis databases ready to use
|
|
154
|
-
- Automatic port forwarding and extension installation
|
|
155
|
-
- Hot reload and debugging support
|
|
156
|
-
|
|
157
|
-
### Services Available
|
|
158
|
-
|
|
159
|
-
- **Web App**: React application with hot reload
|
|
160
|
-
- **API Server**: Backend with database connections
|
|
161
|
-
- **PostgreSQL**: Database with initialization scripts
|
|
162
|
-
- **Redis**: Caching and session storage
|
|
163
|
-
- **Nginx**: Reverse proxy and load balancer (production)
|
|
164
|
-
|
|
165
|
-
### Management Scripts
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
# Deployment
|
|
169
|
-
./scripts/docker/deploy.sh [development|production|staging]
|
|
170
|
-
|
|
171
|
-
# Database management
|
|
172
|
-
./scripts/docker/db-backup.sh [backup|restore|list|clean]
|
|
173
|
-
|
|
174
|
-
# View status
|
|
175
|
-
./scripts/docker/deploy.sh status
|
|
176
|
-
|
|
177
|
-
# View logs
|
|
178
|
-
./scripts/docker/deploy.sh logs
|
|
179
|
-
```
|