@bardioc/create-bardioc-app 0.5.4 → 0.5.6

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 (87) hide show
  1. package/README.md +3 -5
  2. package/bin/create.mjs +2 -4
  3. package/package.json +5 -5
  4. package/templates/_base/README.md +17 -3
  5. package/templates/_base/scripts/stamp-manifest.mjs +1 -1
  6. package/templates/_opt-link/scripts/link-source.mjs +7 -5
  7. package/templates/angular/.env.example +4 -2
  8. package/templates/angular/_gitignore +1 -0
  9. package/templates/angular/package.json +2 -4
  10. package/templates/angular/public/runtime-env.js +1 -1
  11. package/templates/angular/scripts/dev-auth-proxy.mjs +10 -84
  12. package/templates/angular/scripts/sync-runtime-env.mjs +17 -36
  13. package/templates/angular/src/app/app.component.ts +2 -2
  14. package/templates/angular/src/app/bardioc-bridge.ts +1 -1
  15. package/templates/angular/src/index.html +2 -2
  16. package/templates/angular/src/runtime-env.ts +1 -1
  17. package/templates/angular/src/styles.css +84 -80
  18. package/templates/angular/src/vite-env.d.ts +3 -3
  19. package/templates/angular/tsconfig.json +1 -0
  20. package/templates/manifest.json +2 -10
  21. package/templates/nextjs/.env.example +4 -2
  22. package/templates/nextjs/_gitignore +1 -0
  23. package/templates/nextjs/app/globals.css +31 -28
  24. package/templates/nextjs/app/layout.tsx +2 -0
  25. package/templates/nextjs/app/page.tsx +8 -5
  26. package/templates/nextjs/eslint.config.mjs +4 -0
  27. package/templates/nextjs/global.d.ts +1 -1
  28. package/templates/nextjs/next.config.ts +7 -26
  29. package/templates/nextjs/package.json +8 -3
  30. package/templates/nextjs/prettier.config.mjs +1 -0
  31. package/templates/nextjs/scripts/dev-auth-proxy.mjs +17 -0
  32. package/templates/nextjs/tailwind.config.ts +1 -4
  33. package/templates/nextjs/tsconfig.json +3 -18
  34. package/templates/preact/eslint.config.mjs +3 -0
  35. package/templates/preact/index.html +2 -2
  36. package/templates/preact/package.json +8 -3
  37. package/templates/preact/prettier.config.mjs +1 -0
  38. package/templates/preact/src/App.tsx +6 -5
  39. package/templates/preact/src/index.css +31 -28
  40. package/templates/preact/src/vite-env.d.ts +2 -2
  41. package/templates/preact/tsconfig.json +4 -10
  42. package/templates/preact/vite.config.ts +6 -1
  43. package/templates/solid/eslint.config.mjs +3 -0
  44. package/templates/solid/index.html +2 -2
  45. package/templates/solid/package.json +8 -4
  46. package/templates/solid/prettier.config.mjs +1 -0
  47. package/templates/solid/src/App.tsx +7 -6
  48. package/templates/solid/src/bardioc-sdk.tsx +18 -18
  49. package/templates/solid/src/index.css +31 -28
  50. package/templates/solid/src/vite-env.d.ts +2 -2
  51. package/templates/solid/tsconfig.json +4 -9
  52. package/templates/solid/vite.config.ts +7 -2
  53. package/templates/svelte/_gitignore +1 -0
  54. package/templates/svelte/eslint.config.mjs +3 -0
  55. package/templates/svelte/index.html +2 -2
  56. package/templates/svelte/package.json +8 -3
  57. package/templates/svelte/prettier.config.mjs +1 -0
  58. package/templates/svelte/src/App.svelte +1 -1
  59. package/templates/svelte/src/index.css +31 -28
  60. package/templates/svelte/src/main.ts +1 -1
  61. package/templates/svelte/src/vite-env.d.ts +2 -2
  62. package/templates/svelte/tsconfig.json +4 -4
  63. package/templates/svelte/vite.config.ts +6 -1
  64. package/templates/vite/CLAUDE.md +11 -8
  65. package/templates/vite/eslint.config.mjs +3 -0
  66. package/templates/vite/index.html +2 -2
  67. package/templates/vite/package.json +9 -5
  68. package/templates/vite/prettier.config.mjs +1 -0
  69. package/templates/vite/src/climate/climate-data.ts +13 -6
  70. package/templates/vite/src/climate/conditions-chart.tsx +6 -8
  71. package/templates/vite/src/events/live-events-view.tsx +1 -3
  72. package/templates/vite/src/graph/requests.ts +2 -1
  73. package/templates/vite/src/i18n.tsx +7 -9
  74. package/templates/vite/src/shell/header.tsx +1 -2
  75. package/templates/vite/tsconfig.json +4 -10
  76. package/templates/vite/vite.config.ts +7 -2
  77. package/templates/vue/_gitignore +1 -0
  78. package/templates/vue/eslint.config.mjs +3 -0
  79. package/templates/vue/index.html +2 -2
  80. package/templates/vue/package.json +8 -3
  81. package/templates/vue/prettier.config.mjs +1 -0
  82. package/templates/vue/src/App.vue +26 -10
  83. package/templates/vue/src/bardioc-sdk.ts +11 -11
  84. package/templates/vue/src/index.css +31 -28
  85. package/templates/vue/src/vite-env.d.ts +2 -2
  86. package/templates/vue/tsconfig.json +5 -9
  87. package/templates/vue/vite.config.ts +7 -2
