kybernus 1.0.1 → 1.1.3

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 (300) hide show
  1. package/README.md +48 -263
  2. package/dist/cli/commands/init.d.ts.map +1 -1
  3. package/dist/cli/commands/init.js +5 -1
  4. package/dist/cli/commands/init.js.map +1 -1
  5. package/dist/cli/commands/upgrade.js +2 -2
  6. package/dist/cli/prompts/wizard.d.ts +14 -1
  7. package/dist/cli/prompts/wizard.d.ts.map +1 -1
  8. package/dist/cli/prompts/wizard.js +45 -9
  9. package/dist/cli/prompts/wizard.js.map +1 -1
  10. package/dist/core/generator/project.d.ts +8 -0
  11. package/dist/core/generator/project.d.ts.map +1 -1
  12. package/dist/core/generator/project.js +41 -2
  13. package/dist/core/generator/project.js.map +1 -1
  14. package/dist/core/templates/downloader.d.ts +32 -0
  15. package/dist/core/templates/downloader.d.ts.map +1 -0
  16. package/dist/core/templates/downloader.js +95 -0
  17. package/dist/core/templates/downloader.js.map +1 -0
  18. package/dist/models/config.d.ts +1 -0
  19. package/dist/models/config.d.ts.map +1 -1
  20. package/package.json +6 -2
  21. package/templates/java-spring/pro/clean/.github/workflows/ci-cd.yml.hbs +0 -88
  22. package/templates/java-spring/pro/clean/Dockerfile.hbs +0 -45
  23. package/templates/java-spring/pro/clean/README.md.hbs +0 -31
  24. package/templates/java-spring/pro/clean/docker-compose.yml.hbs +0 -18
  25. package/templates/java-spring/pro/clean/infra/main.tf.hbs +0 -83
  26. package/templates/java-spring/pro/clean/infra/modules/ecs/main.tf.hbs +0 -54
  27. package/templates/java-spring/pro/clean/infra/modules/rds/main.tf.hbs +0 -88
  28. package/templates/java-spring/pro/clean/infra/modules/vpc/main.tf.hbs +0 -107
  29. package/templates/java-spring/pro/clean/pom.xml.hbs +0 -130
  30. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/application/service/AuthService.java.hbs +0 -36
  31. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/domain/entity/User.java.hbs +0 -77
  32. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/domain/repository/UserRepository.java.hbs +0 -15
  33. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/domain/usecase/LoginUserUseCase.java.hbs +0 -36
  34. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/domain/usecase/RegisterUserUseCase.java.hbs +0 -46
  35. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/infrastructure/persistence/InMemoryUserRepository.java.hbs +0 -41
  36. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/infrastructure/security/SecurityAdapters.java.hbs +0 -53
  37. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/infrastructure/web/controller/AuthController.java.hbs +0 -41
  38. package/templates/java-spring/pro/clean/src/main/java/{{packagePath}}/{{projectNamePascalCase}}Application.java.hbs +0 -14
  39. package/templates/java-spring/pro/hexagonal/.github/workflows/ci-cd.yml.hbs +0 -88
  40. package/templates/java-spring/pro/hexagonal/Dockerfile.hbs +0 -45
  41. package/templates/java-spring/pro/hexagonal/README.md.hbs +0 -38
  42. package/templates/java-spring/pro/hexagonal/docker-compose.yml.hbs +0 -18
  43. package/templates/java-spring/pro/hexagonal/infra/main.tf.hbs +0 -83
  44. package/templates/java-spring/pro/hexagonal/infra/modules/ecs/main.tf.hbs +0 -54
  45. package/templates/java-spring/pro/hexagonal/infra/modules/rds/main.tf.hbs +0 -88
  46. package/templates/java-spring/pro/hexagonal/infra/modules/vpc/main.tf.hbs +0 -107
  47. package/templates/java-spring/pro/hexagonal/pom.xml.hbs +0 -130
  48. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/application/service/AuthService.java.hbs +0 -36
  49. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/domain/entity/User.java.hbs +0 -77
  50. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/domain/repository/UserRepository.java.hbs +0 -15
  51. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/domain/usecase/LoginUserUseCase.java.hbs +0 -36
  52. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/domain/usecase/RegisterUserUseCase.java.hbs +0 -46
  53. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/infrastructure/persistence/InMemoryUserRepository.java.hbs +0 -41
  54. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/infrastructure/security/SecurityAdapters.java.hbs +0 -53
  55. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/infrastructure/web/controller/AuthController.java.hbs +0 -41
  56. package/templates/java-spring/pro/hexagonal/src/main/java/{{packagePath}}/{{projectNamePascalCase}}Application.java.hbs +0 -14
  57. package/templates/java-spring/pro/mvc/.github/workflows/ci-cd.yml.hbs +0 -88
  58. package/templates/java-spring/pro/mvc/Dockerfile.hbs +0 -45
  59. package/templates/java-spring/pro/mvc/README.md.hbs +0 -116
  60. package/templates/java-spring/pro/mvc/docker-compose.yml.hbs +0 -18
  61. package/templates/java-spring/pro/mvc/infra/main.tf.hbs +0 -83
  62. package/templates/java-spring/pro/mvc/infra/modules/ecs/main.tf.hbs +0 -54
  63. package/templates/java-spring/pro/mvc/infra/modules/rds/main.tf.hbs +0 -88
  64. package/templates/java-spring/pro/mvc/infra/modules/vpc/main.tf.hbs +0 -107
  65. package/templates/java-spring/pro/mvc/pom.xml.hbs +0 -130
  66. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/config/GlobalExceptionHandler.java.hbs +0 -39
  67. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/config/SecurityConfig.java.hbs +0 -44
  68. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/config/WebConfig.java.hbs +0 -30
  69. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/controller/AuthController.java.hbs +0 -69
  70. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/controller/HealthController.java.hbs +0 -30
  71. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/controller/PaymentsController.java.hbs +0 -49
  72. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/dto/AuthRequest.java.hbs +0 -3
  73. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/dto/AuthResponse.java.hbs +0 -3
  74. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/model/.gitkeep +0 -0
  75. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/repository/.gitkeep +0 -0
  76. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/security/JwtAuthenticationFilter.java.hbs +0 -56
  77. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/security/JwtTokenProvider.java.hbs +0 -59
  78. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/service/.gitkeep +0 -0
  79. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/service/StripeService.java.hbs +0 -67
  80. package/templates/java-spring/pro/mvc/src/main/java/{{packagePath}}/{{projectNamePascalCase}}Application.java.hbs +0 -13
  81. package/templates/java-spring/pro/mvc/src/main/resources/application.yml.hbs +0 -32
  82. package/templates/java-spring/pro/mvc/src/test/java/{{packagePath}}/{{projectNamePascalCase}}ApplicationTests.java.hbs +0 -13
  83. package/templates/java-spring/pro/mvc/src/test/resources/application.yml.hbs +0 -10
  84. package/templates/java-spring/pro/mvc/template.json +0 -14
  85. package/templates/nestjs/free/mvc/README.md.hbs +0 -28
  86. package/templates/nestjs/free/mvc/package.json.hbs +0 -29
  87. package/templates/nestjs/free/mvc/src/app.module.ts.hbs +0 -13
  88. package/templates/nestjs/free/mvc/src/controllers/health.controller.ts.hbs +0 -9
  89. package/templates/nestjs/free/mvc/src/controllers/items.controller.ts.hbs +0 -32
  90. package/templates/nestjs/free/mvc/src/main.ts.hbs +0 -17
  91. package/templates/nestjs/free/mvc/src/models/create-item.dto.ts.hbs +0 -10
  92. package/templates/nestjs/free/mvc/src/models/item.model.ts.hbs +0 -6
  93. package/templates/nestjs/free/mvc/src/modules/items.module.ts.hbs +0 -9
  94. package/templates/nestjs/free/mvc/src/services/items.service.ts.hbs +0 -32
  95. package/templates/nestjs/free/mvc/tsconfig.json.hbs +0 -21
  96. package/templates/nestjs/pro/clean/.env.example.hbs +0 -19
  97. package/templates/nestjs/pro/clean/.github/workflows/ci-cd.yml.hbs +0 -88
  98. package/templates/nestjs/pro/clean/Dockerfile.hbs +0 -45
  99. package/templates/nestjs/pro/clean/infra/main.tf.hbs +0 -83
  100. package/templates/nestjs/pro/clean/infra/modules/ecs/main.tf.hbs +0 -54
  101. package/templates/nestjs/pro/clean/infra/modules/rds/main.tf.hbs +0 -88
  102. package/templates/nestjs/pro/clean/infra/modules/vpc/main.tf.hbs +0 -107
  103. package/templates/nestjs/pro/clean/package.json.hbs +0 -37
  104. package/templates/nestjs/pro/clean/src/auth.module.ts.hbs +0 -17
  105. package/templates/nestjs/pro/clean/src/domain/entities/user.entity.ts.hbs +0 -12
  106. package/templates/nestjs/pro/clean/src/domain/repositories/user.repository.ts.hbs +0 -6
  107. package/templates/nestjs/pro/clean/src/domain/use-cases/register.use-case.ts.hbs +0 -18
  108. package/templates/nestjs/pro/clean/src/infrastructure/database/in-memory.repository.ts.hbs +0 -17
  109. package/templates/nestjs/pro/clean/src/infrastructure/http/auth.controller.ts.hbs +0 -16
  110. package/templates/nestjs/pro/clean/tsconfig.json.hbs +0 -21
  111. package/templates/nestjs/pro/hexagonal/.env.example.hbs +0 -19
  112. package/templates/nestjs/pro/hexagonal/.github/workflows/ci-cd.yml.hbs +0 -88
  113. package/templates/nestjs/pro/hexagonal/Dockerfile.hbs +0 -45
  114. package/templates/nestjs/pro/hexagonal/infra/main.tf.hbs +0 -83
  115. package/templates/nestjs/pro/hexagonal/infra/modules/ecs/main.tf.hbs +0 -54
  116. package/templates/nestjs/pro/hexagonal/infra/modules/rds/main.tf.hbs +0 -88
  117. package/templates/nestjs/pro/hexagonal/infra/modules/vpc/main.tf.hbs +0 -107
  118. package/templates/nestjs/pro/hexagonal/package.json.hbs +0 -37
  119. package/templates/nestjs/pro/hexagonal/src/adapters/inbound/http.adapter.ts.hbs +0 -12
  120. package/templates/nestjs/pro/hexagonal/src/adapters/outbound/persistence.adapter.ts.hbs +0 -13
  121. package/templates/nestjs/pro/hexagonal/src/auth.module.ts.hbs +0 -19
  122. package/templates/nestjs/pro/hexagonal/src/core/auth.service.ts.hbs +0 -16
  123. package/templates/nestjs/pro/hexagonal/src/core/domain/user.entity.ts.hbs +0 -8
  124. package/templates/nestjs/pro/hexagonal/src/core/ports/ports.ts.hbs +0 -9
  125. package/templates/nestjs/pro/hexagonal/tsconfig.json.hbs +0 -21
  126. package/templates/nestjs/pro/mvc/.env.example.hbs +0 -19
  127. package/templates/nestjs/pro/mvc/.github/workflows/ci-cd.yml.hbs +0 -88
  128. package/templates/nestjs/pro/mvc/Dockerfile.hbs +0 -45
  129. package/templates/nestjs/pro/mvc/README.md.hbs +0 -28
  130. package/templates/nestjs/pro/mvc/infra/main.tf.hbs +0 -83
  131. package/templates/nestjs/pro/mvc/infra/modules/ecs/main.tf.hbs +0 -54
  132. package/templates/nestjs/pro/mvc/infra/modules/rds/main.tf.hbs +0 -88
  133. package/templates/nestjs/pro/mvc/infra/modules/vpc/main.tf.hbs +0 -107
  134. package/templates/nestjs/pro/mvc/package.json.hbs +0 -37
  135. package/templates/nestjs/pro/mvc/src/app.module.ts.hbs +0 -17
  136. package/templates/nestjs/pro/mvc/src/auth/auth.controller.ts.hbs +0 -35
  137. package/templates/nestjs/pro/mvc/src/auth/auth.module.ts.hbs +0 -25
  138. package/templates/nestjs/pro/mvc/src/auth/auth.service.ts.hbs +0 -55
  139. package/templates/nestjs/pro/mvc/src/auth/jwt.strategy.ts.hbs +0 -19
  140. package/templates/nestjs/pro/mvc/src/controllers/health.controller.ts.hbs +0 -9
  141. package/templates/nestjs/pro/mvc/src/controllers/items.controller.ts.hbs +0 -32
  142. package/templates/nestjs/pro/mvc/src/main.ts.hbs +0 -17
  143. package/templates/nestjs/pro/mvc/src/models/create-item.dto.ts.hbs +0 -10
  144. package/templates/nestjs/pro/mvc/src/models/item.model.ts.hbs +0 -6
  145. package/templates/nestjs/pro/mvc/src/modules/items.module.ts.hbs +0 -9
  146. package/templates/nestjs/pro/mvc/src/payments/payments.controller.ts.hbs +0 -26
  147. package/templates/nestjs/pro/mvc/src/payments/payments.module.ts.hbs +0 -11
  148. package/templates/nestjs/pro/mvc/src/payments/payments.service.ts.hbs +0 -43
  149. package/templates/nestjs/pro/mvc/src/services/items.service.ts.hbs +0 -32
  150. package/templates/nestjs/pro/mvc/tsconfig.json.hbs +0 -21
  151. package/templates/nextjs/pro/default/.env.example.hbs +0 -20
  152. package/templates/nextjs/pro/default/.github/workflows/ci-cd.yml.hbs +0 -88
  153. package/templates/nextjs/pro/default/Dockerfile.hbs +0 -45
  154. package/templates/nextjs/pro/default/README.md.hbs +0 -96
  155. package/templates/nextjs/pro/default/docker-compose.yml.hbs +0 -18
  156. package/templates/nextjs/pro/default/infra/main.tf.hbs +0 -83
  157. package/templates/nextjs/pro/default/infra/modules/ecs/main.tf.hbs +0 -54
  158. package/templates/nextjs/pro/default/infra/modules/rds/main.tf.hbs +0 -88
  159. package/templates/nextjs/pro/default/infra/modules/vpc/main.tf.hbs +0 -107
  160. package/templates/nextjs/pro/default/next.config.js.hbs +0 -4
  161. package/templates/nextjs/pro/default/package.json.hbs +0 -34
  162. package/templates/nextjs/pro/default/postcss.config.js.hbs +0 -6
  163. package/templates/nextjs/pro/default/prisma/schema.prisma.hbs +0 -18
  164. package/templates/nextjs/pro/default/public/.gitkeep +0 -0
  165. package/templates/nextjs/pro/default/src/app/api/auth/[...nextauth]/route.ts.hbs +0 -61
  166. package/templates/nextjs/pro/default/src/app/api/checkout/route.ts.hbs +0 -30
  167. package/templates/nextjs/pro/default/src/app/api/health/route.ts.hbs +0 -9
  168. package/templates/nextjs/pro/default/src/app/api/webhook/route.ts.hbs +0 -51
  169. package/templates/nextjs/pro/default/src/app/dashboard/page.tsx.hbs +0 -52
  170. package/templates/nextjs/pro/default/src/app/globals.css.hbs +0 -3
  171. package/templates/nextjs/pro/default/src/app/layout.tsx.hbs +0 -22
  172. package/templates/nextjs/pro/default/src/app/page.tsx.hbs +0 -38
  173. package/templates/nextjs/pro/default/src/components/.gitkeep +0 -0
  174. package/templates/nextjs/pro/default/src/components/AuthButton.tsx.hbs +0 -34
  175. package/templates/nextjs/pro/default/src/components/Providers.tsx.hbs +0 -7
  176. package/templates/nextjs/pro/default/src/lib/prisma.ts.hbs +0 -13
  177. package/templates/nextjs/pro/default/src/proxy.ts.hbs +0 -22
  178. package/templates/nextjs/pro/default/tailwind.config.ts.hbs +0 -15
  179. package/templates/nextjs/pro/default/template.json +0 -18
  180. package/templates/nextjs/pro/default/tsconfig.json.hbs +0 -40
  181. package/templates/nodejs-express/pro/clean/.env.example.hbs +0 -19
  182. package/templates/nodejs-express/pro/clean/.github/workflows/ci-cd.yml.hbs +0 -88
  183. package/templates/nodejs-express/pro/clean/Dockerfile.hbs +0 -45
  184. package/templates/nodejs-express/pro/clean/README.md.hbs +0 -41
  185. package/templates/nodejs-express/pro/clean/docker-compose.yml.hbs +0 -18
  186. package/templates/nodejs-express/pro/clean/infra/main.tf.hbs +0 -83
  187. package/templates/nodejs-express/pro/clean/infra/modules/ecs/main.tf.hbs +0 -54
  188. package/templates/nodejs-express/pro/clean/infra/modules/rds/main.tf.hbs +0 -88
  189. package/templates/nodejs-express/pro/clean/infra/modules/vpc/main.tf.hbs +0 -107
  190. package/templates/nodejs-express/pro/clean/package.json.hbs +0 -55
  191. package/templates/nodejs-express/pro/clean/src/application/services/AuthService.ts.hbs +0 -66
  192. package/templates/nodejs-express/pro/clean/src/domain/entities/User.ts.hbs +0 -38
  193. package/templates/nodejs-express/pro/clean/src/domain/repositories/IUserRepository.ts.hbs +0 -13
  194. package/templates/nodejs-express/pro/clean/src/domain/usecases/LoginUserUseCase.ts.hbs +0 -39
  195. package/templates/nodejs-express/pro/clean/src/domain/usecases/RegisterUserUseCase.ts.hbs +0 -51
  196. package/templates/nodejs-express/pro/clean/src/index.ts.hbs +0 -40
  197. package/templates/nodejs-express/pro/clean/src/infrastructure/database/InMemoryUserRepository.ts.hbs +0 -46
  198. package/templates/nodejs-express/pro/clean/src/infrastructure/http/controllers/AuthController.ts.hbs +0 -45
  199. package/templates/nodejs-express/pro/clean/src/infrastructure/http/middlewares/AuthMiddleware.ts.hbs +0 -27
  200. package/templates/nodejs-express/pro/clean/src/infrastructure/providers/PasswordHasher.ts.hbs +0 -14
  201. package/templates/nodejs-express/pro/clean/src/infrastructure/providers/TokenGenerator.ts.hbs +0 -25
  202. package/templates/nodejs-express/pro/clean/tsconfig.json.hbs +0 -27
  203. package/templates/nodejs-express/pro/hexagonal/.env.example.hbs +0 -19
  204. package/templates/nodejs-express/pro/hexagonal/.github/workflows/ci-cd.yml.hbs +0 -88
  205. package/templates/nodejs-express/pro/hexagonal/Dockerfile.hbs +0 -45
  206. package/templates/nodejs-express/pro/hexagonal/README.md.hbs +0 -42
  207. package/templates/nodejs-express/pro/hexagonal/docker-compose.yml.hbs +0 -18
  208. package/templates/nodejs-express/pro/hexagonal/infra/main.tf.hbs +0 -83
  209. package/templates/nodejs-express/pro/hexagonal/infra/modules/ecs/main.tf.hbs +0 -54
  210. package/templates/nodejs-express/pro/hexagonal/infra/modules/rds/main.tf.hbs +0 -88
  211. package/templates/nodejs-express/pro/hexagonal/infra/modules/vpc/main.tf.hbs +0 -107
  212. package/templates/nodejs-express/pro/hexagonal/package.json.hbs +0 -55
  213. package/templates/nodejs-express/pro/hexagonal/src/adapters/inbound/http/AuthController.ts.hbs +0 -48
  214. package/templates/nodejs-express/pro/hexagonal/src/adapters/outbound/SecurityAdapters.ts.hbs +0 -31
  215. package/templates/nodejs-express/pro/hexagonal/src/adapters/outbound/persistence/InMemoryUserAdapter.ts.hbs +0 -38
  216. package/templates/nodejs-express/pro/hexagonal/src/core/AuthService.ts.hbs +0 -51
  217. package/templates/nodejs-express/pro/hexagonal/src/core/domain/entities/User.ts.hbs +0 -28
  218. package/templates/nodejs-express/pro/hexagonal/src/core/ports/inbound/IAuthPort.ts.hbs +0 -11
  219. package/templates/nodejs-express/pro/hexagonal/src/core/ports/outbound/ISecurityPorts.ts.hbs +0 -15
  220. package/templates/nodejs-express/pro/hexagonal/src/core/ports/outbound/IUserRepositoryPort.ts.hbs +0 -13
  221. package/templates/nodejs-express/pro/hexagonal/src/index.ts.hbs +0 -41
  222. package/templates/nodejs-express/pro/hexagonal/tsconfig.json.hbs +0 -27
  223. package/templates/nodejs-express/pro/mvc/.env.example.hbs +0 -19
  224. package/templates/nodejs-express/pro/mvc/.github/workflows/ci-cd.yml.hbs +0 -88
  225. package/templates/nodejs-express/pro/mvc/Dockerfile.hbs +0 -45
  226. package/templates/nodejs-express/pro/mvc/README.md.hbs +0 -85
  227. package/templates/nodejs-express/pro/mvc/docker-compose.yml.hbs +0 -18
  228. package/templates/nodejs-express/pro/mvc/infra/main.tf.hbs +0 -83
  229. package/templates/nodejs-express/pro/mvc/infra/modules/ecs/main.tf.hbs +0 -54
  230. package/templates/nodejs-express/pro/mvc/infra/modules/rds/main.tf.hbs +0 -88
  231. package/templates/nodejs-express/pro/mvc/infra/modules/vpc/main.tf.hbs +0 -107
  232. package/templates/nodejs-express/pro/mvc/package.json.hbs +0 -55
  233. package/templates/nodejs-express/pro/mvc/src/app.ts.hbs +0 -34
  234. package/templates/nodejs-express/pro/mvc/src/config/database.ts.hbs +0 -10
  235. package/templates/nodejs-express/pro/mvc/src/controllers/auth.controller.ts.hbs +0 -91
  236. package/templates/nodejs-express/pro/mvc/src/controllers/healthController.ts.hbs +0 -20
  237. package/templates/nodejs-express/pro/mvc/src/controllers/payments.controller.ts.hbs +0 -72
  238. package/templates/nodejs-express/pro/mvc/src/index.ts.hbs +0 -12
  239. package/templates/nodejs-express/pro/mvc/src/middleware/errorHandler.ts.hbs +0 -22
  240. package/templates/nodejs-express/pro/mvc/src/middlewares/auth.middleware.ts.hbs +0 -31
  241. package/templates/nodejs-express/pro/mvc/src/models/.gitkeep +0 -0
  242. package/templates/nodejs-express/pro/mvc/src/routes/index.ts.hbs +0 -14
  243. package/templates/nodejs-express/pro/mvc/src/services/.gitkeep +0 -0
  244. package/templates/nodejs-express/pro/mvc/src/services/stripe.service.ts.hbs +0 -102
  245. package/templates/nodejs-express/pro/mvc/template.json +0 -18
  246. package/templates/nodejs-express/pro/mvc/tsconfig.json.hbs +0 -27
  247. package/templates/python-fastapi/free/mvc/README.md.hbs +0 -41
  248. package/templates/python-fastapi/free/mvc/app/controllers/health.py.hbs +0 -7
  249. package/templates/python-fastapi/free/mvc/app/controllers/items.py.hbs +0 -27
  250. package/templates/python-fastapi/free/mvc/app/main.py.hbs +0 -26
  251. package/templates/python-fastapi/free/mvc/app/models/item.py.hbs +0 -11
  252. package/templates/python-fastapi/free/mvc/app/schemas/item.py.hbs +0 -17
  253. package/templates/python-fastapi/free/mvc/app/services/item_service.py.hbs +0 -33
  254. package/templates/python-fastapi/free/mvc/requirements.txt.hbs +0 -4
  255. package/templates/python-fastapi/pro/clean/.env.example.hbs +0 -17
  256. package/templates/python-fastapi/pro/clean/.github/workflows/ci-cd.yml.hbs +0 -88
  257. package/templates/python-fastapi/pro/clean/Dockerfile.hbs +0 -20
  258. package/templates/python-fastapi/pro/clean/app/domain/entities/user.py.hbs +0 -23
  259. package/templates/python-fastapi/pro/clean/app/domain/repositories/user_repository.py.hbs +0 -22
  260. package/templates/python-fastapi/pro/clean/app/domain/usecases/register_user.py.hbs +0 -30
  261. package/templates/python-fastapi/pro/clean/app/infrastructure/database/in_memory_repository.py.hbs +0 -26
  262. package/templates/python-fastapi/pro/clean/app/infrastructure/http/auth_controller.py.hbs +0 -26
  263. package/templates/python-fastapi/pro/clean/app/infrastructure/security/adapters.py.hbs +0 -23
  264. package/templates/python-fastapi/pro/clean/app/main.py.hbs +0 -10
  265. package/templates/python-fastapi/pro/clean/infra/main.tf.hbs +0 -83
  266. package/templates/python-fastapi/pro/clean/infra/modules/ecs/main.tf.hbs +0 -54
  267. package/templates/python-fastapi/pro/clean/infra/modules/rds/main.tf.hbs +0 -88
  268. package/templates/python-fastapi/pro/clean/infra/modules/vpc/main.tf.hbs +0 -107
  269. package/templates/python-fastapi/pro/clean/requirements.txt.hbs +0 -12
  270. package/templates/python-fastapi/pro/hexagonal/.env.example.hbs +0 -17
  271. package/templates/python-fastapi/pro/hexagonal/.github/workflows/ci-cd.yml.hbs +0 -88
  272. package/templates/python-fastapi/pro/hexagonal/Dockerfile.hbs +0 -20
  273. package/templates/python-fastapi/pro/hexagonal/app/adapters/inbound/http_adapter.py.hbs +0 -29
  274. package/templates/python-fastapi/pro/hexagonal/app/core/domain/user.py.hbs +0 -15
  275. package/templates/python-fastapi/pro/hexagonal/app/core/ports.py.hbs +0 -25
  276. package/templates/python-fastapi/pro/hexagonal/app/core/service.py.hbs +0 -28
  277. package/templates/python-fastapi/pro/hexagonal/app/main.py.hbs +0 -22
  278. package/templates/python-fastapi/pro/hexagonal/infra/main.tf.hbs +0 -83
  279. package/templates/python-fastapi/pro/hexagonal/infra/modules/ecs/main.tf.hbs +0 -54
  280. package/templates/python-fastapi/pro/hexagonal/infra/modules/rds/main.tf.hbs +0 -88
  281. package/templates/python-fastapi/pro/hexagonal/infra/modules/vpc/main.tf.hbs +0 -107
  282. package/templates/python-fastapi/pro/hexagonal/requirements.txt.hbs +0 -12
  283. package/templates/python-fastapi/pro/mvc/.env.example.hbs +0 -17
  284. package/templates/python-fastapi/pro/mvc/.github/workflows/ci-cd.yml.hbs +0 -88
  285. package/templates/python-fastapi/pro/mvc/Dockerfile.hbs +0 -20
  286. package/templates/python-fastapi/pro/mvc/README.md.hbs +0 -41
  287. package/templates/python-fastapi/pro/mvc/app/controllers/auth.py.hbs +0 -46
  288. package/templates/python-fastapi/pro/mvc/app/controllers/health.py.hbs +0 -7
  289. package/templates/python-fastapi/pro/mvc/app/controllers/items.py.hbs +0 -21
  290. package/templates/python-fastapi/pro/mvc/app/controllers/payments.py.hbs +0 -32
  291. package/templates/python-fastapi/pro/mvc/app/main.py.hbs +0 -20
  292. package/templates/python-fastapi/pro/mvc/app/middleware/security.py.hbs +0 -39
  293. package/templates/python-fastapi/pro/mvc/app/models/item.py.hbs +0 -11
  294. package/templates/python-fastapi/pro/mvc/app/schemas/item.py.hbs +0 -16
  295. package/templates/python-fastapi/pro/mvc/app/services/item_service.py.hbs +0 -24
  296. package/templates/python-fastapi/pro/mvc/infra/main.tf.hbs +0 -83
  297. package/templates/python-fastapi/pro/mvc/infra/modules/ecs/main.tf.hbs +0 -54
  298. package/templates/python-fastapi/pro/mvc/infra/modules/rds/main.tf.hbs +0 -88
  299. package/templates/python-fastapi/pro/mvc/infra/modules/vpc/main.tf.hbs +0 -107
  300. package/templates/python-fastapi/pro/mvc/requirements.txt.hbs +0 -12
