@intranefr/superbackend 1.7.7 → 1.7.9

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 (119) hide show
  1. package/.beads/.br_history/issues.20260314_212352_900045509.jsonl +0 -0
  2. package/.beads/.br_history/issues.20260314_212352_900045509.jsonl.meta.json +1 -0
  3. package/.beads/.br_history/issues.20260314_212353_087140743.jsonl +1 -0
  4. package/.beads/.br_history/issues.20260314_212353_087140743.jsonl.meta.json +1 -0
  5. package/.beads/.br_history/issues.20260314_212353_285881504.jsonl +2 -0
  6. package/.beads/.br_history/issues.20260314_212353_285881504.jsonl.meta.json +1 -0
  7. package/.beads/.br_history/issues.20260314_212353_473915419.jsonl +3 -0
  8. package/.beads/.br_history/issues.20260314_212353_473915419.jsonl.meta.json +1 -0
  9. package/.beads/.br_history/issues.20260314_212353_659476307.jsonl +4 -0
  10. package/.beads/.br_history/issues.20260314_212353_659476307.jsonl.meta.json +1 -0
  11. package/.beads/.br_history/issues.20260314_212353_869998925.jsonl +5 -0
  12. package/.beads/.br_history/issues.20260314_212353_869998925.jsonl.meta.json +1 -0
  13. package/.beads/.br_history/issues.20260314_212354_054785029.jsonl +6 -0
  14. package/.beads/.br_history/issues.20260314_212354_054785029.jsonl.meta.json +1 -0
  15. package/.beads/.br_history/issues.20260314_213336_175893691.jsonl +7 -0
  16. package/.beads/.br_history/issues.20260314_213336_175893691.jsonl.meta.json +1 -0
  17. package/.beads/.br_history/issues.20260314_213336_338509797.jsonl +7 -0
  18. package/.beads/.br_history/issues.20260314_213336_338509797.jsonl.meta.json +1 -0
  19. package/.beads/.br_history/issues.20260314_213336_515443192.jsonl +7 -0
  20. package/.beads/.br_history/issues.20260314_213336_515443192.jsonl.meta.json +1 -0
  21. package/.beads/.br_history/issues.20260314_213336_676417592.jsonl +7 -0
  22. package/.beads/.br_history/issues.20260314_213336_676417592.jsonl.meta.json +1 -0
  23. package/.beads/.br_history/issues.20260314_213336_839182422.jsonl +7 -0
  24. package/.beads/.br_history/issues.20260314_213336_839182422.jsonl.meta.json +1 -0
  25. package/.beads/.br_history/issues.20260314_213337_004349113.jsonl +7 -0
  26. package/.beads/.br_history/issues.20260314_213337_004349113.jsonl.meta.json +1 -0
  27. package/.beads/.br_history/issues.20260314_213337_179824080.jsonl +7 -0
  28. package/.beads/.br_history/issues.20260314_213337_179824080.jsonl.meta.json +1 -0
  29. package/.beads/.br_history/issues.20260314_213701_705075332.jsonl +7 -0
  30. package/.beads/.br_history/issues.20260314_213701_705075332.jsonl.meta.json +1 -0
  31. package/.beads/.br_history/issues.20260314_213706_783128702.jsonl +8 -0
  32. package/.beads/.br_history/issues.20260314_213706_783128702.jsonl.meta.json +1 -0
  33. package/.beads/config.yaml +4 -0
  34. package/.beads/issues.jsonl +8 -0
  35. package/.beads/metadata.json +4 -0
  36. package/.env.example +8 -0
  37. package/autochangelog/.env.example +36 -0
  38. package/autochangelog/README.md +412 -0
  39. package/autochangelog/config/database.js +27 -0
  40. package/autochangelog/package.json +47 -0
  41. package/autochangelog/public/landing.html +581 -0
  42. package/autochangelog/server.js +104 -0
  43. package/autochangelog/src/app.js +181 -0
  44. package/autochangelog/src/config/database.js +26 -0
  45. package/autochangelog/src/controllers/auth.js +488 -0
  46. package/autochangelog/src/controllers/changelog.js +682 -0
  47. package/autochangelog/src/controllers/project.js +580 -0
  48. package/autochangelog/src/controllers/repository.js +780 -0
  49. package/autochangelog/src/middleware/auth.js +386 -0
  50. package/autochangelog/src/models/Changelog.js +443 -0
  51. package/autochangelog/src/models/Project.js +226 -0
  52. package/autochangelog/src/models/Repository.js +366 -0
  53. package/autochangelog/src/models/User.js +223 -0
  54. package/autochangelog/src/routes/auth.routes.js +32 -0
  55. package/autochangelog/src/routes/changelog.routes.js +42 -0
  56. package/autochangelog/src/routes/github-auth.routes.js +102 -0
  57. package/autochangelog/src/routes/project.routes.js +50 -0
  58. package/autochangelog/src/routes/repository.routes.js +54 -0
  59. package/autochangelog/src/services/changelog.js +722 -0
  60. package/autochangelog/src/services/github.js +243 -0
  61. package/autochangelog/utils/logger.js +77 -0
  62. package/autochangelog/views/404.ejs +18 -0
  63. package/autochangelog/views/dashboard.ejs +596 -0
  64. package/autochangelog/views/index.ejs +231 -0
  65. package/autochangelog/views/layouts/main.ejs +44 -0
  66. package/autochangelog/views/login.ejs +104 -0
  67. package/autochangelog/views/partials/footer.ejs +20 -0
  68. package/autochangelog/views/partials/navbar.ejs +51 -0
  69. package/autochangelog/views/register.ejs +109 -0
  70. package/autochangelog-cli/README.md +266 -0
  71. package/autochangelog-cli/bin/autochangelog +120 -0
  72. package/autochangelog-cli/package.json +46 -0
  73. package/autochangelog-cli/src/cli/commands/auth.js +291 -0
  74. package/autochangelog-cli/src/cli/commands/changelog.js +619 -0
  75. package/autochangelog-cli/src/cli/commands/project.js +427 -0
  76. package/autochangelog-cli/src/cli/commands/repo.js +557 -0
  77. package/autochangelog-cli/src/cli/commands/stats.js +706 -0
  78. package/autochangelog-cli/src/cli/utils/config.js +277 -0
  79. package/autochangelog-cli/src/cli/utils/errors.js +307 -0
  80. package/autochangelog-cli/src/cli/utils/logger.js +75 -0
  81. package/autochangelog-cli/src/cli/utils/output.js +357 -0
  82. package/package.json +8 -3
  83. package/plugins/supercli/README.md +108 -0
  84. package/plugins/supercli/plugin.json +123 -0
  85. package/server.js +1 -1
  86. package/src/cli/api.js +380 -0
  87. package/src/cli/direct/agent-utils.js +61 -0
  88. package/src/cli/direct/cli-utils.js +112 -0
  89. package/src/cli/direct/data-seeding.js +307 -0
  90. package/src/cli/direct/db-admin.js +84 -0
  91. package/src/cli/direct/db-advanced.js +372 -0
  92. package/src/cli/direct/db-utils.js +558 -0
  93. package/src/cli/direct/help.js +195 -0
  94. package/src/cli/direct/migration.js +107 -0
  95. package/src/cli/direct/rbac-advanced.js +132 -0
  96. package/src/cli/direct/resources-additional.js +400 -0
  97. package/src/cli/direct/resources-cms-advanced.js +173 -0
  98. package/src/cli/direct/resources-cms.js +247 -0
  99. package/src/cli/direct/resources-core.js +253 -0
  100. package/src/cli/direct/resources-execution.js +367 -0
  101. package/src/cli/direct/resources-health.js +152 -0
  102. package/src/cli/direct/resources-integrations.js +182 -0
  103. package/src/cli/direct/resources-logs.js +204 -0
  104. package/src/cli/direct/resources-org-rbac.js +187 -0
  105. package/src/cli/direct/resources-system.js +236 -0
  106. package/src/cli/direct.js +556 -0
  107. package/src/controllers/admin.controller.js +4 -0
  108. package/src/controllers/auth.controller.js +148 -1
  109. package/src/controllers/waitingList.controller.js +130 -1
  110. package/src/models/RbacRole.js +1 -1
  111. package/src/models/User.js +39 -5
  112. package/src/routes/auth.routes.js +6 -0
  113. package/src/routes/waitingList.routes.js +12 -2
  114. package/src/routes/waitingListAdmin.routes.js +3 -0
  115. package/src/services/email.service.js +1 -0
  116. package/src/services/github.service.js +255 -0
  117. package/src/services/rateLimiter.service.js +29 -1
  118. package/src/services/waitingListJson.service.js +32 -3
  119. package/views/admin-waiting-list.ejs +386 -3