@@ -1,258 +1,262 @@
1
1
  * {
2
- box-sizing: border-box;
2
+ box-sizing: border-box;
3
3
  }
4
4
 
5
5
  html,
6
6
  body,
7
7
  app-root {
8
- margin: 0;
9
- padding: 0;
10
- height: 100%;
11
- width: 100%;
12
- overflow: hidden;
8
+ margin: 0;
9
+ padding: 0;
10
+ height: 100%;
11
+ width: 100%;
12
+ overflow: hidden;
13
13
  }
14
14
 
15
15
  :root {
16
- --background: oklch(17.88% 0.0075 229.38);
17
- --foreground: oklch(98.69% 0.0093 99.98);
18
- --muted-foreground: oklch(86.03% 0.0056 95.11);
19
- --border: oklch(1 0 0 / 10%);
20
- --primary: oklch(97.02% 0 0);
21
- --primary-foreground: oklch(36.94% 0.0053 236.64);
22
- --destructive: oklch(68.04% 0.1386 21.38);
23
- --ring: oklch(79.43% 0.0084 98.91);
16
+ --background: oklch(17.88% 0.0075 229.38);
17
+ --foreground: oklch(98.69% 0.0093 99.98);
18
+ --muted-foreground: oklch(86.03% 0.0056 95.11);
19
+ --border: oklch(1 0 0 / 10%);
20
+ --primary: oklch(97.02% 0 0);
21
+ --primary-foreground: oklch(36.94% 0.0053 236.64);
22
+ --destructive: oklch(68.04% 0.1386 21.38);
23
+ --ring: oklch(79.43% 0.0084 98.91);
24
24
  }
25
25
 
26
26
  body {
27
- background: var(--background);
28
- color: var(--foreground);
29
- font-family: system-ui, -apple-system, sans-serif;
27
+ background: var(--background);
28
+ color: var(--foreground);
29
+ font-family:
30
+ system-ui,
31
+ -apple-system,
32
+ sans-serif;
30
33
  }
31
34
 
32
35
  code {
33
- font-family: inherit;
36
+ font-family: inherit;
34
37
  }
35
38
 
36
39
  .bg-background {
37
- background-color: var(--background);
40
+ background-color: var(--background);
38
41
  }
39
42
 
40
43
  .text-foreground {
41
- color: var(--foreground);
44
+ color: var(--foreground);
42
45
  }
43
46
 
44
47
  .text-muted-foreground {
45
- color: var(--muted-foreground);
48
+ color: var(--muted-foreground);
46
49
  }
47
50
 
48
51
  .border-border {
49
- border-color: var(--border);
52
+ border-color: var(--border);
50
53
  }
51
54
 
52
55
  .bg-primary {
53
- background-color: var(--primary);
56
+ background-color: var(--primary);
54
57
  }
55
58
 