@@ -1,55 +0,0 @@
1
- {
2
- "name": "{{kebabCase projectName}}",
3
- "version": "1.0.0",
4
- "description": "Generated by Kybernus CLI (Pro)",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "dev": "tsx watch src/index.ts",
8
- "build": "rimraf dist && tsc",
9
- "start": "node dist/index.js",
10
- "lint": "eslint src --ext .ts",
11
- "format": "prettier --write \"src/**/*.ts\"",
12
- "test": "jest"
13
- },
14
- "keywords": [
15
- "express",
16
- "api",
17
- "typescript",
18
- "mvc",
19
- "saas",
20
- "stripe",
21
- "auth"
22
- ],
23
- "author": "",
24
- "license": "MIT",
25
- "dependencies": {
26
- "express": "^4.18.2",
27
- "dotenv": "^16.4.5",
28
- "cors": "^2.8.5",
29
- "helmet": "^7.1.0",
30
- "morgan": "^1.10.0",
31
- "jsonwebtoken": "^9.0.2",
32
- "bcryptjs": "^2.4.3",
33
- "stripe": "^14.14.0"
34
- },
35
- "devDependencies": {
36
- "@types/express": "^4.17.21",
37
- "@types/node": "^20.11.19",
38
- "@types/cors": "^2.8.17",
39
- "@types/morgan": "^1.9.9",
40
- "@types/jsonwebtoken": "^9.0.5",
41
- "@types/bcryptjs": "^2.4.6",
42
- "typescript": "^5.3.3",
43
- "tsx": "^4.7.1",
44
- "rimraf": "^5.0.5",
45
- "eslint": "^8.56.0",
46
- "@typescript-eslint/eslint-plugin": "^6.21.0",
47
- "@typescript-eslint/parser": "^6.21.0",
48
- "prettier": "^3.2.5",
49
- "jest": "^29.7.0",
50
- "@types/jest": "^29.5.12"
51
- },
52
- "engines": {
53
- "node": ">=18.0.0"
54
- }
55
- }
@@ -1,48 +0,0 @@
1
- import { Router, Request, Response } from 'express';
2
- import { IAuthPort } from '../../../core/ports/inbound/IAuthPort';
3
-
4
- /**
5
- * HTTP Auth Controller - Inbound Adapter
6
- * Adapts HTTP requests to the application port
7
- */
8
- export function createAuthController(authService: IAuthPort): Router {
9
- const router = Router();
10
-
11
- router.post('/register', async (req: Request, res: Response) => {
12
- try {
13
- const { email, name, password } = req.body;
14
- const result = await authService.register(email, name, password);
15
- res.status(201).json({
16
- token: result.token,
17
- user: { id: result.user.id, email: result.user.email, name: result.user.name },
18
- });
19
- } catch (error: any) {
20
- res.status(400).json({ error: error.message });
21
- }
22
- });
23
-
24
- router.post('/login', async (req: Request, res: Response) => {
25
- try {
26
- const { email, password } = req.body;
27
- const result = await authService.login(email, password);
28
- res.json({
29
- token: result.token,
30
- user: { id: result.user.id, email: result.user.email, name: result.user.name },
31
- });
32
- } catch (error: any) {
33
- res.status(401).json({ error: error.message });
34
- }
35
- });
36
-
37
- router.get('/me', async (req: Request, res: Response) => {
38
- const token = req.headers.authorization?.split(' ')[1];
39
- if (!token) return res.status(401).json({ error: 'No token' });
40
-
41
- const user = await authService.validateToken(token);
42
- if (!user) return res.status(401).json({ error: 'Invalid token' });
43
-
44
- res.json({ user: { id: user.id, email: user.email, name: user.name } });
45
- });
46
-
47
- return router;
48
- }
@@ -1,31 +0,0 @@
1
- import bcrypt from 'bcryptjs';
2
- import jwt from 'jsonwebtoken';
3
- import { IPasswordHasherPort, ITokenGeneratorPort } from '../../../core/ports/outbound/ISecurityPorts';
4
-
5
- /**
6
- * Bcrypt Password Hasher Adapter
7
- */
8
- export const bcryptAdapter: IPasswordHasherPort = {
9
- async hash(password: string): Promise<string> {
10
- return bcrypt.hash(password, 10);
11
- },
12
- async compare(password: string, hash: string): Promise<boolean> {
13
- return bcrypt.compare(password, hash);
14
- },
15
- };
16
-
17
- /**
18
- * JWT Token Generator Adapter
19
- */
20
- export const jwtAdapter: ITokenGeneratorPort = {
21
- generate(userId: string, email: string): string {
22
- return jwt.sign({ id: userId, email }, process.env.JWT_SECRET || 'secret', { expiresIn: '7d' });
23
- },
24
- verify(token: string): { id: string; email: string } | null {
25
- try {
26
- return jwt.verify(token, process.env.JWT_SECRET || 'secret') as { id: string; email: string };
27
- } catch {
28
- return null;
29
- }
30
- },
31
- };
@@ -1,38 +0,0 @@
1
- import { User } from '../../core/domain/entities/User';
2
- import { IUserRepositoryPort } from '../../core/ports/outbound/IUserRepositoryPort';
3
-
4
- /**
5
- * In-Memory User Repository Adapter
6
- * Implements the outbound port
7
- */
8
- export class InMemoryUserAdapter implements IUserRepositoryPort {
9
- private users: Map<string, User> = new Map();
10
-
11
- async findById(id: string): Promise<User | null> {
12
- return this.users.get(id) || null;
13
- }
14
-
15
- async findByEmail(email: string): Promise<User | null> {
16
- for (const user of this.users.values()) {
17
- if (user.email === email) return user;
18
- }
19
- return null;
20
- }
21
-
22
- async save(user: User): Promise<User> {
23
- const id = Date.now().toString();
24
- const savedUser = user.withId(id);
25
- this.users.set(id, savedUser);
26
- return savedUser;
27
- }
28
-
29
- async update(user: User): Promise<User> {
30
- if (!user.id) throw new Error('User must have an ID');
31
- this.users.set(user.id, user);
32
- return user;
33
- }
34
-
35
- async delete(id: string): Promise<void> {
36
- this.users.delete(id);
37
- }
38
- }
@@ -1,51 +0,0 @@
1
- import { User } from '../domain/entities/User';
2
- import { IAuthPort } from '../ports/inbound/IAuthPort';
3
- import { IUserRepositoryPort } from '../ports/outbound/IUserRepositoryPort';
4
- import { IPasswordHasherPort, ITokenGeneratorPort } from '../ports/outbound/ISecurityPorts';
5
-
6
- /**
7
- * Auth Service - Application Core
8
- * Implements the inbound port using outbound ports
9
- */
10
- export class AuthService implements IAuthPort {
11
- constructor(
12
- private readonly userRepository: IUserRepositoryPort,
13
- private readonly passwordHasher: IPasswordHasherPort,
14
- private readonly tokenGenerator: ITokenGeneratorPort
15
- ) {}
16
-
17
- async register(email: string, name: string, password: string): Promise<{ user: User; token: string }> {
18
- const existingUser = await this.userRepository.findByEmail(email);
19
- if (existingUser) {
20
- throw new Error('User already exists');
21
- }
22
-
23
- const hashedPassword = await this.passwordHasher.hash(password);
24
- const user = new User(undefined, email, name, hashedPassword);
25
- const savedUser = await this.userRepository.save(user);
26
- const token = this.tokenGenerator.generate(savedUser.id!, savedUser.email);
27
-
28
- return { user: savedUser, token };
29
- }
30
-
31
- async login(email: string, password: string): Promise<{ user: User; token: string }> {
32
- const user = await this.userRepository.findByEmail(email);
33
- if (!user) {
34
- throw new Error('Invalid credentials');
35
- }
36
-
37
- const isValid = await this.passwordHasher.compare(password, user.password);
38
- if (!isValid) {
39
- throw new Error('Invalid credentials');
40
- }
41
-
42
- const token = this.tokenGenerator.generate(user.id!, user.email);
43
- return { user, token };
44
- }
45
-
46
- async validateToken(token: string): Promise<User | null> {
47
- const decoded = this.tokenGenerator.verify(token);
48
- if (!decoded) return null;
49
- return this.userRepository.findById(decoded.id);
50
- }
51
- }
@@ -1,28 +0,0 @@
1
- /**
2
- * User Entity - Core Domain
3
- * Hexagonal Architecture: This is the heart of the hexagon
4
- */
5
- export class User {
6
- constructor(
7
- public readonly id: string | undefined,
8
- public readonly email: string,
9
- public readonly name: string,
10
- public readonly password: string,
11
- public readonly stripeCustomerId?: string,
12
- public readonly createdAt: Date = new Date()
13
- ) {
14
- this.validateEmail(email);
15
- this.validatePassword(password);
16
- }
17
-
18
- private validateEmail(email: string): void {
19
- if (!email || !email.includes('@')) {
20
- throw new Error('Invalid email format');
21
- }
22
- }
23
-
24
- private validatePassword(password: string): void {
25
- if (!password || password.length < 8) { throw new Error('Password must be at least 8 characters'); } } withId(id:
26
- string): User { return new User(id, this.email, this.name, this.password, this.stripeCustomerId, this.createdAt); }
27
- withStripeCustomerId(customerId: string): User { return new User(this.id, this.email, this.name, this.password,
28
- customerId, this.createdAt); } }
@@ -1,11 +0,0 @@
1
- import { User } from '../../domain/entities/User';
2
-
3
- /**
4
- * Auth Port - Inbound (Driving) Port
5
- * Defines what the application CAN DO (use cases)
6
- */
7
- export interface IAuthPort {
8
- register(email: string, name: string, password: string): Promise<{ user: User; token: string }>;
9
- login(email: string, password: string): Promise<{ user: User; token: string }>;
10
- validateToken(token: string): Promise<User | null>;
11
- }
@@ -1,15 +0,0 @@
1
- /**
2
- * Password Hasher Port - Outbound Port
3
- */
4
- export interface IPasswordHasherPort {
5
- hash(password: string): Promise<string>;
6
- compare(password: string, hash: string): Promise<boolean>;
7
- }
8
-
9
- /**
10
- * Token Generator Port - Outbound Port
11
- */
12
- export interface ITokenGeneratorPort {
13
- generate(userId: string, email: string): string;
14
- verify(token: string): { id: string; email: string } | null;
15
- }
@@ -1,13 +0,0 @@
1
- import { User } from '../../domain/entities/User';
2
-
3
- /**
4
- * User Repository Port - Outbound (Driven) Port
5
- * Defines what the application NEEDS from the outside world
6
- */
7
- export interface IUserRepositoryPort {
8
- findById(id: string): Promise<User | null>;
9
- findByEmail(email: string): Promise<User | null>;
10
- save(user: User): Promise<User>;
11
- update(user: User): Promise<User>;
12
- delete(id: string): Promise<void>;
13
- }
@@ -1,41 +0,0 @@
1
- import express from 'express';
2
- import cors from 'cors';
3
- import helmet from 'helmet';
4
- import morgan from 'morgan';
5
- import dotenv from 'dotenv';
6
-
7
- // Core
8
- import { AuthService } from './core/AuthService';
9
-
10
- // Adapters
11
- import { InMemoryUserAdapter } from './adapters/outbound/persistence/InMemoryUserAdapter';
12
- import { bcryptAdapter, jwtAdapter } from './adapters/outbound/SecurityAdapters';
13
- import { createAuthController } from './adapters/inbound/http/AuthController';
14
-
15
- dotenv.config();
16
-
17
- const app = express();
18
-
19
- // Middleware
20
- app.use(helmet());
21
- app.use(cors());
22
- app.use(morgan('dev'));
23
- app.use(express.json());
24
-
25
- // Dependency Injection - Wire up the hexagon
26
- const userRepository = new InMemoryUserAdapter();
27
- const authService = new AuthService(userRepository, bcryptAdapter, jwtAdapter);
28
-
29
- // Mount adapters
30
- app.use('/api/auth', createAuthController(authService));
31
-
32
- // Health check
33
- app.get('/health', (_, res) => res.json({ status: 'ok' }));
34
-
35
- const PORT = process.env.PORT || 3000;
36
-
37
- app.listen(PORT, () => {
38
- console.log(`🚀 {{pascalCase projectName}} running on port ${PORT}`);
39
- console.log(`⬡ Architecture: Hexagonal (Ports & Adapters)`);
40
- console.log(`🔗 Health check: http://localhost:${PORT}/health`);
41
- });
@@ -1,27 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "commonjs",
5
- "lib": [
6
- "ES2022"
7
- ],
8
- "outDir": "./dist",
9
- "rootDir": "./src",
10
- "strict": true,
11
- "esModuleInterop": true,
12
- "skipLibCheck": true,
13
- "forceConsistentCasingInFileNames": true,
14
- "resolveJsonModule": true,
15
- "moduleResolution": "node",
16
- "types": [
17
- "node"
18
- ]
19
- },
20
- "include": [
21
- "src/**/*"
22
- ],
23
- "exclude": [
24
- "node_modules",
25
- "dist"
26
- ]
27
- }
@@ -1,19 +0,0 @@
1
- # {{projectName}} Environment Variables
2
-
3
- # Server
4
- NODE_ENV=development
5
- PORT=3000
6
-
7
- # Database
8
- DATABASE_URL=postgresql://postgres:postgres@localhost:5432/{{projectNameSnakeCase}}
9
-
10
- # Authentication
11
- JWT_SECRET=your-super-secret-jwt-key-change-in-production
12
-
13
- # Stripe
14
- STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key
15
- STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret
16
- STRIPE_PRICE_ID=price_your_price_id
17
-
18
- # Frontend URL (for redirects)
19
- FRONTEND_URL=http://localhost:3001
@@ -1,88 +0,0 @@
1
- name: CI/CD Pipeline
2
-
3
- on:
4
- push:
5
- branches: [main, develop]
6
- pull_request:
7
- branches: [main]
8
-
9
- env:
10
- NODE_VERSION: '20'
11
- AWS_REGION: 'us-east-1'
12
-
13
- jobs:
14
- test:
15
- runs-on: ubuntu-latest
16
-
17
- steps:
18
- - uses: actions/checkout@v4
19
-
20
- - name: Setup Node.js
21
- uses: actions/setup-node@v4
22
- with:
23
- node-version: $\{{ env.NODE_VERSION }}
24
- cache: 'npm'
25
-
26
- - name: Install dependencies
27
- run: npm ci
28
-
29
- - name: Run linter
30
- run: npm run lint --if-present
31
-
32
- - name: Run tests
33
- run: npm test --if-present
34
-
35
- - name: Build
36
- run: npm run build
37
-
38
- build-and-push:
39
- needs: test
40
- runs-on: ubuntu-latest
41
- if: github.ref == 'refs/heads/main'
42
-
43
- steps:
44
- - uses: actions/checkout@v4
45
-
46
- - name: Configure AWS credentials
47
- uses: aws-actions/configure-aws-credentials@v4
48
- with:
49
- aws-access-key-id: $\{{ secrets.AWS_ACCESS_KEY_ID }}
50
- aws-secret-access-key: $\{{ secrets.AWS_SECRET_ACCESS_KEY }}
51
- aws-region: $\{{ env.AWS_REGION }}
52
-
53
- - name: Login to Amazon ECR
54
- id: login-ecr
55
- uses: aws-actions/amazon-ecr-login@v2
56
-
57
- - name: Build, tag, and push image to Amazon ECR
58
- env:
59
- ECR_REGISTRY: $\{{ steps.login-ecr.outputs.registry }}
60
- ECR_REPOSITORY: {{projectNameKebabCase}}
61
- IMAGE_TAG: $\{{ github.sha }}
62
- run: |
63
- docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG .
64
- docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
65
- docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
66
- docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
67
-
68
- deploy:
69
- needs: build-and-push
70
- runs-on: ubuntu-latest
71
- if: github.ref == 'refs/heads/main'
72
-
73
- steps:
74
- - uses: actions/checkout@v4
75
-
76
- - name: Configure AWS credentials
77
- uses: aws-actions/configure-aws-credentials@v4
78
- with:
79
- aws-access-key-id: $\{{ secrets.AWS_ACCESS_KEY_ID }}
80
- aws-secret-access-key: $\{{ secrets.AWS_SECRET_ACCESS_KEY }}
81
- aws-region: $\{{ env.AWS_REGION }}
82
-
83
- - name: Deploy to ECS
84
- run: |
85
- aws ecs update-service \
86
- --cluster {{projectNameKebabCase}}-prod \
87
- --service {{projectNameKebabCase}}-api \
88
- --force-new-deployment
@@ -1,45 +0,0 @@
1
- # Production Dockerfile for {{projectName}}
2
-
3
- # Build stage
4
- FROM node:20-alpine AS builder
5
-
6
- WORKDIR /app
7
-
8
- # Copy package files
9
- COPY package*.json ./
10
-
11
- # Install dependencies
12
- RUN npm ci --only=production
13
-
14
- # Copy source code
15
- COPY . .
16
-
17
- # Build TypeScript
18
- RUN npm run build
19
-
20
- # Production stage
21
- FROM node:20-alpine AS production
22
-
23
- WORKDIR /app
24
-
25
- # Create non-root user
26
- RUN addgroup -g 1001 -S nodejs && \
27
- adduser -S nodejs -u 1001
28
-
29
- # Copy built application
30
- COPY --from=builder --chown=nodejs:nodejs /app/dist ./dist
31
- COPY --from=builder --chown=nodejs:nodejs /app/node_modules ./node_modules
32
- COPY --from=builder --chown=nodejs:nodejs /app/package.json ./
33
-
34
- # Switch to non-root user
35
- USER nodejs
36
-
37
- # Expose port
38
- EXPOSE 3000
39
-
40
- # Health check
41
- HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
42
- CMD wget --no-verbose --tries=1 --spider http://localhost:3000/health || exit 1
43
-
44
- # Start application
45
- CMD ["node", "dist/index.js"]
@@ -1,85 +0,0 @@
1
- # {{projectName}}
2
-
3
- > Generated by [Kybernus CLI](https://kybernus.dev) 🚀 (Pro Template)
4
-
5
- ## Stack
6
-
7
- - **Runtime**: Node.js 20+
8
- - **Framework**: Express.js
9
- - **Language**: TypeScript
10
- - **Database**: PostgreSQL
11
- - **Auth**: JWT
12
- - **Payments**: Stripe
13
-
14
- ## Quick Start
15
-
16
- ```bash
17
- # Install dependencies
18
- npm install
19
-
20
- # Set up environment
21
- cp .env.example .env
22
- # Edit .env with your values
23
-
24
- # Start development server
25
- npm run dev
26
- ```
27
-
28
- ## Pro Features
29
-
30
- ### Authentication
31
-
32
- Endpoints:
33
- - `POST /api/auth/register` - Register new user
34
- - `POST /api/auth/login` - Login and get JWT
35
- - `GET /api/auth/me` - Get current user (protected)
36
-
37
- ### Payments (Stripe)
38
-
39
- Endpoints:
40
- - `POST /api/payments/checkout` - Create checkout session (protected)
41
- - `POST /api/payments/portal` - Create customer portal (protected)
42
- - `POST /api/payments/webhook` - Handle Stripe webhooks
43
-
44
- ## Infrastructure
45
-
46
- The `infra/` folder contains Terraform modules for AWS deployment:
47
- - VPC with public/private subnets
48
- - ECS Fargate cluster
49
- - RDS PostgreSQL database
50
-
51
- ```bash
52
- cd infra
53
- terraform init
54
- terraform plan
55
- terraform apply
56
- ```
57
-
58
- ## Scripts
59
-
60
- | Command | Description |
61
- |---------|-------------|
62
- | `npm run dev` | Start development server |
63
- | `npm run build` | Build for production |
64
- | `npm start` | Start production server |
65
- | `npm test` | Run tests |
66
- | `npm run lint` | Run ESLint |
67
-
68
- ## Docker
69
-
70
- ```bash
71
- docker build -t {{projectNameKebabCase}} .
72
- docker run -p 3000:3000 {{projectNameKebabCase}}
73
- ```
74
-
75
- ## CI/CD
76
-
77
- GitHub Actions workflow included at `.github/workflows/ci-cd.yml`:
78
- 1. Run tests
79
- 2. Build Docker image
80
- 3. Push to ECR
81
- 4. Deploy to ECS
82
-
83
- ---
84
-
85
- Made with ❤️ using [Kybernus Pro](https://kybernus.dev/pro)
@@ -1,18 +0,0 @@
1
- version: '3.8'
2
-
3
- services:
4
- postgres:
5
- image: postgres:15-alpine
6
- container_name: {{kebabCase projectName}}-db
7
- environment:
8
- POSTGRES_USER: postgres
9
- POSTGRES_PASSWORD: postgres
10
- POSTGRES_DB: {{snakeCase projectName}}
11
- ports:
12
- - "5432:5432"
13
- volumes:
14
- - postgres_data:/var/lib/postgresql/data
15
- restart: unless-stopped
16
-
17
- volumes:
18
- postgres_data: