boiling-fullstack 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +140 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +313 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +33 -0
- package/dist/scaffolder.d.ts +2 -0
- package/dist/scaffolder.js +89 -0
- package/dist/types.d.ts +28 -0
- package/dist/types.js +2 -0
- package/dist/utils/shell.d.ts +6 -0
- package/dist/utils/shell.js +53 -0
- package/dist/utils/template.d.ts +2 -0
- package/dist/utils/template.js +51 -0
- package/dist/utils/validation.d.ts +6 -0
- package/dist/utils/validation.js +59 -0
- package/package.json +40 -0
- package/templates/backend/nestjs/.dockerignore +3 -0
- package/templates/backend/nestjs/.eslintrc.cjs.ejs +19 -0
- package/templates/backend/nestjs/.prettierrc +6 -0
- package/templates/backend/nestjs/Dockerfile +44 -0
- package/templates/backend/nestjs/nest-cli.json +8 -0
- package/templates/backend/nestjs/package.json.ejs +52 -0
- package/templates/backend/nestjs/src/app.controller.ts +17 -0
- package/templates/backend/nestjs/src/app.module.ts.ejs +20 -0
- package/templates/backend/nestjs/src/app.service.ts +4 -0
- package/templates/backend/nestjs/src/auth/auth.controller.ts +19 -0
- package/templates/backend/nestjs/src/auth/auth.guard.ts +5 -0
- package/templates/backend/nestjs/src/auth/auth.module.ts +28 -0
- package/templates/backend/nestjs/src/auth/auth.service.ts +50 -0
- package/templates/backend/nestjs/src/auth/dto/login.dto.ts +10 -0
- package/templates/backend/nestjs/src/auth/dto/register.dto.ts +10 -0
- package/templates/backend/nestjs/src/auth/entities/user.entity.ts +25 -0
- package/templates/backend/nestjs/src/auth/jwt.strategy.ts +19 -0
- package/templates/backend/nestjs/src/config/data-source.ts +9 -0
- package/templates/backend/nestjs/src/config/typeorm.config.ts.ejs +8 -0
- package/templates/backend/nestjs/src/main.ts.ejs +20 -0
- package/templates/backend/nestjs/src/migrations/.gitkeep +0 -0
- package/templates/backend/nestjs/tsconfig.build.json +4 -0
- package/templates/backend/nestjs/tsconfig.json +21 -0
- package/templates/frontend/nuxt/.dockerignore +5 -0
- package/templates/frontend/nuxt/.eslintrc.cjs.ejs +5 -0
- package/templates/frontend/nuxt/.prettierrc +6 -0
- package/templates/frontend/nuxt/Dockerfile +38 -0
- package/templates/frontend/nuxt/app/app.vue +3 -0
- package/templates/frontend/nuxt/app/pages/index.vue.ejs +25 -0
- package/templates/frontend/nuxt/nuxt.config.ts.ejs +19 -0
- package/templates/frontend/nuxt/package.json.ejs +25 -0
- package/templates/frontend/nuxt/tsconfig.json +3 -0
- package/templates/frontend/vue/.dockerignore +3 -0
- package/templates/frontend/vue/.eslintrc.cjs.ejs +14 -0
- package/templates/frontend/vue/.prettierrc +6 -0
- package/templates/frontend/vue/Dockerfile +33 -0
- package/templates/frontend/vue/index.html.ejs +13 -0
- package/templates/frontend/vue/package.json.ejs +28 -0
- package/templates/frontend/vue/src/App.vue.ejs +22 -0
- package/templates/frontend/vue/src/main.ts +4 -0
- package/templates/frontend/vue/src/vite-env.d.ts +1 -0
- package/templates/frontend/vue/tsconfig.json +20 -0
- package/templates/frontend/vue/vite.config.ts.ejs +14 -0
- package/templates/root/.env.ejs +24 -0
- package/templates/root/.env.example.ejs +24 -0
- package/templates/root/.env.production.ejs +17 -0
- package/templates/root/Makefile.ejs +116 -0
- package/templates/root/README.md.ejs +158 -0
- package/templates/root/docker-compose.prod.yml.ejs +45 -0
- package/templates/root/docker-compose.yml.ejs +77 -0
- package/templates/root/gitignore +8 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
services:
|
|
2
|
+
postgres:
|
|
3
|
+
image: postgres:16-alpine
|
|
4
|
+
restart: always
|
|
5
|
+
environment:
|
|
6
|
+
POSTGRES_DB: ${DB_NAME}
|
|
7
|
+
POSTGRES_USER: ${DB_USER}
|
|
8
|
+
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
9
|
+
volumes:
|
|
10
|
+
- postgres_data:/var/lib/postgresql/data
|
|
11
|
+
|
|
12
|
+
backend:
|
|
13
|
+
build:
|
|
14
|
+
context: ./backend
|
|
15
|
+
target: production
|
|
16
|
+
restart: always
|
|
17
|
+
ports:
|
|
18
|
+
- '${BACKEND_PORT}:3001'
|
|
19
|
+
environment:
|
|
20
|
+
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}
|
|
21
|
+
- JWT_SECRET=${JWT_SECRET}
|
|
22
|
+
- NODE_ENV=production
|
|
23
|
+
depends_on:
|
|
24
|
+
- postgres
|
|
25
|
+
<%_ for (const fe of frontends) { -%>
|
|
26
|
+
|
|
27
|
+
<%= fe.name %>:
|
|
28
|
+
build:
|
|
29
|
+
context: ./<%= fe.name %>
|
|
30
|
+
target: production
|
|
31
|
+
restart: always
|
|
32
|
+
ports:
|
|
33
|
+
<%_ if (fe.framework === 'nuxt') { -%>
|
|
34
|
+
- '<%= fe.port %>:3000'
|
|
35
|
+
<%_ } else { -%>
|
|
36
|
+
- '<%= fe.port %>:80'
|
|
37
|
+
<%_ } -%>
|
|
38
|
+
environment:
|
|
39
|
+
- API_URL=http://backend:3001
|
|
40
|
+
depends_on:
|
|
41
|
+
- backend
|
|
42
|
+
<%_ } -%>
|
|
43
|
+
|
|
44
|
+
volumes:
|
|
45
|
+
postgres_data:
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
services:
|
|
2
|
+
postgres:
|
|
3
|
+
image: postgres:16-alpine
|
|
4
|
+
restart: unless-stopped
|
|
5
|
+
environment:
|
|
6
|
+
POSTGRES_DB: ${DB_NAME}
|
|
7
|
+
POSTGRES_USER: ${DB_USER}
|
|
8
|
+
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
|
9
|
+
ports:
|
|
10
|
+
- '5432:5432'
|
|
11
|
+
volumes:
|
|
12
|
+
- postgres_data:/var/lib/postgresql/data
|
|
13
|
+
|
|
14
|
+
backend:
|
|
15
|
+
build:
|
|
16
|
+
context: ./backend
|
|
17
|
+
target: development
|
|
18
|
+
restart: unless-stopped
|
|
19
|
+
ports:
|
|
20
|
+
- '${BACKEND_PORT}:3001'
|
|
21
|
+
environment:
|
|
22
|
+
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@postgres:5432/${DB_NAME}
|
|
23
|
+
- JWT_SECRET=${JWT_SECRET}
|
|
24
|
+
- NODE_ENV=development
|
|
25
|
+
volumes:
|
|
26
|
+
- ./backend:/app
|
|
27
|
+
- /app/node_modules
|
|
28
|
+
depends_on:
|
|
29
|
+
- postgres
|
|
30
|
+
<%_ for (const fe of frontends) { -%>
|
|
31
|
+
|
|
32
|
+
<%= fe.name %>:
|
|
33
|
+
build:
|
|
34
|
+
context: ./<%= fe.name %>
|
|
35
|
+
target: development
|
|
36
|
+
restart: unless-stopped
|
|
37
|
+
ports:
|
|
38
|
+
<%_ if (fe.framework === 'nuxt') { -%>
|
|
39
|
+
- '<%= fe.port %>:3000'
|
|
40
|
+
<%_ } else { -%>
|
|
41
|
+
- '<%= fe.port %>:5173'
|
|
42
|
+
<%_ } -%>
|
|
43
|
+
environment:
|
|
44
|
+
- API_URL=http://backend:3001
|
|
45
|
+
volumes:
|
|
46
|
+
- ./<%= fe.name %>:/app
|
|
47
|
+
- /app/node_modules
|
|
48
|
+
depends_on:
|
|
49
|
+
- backend
|
|
50
|
+
<%_ } -%>
|
|
51
|
+
<%_ if (dbAdmin && dbAdmin.tool === 'pgadmin') { -%>
|
|
52
|
+
|
|
53
|
+
pgadmin:
|
|
54
|
+
image: dpage/pgadmin4:latest
|
|
55
|
+
restart: unless-stopped
|
|
56
|
+
ports:
|
|
57
|
+
- '${PGADMIN_PORT}:80'
|
|
58
|
+
environment:
|
|
59
|
+
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL}
|
|
60
|
+
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
|
|
61
|
+
depends_on:
|
|
62
|
+
- postgres
|
|
63
|
+
<%_ } else if (dbAdmin && dbAdmin.tool === 'adminer') { -%>
|
|
64
|
+
|
|
65
|
+
adminer:
|
|
66
|
+
image: adminer:latest
|
|
67
|
+
restart: unless-stopped
|
|
68
|
+
ports:
|
|
69
|
+
- '${ADMINER_PORT}:8080'
|
|
70
|
+
environment:
|
|
71
|
+
ADMINER_DEFAULT_SERVER: postgres
|
|
72
|
+
depends_on:
|
|
73
|
+
- postgres
|
|
74
|
+
<%_ } -%>
|
|
75
|
+
|
|
76
|
+
volumes:
|
|
77
|
+
postgres_data:
|