56
59
  .text-primary-foreground {
57
- color: var(--primary-foreground);
60
+ color: var(--primary-foreground);
58
61
  }
59
62
 
60
63
  .text-destructive {
61
- color: var(--destructive);
64
+ color: var(--destructive);
62
65
  }
63
66
 
64
67
  .focus\:ring-ring:focus {
65
- --tw-ring-color: var(--ring);
68
+ --tw-ring-color: var(--ring);
66
69
  }
67
70
 
68
71
  .hover\:bg-primary\/90:hover {
69
- background-color: oklch(from var(--primary) calc(l * 0.9) c h);
72
+ background-color: oklch(from var(--primary) calc(l * 0.9) c h);
70
73
  }
71
74
 
72
75
  .hover\:text-foreground:hover {
73
- color: var(--foreground);
76
+ color: var(--foreground);
74
77
  }
75
78
 
76
79
  .mx-auto {
77
- margin-left: auto;
78
- margin-right: auto;
80
+ margin-left: auto;
81
+ margin-right: auto;
79
82
  }
80
83
 
81
84
  .m-0 {
82
- margin: 0;
85
+ margin: 0;
83
86
  }
84
87
 
85
88
  .flex {
86
- display: flex;
89
+ display: flex;
87
90
  }
88
91
 
89
92
  .min-h-0 {
90
- min-height: 0;
93
+ min-height: 0;
91
94
  }
92
95
 
93
96
  .min-h-screen {
94
- min-height: 100vh;
97
+ min-height: 100vh;
95
98
  }
96
99
 
97
100
  .h-full {
98
- height: 100%;
101
+ height: 100%;
99
102
  }
100
103
 
101
104
  .w-full {
102
- width: 100%;
105
+ width: 100%;
103
106
  }
104
107
 
105
108
  .max-w-2xl {
106
- max-width: 42rem;
109
+ max-width: 42rem;
107
110
  }
108
111
 
109
112
  .max-w-3xl {
110
- max-width: 48rem;
113
+ max-width: 48rem;
111
114
  }
112
115
 
113
116
  .shrink-0 {
114
- flex-shrink: 0;
117
+ flex-shrink: 0;
115
118
  }
116
119
 
117
120
  .flex-1 {
118
- flex: 1 1 0%;
121
+ flex: 1 1 0%;
119
122
  }
120
123
 
121
124
  .flex-col {
122
- flex-direction: column;
125
+ flex-direction: column;
123
126
  }
124
127
 
125
128
  .flex-wrap {
126
- flex-wrap: wrap;
129
+ flex-wrap: wrap;
127
130
  }
128
131
 
129
132
  .items-center {
130
- align-items: center;
133
+ align-items: center;
131
134
  }
132
135
 
133
136
  .justify-center {
134
- justify-content: center;
137
+ justify-content: center;
135
138
  }
136
139
 
137
140
  .gap-0 {
138
- gap: 0;
141
+ gap: 0;
139
142
  }
140
143
 
141
144
  .gap-1 {
142
- gap: 0.25rem;
145
+ gap: 0.25rem;
143
146
  }
144
147
 
145
148
  .gap-2 {
146
- gap: 0.5rem;
149
+ gap: 0.5rem;
147
150
  }
148
151
 
149
152
  .gap-3 {
150
- gap: 0.75rem;
153
+ gap: 0.75rem;
151
154
  }
152
155
 
153
156
  .gap-4 {
154
- gap: 1rem;
157
+ gap: 1rem;
155
158
  }
156
159
 
157
160
  .overflow-hidden {
158
- overflow: hidden;
161
+ overflow: hidden;
159
162
  }
160
163
 
161
164
  .overflow-auto {
162
- overflow: auto;
165
+ overflow: auto;
163
166
  }
164
167
 
165
168
  .rounded {
166
- border-radius: 0.25rem;
169
+ border-radius: 0.25rem;
167
170
  }
168
171
 
169
172
  .rounded-xl {
170
- border-radius: 0.75rem;
173
+ border-radius: 0.75rem;
171
174
  }
172
175
 
173
176
  .border {
174
- border-width: 1px;
175
- border-style: solid;
177
+ border-width: 1px;
178
+ border-style: solid;
176
179
  }
177
180
 
