create-dovite 2.0.1 → 2.2.2

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 (37) hide show
  1. package/README.md +20 -16
  2. package/index.js +10 -4
  3. package/package.json +8 -4
  4. package/src/files.js +40 -1
  5. package/src/prompts.js +2 -0
  6. package/src/setup.js +56 -33
  7. package/templates/react-js/public/thumbnail.png +0 -0
  8. package/templates/react-js/src/App.jsx +3 -9
  9. package/templates/react-js/src/pages/index.css +96 -0
  10. package/templates/react-js/src/pages/index.jsx +340 -0
  11. package/templates/react-ts/public/thumbnail.png +0 -0
  12. package/templates/react-ts/src/App.tsx +3 -9
  13. package/templates/react-ts/src/pages/index.css +96 -0
  14. package/templates/react-ts/src/pages/index.tsx +347 -0
  15. package/templates/vue-js/jsconfig.json +7 -0
  16. package/templates/vue-js/public/manifest.json +12 -0
  17. package/templates/vue-js/public/thumbnail.png +0 -0
  18. package/templates/vue-js/src/API/currentUserContext.js +61 -0
  19. package/templates/vue-js/src/API/dataApi.js +238 -0
  20. package/templates/vue-js/src/API/domoAPI.js +311 -0
  21. package/templates/vue-js/src/App.vue +9 -0
  22. package/templates/vue-js/src/index.css +1 -0
  23. package/templates/vue-js/src/main.js +6 -0
  24. package/templates/vue-js/src/pages/index.vue +699 -0
  25. package/templates/vue-js/vite.config.js +40 -0
  26. package/templates/vue-ts/public/manifest.json +12 -0
  27. package/templates/vue-ts/public/thumbnail.png +0 -0
  28. package/templates/vue-ts/src/API/currentUserContext.ts +76 -0
  29. package/templates/vue-ts/src/API/dataApi.ts +284 -0
  30. package/templates/vue-ts/src/API/domoAPI.ts +340 -0
  31. package/templates/vue-ts/src/App.vue +9 -0
  32. package/templates/vue-ts/src/index.css +1 -0
  33. package/templates/vue-ts/src/main.ts +6 -0
  34. package/templates/vue-ts/src/pages/index.vue +706 -0
  35. package/templates/vue-ts/tsconfig.app.json +31 -0
  36. package/templates/vue-ts/tsconfig.json +17 -0
  37. package/templates/vue-ts/vite.config.ts +43 -0