@@ -0,0 +1,581 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AutoChangelog - Coming Soon</title>
7
+ <style>
8
+ :root {
9
+ --primary: #2563eb;
10
+ --primary-dark: #1d4ed8;
11
+ --secondary: #64748b;
12
+ --text: #1e293b;
13
+ --text-light: #64748b;
14
+ --bg: #f8fafc;
15
+ --card: #ffffff;
16
+ --border: #e2e8f0;
17
+ }
18
+
19
+ * {
20
+ margin: 0;
21
+ padding: 0;
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ body {
26
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
27
+ background-color: var(--bg);
28
+ color: var(--text);
29
+ line-height: 1.6;
30
+ overflow-x: hidden;
31
+ }
32
+
33
+ .container {
34
+ max-width: 1200px;
35
+ margin: 0 auto;
36
+ padding: 0 20px;
37
+ }
38
+
39
+ /* Header */
40
+ header {
41
+ padding: 40px 0;
42
+ position: relative;
43
+ }
44
+
45
+ .logo {
46
+ display: flex;
47
+ align-items: center;
48
+ gap: 15px;
49
+ margin-bottom: 20px;
50
+ }
51
+
52
+ .logo-icon {
53
+ width: 40px;
54
+ height: 40px;
55
+ background: linear-gradient(135deg, var(--primary), var(--primary-dark));
56
+ border-radius: 12px;
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ color: white;
61
+ font-weight: bold;
62
+ font-size: 18px;
63
+ box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
64
+ }
65
+
66
+ .logo-text {
67
+ font-size: 24px;
68
+ font-weight: 700;
69
+ letter-spacing: -0.5px;
70
+ }
71
+
72
+ .logo-sub {
73
+ color: var(--text-light);
74
+ font-size: 14px;
75
+ margin-left: 55px;
76
+ }
77
+
78
+ /* Hero Section */
79
+ .hero {
80
+ display: grid;
81
+ grid-template-columns: 1fr 1fr;
82
+ gap: 60px;
83
+ align-items: center;
84
+ padding: 60px 0;
85
+ }
86
+
87
+ .hero-content {
88
+ max-width: 500px;
89
+ }
90
+
91
+ .hero h1 {
92
+ font-size: 48px;
93
+ font-weight: 800;
94
+ line-height: 1.2;
95
+ margin-bottom: 20px;
96
+ background: linear-gradient(135deg, var(--primary), #0ea5e9);
97
+ -webkit-background-clip: text;
98
+ -webkit-text-fill-color: transparent;
99
+ background-clip: text;
100
+ }
101
+
102
+ .hero p {
103
+ font-size: 18px;
104
+ color: var(--text-light);
105
+ margin-bottom: 30px;
106
+ line-height: 1.8;
107
+ }
108
+
109
+ .cta-group {
110
+ display: flex;
111
+ gap: 15px;
112
+ flex-wrap: wrap;
113
+ }
114
+
115
+ .btn {
116
+ padding: 14px 28px;
117
+ border-radius: 12px;
118
+ text-decoration: none;
119
+ font-weight: 600;
120
+ font-size: 16px;
121
+ transition: all 0.3s ease;
122
+ border: none;
123
+ cursor: pointer;
124
+ display: inline-flex;
125
+ align-items: center;
126
+ gap: 8px;
127
+ }
128
+
129
+ .btn-primary {
130
+ background: linear-gradient(135deg, var(--primary), var(--primary-dark));
131
+ color: white;
132
+ box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
133
+ }
134
+
135
+ .btn-primary:hover {
136
+ transform: translateY(-2px);
137
+ box-shadow: 0 12px 30px rgba(37, 99, 235, 0.4);
138
+ }
139
+
140
+ .btn-secondary {
141
+ background: var(--card);
142
+ color: var(--text);
143
+ border: 1px solid var(--border);
144
+ }
145
+
146
+ .btn-secondary:hover {
147
+ background: #f1f5f9;
148
+ border-color: #cbd5e1;
149
+ }
150
+
151
+ .hero-image {
152
+ position: relative;
153
+ display: flex;
154
+ justify-content: center;
155
+ align-items: center;
156
+ }
157
+
158
+ .mockup {
159
+ width: 100%;
160
+ max-width: 500px;
161
+ background: var(--card);
162
+ border-radius: 20px;
163
+ padding: 20px;
164
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
165
+ border: 1px solid var(--border);
166
+ }
167
+
168
+ .mockup-header {
169
+ display: flex;
170
+ align-items: center;
171
+ gap: 10px;
172
+ margin-bottom: 20px;
173
+ padding-bottom: 15px;
174
+ border-bottom: 1px solid var(--border);
175
+ }
176
+
177
+ .dot {
178
+ width: 12px;
179
+ height: 12px;
180
+ border-radius: 50%;
181
+ background: var(--border);
182
+ }
183
+
184
+ .dot.active { background: #10b981; }
185
+ .dot.warning { background: #f59e0b; }
186
+ .dot.error { background: #ef4444; }
187
+
188
+ .changelog-preview {
189
+ font-family: 'Courier New', monospace;
190
+ font-size: 14px;
191
+ line-height: 1.6;
192
+ color: #334155;
193
+ background: #f8fafc;
194
+ padding: 20px;
195
+ border-radius: 12px;
196
+ border-left: 4px solid var(--primary);
197
+ }
198
+
199
+ .changelog-line {
200
+ margin-bottom: 8px;
201
+ padding-left: 10px;
202
+ }
203
+
204
+ .changelog-line .type {
205
+ color: var(--primary);
206
+ font-weight: bold;
207
+ margin-right: 8px;
208
+ }
209
+
210
+ /* Features */
211
+ .features {
212
+ padding: 80px 0;
213
+ background: white;
214
+ }
215
+
216
+ .section-title {
217
+ text-align: center;
218
+ font-size: 36px;
219
+ font-weight: 700;
220
+ margin-bottom: 20px;
221
+ }
222
+
223
+ .section-subtitle {
224
+ text-align: center;
225
+ color: var(--text-light);
226
+ font-size: 18px;
227
+ margin-bottom: 60px;
228
+ }
229
+
230
+ .features-grid {
231
+ display: grid;
232
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
233
+ gap: 30px;
234
+ }
235
+
236
+ .feature-card {
237
+ background: var(--card);
238
+ padding: 30px;
239
+ border-radius: 16px;
240
+ border: 1px solid var(--border);
241
+ transition: all 0.3s ease;
242
+ }
243
+
244
+ .feature-card:hover {
245
+ transform: translateY(-5px);
246
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
247
+ }
248
+
249
+ .feature-icon {
250
+ width: 50px;
251
+ height: 50px;
252
+ background: linear-gradient(135deg, var(--primary), var(--primary-dark));
253
+ border-radius: 12px;
254
+ display: flex;
255
+ align-items: center;
256
+ justify-content: center;
257
+ color: white;
258
+ margin-bottom: 20px;
259
+ font-size: 20px;
260
+ }
261
+
262
+ .feature-title {
263
+ font-size: 20px;
264
+ font-weight: 700;
265
+ margin-bottom: 10px;
266
+ }
267
+
268
+ .feature-desc {
269
+ color: var(--text-light);
270
+ line-height: 1.6;
271
+ }
272
+
273
+ /* Stats */
274
+ .stats {
275
+ padding: 60px 0;
276
+ background: linear-gradient(135deg, #f8fafc, #e2e8f0);
277
+ }
278
+
279
+ .stats-grid {
280
+ display: grid;
281
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
282
+ gap: 40px;
283
+ text-align: center;
284
+ }
285
+
286
+ .stat-item {
287
+ background: var(--card);
288
+ padding: 30px;
289
+ border-radius: 16px;
290
+ border: 1px solid var(--border);
291
+ }
292
+
293
+ .stat-number {
294
+ font-size: 32px;
295
+ font-weight: 800;
296
+ color: var(--primary);
297
+ display: block;
298
+ margin-bottom: 8px;
299
+ }
300
+
301
+ .stat-label {
302
+ color: var(--text-light);
303
+ font-size: 14px;
304
+ text-transform: uppercase;
305
+ letter-spacing: 1px;
306
+ }
307
+
308
+ /* Footer */
309
+ footer {
310
+ padding: 60px 0 40px;
311
+ background: white;
312
+ border-top: 1px solid var(--border);
313
+ }
314
+
315
+ .footer-content {
316
+ display: flex;
317
+ justify-content: space-between;
318
+ align-items: center;
319
+ flex-wrap: wrap;
320
+ gap: 20px;
321
+ }
322
+
323
+ .footer-text {
324
+ color: var(--text-light);
325
+ font-size: 14px;
326
+ }
327
+
328
+ .social-links {
329
+ display: flex;
330
+ gap: 15px;
331
+ }
332
+
333
+ .social-link {
334
+ width: 40px;
335
+ height: 40px;
336
+ border-radius: 10px;
337
+ background: var(--bg);
338
+ border: 1px solid var(--border);
339
+ display: flex;
340
+ align-items: center;
341
+ justify-content: center;
342
+ color: var(--text);
343
+ text-decoration: none;
344
+ transition: all 0.3s ease;
345
+ }
346
+
347
+ .social-link:hover {
348
+ background: var(--primary);
349
+ color: white;
350
+ border-color: var(--primary);
351
+ transform: translateY(-2px);
352
+ }
353
+
354
+ /* Responsive */
355
+ @media (max-width: 768px) {
356
+ .hero {
357
+ grid-template-columns: 1fr;
358
+ text-align: center;
359
+ }
360
+
361
+ .hero h1 {
362
+ font-size: 36px;
363
+ }
364
+
365
+ .logo-sub {
366
+ margin-left: 0;
367
+ text-align: left;
368
+ }
369
+
370
+ .cta-group {
371
+ justify-content: center;
372
+ }
373
+
374
+ .footer-content {
375
+ flex-direction: column;
376
+ text-align: center;
377
+ }
378
+ }
379
+
380
+ /* Animation */
381
+ @keyframes fadeInUp {
382
+ from {
383
+ opacity: 0;
384
+ transform: translateY(20px);
385
+ }
386
+ to {
387
+ opacity: 1;
388
+ transform: translateY(0);
389
+ }
390
+ }
391
+
392
+ .animate {
393
+ animation: fadeInUp 0.6s ease-out;
394
+ }
395
+ </style>
396
+ </head>
397
+ <body>
398
+ <div class="container">
399
+ <!-- Header -->
400
+ <header>
401
+ <div class="logo animate">
402
+ <div class="logo-icon">AC</div>
403
+ <div>
404
+ <div class="logo-text">AutoChangelog</div>
405
+ <div class="logo-sub">Coming Soon - Spring 2024</div>
406
+ </div>
407
+ </div>
408
+ </header>
409
+
410
+ <!-- Hero Section -->
411
+ <section class="hero">
412
+ <div class="hero-content animate">
413
+ <h1>Automate Your Changelog Generation</h1>
414
+ <p>Stop manually writing changelogs. Let AutoChangelog analyze your commits, pull requests, and issues to generate beautiful, comprehensive changelogs automatically.</p>
415
+
416
+ <div class="cta-group">
417
+ <a href="#" class="btn btn-primary">
418
+ 🚀 Get Early Access
419
+ </a>
420
+ <a href="#" class="btn btn-secondary">
421
+ 📧 Join Waitlist
422
+ </a>
423
+ </div>
424
+ </div>
425
+
426
+ <div class="hero-image animate">
427
+ <div class="mockup">
428
+ <div class="mockup-header">
429
+ <div class="dot active"></div>
430
+ <div class="dot warning"></div>
431
+ <div class="dot error"></div>
432
+ <span style="margin-left: auto; color: var(--text-light); font-size: 12px;">changelog.md</span>
433
+ </div>
434
+ <div class="changelog-preview">
435
+ <div class="changelog-line">
436
+ <span class="type">✨</span> Add dark mode toggle to application settings
437
+ </div>
438
+ <div class="changelog-line">
439
+ <span class="type">🐛</span> Fix authentication timeout issue on mobile devices
440
+ </div>
441
+ <div class="changelog-line">
442
+ <span class="type">🚀</span> Optimize image loading for faster page performance
443
+ </div>
444
+ <div class="changelog-line">
445
+ <span class="type">📝</span> Update API documentation for v2.1 endpoints
446
+ </div>
447
+ <div class="changelog-line">
448
+ <span class="type">🎨</span> Redesign dashboard layout for better user experience
449
+ </div>
450
+ </div>
451
+ </div>
452
+ </div>
453
+ </section>
454
+ </div>
455
+
456
+ <!-- Features -->
457
+ <section class="features">
458
+ <div class="container">
459
+ <h2 class="section-title animate">Powerful Features</h2>
460
+ <p class="section-subtitle animate">Everything you need to keep your users informed</p>
461
+
462
+ <div class="features-grid">
463
+ <div class="feature-card animate">
464
+ <div class="feature-icon">🤖</div>
465
+ <h3 class="feature-title">AI-Powered Analysis</h3>
466
+ <p class="feature-desc">Smart algorithms analyze your commits, PRs, and issues to categorize changes automatically.</p>
467
+ </div>
468
+
469
+ <div class="feature-card animate">
470
+ <div class="feature-icon">🔗</div>
471
+ <h3 class="feature-title">GitHub Integration</h3>
472
+ <p class="feature-desc">Seamlessly connects with your GitHub repositories for real-time changelog updates.</p>
473
+ </div>
474
+
475
+ <div class="feature-card animate">
476
+ <div class="feature-icon">🎨</div>
477
+ <h3 class="feature-title">Multiple Formats</h3>
478
+ <p class="feature-desc">Generate changelogs in Markdown, HTML, or JSON formats to fit your workflow.</p>
479
+ </div>
480
+
481
+ <div class="feature-card animate">
482
+ <div class="feature-icon">⚡</div>
483
+ <h3 class="feature-title">Webhook Automation</h3>
484
+ <p class="feature-desc">Automatic changelog generation triggered by commits, releases, or scheduled intervals.</p>
485
+ </div>
486
+
487
+ <div class="feature-card animate">
488
+ <div class="feature-icon">📊</div>
489
+ <h3 class="feature-title">Team Analytics</h3>
490
+ <p class="feature-desc">Track team contributions, commit patterns, and project evolution over time.</p>
491
+ </div>
492
+
493
+ <div class="feature-card animate">
494
+ <div class="feature-icon">🔒</div>
495
+ <h3 class="feature-title">Enterprise Ready</h3>
496
+ <p class="feature-desc">Secure, scalable, and customizable for teams of all sizes with advanced permissions.</p>
497
+ </div>
498
+ </div>
499
+ </div>
500
+ </section>
501
+
502
+ <!-- Stats -->
503
+ <section class="stats">
504
+ <div class="container">
505
+ <div class="stats-grid">
506
+ <div class="stat-item animate">
507
+ <span class="stat-number">500+</span>
508
+ <span class="stat-label">Beta Users</span>
509
+ </div>
510
+ <div class="stat-item animate">
511
+ <span class="stat-number">50+</span>
512
+ <span class="stat-label">GitHub Integrations</span>
513
+ </div>
514
+ <div class="stat-item animate">
515
+ <span class="stat-number">95%</span>
516
+ <span class="stat-label">Accuracy Rate</span>
517
+ </div>
518
+ <div class="stat-item animate">
519
+ <span class="stat-number">10x</span>
520
+ <span class="stat-label">Time Saved</span>
521
+ </div>
522
+ </div>
523
+ </div>
524
+ </section>
525
+
526
+ <!-- Footer -->
527
+ <footer>
528
+ <div class="container">
529
+ <div class="footer-content">
530
+ <div class="footer-text">
531
+ © 2024 AutoChangelog. Built with ❤️ for developers.
532
+ </div>
533
+ <div class="social-links">
534
+ <a href="#" class="social-link">🐦</a>
535
+ <a href="#" class="social-link">📘</a>
536
+ <a href="#" class="social-link">💼</a>
537
+ <a href="#" class="social-link">🐙</a>
538
+ </div>
539
+ </div>
540
+ </div>
541
+ </footer>
542
+
543
+ <script>
544
+ // Simple animation on scroll
545
+ const observerOptions = {
546
+ threshold: 0.1,
547
+ rootMargin: '0px 0px -50px 0px'
548
+ };
549
+
550
+ const observer = new IntersectionObserver((entries) => {
551
+ entries.forEach(entry => {
552
+ if (entry.isIntersecting) {
553
+ entry.target.style.opacity = '1';
554
+ entry.target.style.transform = 'translateY(0)';
555
+ }
556
+ });
557
+ }, observerOptions);
558
+
559
+ document.querySelectorAll('.animate').forEach(el => {
560
+ el.style.opacity = '0';
561
+ el.style.transform = 'translateY(20px)';
562
+ el.style.transition = 'opacity 0.6s ease, transform 0.6s ease';
563
+ observer.observe(el);
564
+ });
565
+
566
+ // Smooth scrolling for buttons
567
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
568
+ anchor.addEventListener('click', function (e) {
569
+ e.preventDefault();
570
+ const target = document.querySelector(this.getAttribute('href'));
571
+ if (target) {
572
+ target.scrollIntoView({
573
+ behavior: 'smooth',
574
+ block: 'start'
575
+ });
576
+ }
577
+ });
578
+ });
579
+ </script>
580
+ </body>
581
+ </html>
@@ -0,0 +1,104 @@
1
+ require("dotenv").config();
2
+
3
+ const mongoose = require("mongoose");
4
+ const logger = require("./utils/logger");
5
+ const connectDB = require("./src/config/database");
6
+
7
+ // Import SuperBackend
8
+ const superbackend = require("@intranefr/superbackend");
9
+
10
+ const PORT = process.env.PORT || 5000;
11
+
12
+ // Connect to database first
13
+ connectDB();
14
+
15
+ // Wait for DB connection then start server
16
+ mongoose.connection.once("open", () => {
17
+ logger.info("MongoDB connected, initializing SuperBackend middleware...");
18
+
19
+ // Create SuperBackend middleware with autochangelog-specific options
20
+ const superbackendMiddleware = superbackend.middleware({
21
+ mongodbUri: process.env.MONGODB_URI,
22
+ corsOrigin: process.env.FRONTEND_URL || "http://localhost:3000",
23
+ jwtSecret: process.env.JWT_SECRET || process.env.JWT_ACCESS_SECRET,
24
+ dbConnection: mongoose.connection,
25
+ // Mount admin panel at /admin
26
+ adminPath: "/admin",
27
+ pagesPrefix: "/",
28
+ // Enable/disable features
29
+ telegram: {
30
+ enabled: process.env.TELEGRAM_ENABLED === "true",
31
+ },
32
+ cron: {
33
+ enabled: process.env.CRON_ENABLED !== "false",
34
+ },
35
+ });
36
+
37
+ // Import autochangelog app (which will mount on top of superbackend)
38
+ const app = require("./src/app");
39
+
40
+ // Mount SuperBackend middleware FIRST
41
+ // SuperBackend provides: auth, users, orgs, billing, admin at /admin
42
+ app.use(superbackendMiddleware);
43
+
44
+ // AutoChangelog adds: github integration, changelogs, repositories
45
+ // These routes are mounted in app.js and will be checked AFTER SuperBackend routes
46
+
47
+ // 404 handler — must come AFTER SuperBackend middleware
48
+ app.use("*", (req, res) => {
49
+ if (req.accepts("html")) {
50
+ res.status(404).render("404", { title: "Page Not Found" });
51
+ } else {
52
+ res.status(404).json({ success: false, message: "Route not found" });
53
+ }
54
+ });
55
+
56
+ // Start server
57
+ const server = app.listen(PORT, () => {
58
+ logger.info(`AutoChangelog server running on port ${PORT}`);
59
+ logger.info(`Environment: ${process.env.NODE_ENV || "development"}`);
60
+ logger.info(`SuperBackend admin panel: http://localhost:${PORT}/admin`);
61
+ });
62
+
63
+ // Attach WebSocket server if available
64
+ if (typeof superbackendMiddleware.attachWs === "function") {
65
+ superbackendMiddleware.attachWs(server);
66
+ }
67
+
68
+ // Graceful shutdown
69
+ const gracefulShutdown = (signal) => {
70
+ logger.info(`${signal} received, shutting down gracefully`);
71
+
72
+ server.close((err) => {
73
+ if (err) {
74
+ logger.error("Error during server shutdown:", err);
75
+ process.exit(1);
76
+ }
77
+
78
+ mongoose.connection.close(false, (err) => {
79
+ if (err) {
80
+ logger.error("Error during database shutdown:", err);
81
+ process.exit(1);
82
+ }
83
+
84
+ logger.info("Server shutdown complete");
85
+ process.exit(0);
86
+ });
87
+ });
88
+ };
89
+
90
+ process.on("SIGTERM", () => gracefulShutdown("SIGTERM"));
91
+ process.on("SIGINT", () => gracefulShutdown("SIGINT"));
92
+ });
93
+
94
+ // Handle uncaught exceptions
95
+ process.on("uncaughtException", (err) => {
96
+ logger.error("Uncaught Exception:", err);
97
+ process.exit(1);
98
+ });
99
+
100
+ // Handle unhandled promise rejections
101
+ process.on("unhandledRejection", (reason, promise) => {
102
+ logger.error("Unhandled Rejection at:", promise, "reason:", reason);
103
+ process.exit(1);
104
+ });