178
181
  .border-b {
179
- border-bottom-width: 1px;
180
- border-bottom-style: solid;
182
+ border-bottom-width: 1px;
183
+ border-bottom-style: solid;
181
184
  }
182
185
 
183
186
  .p-3 {
184
- padding: 0.75rem;
187
+ padding: 0.75rem;
185
188
  }
186
189
 
187
190
  .p-4 {
188
- padding: 1rem;
191
+ padding: 1rem;
189
192
  }
190
193
 
191
194
  .px-3 {
192
- padding-left: 0.75rem;
193
- padding-right: 0.75rem;
195
+ padding-left: 0.75rem;
196
+ padding-right: 0.75rem;
194
197
  }
195
198
 
196
199
  .py-1 {
197
- padding-top: 0.25rem;
198
- padding-bottom: 0.25rem;
200
+ padding-top: 0.25rem;
201
+ padding-bottom: 0.25rem;
199
202
  }
200
203
 
201
204
  .pb-2 {
202
- padding-bottom: 0.5rem;
205
+ padding-bottom: 0.5rem;
203
206
  }
204
207
 
205
208
  .text-center {
206
- text-align: center;
209
+ text-align: center;
207
210
  }
208
211
 
209
212
  .text-2xl {
210
- font-size: 1.5rem;
211
- line-height: 2rem;
213
+ font-size: 1.5rem;
214
+ line-height: 2rem;
212
215
  }
213
216
 
214
217
  .text-xs {
215
- font-size: 0.75rem;
216
- line-height: 1rem;
218
+ font-size: 0.75rem;
219
+ line-height: 1rem;
217
220
  }
218
221
 
219
222
  .text-\[11px\] {
220
- font-size: 11px;
223
+ font-size: 11px;
221
224
  }
222
225
 
223
226
  .font-medium {
224
- font-weight: 500;
227
+ font-weight: 500;
225
228
  }
226
229
 
227
230
  .font-semibold {
228
- font-weight: 600;
231
+ font-weight: 600;
229
232
  }
230
233
 
231
234
  .font-mono {
232
- font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
233
- 'Courier New', monospace;
235
+ font-family:
236
+ ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
237
+ monospace;
234
238
  }
235
239
 
236
240
  .leading-5 {
237
- line-height: 1.25rem;
241
+ line-height: 1.25rem;
238
242
  }
239
243
 
240
244
  .whitespace-pre-wrap {
241
- white-space: pre-wrap;
245
+ white-space: pre-wrap;
242
246
  }
243
247
 
244
248
  .break-all {
245
- word-break: break-all;
249
+ word-break: break-all;
246
250
  }
247
251
 
248
252
  .bg-muted\/20 {
249
- background-color: oklch(from var(--muted-foreground) l c h / 0.2);
253
+ background-color: oklch(from var(--muted-foreground) l c h / 0.2);
250
254
  }
251
255
 
252
256
  .disabled\:opacity-50:disabled {
253
- opacity: 0.5;
257
+ opacity: 0.5;
254
258
  }
255
259
 
256
260
  .disabled\:cursor-not-allowed:disabled {
257
- cursor: not-allowed;
261
+ cursor: not-allowed;
258
262
  }
@@ -1,8 +1,8 @@
1
1
  interface ImportMetaEnv {
2
- readonly DEV?: boolean;
3
- readonly VITE_APP_NAME?: string;
2
+ readonly DEV?: boolean;
3
+ readonly VITE_APP_NAME?: string;
4
4
  }
5
5
 
6
6
  interface ImportMeta {
7
- readonly env: ImportMetaEnv;
7
+ readonly env: ImportMetaEnv;
8
8
  }
@@ -7,6 +7,7 @@
7
7
  "noPropertyAccessFromIndexSignature": true,
8
8
  "noImplicitReturns": true,
9
9
  "noFallthroughCasesInSwitch": true,
10
+ "noUncheckedIndexedAccess": true,
10
11
  "skipLibCheck": true,
11
12
  "esModuleInterop": true,
12
13
  "sourceMap": true,
