@intranefr/superbackend 1.6.7 → 1.7.8

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 +9 -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,231 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="light">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title><%= title %></title>
7
+
8
+ <!-- Tailwind CSS CDN -->
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+
11
+ <!-- DaisyUI CDN -->
12
+ <link href="https://cdn.jsdelivr.net/npm/daisyui@4.4.19/dist/full.min.css" rel="stylesheet" type="text/css" />
13
+
14
+ <!-- Vue 3 CDN -->
15
+ <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
16
+
17
+ <style>
18
+ [v-cloak] { display: none; }
19
+ </style>
20
+
21
+ <script>
22
+ tailwind.config = {
23
+ theme: {
24
+ extend: {
25
+ colors: {
26
+ primary: '#3b82f6',
27
+ secondary: '#8b5cf6',
28
+ }
29
+ }
30
+ }
31
+ }
32
+ </script>
33
+ </head>
34
+ <body class="min-h-screen bg-base-100">
35
+ <%- include('partials/navbar') %>
36
+
37
+ <div id="app" v-cloak>
38
+ <!-- Hero Section -->
39
+ <section class="hero min-h-[80vh] bg-gradient-to-br from-primary/10 to-secondary/10">
40
+ <div class="hero-content text-center">
41
+ <div class="max-w-4xl">
42
+ <div class="badge badge-primary badge-lg mb-4">Now with AI-Powered Summaries</div>
43
+ <h1 class="text-5xl md:text-7xl font-bold mb-6">
44
+ Automated Changelogs
45
+ <span class="block text-primary">for Your GitHub Repos</span>
46
+ </h1>
47
+ <p class="text-xl md:text-2xl mb-8 text-gray-600 max-w-2xl mx-auto">
48
+ Generate beautiful, consistent changelogs from your commits and pull requests.
49
+ Save hours of manual work every release.
50
+ </p>
51
+ <div class="flex flex-col sm:flex-row gap-4 justify-center">
52
+ <a href="/auth/register" class="btn btn-primary btn-lg">
53
+ Start Free Trial
54
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
55
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6" />
56
+ </svg>
57
+ </a>
58
+ <a href="/features" class="btn btn-outline btn-lg">Learn More</a>
59
+ </div>
60
+ <p class="mt-4 text-sm text-gray-500">No credit card required. 14-day free trial.</p>
61
+ </div>
62
+ </div>
63
+ </section>
64
+
65
+ <!-- Features Section -->
66
+ <section class="py-20 px-4">
67
+ <div class="max-w-6xl mx-auto">
68
+ <div class="text-center mb-16">
69
+ <h2 class="text-4xl font-bold mb-4">How It Works</h2>
70
+ <p class="text-xl text-gray-600">Generate changelogs in three simple steps</p>
71
+ </div>
72
+
73
+ <div class="grid md:grid-cols-3 gap-8">
74
+ <!-- Step 1 -->
75
+ <div class="card bg-base-100 shadow-xl hover:shadow-2xl transition-shadow">
76
+ <div class="card-body items-center text-center">
77
+ <div class="w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center mb-4">
78
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
79
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
80
+ </svg>
81
+ </div>
82
+ <h3 class="card-title text-2xl">1. Connect Repo</h3>
83
+ <p class="text-gray-600">Link your GitHub repository with one click. We support public and private repos.</p>
84
+ </div>
85
+ </div>
86
+
87
+ <!-- Step 2 -->
88
+ <div class="card bg-base-100 shadow-xl hover:shadow-2xl transition-shadow">
89
+ <div class="card-body items-center text-center">
90
+ <div class="w-16 h-16 rounded-full bg-secondary/10 flex items-center justify-center mb-4">
91
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-secondary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
92
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z" />
93
+ </svg>
94
+ </div>
95
+ <h3 class="card-title text-2xl">2. Select Period</h3>
96
+ <p class="text-gray-600">Choose the time period for your changelog. Monthly, weekly, or custom ranges.</p>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- Step 3 -->
101
+ <div class="card bg-base-100 shadow-xl hover:shadow-2xl transition-shadow">
102
+ <div class="card-body items-center text-center">
103
+ <div class="w-16 h-16 rounded-full bg-success/10 flex items-center justify-center mb-4">
104
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-success" fill="none" viewBox="0 0 24 24" stroke="currentColor">
105
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
106
+ </svg>
107
+ </div>
108
+ <h3 class="card-title text-2xl">3. Generate</h3>
109
+ <p class="text-gray-600">Get a beautifully formatted changelog in Markdown, HTML, or JSON format.</p>
110
+ </div>
111
+ </div>
112
+ </div>
113
+ </div>
114
+ </section>
115
+
116
+ <!-- Features Grid -->
117
+ <section class="py-20 bg-base-200 px-4">
118
+ <div class="max-w-6xl mx-auto">
119
+ <div class="text-center mb-16">
120
+ <h2 class="text-4xl font-bold mb-4">Powerful Features</h2>
121
+ <p class="text-xl text-gray-600">Everything you need for professional changelogs</p>
122
+ </div>
123
+
124
+ <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
125
+ <div class="card bg-base-100">
126
+ <div class="card-body">
127
+ <h3 class="card-title">
128
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-primary mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
129
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z" />
130
+ </svg>
131
+ AI-Powered Summaries
132
+ </h3>
133
+ <p class="text-gray-600">Smart grouping and summarization of commits using AI.</p>
134
+ </div>
135
+ </div>
136
+
137
+ <div class="card bg-base-100">
138
+ <div class="card-body">
139
+ <h3 class="card-title">
140
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-primary mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
141
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01" />
142
+ </svg>
143
+ Multiple Formats
144
+ </h3>
145
+ <p class="text-gray-600">Export as Markdown, HTML, or JSON. GitHub releases integration.</p>
146
+ </div>
147
+ </div>
148
+
149
+ <div class="card bg-base-100">
150
+ <div class="card-body">
151
+ <h3 class="card-title">
152
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-primary mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
153
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
154
+ </svg>
155
+ Automated Scheduling
156
+ </h3>
157
+ <p class="text-gray-600">Set up automatic changelog generation on your schedule.</p>
158
+ </div>
159
+ </div>
160
+
161
+ <div class="card bg-base-100">
162
+ <div class="card-body">
163
+ <h3 class="card-title">
164
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-primary mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
165
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
166
+ </svg>
167
+ Team Collaboration
168
+ </h3>
169
+ <p class="text-gray-600">Share changelogs with your team. Organization support.</p>
170
+ </div>
171
+ </div>
172
+
173
+ <div class="card bg-base-100">
174
+ <div class="card-body">
175
+ <h3 class="card-title">
176
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-primary mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
177
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" />
178
+ </svg>
179
+ Private & Secure
180
+ </h3>
181
+ <p class="text-gray-600">Your code never leaves your repos. Secure GitHub OAuth.</p>
182
+ </div>
183
+ </div>
184
+
185
+ <div class="card bg-base-100">
186
+ <div class="card-body">
187
+ <h3 class="card-title">
188
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 text-primary mr-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
189
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4" />
190
+ </svg>
191
+ Webhook Integration
192
+ </h3>
193
+ <p class="text-gray-600">Trigger changelogs on every push, PR merge, or release.</p>
194
+ </div>
195
+ </div>
196
+ </div>
197
+ </div>
198
+ </section>
199
+
200
+ <!-- CTA Section -->
201
+ <section class="py-20 px-4">
202
+ <div class="max-w-4xl mx-auto text-center">
203
+ <h2 class="text-4xl font-bold mb-6">Ready to Automate Your Changelogs?</h2>
204
+ <p class="text-xl text-gray-600 mb-8">
205
+ Join thousands of developers who save hours every week with AutoChangelog.
206
+ </p>
207
+ <a href="/auth/register" class="btn btn-primary btn-lg">
208
+ Get Started Free
209
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 ml-2" fill="none" viewBox="0 0 24 24" stroke="currentColor">
210
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7l5 5m0 0l-5 5m5-5H6" />
211
+ </svg>
212
+ </a>
213
+ </div>
214
+ </section>
215
+ </div>
216
+
217
+ <%- include('partials/footer') %>
218
+
219
+ <script>
220
+ const { createApp } = Vue;
221
+
222
+ createApp({
223
+ data() {
224
+ return {
225
+ // Landing page can have interactive elements here
226
+ }
227
+ }
228
+ }).mount('#app');
229
+ </script>
230
+ </body>
231
+ </html>
@@ -0,0 +1,44 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="light">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title><%= title %></title>
7
+
8
+ <!-- Tailwind CSS CDN -->
9
+ <script src="https://cdn.tailwindcss.com"></script>
10
+
11
+ <!-- DaisyUI CDN -->
12
+ <link href="https://cdn.jsdelivr.net/npm/daisyui@4.4.19/dist/full.min.css" rel="stylesheet" type="text/css" />
13
+
14
+ <!-- Vue 3 CDN -->
15
+ <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
16
+
17
+ <!-- Custom styles -->
18
+ <style>
19
+ [v-cloak] { display: none; }
20
+ </style>
21
+
22
+ <script>
23
+ tailwind.config = {
24
+ theme: {
25
+ extend: {
26
+ colors: {
27
+ primary: '#3b82f6',
28
+ secondary: '#8b5cf6',
29
+ }
30
+ }
31
+ }
32
+ }
33
+ </script>
34
+ </head>
35
+ <body class="min-h-screen bg-base-100">
36
+ <%- include('../partials/navbar') %>
37
+
38
+ <main>
39
+ <%- body %>
40
+ </main>
41
+
42
+ <%- include('../partials/footer') %>
43
+ </body>
44
+ </html>
@@ -0,0 +1,104 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="light">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Login - AutoChangelog</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link href="https://cdn.jsdelivr.net/npm/daisyui@4.4.19/dist/full.min.css" rel="stylesheet" type="text/css" />
9
+ <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
10
+ <style>[v-cloak] { display: none; }</style>
11
+ </head>
12
+ <body class="min-h-screen bg-base-200 flex items-center justify-center">
13
+ <div id="app" v-cloak class="w-full max-w-sm px-4">
14
+ <div class="text-center mb-8">
15
+ <a href="/" class="inline-flex items-center gap-2 text-2xl font-bold">
16
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
17
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
18
+ </svg>
19
+ AutoChangelog
20
+ </a>
21
+ </div>
22
+
23
+ <div class="card bg-base-100 shadow-xl">
24
+ <div class="card-body">
25
+ <h2 class="card-title text-2xl justify-center mb-2">Welcome back</h2>
26
+ <p class="text-center text-gray-500 text-sm mb-4">Sign in to your account</p>
27
+
28
+ <div v-if="error" class="alert alert-error mb-4">
29
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
30
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
31
+ </svg>
32
+ <span>{{ error }}</span>
33
+ </div>
34
+
35
+ <form @submit.prevent="login">
36
+ <div class="form-control mb-4">
37
+ <label class="label"><span class="label-text">Email</span></label>
38
+ <input v-model="form.email" type="email" placeholder="you@example.com" class="input input-bordered" required />
39
+ </div>
40
+
41
+ <div class="form-control mb-6">
42
+ <label class="label"><span class="label-text">Password</span></label>
43
+ <input v-model="form.password" type="password" placeholder="••••••••" class="input input-bordered" required />
44
+ </div>
45
+
46
+ <button type="submit" class="btn btn-primary w-full" :disabled="loading">
47
+ <span v-if="loading" class="loading loading-spinner loading-sm mr-2"></span>
48
+ {{ loading ? 'Signing in...' : 'Sign in' }}
49
+ </button>
50
+ </form>
51
+
52
+ <div class="divider text-sm text-gray-500">OR</div>
53
+ <a href="/auth/github" class="btn btn-neutral w-full">
54
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" viewBox="0 0 24 24">
55
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
56
+ </svg>
57
+ Continue with GitHub
58
+ </a>
59
+
60
+ <div class="divider text-sm text-gray-500">Don't have an account?</div>
61
+ <a href="/auth/register" class="btn btn-outline w-full">Create account</a>
62
+ </div>
63
+ </div>
64
+ </div>
65
+
66
+ <script>
67
+ const { createApp } = Vue;
68
+ createApp({
69
+ data() {
70
+ return {
71
+ form: { email: '', password: '' },
72
+ loading: false,
73
+ error: null,
74
+ };
75
+ },
76
+ methods: {
77
+ async login() {
78
+ this.loading = true;
79
+ this.error = null;
80
+ try {
81
+ const res = await fetch('/api/auth/login', {
82
+ method: 'POST',
83
+ headers: { 'Content-Type': 'application/json' },
84
+ body: JSON.stringify(this.form),
85
+ });
86
+ const data = await res.json();
87
+ if (res.ok && (data.token || data.accessToken)) {
88
+ localStorage.setItem('token', data.token || data.accessToken);
89
+ if (data.refreshToken) localStorage.setItem('refreshToken', data.refreshToken);
90
+ window.location.href = '/dashboard';
91
+ } else {
92
+ this.error = data.message || 'Invalid email or password.';
93
+ }
94
+ } catch (e) {
95
+ this.error = 'Network error. Please try again.';
96
+ } finally {
97
+ this.loading = false;
98
+ }
99
+ },
100
+ },
101
+ }).mount('#app');
102
+ </script>
103
+ </body>
104
+ </html>
@@ -0,0 +1,20 @@
1
+ <footer class="footer footer-center p-10 bg-base-200 text-base-content rounded mt-20">
2
+ <nav class="grid grid-flow-col gap-4">
3
+ <a href="/" class="link link-hover">Home</a>
4
+ <a href="/features" class="link link-hover">Features</a>
5
+ <a href="/pricing" class="link link-hover">Pricing</a>
6
+ <a href="/docs" class="link link-hover">Documentation</a>
7
+ </nav>
8
+ <nav>
9
+ <div class="grid grid-flow-col gap-4">
10
+ <a href="https://github.com" target="_blank" class="link link-hover">
11
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="fill-current">
12
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
13
+ </svg>
14
+ </a>
15
+ </div>
16
+ </nav>
17
+ <aside>
18
+ <p>Copyright © 2024 AutoChangelog. All rights reserved.</p>
19
+ </aside>
20
+ </footer>
@@ -0,0 +1,51 @@
1
+ <nav class="navbar bg-base-100 shadow-lg sticky top-0 z-50">
2
+ <div class="navbar-start">
3
+ <div class="dropdown">
4
+ <label tabindex="0" class="btn btn-ghost lg:hidden">
5
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
6
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h8m-8 6h16" />
7
+ </svg>
8
+ </label>
9
+ <ul tabindex="0" class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
10
+ <li><a href="/">Home</a></li>
11
+ <li><a href="/features">Features</a></li>
12
+ <li><a href="/pricing">Pricing</a></li>
13
+ </ul>
14
+ </div>
15
+ <a href="/" class="btn btn-ghost normal-case text-xl">
16
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 mr-2 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
17
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
18
+ </svg>
19
+ AutoChangelog
20
+ </a>
21
+ </div>
22
+
23
+ <div class="navbar-center hidden lg:flex">
24
+ <ul class="menu menu-horizontal px-1">
25
+ <li><a href="/">Home</a></li>
26
+ <li><a href="/features">Features</a></li>
27
+ <li><a href="/pricing">Pricing</a></li>
28
+ </ul>
29
+ </div>
30
+
31
+ <div class="navbar-end gap-2">
32
+ <% if (typeof user !== 'undefined' && user) { %>
33
+ <a href="/dashboard" class="btn btn-primary">Dashboard</a>
34
+ <div class="dropdown dropdown-end">
35
+ <label tabindex="0" class="btn btn-ghost btn-circle avatar">
36
+ <div class="w-10 rounded-full">
37
+ <img src="<%= user.avatar || 'https://ui-avatars.com/api/?name=' + encodeURIComponent(user.name || user.email) %>" alt="<%= user.name || user.email %>">
38
+ </div>
39
+ </label>
40
+ <ul tabindex="0" class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-100 rounded-box w-52">
41
+ <li><a href="/dashboard">Dashboard</a></li>
42
+ <li><a href="/settings">Settings</a></li>
43
+ <li><a href="/auth/logout">Logout</a></li>
44
+ </ul>
45
+ </div>
46
+ <% } else { %>
47
+ <a href="/auth/login" class="btn btn-ghost">Login</a>
48
+ <a href="/auth/register" class="btn btn-primary">Get Started</a>
49
+ <% } %>
50
+ </div>
51
+ </nav>
@@ -0,0 +1,109 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="light">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Create Account - AutoChangelog</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link href="https://cdn.jsdelivr.net/npm/daisyui@4.4.19/dist/full.min.css" rel="stylesheet" type="text/css" />
9
+ <script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
10
+ <style>[v-cloak] { display: none; }</style>
11
+ </head>
12
+ <body class="min-h-screen bg-base-200 flex items-center justify-center">
13
+ <div id="app" v-cloak class="w-full max-w-sm px-4">
14
+ <div class="text-center mb-8">
15
+ <a href="/" class="inline-flex items-center gap-2 text-2xl font-bold">
16
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-8 w-8 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor">
17
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
18
+ </svg>
19
+ AutoChangelog
20
+ </a>
21
+ </div>
22
+
23
+ <div class="card bg-base-100 shadow-xl">
24
+ <div class="card-body">
25
+ <h2 class="card-title text-2xl justify-center mb-2">Create account</h2>
26
+ <p class="text-center text-gray-500 text-sm mb-4">Start your free 14-day trial</p>
27
+
28
+ <div v-if="error" class="alert alert-error mb-4">
29
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 shrink-0" fill="none" viewBox="0 0 24 24" stroke="currentColor">
30
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
31
+ </svg>
32
+ <span>{{ error }}</span>
33
+ </div>
34
+
35
+ <form @submit.prevent="register">
36
+ <div class="form-control mb-4">
37
+ <label class="label"><span class="label-text">Name</span></label>
38
+ <input v-model="form.name" type="text" placeholder="Your name" class="input input-bordered" required />
39
+ </div>
40
+
41
+ <div class="form-control mb-4">
42
+ <label class="label"><span class="label-text">Email</span></label>
43
+ <input v-model="form.email" type="email" placeholder="you@example.com" class="input input-bordered" required />
44
+ </div>
45
+
46
+ <div class="form-control mb-6">
47
+ <label class="label"><span class="label-text">Password</span></label>
48
+ <input v-model="form.password" type="password" placeholder="Min. 6 characters" class="input input-bordered" required minlength="6" />
49
+ </div>
50
+
51
+ <button type="submit" class="btn btn-primary w-full" :disabled="loading">
52
+ <span v-if="loading" class="loading loading-spinner loading-sm mr-2"></span>
53
+ {{ loading ? 'Creating account...' : 'Create account' }}
54
+ </button>
55
+ </form>
56
+
57
+ <div class="divider text-sm text-gray-500">OR</div>
58
+ <a href="/auth/github" class="btn btn-neutral w-full">
59
+ <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 mr-2" viewBox="0 0 24 24">
60
+ <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"/>
61
+ </svg>
62
+ Sign up with GitHub
63
+ </a>
64
+
65
+ <div class="divider text-sm text-gray-500">Already have an account?</div>
66
+ <a href="/auth/login" class="btn btn-outline w-full">Sign in</a>
67
+ </div>
68
+ </div>
69
+ </div>
70
+
71
+ <script>
72
+ const { createApp } = Vue;
73
+ createApp({
74
+ data() {
75
+ return {
76
+ form: { name: '', email: '', password: '' },
77
+ loading: false,
78
+ error: null,
79
+ };
80
+ },
81
+ methods: {
82
+ async register() {
83
+ this.loading = true;
84
+ this.error = null;
85
+ try {
86
+ const res = await fetch('/api/auth/register', {
87
+ method: 'POST',
88
+ headers: { 'Content-Type': 'application/json' },
89
+ body: JSON.stringify(this.form),
90
+ });
91
+ const data = await res.json();
92
+ if (res.ok && (data.token || data.accessToken)) {
93
+ localStorage.setItem('token', data.token || data.accessToken);
94
+ if (data.refreshToken) localStorage.setItem('refreshToken', data.refreshToken);
95
+ window.location.href = '/dashboard';
96
+ } else {
97
+ this.error = data.message || 'Registration failed. Please try again.';
98
+ }
99
+ } catch (e) {
100
+ this.error = 'Network error. Please try again.';
101
+ } finally {
102
+ this.loading = false;
103
+ }
104
+ },
105
+ },
106
+ }).mount('#app');
107
+ </script>
108
+ </body>
109
+ </html>