@@ -0,0 +1,340 @@
1
+ import { useState } from "react";
2
+ import { Button } from "../components/ui/button";
3
+ import { FiBook, FiPackage, FiGithub, FiExternalLink } from "react-icons/fi";
4
+ import "./index.css";
5
+
6
+ // Vite Logo SVG
7
+ const ViteLogo = () => (
8
+ <svg
9
+ className="logo-icon logo-vite"
10
+ viewBox="0 0 410 404"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ >
14
+ <path
15
+ d="M399.641 59.5246L215.643 388.545C211.844 395.338 202.084 395.378 198.228 388.618L10.5817 59.5563C6.38087 52.1896 12.6802 43.2665 21.0281 44.7586L205.223 77.6824C206.398 77.8924 207.601 77.8904 208.776 77.6763L389.119 44.8058C397.439 43.2894 403.768 52.1434 399.641 59.5246Z"
16
+ fill="url(#paint0_linear)"
17
+ />
18
+ <path
19
+ d="M292.965 1.5744L156.801 28.2552C154.563 28.6937 152.906 30.5903 152.771 32.8664L144.395 174.33C144.198 177.662 147.258 180.248 150.51 179.498L188.42 170.749C191.967 169.931 195.172 173.055 194.443 176.622L183.18 231.775C182.422 235.487 185.907 238.661 189.532 237.56L212.947 230.446C216.577 229.344 220.065 232.527 219.297 236.242L201.398 322.875C200.278 328.294 207.486 331.249 210.492 326.603L212.5 323.5L323.454 102.072C325.312 98.3645 322.108 94.137 318.036 94.9228L279.014 102.454C275.347 103.161 272.227 99.746 273.262 96.1583L298.731 7.86689C299.767 4.27314 296.636 0.855181 292.965 1.5744Z"
20
+ fill="url(#paint1_linear)"
21
+ />
22
+ <defs>
23
+ <linearGradient
24
+ id="paint0_linear"
25
+ x1="6.00017"
26
+ y1="32.9999"
27
+ x2="235"
28
+ y2="344"
29
+ gradientUnits="userSpaceOnUse"
30
+ >
31
+ <stop stopColor="#41D1FF" />
32
+ <stop offset="1" stopColor="#BD34FE" />
33
+ </linearGradient>
34
+ <linearGradient
35
+ id="paint1_linear"
36
+ x1="194.651"
37
+ y1="8.81818"
38
+ x2="236.076"
39
+ y2="292.989"
40
+ gradientUnits="userSpaceOnUse"
41
+ >
42
+ <stop stopColor="#FFBD4F" />
43
+ <stop offset="1" stopColor="#FF980E" />
44
+ </linearGradient>
45
+ </defs>
46
+ </svg>
47
+ );
48
+
49
+ // React Logo SVG
50
+ const ReactLogo = () => (
51
+ <svg
52
+ className="logo-icon logo-react"
53
+ viewBox="-11.5 -10.23174 23 20.46348"
54
+ xmlns="http://www.w3.org/2000/svg"
55
+ >
56
+ <circle cx="0" cy="0" r="2.05" fill="#61dafb" />
57
+ <g stroke="#61dafb" strokeWidth="1" fill="none">
58
+ <ellipse rx="11" ry="4.2" />
59
+ <ellipse rx="11" ry="4.2" transform="rotate(60)" />
60
+ <ellipse rx="11" ry="4.2" transform="rotate(120)" />
61
+ </g>
62
+ </svg>
63
+ );
64
+
65
+ // Domo Logo SVG
66
+ const DomoLogo = () => (
67
+ <svg
68
+ className="logo-icon logo-domo"
69
+ viewBox="0 0 100 100"
70
+ fill="none"
71
+ xmlns="http://www.w3.org/2000/svg"
72
+ >
73
+ <rect width="100" height="100" rx="16" fill="url(#domoGradient)" />
74
+ <text
75
+ x="50"
76
+ y="65"
77
+ textAnchor="middle"
78
+ fill="white"
79
+ fontSize="36"
80
+ fontWeight="bold"
81
+ fontFamily="Arial, sans-serif"
82
+ >
83
+ DOMO
84
+ </text>
85
+ {/* <circle cx="72" cy="35" r="8" fill="white" opacity="0.8" /> */}
86
+ <defs>
87
+ <linearGradient
88
+ id="domoGradient"
89
+ x1="0"
90
+ y1="0"
91
+ x2="100"
92
+ y2="100"
93
+ gradientUnits="userSpaceOnUse"
94
+ >
95
+ <stop stopColor="#00B5E2" />
96
+ <stop offset="1" stopColor="#0072BC" />
97
+ </linearGradient>
98
+ </defs>
99
+ </svg>
100
+ );
101
+
102
+ // Tailwind Logo SVG
103
+ const TailwindLogo = () => (
104
+ <svg
105
+ className="logo-icon logo-tailwind"
106
+ viewBox="0 0 54 33"
107
+ fill="none"
108
+ xmlns="http://www.w3.org/2000/svg"
109
+ >
110
+ <g clipPath="url(#tailwindClip)">
111
+ <path
112
+ fillRule="evenodd"
113
+ clipRule="evenodd"
114
+ d="M27 0C19.8 0 15.3 3.6 13.5 10.8C16.2 7.2 19.35 5.85 22.95 6.75C25.004 7.263 26.472 8.754 28.097 10.403C30.744 13.09 33.808 16.2 40.5 16.2C47.7 16.2 52.2 12.6 54 5.4C51.3 9 48.15 10.35 44.55 9.45C42.496 8.937 41.028 7.446 39.403 5.797C36.756 3.11 33.692 0 27 0ZM13.5 16.2C6.3 16.2 1.8 19.8 0 27C2.7 23.4 5.85 22.05 9.45 22.95C11.504 23.464 12.972 24.954 14.597 26.603C17.244 29.29 20.308 32.4 27 32.4C34.2 32.4 38.7 28.8 40.5 21.6C37.8 25.2 34.65 26.55 31.05 25.65C28.996 25.137 27.528 23.646 25.903 21.997C23.256 19.31 20.192 16.2 13.5 16.2Z"
115
+ fill="url(#tailwindGradient)"
116
+ />
117
+ </g>
118
+ <defs>
119
+ <linearGradient
120
+ id="tailwindGradient"
121
+ x1="0"
122
+ y1="16.2"
123
+ x2="54"
124
+ y2="16.2"
125
+ gradientUnits="userSpaceOnUse"
126
+ >
127
+ <stop stopColor="#06B6D4" />
128
+ <stop offset="1" stopColor="#22D3EE" />
129
+ </linearGradient>
130
+ <clipPath id="tailwindClip">
131
+ <rect width="54" height="33" fill="white" />
132
+ </clipPath>
133
+ </defs>
134
+ </svg>
135
+ );
136
+
137
+ // Shadcn Logo SVG
138
+ const ShadcnLogo = () => (
139
+ <svg
140
+ className="logo-icon logo-shadcn"
141
+ viewBox="0 0 256 256"
142
+ fill="none"
143
+ xmlns="http://www.w3.org/2000/svg"
144
+ >
145
+ <rect width="256" height="256" rx="60" fill="currentColor" />
146
+ <line
147
+ x1="208"
148
+ y1="128"
149
+ x2="128"
150
+ y2="208"
151
+ stroke="url(#shadcnGradient)"
152
+ strokeWidth="24"
153
+ strokeLinecap="round"
154
+ />
155
+ <line
156
+ x1="192"
157
+ y1="40"
158
+ x2="40"
159
+ y2="192"
160
+ stroke="url(#shadcnGradient)"
161
+ strokeWidth="24"
162
+ strokeLinecap="round"
163
+ />
164
+ <defs>
165
+ <linearGradient
166
+ id="shadcnGradient"
167
+ x1="40"
168
+ y1="40"
169
+ x2="208"
170
+ y2="208"
171
+ gradientUnits="userSpaceOnUse"
172
+ >
173
+ <stop stopColor="#fff" />
174
+ <stop offset="1" stopColor="#a1a1aa" />
175
+ </linearGradient>
176
+ </defs>
177
+ </svg>
178
+ );
179
+
180
+ const DefaultPage = () => {
181
+ const [count, setCount] = useState(0);
182
+
183
+ const docLinks = [
184
+ {
185
+ title: "DOMO APIs",
186
+ url: "https://developer.domo.com/portal/8ba9aedad3679-ap-is",
187
+ description: "Explore the API documentation",
188
+ Icon: FiBook,
189
+ },
190
+ {
191
+ title: "Domo Starter Kit",
192
+ url: "https://developer.domo.com/portal/u8w475o2245yp-starter-kits",
193
+ description: "Get started quickly",
194
+ Icon: FiPackage,
195
+ },
196
+ {
197
+ title: "GitHub Repository",
198
+ url: "https://github.com/Ajay-Balu/create-dovite",
199
+ description: "View source code",
200
+ Icon: FiGithub,
201
+ },
202
+ ];
203
+
204
+ return (
205
+ <div className="landing-page h-screen w-screen flex flex-col overflow-hidden">
206
+ {/* Main Content Area */}
207
+ <div className="flex-1 flex items-center justify-center gap-16 px-8 py-8 max-w-[1400px] mx-auto w-full max-lg:flex-col max-lg:gap-8 max-lg:overflow-y-auto">
208
+ {/* Left Side - Hero Section */}
209
+ <div className="flex-1 flex flex-col items-center justify-center text-center gap-4">
210
+ {/* Logo Container */}
211
+ <div className="flex justify-center items-center gap-2 flex-wrap mb-2">
212
+ <a
213
+ href="https://vitejs.dev"
214
+ target="_blank"
215
+ rel="noopener noreferrer"
216
+ className="inline-flex transition-transform duration-300 hover:scale-115"
217
+ >
218
+ <ViteLogo />
219
+ </a>
220
+ <span className="text-2xl font-light text-zinc-500/50 mx-1">+</span>
221
+ <a
222
+ href="https://react.dev"
223
+ target="_blank"
224
+ rel="noopener noreferrer"
225
+ className="inline-flex transition-transform duration-300 hover:scale-115"
226
+ >
227
+ <ReactLogo />
228
+ </a>
229
+ <span className="text-2xl font-light text-zinc-500/50 mx-1">+</span>
230
+ <a
231
+ href="https://www.domo.com"
232
+ target="_blank"
233
+ rel="noopener noreferrer"
234
+ className="inline-flex transition-transform duration-300 hover:scale-115"
235
+ >
236
+ <DomoLogo />
237
+ </a>
238
+ <span className="text-2xl font-light text-zinc-500/50 mx-1">+</span>
239
+ <a
240
+ href="https://tailwindcss.com"
241
+ target="_blank"
242
+ rel="noopener noreferrer"
243
+ className="inline-flex transition-transform duration-300 hover:scale-115"
244
+ >
245
+ <TailwindLogo />
246
+ </a>
247
+ <span className="text-2xl font-light text-zinc-500/50 mx-1">+</span>
248
+ <a
249
+ href="https://ui.shadcn.com"
250
+ target="_blank"
251
+ rel="noopener noreferrer"
252
+ className="inline-flex transition-transform duration-300 hover:scale-115"
253
+ >
254
+ <ShadcnLogo />
255
+ </a>
256
+ </div>
257
+
258
+ {/* Title */}
259
+ <h1 className="text-5xl font-extrabold tracking-tight m-0 leading-tight max-md:text-4xl max-sm:text-3xl">
260
+ <span className="gradient-text">Dovite</span>
261
+ </h1>
262
+ <p className="text-base text-zinc-400 m-0 font-medium">
263
+ Vite + React + DOMO + Tailwind + Shadcn/UI
264
+ </p>
265
+ <p className="text-sm text-zinc-500 m-0 max-w-[400px]">
266
+ Build beautiful DOMO apps with modern web technologies
267
+ </p>
268
+
269
+ {/* Interactive Demo Section */}
270
+ <div className="mt-6">
271
+ <div className="px-8 py-6 bg-white/3 border border-white/8 rounded-2xl backdrop-blur-lg">
272
+ <Button
273
+ onClick={() => setCount((count) => count + 1)}
274
+ className="text-sm px-5 py-2.5 transition-all duration-300 hover:-translate-y-0.5 hover:shadow-xl"
275
+ >
276
+ Count is {count}
277
+ </Button>
278
+ <p className="mt-4 text-zinc-500 text-xs">
279
+ Edit{" "}
280
+ <code className="bg-zinc-500/15 px-1.5 py-0.5 rounded text-zinc-400 font-mono text-[0.8em]">
281
+ src/pages/index.jsx
282
+ </code>{" "}
283
+ and save to test HMR
284
+ </p>
285
+ </div>
286
+ </div>
287
+ </div>
288
+
289
+ {/* Right Side - Documentation Links */}
290
+ <div className="w-80 flex flex-col gap-4 p-6 bg-white/2 border border-white/6 rounded-2xl backdrop-blur-lg max-lg:w-full max-lg:max-w-[400px]">
291
+ <h2 className="text-xs font-semibold text-zinc-400 uppercase tracking-widest m-0 pb-3 border-b border-white/6">
292
+ Resources
293
+ </h2>
294
+ <div className="flex flex-col gap-2">
295
+ {docLinks.map((link, index) => (
296
+ <a
297
+ key={index}
298
+ href={link.url}
299
+ target="_blank"
300
+ rel="noopener noreferrer"
301
+ className="group flex items-center gap-3 px-4 py-3.5 bg-white/2 border border-white/4 rounded-xl no-underline text-inherit transition-all duration-250 hover:bg-white/6 hover:border-cyan-500/30 hover:translate-x-1"
302
+ >
303
+ <link.Icon className="text-xl text-cyan-500 shrink-0" />
304
+ <div className="flex-1 flex flex-col gap-0.5 min-w-0">
305
+ <span className="text-sm font-semibold text-zinc-100">
306
+ {link.title}
307
+ </span>
308
+ <span className="text-xs text-zinc-500">
309
+ {link.description}
310
+ </span>
311
+ </div>
312
+ <FiExternalLink className="text-sm text-zinc-600 shrink-0 transition-all duration-250 group-hover:text-cyan-500 group-hover:translate-x-0.5 group-hover:-translate-y-0.5" />
313
+ </a>
314
+ ))}
315
+ </div>
316
+ <p className="text-xs text-zinc-600 text-center m-0 pt-2">
317
+ Click on the logos to learn more
318
+ </p>
319
+ </div>
320
+ </div>
321
+
322
+ {/* Footer */}
323
+ <footer className="px-8 py-4 text-center border-t border-white/6 bg-black/20">
324
+ <p className="m-0 text-zinc-600 text-xs">
325
+ Built with <span className="text-red-500">❤</span> using{" "}
326
+ <a
327
+ href="https://github.com/Ajay-Balu/create-dovite"
328
+ target="_blank"
329
+ rel="noopener noreferrer"
330
+ className="text-cyan-500 no-underline font-medium transition-colors duration-300 hover:text-purple-500"
331
+ >
332
+ create-dovite
333
+ </a>
334
+ </p>
335
+ </footer>
336
+ </div>
337
+ );
338
+ };
339
+
340
+ export default DefaultPage;
@@ -1,13 +1,7 @@
1
- import { useState } from "react";
2
- import { Button } from "./components/ui/button";
3
- import "./App.css";
1
+ import DefaultPage from "./pages/index";
2
+
4
3
  function App() {
5
- const [count, setCount] = useState(0);
6
- return (
7
- <div className="App">
8
- <Button onClick={() => setCount(count + 1)}>Count: {count}</Button>
9
- </div>
10
- );
4
+ return <DefaultPage />;
11
5
  }