@@ -1,13 +1,5 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "defaultTemplate": "vite",
4
- "templates": [
5
- "angular",
6
- "nextjs",
7
- "preact",
8
- "solid",
9
- "svelte",
10
- "vite",
11
- "vue"
12
- ]
13
- }
4
+ "templates": ["angular", "nextjs", "preact", "solid", "svelte", "vite", "vue"]
5
+ }
@@ -1,7 +1,9 @@
1
+ # Hosted app slug used by local runtime/dev-auth wiring.
1
2
  NEXT_PUBLIC_APP_NAME={{APP_NAME}}
2
3
 
3
- # Shared secret used for dev auth when proxying API requests through /rest.
4
+ # Paste the dev secret from the BardiocOS AppStore after registering your app.
5
+ # Used by the dev-auth proxy (scripts/dev-auth-proxy.mjs) to sign requests to the BFF.
4
6
  DEV_SECRET=
5
7
 
6
- # Base URL of the Bardioc API backend to proxy /rest requests to.
8
+ # Base URL of the Bardioc BFF / backend-for-frontend (e.g. https://your-host).
7
9
  API_BASE_URL=
@@ -5,3 +5,4 @@ out
5
5
  node_modules
6
6
  *.zip
7
7
  .linked/
8
+ .DS_Store
@@ -1,75 +1,78 @@
1
1
  @import 'tailwindcss';
2
2
 
3
3
  * {
4
- box-sizing: border-box;
4
+ box-sizing: border-box;
5
5
  }
6
6
 
7
7
  html,
8
8
  body {
9
- margin: 0;
10
- padding: 0;
11
- height: 100%;
12
- width: 100%;
13
- overflow: hidden;
9
+ margin: 0;
10
+ padding: 0;
11
+ height: 100%;
12
+ width: 100%;
13
+ overflow: hidden;
14
14
  }
15
15
 
16
16
  :root {
17
- --background: oklch(17.88% 0.0075 229.38);
18
- --foreground: oklch(98.69% 0.0093 99.98);
19
- --muted-foreground: oklch(86.03% 0.0056 95.11);
20
- --border: oklch(1 0 0 / 10%);
21
- --primary: oklch(97.02% 0 0);
22
- --primary-foreground: oklch(36.94% 0.0053 236.64);
23
- --destructive: oklch(68.04% 0.1386 21.38);
24
- --ring: oklch(79.43% 0.0084 98.91);
17
+ --background: oklch(17.88% 0.0075 229.38);
18
+ --foreground: oklch(98.69% 0.0093 99.98);
19
+ --muted-foreground: oklch(86.03% 0.0056 95.11);
20
+ --border: oklch(1 0 0 / 10%);
21
+ --primary: oklch(97.02% 0 0);
22
+ --primary-foreground: oklch(36.94% 0.0053 236.64);
23
+ --destructive: oklch(68.04% 0.1386 21.38);
24
+ --ring: oklch(79.43% 0.0084 98.91);
25
25
  }
26
26
 
27
27
  body {
28
- background: var(--background);
29
- color: var(--foreground);
30
- font-family: system-ui, -apple-system, sans-serif;
28
+ background: var(--background);
29
+ color: var(--foreground);
30
+ font-family:
31
+ system-ui,
32
+ -apple-system,
33
+ sans-serif;
31
34
  }
32
35
 
33
36
  code {
34
- font-family: inherit;
37
+ font-family: inherit;
35
38
  }
36
39
 
37
40
  .bg-background {
38
- background-color: var(--background);
41
+ background-color: var(--background);
39
42
  }
40
43
 
41
44
  .text-foreground {
42
- color: var(--foreground);
45
+ color: var(--foreground);
43
46
  }
44
47
 
45
48
  .text-muted-foreground {
46
- color: var(--muted-foreground);
49
+ color: var(--muted-foreground);
47
50
  }
48
51
 
49
52
  .border-border {
50
- border-color: var(--border);
53
+ border-color: var(--border);
51
54
  }
52
55
 
53
56
  .bg-primary {
54
- background-color: var(--primary);
57
+ background-color: var(--primary);
55
58
  }
56
59
 
57
60
  .text-primary-foreground {
58
- color: var(--primary-foreground);
61
+ color: var(--primary-foreground);
59
62
  }
60
63
 
61
64
  .text-destructive {
62
- color: var(--destructive);
65
+ color: var(--destructive);
63
66
  }
