openship 0.1.0 → 0.1.7

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 (177) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.js +5786 -0
  3. package/dist/server/index.js +324319 -0
  4. package/dist/server/migrations/0000_init.sql +666 -0
  5. package/dist/server/migrations/0001_brief_tomorrow_man.sql +47 -0
  6. package/dist/server/migrations/0002_funny_dazzler.sql +2 -0
  7. package/dist/server/migrations/0003_third_killer_shrike.sql +1 -0
  8. package/dist/server/migrations/0004_session_active_org_not_null.sql +10 -0
  9. package/dist/server/migrations/0005_warm_amazoness.sql +3 -0
  10. package/dist/server/migrations/0006_lumpy_joystick.sql +1 -0
  11. package/dist/server/migrations/0007_outgoing_maginty.sql +2 -0
  12. package/dist/server/migrations/0008_frozen_cutover.sql +3 -0
  13. package/dist/server/migrations/0009_credits_billing.sql +142 -0
  14. package/dist/server/migrations/0010_credit_grant_dedupe.sql +14 -0
  15. package/dist/server/migrations/0011_remove_credit_ledger.sql +23 -0
  16. package/dist/server/migrations/0012_smart_deploys_and_git_rollback.sql +81 -0
  17. package/dist/server/migrations/0013_fix_check_run_rollup_unique.sql +38 -0
  18. package/dist/server/migrations/0014_default_rollback_git.sql +9 -0
  19. package/dist/server/migrations/0015_billing_idempotency_grants.sql +41 -0
  20. package/dist/server/migrations/0016_github_auth_high_findings.sql +30 -0
  21. package/dist/server/migrations/0017_spooky_rumiko_fujikawa.sql +6 -0
  22. package/dist/server/migrations/0018_calm_shatterstar.sql +1 -0
  23. package/dist/server/migrations/0019_rename_workspace_install_to_prepare.sql +1 -0
  24. package/dist/server/migrations/0020_uneven_the_renegades.sql +13 -0
  25. package/dist/server/migrations/0021_shiny_firestar.sql +2 -0
  26. package/dist/server/migrations/0022_version_on_success_backfill.sql +6 -0
  27. package/dist/server/migrations/0023_productive_gorilla_man.sql +17 -0
  28. package/dist/server/migrations/0024_sleepy_peter_quill.sql +2 -0
  29. package/dist/server/migrations/0025_smooth_blue_shield.sql +1 -0
  30. package/dist/server/migrations/0026_mail_backup_source.sql +11 -0
  31. package/dist/server/migrations/0027_opposite_anthem.sql +6 -0
  32. package/dist/server/migrations/0028_stale_rogue.sql +18 -0
  33. package/dist/server/migrations/0029_bouncy_loners.sql +16 -0
  34. package/dist/server/migrations/0030_bright_darkstar.sql +6 -0
  35. package/dist/server/migrations/0031_conscious_catseye.sql +13 -0
  36. package/dist/server/migrations/0032_wet_mimic.sql +51 -0
  37. package/dist/server/migrations/0033_eminent_molly_hayes.sql +2 -0
  38. package/dist/server/migrations/meta/0000_snapshot.json +5110 -0
  39. package/dist/server/migrations/meta/0001_snapshot.json +5257 -0
  40. package/dist/server/migrations/meta/0002_snapshot.json +5279 -0
  41. package/dist/server/migrations/meta/0003_snapshot.json +5286 -0
  42. package/dist/server/migrations/meta/0004_snapshot.json +5286 -0
  43. package/dist/server/migrations/meta/0005_snapshot.json +5305 -0
  44. package/dist/server/migrations/meta/0006_snapshot.json +5311 -0
  45. package/dist/server/migrations/meta/0007_snapshot.json +5323 -0
  46. package/dist/server/migrations/meta/0016_snapshot.json +6345 -0
  47. package/dist/server/migrations/meta/0017_snapshot.json +6383 -0
  48. package/dist/server/migrations/meta/0018_snapshot.json +6390 -0
  49. package/dist/server/migrations/meta/0019_snapshot.json +6390 -0
  50. package/dist/server/migrations/meta/0020_snapshot.json +6497 -0
  51. package/dist/server/migrations/meta/0021_snapshot.json +6509 -0
  52. package/dist/server/migrations/meta/0022_snapshot.json +6509 -0
  53. package/dist/server/migrations/meta/0023_snapshot.json +6629 -0
  54. package/dist/server/migrations/meta/0024_snapshot.json +6641 -0
  55. package/dist/server/migrations/meta/0025_snapshot.json +6648 -0
  56. package/dist/server/migrations/meta/0026_snapshot.json +6750 -0
  57. package/dist/server/migrations/meta/0027_snapshot.json +6757 -0
  58. package/dist/server/migrations/meta/0028_snapshot.json +6895 -0
  59. package/dist/server/migrations/meta/0029_snapshot.json +7028 -0
  60. package/dist/server/migrations/meta/0030_snapshot.json +7066 -0
  61. package/dist/server/migrations/meta/0031_snapshot.json +7181 -0
  62. package/dist/server/migrations/meta/0032_snapshot.json +7570 -0
  63. package/dist/server/migrations/meta/0033_snapshot.json +7597 -0
  64. package/dist/server/migrations/meta/_journal.json +244 -0
  65. package/dist/server/pglite/pglite.data +0 -0
  66. package/dist/server/pglite/pglite.wasm +0 -0
  67. package/package.json +33 -21
  68. package/.env.example +0 -22
  69. package/.nvmrc +0 -1
  70. package/.prettierrc +0 -7
  71. package/CONTRIBUTING.md +0 -40
  72. package/README.md +0 -164
  73. package/apps/api/.env.example +0 -30
  74. package/apps/api/Dockerfile +0 -24
  75. package/apps/api/package.json +0 -37
  76. package/apps/api/src/app.ts +0 -26
  77. package/apps/api/src/config/env.ts +0 -39
  78. package/apps/api/src/config/index.ts +0 -1
  79. package/apps/api/src/index.ts +0 -8
  80. package/apps/api/src/middleware/auth.ts +0 -24
  81. package/apps/api/src/middleware/error-handler.ts +0 -21
  82. package/apps/api/src/middleware/index.ts +0 -3
  83. package/apps/api/src/middleware/rate-limiter.ts +0 -26
  84. package/apps/api/src/modules/auth/auth.controller.ts +0 -26
  85. package/apps/api/src/modules/auth/auth.routes.ts +0 -10
  86. package/apps/api/src/modules/auth/auth.schema.ts +0 -12
  87. package/apps/api/src/modules/auth/auth.service.ts +0 -23
  88. package/apps/api/src/modules/billing/billing.controller.ts +0 -60
  89. package/apps/api/src/modules/billing/billing.routes.ts +0 -26
  90. package/apps/api/src/modules/billing/billing.schema.ts +0 -9
  91. package/apps/api/src/modules/billing/billing.service.ts +0 -33
  92. package/apps/api/src/modules/deployments/deployment.controller.ts +0 -35
  93. package/apps/api/src/modules/deployments/deployment.routes.ts +0 -11
  94. package/apps/api/src/modules/deployments/deployment.schema.ts +0 -7
  95. package/apps/api/src/modules/deployments/deployment.service.ts +0 -23
  96. package/apps/api/src/modules/domains/domain.controller.ts +0 -21
  97. package/apps/api/src/modules/domains/domain.routes.ts +0 -9
  98. package/apps/api/src/modules/domains/domain.service.ts +0 -19
  99. package/apps/api/src/modules/health/health.routes.ts +0 -10
  100. package/apps/api/src/modules/projects/project.controller.ts +0 -29
  101. package/apps/api/src/modules/projects/project.routes.ts +0 -10
  102. package/apps/api/src/modules/projects/project.schema.ts +0 -9
  103. package/apps/api/src/modules/projects/project.service.ts +0 -23
  104. package/apps/api/src/modules/webhooks/webhook.controller.ts +0 -22
  105. package/apps/api/src/modules/webhooks/webhook.routes.ts +0 -12
  106. package/apps/api/src/modules/webhooks/webhook.service.ts +0 -11
  107. package/apps/api/tsconfig.json +0 -12
  108. package/apps/cli/package.json +0 -28
  109. package/apps/cli/src/commands/deploy.ts +0 -11
  110. package/apps/cli/src/commands/init.ts +0 -8
  111. package/apps/cli/src/commands/login.ts +0 -8
  112. package/apps/cli/src/commands/logs.ts +0 -9
  113. package/apps/cli/src/index.ts +0 -21
  114. package/apps/cli/src/lib/api-client.ts +0 -35
  115. package/apps/cli/tsconfig.json +0 -12
  116. package/apps/dashboard/Dockerfile +0 -24
  117. package/apps/dashboard/next.config.mjs +0 -6
  118. package/apps/dashboard/package.json +0 -28
  119. package/apps/dashboard/src/app/(auth)/layout.tsx +0 -6
  120. package/apps/dashboard/src/app/(auth)/login/page.tsx +0 -11
  121. package/apps/dashboard/src/app/(auth)/register/page.tsx +0 -10
  122. package/apps/dashboard/src/app/(dashboard)/billing/page.tsx +0 -10
  123. package/apps/dashboard/src/app/(dashboard)/deployments/page.tsx +0 -8
  124. package/apps/dashboard/src/app/(dashboard)/domains/page.tsx +0 -8
  125. package/apps/dashboard/src/app/(dashboard)/layout.tsx +0 -37
  126. package/apps/dashboard/src/app/(dashboard)/monitoring/page.tsx +0 -8
  127. package/apps/dashboard/src/app/(dashboard)/projects/page.tsx +0 -8
  128. package/apps/dashboard/src/app/(dashboard)/settings/page.tsx +0 -8
  129. package/apps/dashboard/src/app/globals.css +0 -3
  130. package/apps/dashboard/src/app/layout.tsx +0 -15
  131. package/apps/dashboard/src/app/page.tsx +0 -6
  132. package/apps/dashboard/tsconfig.json +0 -11
  133. package/apps/web/Dockerfile +0 -24
  134. package/apps/web/next.config.mjs +0 -6
  135. package/apps/web/package.json +0 -26
  136. package/apps/web/src/app/(marketing)/docs/page.tsx +0 -10
  137. package/apps/web/src/app/(marketing)/layout.tsx +0 -24
  138. package/apps/web/src/app/(marketing)/page.tsx +0 -2
  139. package/apps/web/src/app/(marketing)/pricing/page.tsx +0 -10
  140. package/apps/web/src/app/globals.css +0 -3
  141. package/apps/web/src/app/layout.tsx +0 -16
  142. package/apps/web/src/app/page.tsx +0 -10
  143. package/apps/web/tsconfig.json +0 -11
  144. package/docker-compose.yml +0 -87
  145. package/packages/adapters/package.json +0 -27
  146. package/packages/adapters/src/base-adapter.ts +0 -49
  147. package/packages/adapters/src/docker-adapter.ts +0 -43
  148. package/packages/adapters/src/index.ts +0 -4
  149. package/packages/adapters/src/oblien-adapter.ts +0 -46
  150. package/packages/adapters/src/registry.ts +0 -22
  151. package/packages/adapters/tsconfig.json +0 -9
  152. package/packages/core/package.json +0 -27
  153. package/packages/core/src/constants.ts +0 -28
  154. package/packages/core/src/errors.ts +0 -49
  155. package/packages/core/src/index.ts +0 -4
  156. package/packages/core/src/types.ts +0 -47
  157. package/packages/core/src/utils.ts +0 -35
  158. package/packages/core/tsconfig.json +0 -9
  159. package/packages/db/package.json +0 -32
  160. package/packages/db/prisma/schema.prisma +0 -160
  161. package/packages/db/src/index.ts +0 -11
  162. package/packages/db/tsconfig.json +0 -9
  163. package/packages/ui/package.json +0 -38
  164. package/packages/ui/src/components/badge.tsx +0 -29
  165. package/packages/ui/src/components/button.tsx +0 -44
  166. package/packages/ui/src/components/card.tsx +0 -26
  167. package/packages/ui/src/components/status-dot.tsx +0 -25
  168. package/packages/ui/src/globals.css +0 -18
  169. package/packages/ui/src/index.tsx +0 -8
  170. package/packages/ui/src/lib/cn.ts +0 -7
  171. package/packages/ui/tsconfig.json +0 -9
  172. package/pnpm-workspace.yaml +0 -4
  173. package/tooling/tsconfig/base.json +0 -19
  174. package/tooling/tsconfig/nextjs.json +0 -10
  175. package/tooling/tsconfig/node.json +0 -10
  176. package/tooling/tsconfig/package.json +0 -7
  177. package/turbo.json +0 -32