12
6
 
13
7
  export default App;
@@ -0,0 +1,96 @@
1
+ /* Landing Page Background */
2
+ .landing-page {
3
+ background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
4
+ }
5
+
6
+ /* Logo Icon Base Styles */
7
+ .logo-icon {
8
+ height: 4rem;
9
+ width: 4rem;
10
+ padding: 0.5rem;
11
+ will-change: filter, transform;
12
+ transition: filter 300ms, transform 300ms;
13
+ }
14
+
15
+ /* Logo Hover Effects with Glow */
16
+ .logo-vite:hover {
17
+ filter: drop-shadow(0 0 2em rgba(189, 52, 254, 0.667));
18
+ }
19
+
20
+ .logo-react:hover {
21
+ filter: drop-shadow(0 0 2em rgba(97, 218, 251, 0.667));
22
+ }
23
+
24
+ .logo-domo:hover {
25
+ filter: drop-shadow(0 0 2em rgba(0, 181, 226, 0.667));
26
+ }
27
+
28
+ .logo-tailwind:hover {
29
+ filter: drop-shadow(0 0 2em rgba(6, 182, 212, 0.667));
30
+ }
31
+
32
+ .logo-shadcn {
33
+ color: #27272a;
34
+ }
35
+
36
+ .logo-shadcn:hover {
37
+ filter: drop-shadow(0 0 2em rgba(161, 161, 170, 0.667));
38
+ }
39
+
40
+ /* React Logo Spin Animation */
41
+ @keyframes logo-spin {
42
+ from {
43
+ transform: rotate(0deg);
44
+ }
45
+ to {
46
+ transform: rotate(360deg);
47
+ }
48
+ }
49
+
50
+ @media (prefers-reduced-motion: no-preference) {
51
+ .logo-react {
52
+ animation: logo-spin infinite 20s linear;
53
+ }
54
+ }
55
+
56
+ /* Gradient Text Animation */
57
+ .gradient-text {
58
+ background: linear-gradient(
59
+ 135deg,
60
+ #bd34fe 0%,
61
+ #41d1ff 25%,
62
+ #0072bc 50%,
63
+ #06b6d4 75%,
64
+ #a1a1aa 100%
65
+ );
66
+ background-size: 200% auto;
67
+ background-clip: text;
68
+ -webkit-background-clip: text;
69
+ -webkit-text-fill-color: transparent;
70
+ animation: gradient-shift 5s ease infinite;
71
+ }
72
+
73
+ @keyframes gradient-shift {
74
+ 0%,
75
+ 100% {
76
+ background-position: 0% 50%;
77
+ }
78
+ 50% {
79
+ background-position: 100% 50%;
80
+ }
81
+ }
82
+
83
+ /* Responsive Logo Sizes */
84
+ @media (max-width: 768px) {
85
+ .logo-icon {
86
+ height: 3rem;
87
+ width: 3rem;
88
+ }
89
+ }
90
+
91
+ @media (max-width: 480px) {
92
+ .logo-icon {
93
+ height: 2.5rem;
94
+ width: 2.5rem;
95
+ }
96
+ }