64
67
 
65
68
  .focus\:ring-ring:focus {
66
- --tw-ring-color: var(--ring);
69
+ --tw-ring-color: var(--ring);
67
70
  }
68
71
 
69
72
  .hover\:bg-primary\/90:hover {
70
- background-color: oklch(from var(--primary) calc(l * 0.9) c h);
73
+ background-color: oklch(from var(--primary) calc(l * 0.9) c h);
71
74
  }
72
75
 
73
76
  .hover\:text-foreground:hover {
74
- color: var(--foreground);
77
+ color: var(--foreground);
75
78
  }
@@ -9,6 +9,8 @@ export default function RootLayout({ children }: Readonly<{ children: React.Reac
9
9
  return (
10
10
  <html lang="en" className="dark" style={{ height: '100%', margin: 0 }}>
11
11
  <head>
12
+ {/* Platform font contract — a fixed absolute URL the host serves, not a bundled asset. */}
13
+ {/* eslint-disable-next-line @next/next/no-css-tags */}
12
14
  <link rel="stylesheet" href="/fonts/bardioc-fonts.css" />
13
15
  </head>
14
16
  <body style={{ height: '100%', margin: 0 }}>{children}</body>
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
 
3
- import { isInsideIframe, isDevStandalone, installDevBridge } from '@bardioc/app-sdk/dev';
3
+ import { installDevBridge, isDevStandalone, isInsideIframe } from '@bardioc/app-sdk/dev';
4
4
  import { AppSdkProvider, useNotify, useSdk } from '@bardioc/app-sdk/react';
5
5
  import { useEffect, useState } from 'react';
6
6
 
@@ -12,6 +12,9 @@ type ResultState =
12
12
 
13
13
  const APP_NAME = process.env.NEXT_PUBLIC_APP_NAME?.trim();
14
14
 
15
+ // scripts/dev-auth-proxy.mjs listens on the app port + 100 for standalone dev auth.
16
+ const DEV_PROXY_PORT = Number('{{PORT}}') + 100;
17
+
15
18
  function SdkDemo() {
16
19
  const bridge = useSdk();
17
20
  const notify = useNotify();
@@ -63,14 +66,14 @@ function SdkDemo() {
63
66
 
64
67
  <div className="flex flex-wrap gap-2">
65
68
  <button
66
- className="bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed"
69
+ className="bg-primary text-primary-foreground hover:bg-primary/90 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed disabled:opacity-50"
67
70
  onClick={() => void runGetProfile()}
68
71
  disabled={running}
69
72
  >
70
73
  Get Profile
71
74
  </button>
72
75
  <button
73
- className="bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed"
76
+ className="bg-primary text-primary-foreground hover:bg-primary/90 rounded px-3 py-1 text-xs font-medium disabled:cursor-not-allowed disabled:opacity-50"
74
77
  onClick={handleNotify}
75
78
  disabled={running}
76
79
  >
@@ -103,7 +106,7 @@ function SdkDemo() {
103
106
  <div className="text-muted-foreground border-border border-b pb-2 font-mono text-xs">
104
107
  {result.request}
105
108
  </div>
106
- <div className="text-destructive whitespace-pre-wrap break-all">{result.message}</div>
109
+ <div className="text-destructive break-all whitespace-pre-wrap">{result.message}</div>
107
110
  </div>
108
111
  )}
109
112
  {result.status === 'success' && (
@@ -144,7 +147,7 @@ export default function Page() {
144
147
 
145
148
  useEffect(() => {
146
149
  if (isDevStandalone()) {
147
- installDevBridge();
150
+ installDevBridge({ apiBaseUrl: `http://127.0.0.1:${DEV_PROXY_PORT}/rest` });
148
151
  }
149
152
  }, []);
150
153
 
@@ -0,0 +1,4 @@
1
+ import { config } from '@bardioc/configs/eslint/next';
2
+
3
+ // Static export output and Next's generated env types are not sources.
4
+ export default [...config, { ignores: ['out/**', 'next-env.d.ts'] }];
@@ -1 +1 @@
1
- declare module '*.css';
1
+ declare module '*.css';
@@ -1,32 +1,13 @@
1
1
  import type { NextConfig } from 'next';
2
2
 
3
- const apiBaseUrl = process.env.API_BASE_URL?.replace(/\/$/, '');
4
- const devSecret = process.env.DEV_SECRET;
5
-
3
+ // Standalone dev auth lives in scripts/dev-auth-proxy.mjs (the SDK dev-auth proxy), not here:
4
+ // the BFF needs Origin dropped and X-Requested-With stamped, which rewrites cannot do.
6
5
  const nextConfig: NextConfig = {
7
- output: 'export',
8
- images: {
9
- unoptimized: true,
10
- },
11
- trailingSlash: true,
12
- async headers() {
13
- if (!devSecret) return [];
14
- return [
15
- {
16
- source: '/rest/:path*',
17
- headers: [{ key: 'X-Dev-Secret', value: devSecret }],
18
- },
19
- ];
20
- },
21
- async rewrites() {
22
- if (!apiBaseUrl) return [];
23
- return [
24
- {
25
- source: '/rest/:path*',
26
- destination: `${apiBaseUrl}/:path*`,
27
- },
28
- ];
29
- },
6
+ output: 'export',
7
+ images: {
8
+ unoptimized: true,
9
+ },
10
+ trailingSlash: true,
30
11
  };
31
12
 
32
13
  export default nextConfig;
@@ -3,29 +3,34 @@
3
3
  "version": "0.0.1",
4
4
  "private": true,
5
5
  "scripts": {
6
- "dev": "next dev --port {{PORT}}",
7
- "dev:live": "BARDIOC_TUNNEL=1 next dev --port {{PORT}}",
6
+ "dev": "node ./scripts/dev-auth-proxy.mjs & PROXY_PID=$!; next dev --port {{PORT}}; EXIT_CODE=$?; kill $PROXY_PID 2>/dev/null; exit $EXIT_CODE",
8
7
  "build": "next build && node scripts/stamp-manifest.mjs out",
9
8
  "bundle": "next build && node scripts/stamp-manifest.mjs out && cd out && zip -r ../{{APP_NAME}}.zip .",
10
9
  "start": "next start",
11
10
  "check-types": "tsc --noEmit",
11
+ "lint": "eslint .",
12
+ "format": "prettier --write .",
13
+ "format:check": "prettier --check .",
12
14
  "changeset": "changeset",
13
15
  "release:status": "changeset status --verbose",
14
16
  "release:version": "changeset version && npm install",
15
17
  "release:publish": "changeset publish"
16
18
  },
17
19
  "dependencies": {
18
- "@bardioc/app-sdk": "latest",
20
+ "@bardioc/app-sdk": "^0.4.9",
19
21
  "next": "^15.3.2",
20
22
  "react": "^19.2.5",
21
23
  "react-dom": "^19.2.5"
22
24
  },
23
25
  "devDependencies": {
26
+ "@bardioc/configs": "^0.2.1",
24
27
  "@changesets/cli": "^2.31.0",
25
28
  "@tailwindcss/postcss": "^4.2.4",
26
29
  "@types/node": "^22.10.0",
27
30
  "@types/react": "^19.2.14",
28
31
  "@types/react-dom": "^19.2.3",
32
+ "eslint": "^10.0.0",
33
+ "prettier": "^3.6.2",
29
34
  "tailwindcss": "^4.2.4",
30
35
  "typescript": "^6.0.3"
31
36
  }
@@ -0,0 +1 @@
1
+ export { default } from '@bardioc/configs/prettier';
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { startDevAuthProxy } from '@bardioc/app-sdk/dev-proxy';
4
+ import { dirname, resolve } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const projectDir = resolve(dirname(fileURLToPath(import.meta.url)), '..');
8
+
9
+ // `next dev` cannot host the SDK Vite plugin, so the proxy runs beside it on the app
10
+ // port + 100 — the same origin app/page.tsx points installDevBridge at.
11
+ const server = await startDevAuthProxy({ projectDir, port: {{PORT}} + 100 });
12
+
13
+ // Without DEV_SECRET / API_BASE_URL there is nothing to serve — exit and let the dev server run
14
+ // on its own, matching how the SDK Vite plugin disables itself.
15
+ if (!server) {
16
+ process.exit(0);
17
+ }