@@ -0,0 +1,244 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1781651816329,
9
+ "tag": "0000_init",
10
+ "breakpoints": true
11
+ },
12
+ {
13
+ "idx": 1,
14
+ "version": "7",
15
+ "when": 1781681820697,
16
+ "tag": "0001_brief_tomorrow_man",
17
+ "breakpoints": true
18
+ },
19
+ {
20
+ "idx": 2,
21
+ "version": "7",
22
+ "when": 1781753153388,
23
+ "tag": "0002_funny_dazzler",
24
+ "breakpoints": true
25
+ },
26
+ {
27
+ "idx": 3,
28
+ "version": "7",
29
+ "when": 1781788931998,
30
+ "tag": "0003_third_killer_shrike",
31
+ "breakpoints": true
32
+ },
33
+ {
34
+ "idx": 4,
35
+ "version": "7",
36
+ "when": 1781874000000,
37
+ "tag": "0004_session_active_org_not_null",
38
+ "breakpoints": true
39
+ },
40
+ {
41
+ "idx": 5,
42
+ "version": "7",
43
+ "when": 1781833213684,
44
+ "tag": "0005_warm_amazoness",
45
+ "breakpoints": true
46
+ },
47
+ {
48
+ "idx": 6,
49
+ "version": "7",
50
+ "when": 1781842426724,
51
+ "tag": "0006_lumpy_joystick",
52
+ "breakpoints": true
53
+ },
54
+ {
55
+ "idx": 7,
56
+ "version": "7",
57
+ "when": 1781897497385,
58
+ "tag": "0007_outgoing_maginty",
59
+ "breakpoints": true
60
+ },
61
+ {
62
+ "idx": 8,
63
+ "version": "7",
64
+ "when": 1781898497385,
65
+ "tag": "0008_frozen_cutover",
66
+ "breakpoints": true
67
+ },
68
+ {
69
+ "idx": 9,
70
+ "version": "7",
71
+ "when": 1781899497385,
72
+ "tag": "0009_credits_billing",
73
+ "breakpoints": true
74
+ },
75
+ {
76
+ "idx": 10,
77
+ "version": "7",
78
+ "when": 1781900497385,
79
+ "tag": "0010_credit_grant_dedupe",
80
+ "breakpoints": true
81
+ },
82
+ {
83
+ "idx": 11,
84
+ "version": "7",
85
+ "when": 1781901497385,
86
+ "tag": "0011_remove_credit_ledger",
87
+ "breakpoints": true
88
+ },
89
+ {
90
+ "idx": 12,
91
+ "version": "7",
92
+ "when": 1781902497385,
93
+ "tag": "0012_smart_deploys_and_git_rollback",
94
+ "breakpoints": true
95
+ },
96
+ {
97
+ "idx": 13,
98
+ "version": "7",
99
+ "when": 1781903497385,
100
+ "tag": "0013_fix_check_run_rollup_unique",
101
+ "breakpoints": true
102
+ },
103
+ {
104
+ "idx": 14,
105
+ "version": "7",
106
+ "when": 1781904497385,
107
+ "tag": "0014_default_rollback_git",
108
+ "breakpoints": true
109
+ },
110
+ {
111
+ "idx": 15,
112
+ "version": "7",
113
+ "when": 1781905497385,
114
+ "tag": "0015_billing_idempotency_grants",
115
+ "breakpoints": true
116
+ },
117
+ {
118
+ "idx": 16,
119
+ "version": "7",
120
+ "when": 1782087544711,
121
+ "tag": "0016_github_auth_high_findings",
122
+ "breakpoints": true
123
+ },
124
+ {
125
+ "idx": 17,
126
+ "version": "7",
127
+ "when": 1782089730425,
128
+ "tag": "0017_spooky_rumiko_fujikawa",
129
+ "breakpoints": true
130
+ },
131
+ {
132
+ "idx": 18,
133
+ "version": "7",
134
+ "when": 1782158815087,
135
+ "tag": "0018_calm_shatterstar",
136
+ "breakpoints": true
137
+ },
138
+ {
139
+ "idx": 19,
140
+ "version": "7",
141
+ "when": 1782200000000,
142
+ "tag": "0019_rename_workspace_install_to_prepare",
143
+ "breakpoints": true
144
+ },
145
+ {
146
+ "idx": 20,
147
+ "version": "7",
148
+ "when": 1782573643406,
149
+ "tag": "0020_uneven_the_renegades",
150
+ "breakpoints": true
151
+ },
152
+ {
153
+ "idx": 21,
154
+ "version": "7",
155
+ "when": 1782674221078,
156
+ "tag": "0021_shiny_firestar",
157
+ "breakpoints": true
158
+ },
159
+ {
160
+ "idx": 22,
161
+ "version": "7",
162
+ "when": 1782674321078,
163
+ "tag": "0022_version_on_success_backfill",
164
+ "breakpoints": true
165
+ },
166
+ {
167
+ "idx": 23,
168
+ "version": "7",
169
+ "when": 1782893229637,
170
+ "tag": "0023_productive_gorilla_man",
171
+ "breakpoints": true
172
+ },
173
+ {
174
+ "idx": 24,
175
+ "version": "7",
176
+ "when": 1783022069221,
177
+ "tag": "0024_sleepy_peter_quill",
178
+ "breakpoints": true
179
+ },
180
+ {
181
+ "idx": 25,
182
+ "version": "7",
183
+ "when": 1783036058301,
184
+ "tag": "0025_smooth_blue_shield",
185
+ "breakpoints": true
186
+ },
187
+ {
188
+ "idx": 26,
189
+ "version": "7",
190
+ "when": 1783252365118,
191
+ "tag": "0026_mail_backup_source",
192
+ "breakpoints": true
193
+ },
194
+ {
195
+ "idx": 27,
196
+ "version": "7",
197
+ "when": 1783291721977,
198
+ "tag": "0027_opposite_anthem",
199
+ "breakpoints": true
200
+ },
201
+ {
202
+ "idx": 28,
203
+ "version": "7",
204
+ "when": 1783460970566,
205
+ "tag": "0028_stale_rogue",
206
+ "breakpoints": true
207
+ },
208
+ {
209
+ "idx": 29,
210
+ "version": "7",
211
+ "when": 1783622801772,
212
+ "tag": "0029_bouncy_loners",
213
+ "breakpoints": true
214
+ },
215
+ {
216
+ "idx": 30,
217
+ "version": "7",
218
+ "when": 1783624145593,
219
+ "tag": "0030_bright_darkstar",
220
+ "breakpoints": true
221
+ },
222
+ {
223
+ "idx": 31,
224
+ "version": "7",
225
+ "when": 1783778263455,
226
+ "tag": "0031_conscious_catseye",
227
+ "breakpoints": true
228
+ },
229
+ {
230
+ "idx": 32,
231
+ "version": "7",
232
+ "when": 1783860604096,
233
+ "tag": "0032_wet_mimic",
234
+ "breakpoints": true
235
+ },
236
+ {
237
+ "idx": 33,
238
+ "version": "7",
239
+ "when": 1783864116144,
240
+ "tag": "0033_eminent_molly_hayes",
241
+ "breakpoints": true
242
+ }
243
+ ]
244
+ }
Binary file
Binary file
package/package.json CHANGED
@@ -1,31 +1,43 @@
1
1
  {
2
2
  "name": "openship",
3
- "version": "0.1.0",
4
- "description": "Open-source, self-hostable deployment platform",
5
- "license": "MIT",
3
+ "version": "0.1.7",
4
+ "description": "Openship CLI - deploy, manage, and open your Openship platform from the terminal",
5
+ "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/oblien/openship.git"
8
+ "url": "https://github.com/oblien/openship.git",
9
+ "directory": "apps/cli"
9
10
  },
11
+ "homepage": "https://github.com/oblien/openship",
12
+ "keywords": [
13
+ "openship",
14
+ "deploy",
15
+ "deployment",
16
+ "cli",
17
+ "self-hosted"
18
+ ],
19
+ "type": "module",
20
+ "bin": {
21
+ "openship": "./dist/index.js"
22
+ },
23
+ "files": [
24
+ "dist"
25
+ ],
10
26
  "scripts": {
11
- "build": "turbo run build",
12
- "dev": "turbo run dev",
13
- "lint": "turbo run lint",
14
- "test": "turbo run test",
15
- "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
16
- "db:generate": "turbo run db:generate --filter=openship-db",
17
- "db:push": "turbo run db:push --filter=openship-db",
18
- "db:migrate": "turbo run db:migrate --filter=openship-db",
19
- "clean": "turbo run clean && rm -rf node_modules"
27
+ "build": "tsup && bun run build/stage-server.ts",
28
+ "lint": "tsc --noEmit",
29
+ "clean": "rm -rf dist .turbo node_modules"
20
30
  },
21
- "devDependencies": {
22
- "openship-tsconfig": "workspace:*",
23
- "prettier": "^3.2.0",
24
- "turbo": "^2.0.0",
25
- "typescript": "^5.4.0"
31
+ "dependencies": {
32
+ "chalk": "^5.6.2",
33
+ "commander": "^14.0.3",
34
+ "open": "^10.2.0",
35
+ "ora": "^9.3.0"
26
36
  },
27
- "packageManager": "pnpm@9.0.0",
28
- "engines": {
29
- "node": ">=20.0.0"
37
+ "devDependencies": {
38
+ "@types/node": "^22.13.0",
39
+ "tsup": "^8.5.1",
40
+ "tsx": "^4.21.0",
41
+ "typescript": "^5.9.3"
30
42
  }
31
43
  }
package/.env.example DELETED
@@ -1,22 +0,0 @@
1
- # See docker-compose.yml for full reference.
2
- # Copy this file to .env and customize.
3
-
4
- NODE_ENV=development
5
-
6
- # ─── Database ────────────────────────────────
7
- DATABASE_URL=postgresql://openship:openship@localhost:5432/openship
8
-
9
- # ─── Redis ───────────────────────────────────
10
- REDIS_URL=redis://localhost:6379
11
-
12
- # ─── Auth ────────────────────────────────────
13
- JWT_SECRET=change-me-in-production
14
-
15
- # ─── Mode ────────────────────────────────────
16
- # false = self-hosted (no billing)
17
- # true = cloud (billing, metering, multi-tenant)
18
- CLOUD_MODE=false
19
-
20
- # ─── Stripe (required only when CLOUD_MODE=true) ──
21
- # STRIPE_SECRET_KEY=sk_test_...
22
- # STRIPE_WEBHOOK_SECRET=whsec_...
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 20
package/.prettierrc DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "semi": true,
3
- "singleQuote": false,
4
- "tabWidth": 2,
5
- "trailingComma": "all",
6
- "printWidth": 100
7
- }
package/CONTRIBUTING.md DELETED
@@ -1,40 +0,0 @@
1
- # Contributing to Openship
2
-
3
- Thank you for your interest in contributing! This guide will help you get started.
4
-
5
- ## Development Setup
6
-
7
- 1. **Fork & clone** the repository
8
- 2. **Install dependencies**: `pnpm install`
9
- 3. **Set up env**: `cp .env.example .env`
10
- 4. **Generate DB client**: `pnpm db:generate`
11
- 5. **Start dev**: `pnpm dev`
12
-
13
- ## Project Structure
14
-
15
- - `apps/*` — Deployable applications (web, dashboard, api, cli)
16
- - `packages/*` — Shared libraries consumed by apps
17
- - `tooling/*` — Build and lint configurations
18
-
19
- ## Conventions
20
-
21
- - **Commits**: Follow [Conventional Commits](https://www.conventionalcommits.org/) (`feat:`, `fix:`, `docs:`, etc.)
22
- - **Branches**: `feat/`, `fix/`, `docs/`, `chore/`
23
- - **Code style**: Prettier is configured — run `pnpm format` before committing
24
- - **Types**: TypeScript strict mode is enabled everywhere
25
-
26
- ## API Module Pattern
27
-
28
- Each API module follows this structure:
29
-
30
- ```
31
- modules/<name>/
32
- ├── <name>.routes.ts # Route definitions
33
- ├── <name>.controller.ts # Request handlers
34
- ├── <name>.service.ts # Business logic
35
- └── <name>.schema.ts # Zod validation schemas
36
- ```
37
-
38
- ## Need Help?
39
-
40
- Open an issue or start a discussion — we're happy to help!
package/README.md DELETED
@@ -1,164 +0,0 @@
1
- <div align="center">
2
- <h1>🚀 Openship</h1>
3
- <p><strong>The open-source, self-hostable deployment platform.</strong></p>
4
- <p>Deploy anywhere — from your own server to our managed cloud.</p>
5
-
6
- <br />
7
-
8
- <a href="#quick-start">Quick Start</a> ·
9
- <a href="#architecture">Architecture</a> ·
10
- <a href="#self-hosting">Self-Hosting</a> ·
11
- <a href="#cloud">Cloud</a> ·
12
- <a href="#contributing">Contributing</a>
13
- </div>
14
-
15
- ---
16
-
17
- ## Quick Start
18
-
19
- ### Prerequisites
20
-
21
- - [Node.js](https://nodejs.org/) >= 20
22
- - [pnpm](https://pnpm.io/) >= 9
23
- - [Docker](https://www.docker.com/) (for self-hosting or local development)
24
-
25
- ### Development
26
-
27
- ```bash
28
- # Clone the repo
29
- git clone https://github.com/openship/openship.git
30
- cd openship
31
-
32
- # Install dependencies
33
- pnpm install
34
-
35
- # Set up environment
36
- cp .env.example .env
37
-
38
- # Generate Prisma client
39
- pnpm db:generate
40
-
41
- # Push schema to local SQLite
42
- pnpm db:push
43
-
44
- # Start all apps in dev mode
45
- pnpm dev
46
- ```
47
-
48
- This will start:
49
-
50
- | App | URL |
51
- | ----------- | ----------------------- |
52
- | Web | http://localhost:3000 |
53
- | Dashboard | http://localhost:3001 |
54
- | API | http://localhost:4000 |
55
-
56
- ### Self-Hosting with Docker
57
-
58
- ```bash
59
- cp .env.example .env
60
- docker compose up -d
61
- ```
62
-
63
- That's it. Openship will be running at `http://localhost:3001`.
64
-
65
- ---
66
-
67
- ## Architecture
68
-
69
- ```
70
- openship/
71
- ├── apps/
72
- │ ├── web/ # Next.js — Marketing site, landing page, docs, pricing
73
- │ ├── dashboard/ # Next.js — Authenticated deployment dashboard (Vercel-style)
74
- │ ├── api/ # Hono — Core API engine (auth, deployments, billing, webhooks)
75
- │ └── cli/ # TypeScript CLI — `openship deploy` from your terminal
76
-
77
- ├── packages/
78
- │ ├── adapters/ # Deployment adapters (DockerAdapter, OblienAdapter)
79
- │ ├── db/ # Prisma schema + client (SQLite local, Postgres cloud)
80
- │ ├── core/ # Shared types, constants, utilities, error classes
81
- │ └── ui/ # Shared React component library (Tailwind + shadcn style)
82
-
83
- ├── tooling/
84
- │ └── tsconfig/ # Shared TypeScript configurations
85
-
86
- ├── docker-compose.yml
87
- ├── turbo.json
88
- └── pnpm-workspace.yaml
89
- ```
90
-
91
- ### API Modules
92
-
93
- The API is organized into clean, independent modules:
94
-
95
- | Module | Path | Purpose |
96
- | -------------- | ----------------------------- | ---------------------------------------- |
97
- | **Auth** | `modules/auth/` | Registration, login, JWT, sessions |
98
- | **Projects** | `modules/projects/` | CRUD for deployment projects |
99
- | **Deployments**| `modules/deployments/` | Build, deploy, rollback, logs |
100
- | **Domains** | `modules/domains/` | Custom domains, DNS verification, SSL |
101
- | **Billing** | `modules/billing/` | Plans, subscriptions, usage (cloud only) |
102
- | **Webhooks** | `modules/webhooks/` | GitHub/GitLab/Bitbucket push triggers |
103
- | **Health** | `modules/health/` | Health check endpoint for load balancers |
104
-
105
- ### Adapter Pattern
106
-
107
- The **adapter pattern** is what makes Openship platform-agnostic:
108
-
109
- - **`DockerAdapter`** — Self-hosted. Builds and runs containers on the host machine.
110
- - **`OblienAdapter`** — Cloud. Communicates with the Oblien infrastructure API.
111
-
112
- The `CLOUD_MODE` environment variable controls which adapter is active. For self-hosted installs, billing is completely disabled.
113
-
114
- ---
115
-
116
- ## Self-Hosting
117
-
118
- Openship is designed to be self-hosted with a single `docker compose up`. The Docker adapter handles all builds and deployments locally on your machine.
119
-
120
- **Requirements:** Docker Engine, 2GB RAM minimum.
121
-
122
- ---
123
-
124
- ## Cloud
125
-
126
- The hosted version at [openship.cloud](https://openship.cloud) adds:
127
-
128
- - Managed infrastructure via the Oblien adapter
129
- - Subscription billing (Stripe)
130
- - Usage metering (build minutes, bandwidth)
131
- - Team management and SSO
132
-
133
- ---
134
-
135
- ## Tech Stack
136
-
137
- | Layer | Technology |
138
- | ---------- | --------------------------------- |
139
- | Frontend | Next.js 14, React 18, Tailwind |
140
- | API | Hono (edge-compatible) |
141
- | Database | Prisma (SQLite / PostgreSQL) |
142
- | Queue | BullMQ + Redis |
143
- | CLI | Commander.js, TypeScript |
144
- | Monorepo | Turborepo + pnpm workspaces |
145
- | Containers | Docker |
146
- | Billing | Stripe |
147
-
148
- ---
149
-
150
- ## Contributing
151
-
152
- We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
153
-
154
- 1. Fork the repository
155
- 2. Create your feature branch (`git checkout -b feat/amazing-feature`)
156
- 3. Commit your changes (`git commit -m 'feat: add amazing feature'`)
157
- 4. Push to the branch (`git push origin feat/amazing-feature`)
158
- 5. Open a Pull Request
159
-
160
- ---
161
-
162
- ## License
163
-
164
- [MIT](LICENSE) — Free to use, self-host, and modify. Cloud/SaaS usage requires the AGPL license terms.
@@ -1,30 +0,0 @@
1
- # Openship API — Environment Variables
2
- # Copy this file to .env and fill in the values.
3
-
4
- NODE_ENV=development
5
- PORT=4000
6
-
7
- # ---------- Mode ----------
8
- # Set to "true" to enable cloud billing, metering, multi-tenant features.
9
- # Default: false (self-hosted single-tenant mode).
10
- CLOUD_MODE=false
11
-
12
- # ---------- Database ----------
13
- DATABASE_URL=file:./dev.db
14
-
15
- # ---------- Auth ----------
16
- JWT_SECRET=change-me-in-production
17
- JWT_EXPIRES_IN=15m
18
- JWT_REFRESH_EXPIRES_IN=7d
19
-
20
- # ---------- Redis ----------
21
- REDIS_URL=redis://localhost:6379
22
-
23
- # ---------- Stripe (Cloud mode only) ----------
24
- # STRIPE_SECRET_KEY=sk_test_...
25
- # STRIPE_WEBHOOK_SECRET=whsec_...
26
-
27
- # ---------- GitHub App (for Git push webhooks) ----------
28
- # GITHUB_APP_ID=
29
- # GITHUB_PRIVATE_KEY=
30
- # GITHUB_WEBHOOK_SECRET=
@@ -1,24 +0,0 @@
1
- # ─── Build stage ────────────────────────────────────────
2
- FROM node:20-alpine AS builder
3
- RUN corepack enable && corepack prepare pnpm@9.0.0 --activate
4
- WORKDIR /app
5
-
6
- COPY pnpm-workspace.yaml pnpm-lock.yaml* package.json ./
7
- COPY tooling/ ./tooling/
8
- COPY packages/ ./packages/
9
- COPY apps/api/ ./apps/api/
10
-
11
- RUN pnpm install --frozen-lockfile
12
- RUN pnpm run build --filter=openship-api...
13
-
14
- # ─── Production stage ──────────────────────────────────
15
- FROM node:20-alpine AS runner
16
- WORKDIR /app
17
-
18
- COPY --from=builder /app/apps/api/dist ./dist
19
- COPY --from=builder /app/apps/api/package.json ./
20
- COPY --from=builder /app/node_modules ./node_modules
21
-
22
- ENV NODE_ENV=production
23
- EXPOSE 4000
24
- CMD ["node", "dist/index.js"]
@@ -1,37 +0,0 @@
1
- {
2
- "name": "openship-api",
3
- "version": "0.1.0",
4
- "private": true,
5
- "type": "module",
6
- "scripts": {
7
- "dev": "tsx watch src/index.ts",
8
- "build": "tsup src/index.ts --format esm --dts",
9
- "start": "node dist/index.js",
10
- "lint": "tsc --noEmit",
11
- "test": "vitest run",
12
- "clean": "rm -rf dist .turbo node_modules"
13
- },
14
- "dependencies": {
15
- "openship-core": "workspace:*",
16
- "openship-db": "workspace:*",
17
- "openship-adapters": "workspace:*",
18
- "@hono/node-server": "^1.11.0",
19
- "hono": "^4.4.0",
20
- "zod": "^3.23.0",
21
- "jsonwebtoken": "^9.0.0",
22
- "bcryptjs": "^2.4.3",
23
- "stripe": "^15.0.0",
24
- "bullmq": "^5.7.0",
25
- "ioredis": "^5.4.0",
26
- "pino": "^9.1.0"
27
- },
28
- "devDependencies": {
29
- "openship-tsconfig": "workspace:*",
30
- "@types/jsonwebtoken": "^9.0.0",
31
- "@types/bcryptjs": "^2.4.0",
32
- "tsx": "^4.11.0",
33
- "tsup": "^8.1.0",
34
- "vitest": "^1.6.0",
35
- "typescript": "^5.4.0"
36
- }
37
- }
@@ -1,26 +0,0 @@
1
- import { Hono } from "hono";
2
- import { cors } from "hono/cors";
3
- import { logger } from "hono/logger";
4
-
5
- import { authRoutes } from "./modules/auth/auth.routes";
6
- import { projectRoutes } from "./modules/projects/project.routes";
7
- import { deploymentRoutes } from "./modules/deployments/deployment.routes";
8
- import { domainRoutes } from "./modules/domains/domain.routes";
9
- import { billingRoutes } from "./modules/billing/billing.routes";
10
- import { webhookRoutes } from "./modules/webhooks/webhook.routes";
11
- import { healthRoutes } from "./modules/health/health.routes";
12
-
13
- export const app = new Hono();
14
-
15
- /* ---------- Global middleware ---------- */
16
- app.use("*", logger());
17
- app.use("*", cors());
18
-
19
- /* ---------- Module routes ---------- */
20
- app.route("/api/health", healthRoutes);
21
- app.route("/api/auth", authRoutes);
22
- app.route("/api/projects", projectRoutes);
23
- app.route("/api/deployments", deploymentRoutes);
24
- app.route("/api/domains", domainRoutes);
25
- app.route("/api/billing", billingRoutes);
26
- app.route("/api/webhooks", webhookRoutes);