create-origo-app 0.1.0 → 0.1.1

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 (133) hide show
  1. package/README.md +315 -0
  2. package/dist/base/backend/express/.env +3 -0
  3. package/dist/base/backend/express/javascript/src/app.js +25 -0
  4. package/dist/base/backend/express/javascript/src/config/env.js +10 -0
  5. package/dist/base/backend/express/javascript/src/routes/index.js +18 -0
  6. package/dist/base/backend/express/javascript/src/server.js +28 -0
  7. package/dist/base/backend/express/manifest.js +61 -0
  8. package/dist/base/backend/express/typescript/src/app.ts +25 -0
  9. package/dist/base/backend/express/typescript/src/config/env.ts +10 -0
  10. package/dist/base/backend/express/typescript/src/routes/index.ts +18 -0
  11. package/dist/base/backend/express/typescript/src/server.ts +28 -0
  12. package/dist/base/backend/express/typescript/tsconfig.server.json +16 -0
  13. package/dist/base/backend/fastify/javascript/src/app.js +16 -0
  14. package/dist/base/backend/fastify/javascript/src/routes/index.js +18 -0
  15. package/dist/base/backend/fastify/javascript/src/server.js +27 -0
  16. package/dist/base/backend/fastify/manifest.js +61 -0
  17. package/dist/base/backend/fastify/typescript/src/app.ts +16 -0
  18. package/dist/base/backend/fastify/typescript/src/routes/index.ts +20 -0
  19. package/dist/base/backend/fastify/typescript/src/server.ts +27 -0
  20. package/dist/base/frontend/react/app/App.css +308 -0
  21. package/dist/base/frontend/react/app/App.tsx +59 -0
  22. package/dist/base/frontend/react/app/assets/react.svg +1 -0
  23. package/dist/base/frontend/react/app/assets/vite.svg +1 -0
  24. package/dist/base/frontend/react/app/components/Counter.tsx +16 -0
  25. package/dist/base/frontend/react/app/components/OrigoLogo.tsx +32 -0
  26. package/dist/base/frontend/react/app/components/PingButton.tsx +45 -0
  27. package/dist/base/frontend/react/app/index.css +27 -0
  28. package/dist/base/frontend/react/app/main.tsx +17 -0
  29. package/dist/base/frontend/react/app/vite-env.d.ts +2 -0
  30. package/dist/base/frontend/react/html/index.html +23 -0
  31. package/dist/base/frontend/react/manifest.js +180 -0
  32. package/dist/base/frontend/react/styles/bootstrap/App.tsx +61 -0
  33. package/dist/base/frontend/react/styles/bootstrap/Counter.tsx +16 -0
  34. package/dist/base/frontend/react/styles/bootstrap/PingButton.tsx +52 -0
  35. package/dist/base/frontend/react/styles/bootstrap/index.css +174 -0
  36. package/dist/base/frontend/react/styles/sass/App.scss +231 -0
  37. package/dist/base/frontend/react/styles/sass/App.tsx +59 -0
  38. package/dist/base/frontend/react/styles/sass/PingButton.scss +33 -0
  39. package/dist/base/frontend/react/styles/sass/PingButton.tsx +47 -0
  40. package/dist/base/frontend/react/styles/sass/index.scss +30 -0
  41. package/dist/base/frontend/react/styles/sass/main.tsx +17 -0
  42. package/dist/base/frontend/react/styles/tailwind/App.tsx +66 -0
  43. package/dist/base/frontend/react/styles/tailwind/Counter.tsx +16 -0
  44. package/dist/base/frontend/react/styles/tailwind/PingButton.tsx +52 -0
  45. package/dist/base/frontend/shared/favicon.ico +0 -0
  46. package/dist/base/frontend/shared/origo-logo.svg +6 -0
  47. package/dist/commands/create.js +195 -10
  48. package/dist/commands/index.js +6 -1
  49. package/dist/composer/ast/arrays.js +12 -0
  50. package/dist/composer/ast/config.js +13 -0
  51. package/dist/composer/ast/context.js +73 -0
  52. package/dist/composer/ast/expressions.js +6 -0
  53. package/dist/composer/ast/imports.js +33 -0
  54. package/dist/composer/ast/index.js +6 -0
  55. package/dist/composer/ast/objects.js +32 -0
  56. package/dist/config/architectures.js +5 -0
  57. package/dist/config/backend.js +9 -0
  58. package/dist/config/frontend.js +17 -0
  59. package/dist/config/fullstack.js +30 -0
  60. package/dist/core/copy-template.js +57 -0
  61. package/dist/core/dependency-resolver.js +43 -0
  62. package/dist/core/install-dependencies.js +10 -0
  63. package/dist/core/path-safety.js +22 -0
  64. package/dist/core/project-target.js +40 -0
  65. package/dist/core/version-resolver.js +137 -0
  66. package/dist/features/frontend/styling/tailwind/dependencies.js +10 -0
  67. package/dist/features/frontend/styling/tailwind/feature.js +11 -0
  68. package/dist/features/frontend/styling/tailwind/generator.js +13 -0
  69. package/dist/features/frontend/styling/tailwind/index.js +3 -0
  70. package/dist/features/frontend/styling/tailwind/integrations/index.js +11 -0
  71. package/dist/features/frontend/styling/tailwind/integrations/rsbuild.js +3 -0
  72. package/dist/features/frontend/styling/tailwind/integrations/vite.js +17 -0
  73. package/dist/features/frontend/styling/tailwind/integrations/webpack.js +3 -0
  74. package/dist/features/frontend/styling/tailwind/templates/tailwind-css.js +1 -0
  75. package/dist/features/frontend/styling/tailwind/templates/theme.js +39 -0
  76. package/dist/features/frontend/styling/tailwind/versions/v3.js +19 -0
  77. package/dist/features/frontend/styling/tailwind/versions/v4.js +11 -0
  78. package/dist/features/frontend/ui/shadcn/dependencies.js +8 -0
  79. package/dist/features/frontend/ui/shadcn/feature.js +11 -0
  80. package/dist/features/frontend/ui/shadcn/generator.js +13 -0
  81. package/dist/features/frontend/ui/shadcn/index.js +3 -0
  82. package/dist/features/frontend/ui/shadcn/patches/tsconfig.js +22 -0
  83. package/dist/features/frontend/ui/shadcn/patches/vite-config.js +35 -0
  84. package/dist/features/frontend/ui/shadcn/templates/components-json.js +23 -0
  85. package/dist/features/frontend/ui/shadcn/templates/lib-utils.js +14 -0
  86. package/dist/features/index.js +29 -0
  87. package/dist/generators/backend/base-loader.js +33 -0
  88. package/dist/generators/backend/context.js +54 -0
  89. package/dist/generators/backend/generate.js +72 -0
  90. package/dist/generators/backend/index.js +4 -0
  91. package/dist/generators/backend/resolvers/database.js +1277 -0
  92. package/dist/generators/frontend/base-loader.js +23 -0
  93. package/dist/generators/frontend/context.js +118 -0
  94. package/dist/generators/frontend/css.js +34 -0
  95. package/dist/generators/frontend/file-writer.js +37 -0
  96. package/dist/generators/frontend/generate.js +46 -0
  97. package/dist/generators/frontend/index.js +4 -0
  98. package/dist/generators/frontend/resolvers/base.js +24 -0
  99. package/dist/generators/frontend/resolvers/bundler.js +13 -0
  100. package/dist/generators/frontend/resolvers/index.js +5 -0
  101. package/dist/generators/frontend/resolvers/language.js +55 -0
  102. package/dist/generators/frontend/resolvers/profile.js +41 -0
  103. package/dist/generators/frontend/resolvers/typescript.js +29 -0
  104. package/dist/generators/frontend/template.js +3 -0
  105. package/dist/generators/frontend/validate.js +31 -0
  106. package/dist/generators/package-json/build-package-json.js +33 -0
  107. package/dist/generators/package-json/index.js +2 -0
  108. package/dist/generators/package-json/types.js +1 -0
  109. package/dist/generators/package-json/write-package-json.js +9 -0
  110. package/dist/prompts/architecture.js +5 -0
  111. package/dist/prompts/compatibility.js +18 -0
  112. package/dist/prompts/custom-fullstack.js +10 -0
  113. package/dist/prompts/custom-stack.js +12 -0
  114. package/dist/prompts/database-package.js +15 -0
  115. package/dist/prompts/project-name.js +25 -0
  116. package/dist/prompts/tech-stack.js +54 -0
  117. package/dist/registry/bundlers.js +4 -0
  118. package/dist/registry/databases.js +36 -0
  119. package/dist/registry/features/development.js +40 -0
  120. package/dist/registry/features/quality.js +33 -0
  121. package/dist/registry/features/testing.js +36 -0
  122. package/dist/registry/features/ui.js +37 -0
  123. package/dist/registry/frameworks.js +9 -0
  124. package/dist/registry/packages.js +231 -0
  125. package/dist/registry/routing.js +12 -0
  126. package/dist/registry/runtimes.js +7 -0
  127. package/dist/registry/styling.js +7 -0
  128. package/dist/types/project.js +1 -0
  129. package/dist/ui/banner.js +0 -1
  130. package/dist/ui/checkbox.js +51 -0
  131. package/package.json +36 -4
  132. package/dist/cli.js +0 -22
  133. package/dist/ui/multiselect.js +0 -22
@@ -0,0 +1,16 @@
1
+ import cors from "@fastify/cors";
2
+ import Fastify, { type FastifyInstance } from "fastify";
3
+
4
+ import { env } from "./config/env.js";
5
+ import { registerRoutes } from "./routes/index.js";
6
+ {{DB_ROUTE_IMPORT}}
7
+
8
+ export async function createApp(): Promise<FastifyInstance> {
9
+ const app = Fastify({ logger: true });
10
+
11
+ await app.register(cors, { origin: env.clientUrl });
12
+ await app.register(registerRoutes);
13
+ {{DB_ROUTE_REGISTER}}
14
+
15
+ return app;
16
+ }
@@ -0,0 +1,20 @@
1
+ import type { FastifyInstance } from "fastify";
2
+
3
+ export async function registerRoutes(app: FastifyInstance): Promise<void> {
4
+ app.get("/", async () => ({
5
+ name: "{{PROJECT_NAME}}",
6
+ message: "Origo Fastify API is running",
7
+ }));
8
+
9
+ app.get("/api/health", async () => ({
10
+ status: "ok",
11
+ service: "{{PROJECT_NAME}}",
12
+ uptime: process.uptime(),
13
+ timestamp: new Date().toISOString(),
14
+ }));
15
+
16
+ app.get("/api/hello", async (request) => {
17
+ const query = request.query as { name?: string };
18
+ return { message: `Hello, ${query.name ?? "world"}!` };
19
+ });
20
+ }
@@ -0,0 +1,27 @@
1
+ import path from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+
4
+ import dotenv from "dotenv";
5
+
6
+ const currentDirectory = path.dirname(fileURLToPath(import.meta.url));
7
+ dotenv.config({ path: path.resolve(currentDirectory, "../.env") });
8
+ {{DB_IMPORT}}
9
+
10
+ const { createApp } = await import("./app.js");
11
+ const { env } = await import("./config/env.js");
12
+ {{DB_CONNECT}}
13
+
14
+ const app = await createApp();
15
+ const address = await app.listen({ host: "0.0.0.0", port: env.port });
16
+
17
+ console.log(`Server listening on ${address}`);
18
+
19
+ function shutdown(): void {
20
+ app.close().then(() => {
21
+ console.log("Server closed");
22
+ process.exit(0);
23
+ });
24
+ }
25
+
26
+ process.on("SIGINT", shutdown);
27
+ process.on("SIGTERM", shutdown);
@@ -0,0 +1,308 @@
1
+ .app {
2
+ position: relative;
3
+ min-height: 100vh;
4
+ overflow: hidden;
5
+ display: flex;
6
+ justify-content: center;
7
+ align-items: center;
8
+
9
+ background:
10
+ radial-gradient(ellipse at 100% 25%,
11
+ rgba(65, 0, 150, 0.12),
12
+ transparent 35%),
13
+ #030309;
14
+ }
15
+
16
+ .welcome-container {
17
+ position: relative;
18
+ z-index: 2;
19
+
20
+ width: 100%;
21
+ max-width: 1500px;
22
+
23
+ padding: 90px 7%;
24
+ text-align: center;
25
+ }
26
+
27
+ /* Background decorations */
28
+
29
+ .background-glow {
30
+ position: absolute;
31
+ pointer-events: none;
32
+ border: 2px solid rgba(112, 24, 255, 0.75);
33
+ border-radius: 50%;
34
+ filter: blur(0.3px);
35
+ }
36
+
37
+ .glow-top {
38
+ width: 650px;
39
+ height: 650px;
40
+ top: -470px;
41
+ left: -300px;
42
+ box-shadow: 0 0 80px rgba(104, 0, 255, 0.2);
43
+ }
44
+
45
+ .glow-right {
46
+ width: 500px;
47
+ height: 500px;
48
+ right: -420px;
49
+ top: 10%;
50
+ border-color: rgba(93, 0, 220, 0.2);
51
+ }
52
+
53
+ .glow-bottom {
54
+ width: 850px;
55
+ height: 850px;
56
+ bottom: -750px;
57
+ right: -300px;
58
+ box-shadow: 0 0 90px rgba(104, 0, 255, 0.25);
59
+ }
60
+
61
+ /* Branding */
62
+
63
+ .brand {
64
+ display: flex;
65
+ justify-content: center;
66
+ margin-bottom: 48px;
67
+ }
68
+
69
+ .origo-logo {
70
+ width: 500px;
71
+ max-width: 85%;
72
+ height: auto;
73
+ }
74
+
75
+ /* Hero */
76
+
77
+ .hero h1 {
78
+ font-size: clamp(42px, 5.5vw, 82px);
79
+ font-weight: 800;
80
+ letter-spacing: -3px;
81
+ }
82
+
83
+ .hero h1 span {
84
+ background: linear-gradient(110deg,
85
+ #9b42ff,
86
+ #6412ed,
87
+ #a65bff);
88
+
89
+ background-clip: text;
90
+ -webkit-background-clip: text;
91
+ color: transparent;
92
+ }
93
+
94
+ .subtitle {
95
+ margin-top: 12px;
96
+ font-size: clamp(16px, 2vw, 30px);
97
+ color: #b9b2d2;
98
+ }
99
+
100
+ /* Counter */
101
+
102
+ .counter-section {
103
+ margin-top: 40px;
104
+ }
105
+
106
+ .counter {
107
+ display: inline-flex;
108
+ align-items: center;
109
+ gap: 18px;
110
+
111
+ padding: 14px 24px;
112
+
113
+ border: 1px solid rgba(130, 80, 255, 0.2);
114
+ border-radius: 50px;
115
+
116
+ color: white;
117
+ background: rgba(15, 12, 27, 0.85);
118
+
119
+ font-size: 21px;
120
+ cursor: pointer;
121
+
122
+ transition: all 0.2s ease;
123
+ }
124
+
125
+ .counter:hover {
126
+ border-color: #7625ff;
127
+ background: rgba(91, 25, 180, 0.2);
128
+ transform: translateY(-2px);
129
+ }
130
+
131
+ .counter:active {
132
+ transform: scale(0.97);
133
+ }
134
+
135
+ .status-dot {
136
+ width: 17px;
137
+ height: 17px;
138
+ border-radius: 50%;
139
+ background: #20e879;
140
+ box-shadow: 0 0 12px rgba(32, 232, 121, 0.3);
141
+ }
142
+
143
+ .api-actions {
144
+ display: flex;
145
+ flex-wrap: wrap;
146
+ align-items: center;
147
+ justify-content: center;
148
+ gap: 16px;
149
+ }
150
+
151
+ .ping-button {
152
+ padding: 10px 20px;
153
+ border: 1px solid rgba(130, 80, 255, 0.3);
154
+ border-radius: 999px;
155
+ color: white;
156
+ background: rgba(123, 48, 255, 0.15);
157
+ font: inherit;
158
+ font-size: 14px;
159
+ font-weight: 600;
160
+ cursor: pointer;
161
+ transition: all 0.2s ease;
162
+ }
163
+
164
+ .ping-button:hover:not(:disabled) {
165
+ border-color: #9b42ff;
166
+ background: rgba(123, 48, 255, 0.25);
167
+ }
168
+
169
+ .ping-button:disabled {
170
+ cursor: wait;
171
+ opacity: 0.7;
172
+ }
173
+
174
+ .ping-button.ping-ok {
175
+ border-color: rgba(32, 232, 121, 0.4);
176
+ color: #20e879;
177
+ background: rgba(32, 232, 121, 0.12);
178
+ }
179
+
180
+ .ping-button.ping-error {
181
+ border-color: rgba(255, 92, 122, 0.4);
182
+ color: #ff5c7a;
183
+ background: rgba(255, 92, 122, 0.12);
184
+ }
185
+
186
+ .instruction {
187
+ margin-top: 24px;
188
+ font-size: 21px;
189
+ color: #c4bed8;
190
+ }
191
+
192
+ .instruction code {
193
+ padding: 5px 10px;
194
+ border-radius: 8px;
195
+
196
+ color: #ad69ff;
197
+ background: rgba(123, 48, 255, 0.1);
198
+
199
+ font-family: monospace;
200
+ }
201
+
202
+
203
+ .brand {
204
+ display: flex;
205
+ justify-content: center;
206
+ align-items: center;
207
+ width: 100%;
208
+ }
209
+
210
+ .origo-logo {
211
+ display: block;
212
+ width: 420px;
213
+ max-width: 85%;
214
+ height: auto;
215
+ object-fit: contain;
216
+ }
217
+
218
+ /* Tablet */
219
+ @media (max-width: 768px) {
220
+ .origo-logo {
221
+ width: 320px;
222
+ }
223
+ }
224
+
225
+ /* Mobile */
226
+ @media (max-width: 480px) {
227
+ .origo-logo {
228
+ width: 250px;
229
+ }
230
+ }
231
+
232
+
233
+ /* Footer */
234
+
235
+ .footer {
236
+ display: flex;
237
+ align-items: center;
238
+ justify-content: center;
239
+ gap: 30px;
240
+
241
+ margin-top: 85px;
242
+ }
243
+
244
+ .footer p {
245
+ color: #c4bddb;
246
+ font-size: 19px;
247
+ display: flex;
248
+ align-items: center;
249
+ justify-content: center;
250
+ }
251
+
252
+ .footer strong {
253
+ color: #a34cff;
254
+ font-weight: 600;
255
+ }
256
+
257
+ .heart {
258
+ display: inline-block;
259
+ margin: 0 14px;
260
+ color: #8d32ff;
261
+ font-size: 27px;
262
+ }
263
+
264
+ .footer-line {
265
+ width: 125px;
266
+ height: 1px;
267
+ background: rgba(155, 130, 200, 0.3);
268
+ }
269
+
270
+ /* Responsive */
271
+
272
+ @media (max-width: 1000px) {
273
+ .features {
274
+ grid-template-columns: repeat(2, minmax(0, 1fr));
275
+ }
276
+
277
+ .welcome-container {
278
+ padding: 70px 5%;
279
+ }
280
+ }
281
+
282
+ @media (max-width: 600px) {
283
+ .welcome-container {
284
+ padding: 65px 22px;
285
+ }
286
+
287
+ .brand {
288
+ margin-bottom: 45px;
289
+ }
290
+
291
+ .hero h1 {
292
+ letter-spacing: -1.5px;
293
+ }
294
+
295
+ .subtitle {
296
+ line-height: 1.6;
297
+ }
298
+
299
+ .instruction {
300
+ font-size: 15px;
301
+ line-height: 1.8;
302
+ }
303
+
304
+ .footer {
305
+ flex-direction: column;
306
+ gap: 15px;
307
+ }
308
+ }
@@ -0,0 +1,59 @@
1
+ import Counter from "./components/Counter";
2
+ {{PING_IMPORT}}
3
+
4
+ import "./App.css";
5
+
6
+ function App() {
7
+ return (
8
+ <main className="app">
9
+ <div className="background-glow glow-top" />
10
+ <div className="background-glow glow-right" />
11
+ <div className="background-glow glow-bottom" />
12
+
13
+ <section className="welcome-container">
14
+ <header className="brand">
15
+ <img
16
+ src="/origo-logo.svg"
17
+ alt="Origo"
18
+ className="origo-logo"
19
+ />
20
+ </header>
21
+
22
+ <section className="hero">
23
+ <h1>
24
+ {{HEADLINE_PREFIX}} <span>React</span>
25
+ </h1>
26
+
27
+ <p className="subtitle">
28
+ A modern starter template, out of the box.
29
+ </p>
30
+ </section>
31
+
32
+ <section className="counter-section">
33
+ <div className="api-actions">
34
+ <Counter />
35
+ {{PING_BUTTON}}
36
+ </div>
37
+
38
+ <p className="instruction">
39
+ Edit <code>{{APP_FILE}}</code> and save to test HMR
40
+ </p>
41
+ </section>
42
+
43
+ <footer className="footer">
44
+ <span className="footer-line" />
45
+
46
+ <p>
47
+ Crafted with
48
+ <span className="heart">♥</span>
49
+ by <strong>Origo</strong>
50
+ </p>
51
+
52
+ <span className="footer-line" />
53
+ </footer>
54
+ </section>
55
+ </main>
56
+ );
57
+ }
58
+
59
+ export default App;
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><defs><linearGradient id="a" x1="6" x2="235" y1="33" y2="344" gradientTransform="translate(0 .937) scale(.3122)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#41d1ff"/><stop offset="1" stop-color="#bd34fe"/></linearGradient><linearGradient id="b" x1="194.651" x2="236.076" y1="8.818" y2="292.989" gradientTransform="translate(0 .937) scale(.3122)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffea83"/><stop offset=".083" stop-color="#ffdd35"/><stop offset="1" stop-color="#ffa800"/></linearGradient></defs><path fill="url(#a)" d="M124.766 19.52 67.324 122.238c-1.187 2.121-4.234 2.133-5.437.024L3.305 19.532c-1.313-2.302.652-5.087 3.261-4.622L64.07 25.187a3.09 3.09 0 0 0 1.11 0l56.3-10.261c2.598-.473 4.575 2.289 3.286 4.594Zm0 0"/><path fill="url(#b)" d="M91.46 1.43 48.954 9.758a1.56 1.56 0 0 0-1.258 1.437l-2.617 44.168a1.563 1.563 0 0 0 1.91 1.614l11.836-2.735a1.562 1.562 0 0 1 1.88 1.836l-3.517 17.219a1.562 1.562 0 0 0 1.985 1.805l7.308-2.223c1.133-.344 2.223.652 1.985 1.812l-5.59 27.047c-.348 1.692 1.902 2.614 2.84 1.164l.625-.968 34.64-69.13c.582-1.16-.421-2.48-1.69-2.234l-12.185 2.352a1.558 1.558 0 0 1-1.793-1.965l7.95-27.562A1.56 1.56 0 0 0 91.46 1.43Zm0 0"/></svg>
@@ -0,0 +1,16 @@
1
+ import { useState } from "react";
2
+
3
+ export default function Counter() {
4
+ const [count, setCount] = useState<number>(0);
5
+
6
+ return (
7
+ <button
8
+ className="counter"
9
+ onClick={() => setCount((prev) => prev + 1)}
10
+ aria-label={`Counter: ${count}`}
11
+ >
12
+ <span className="status-dot" />
13
+ <span>count is {count}</span>
14
+ </button>
15
+ );
16
+ }
@@ -0,0 +1,32 @@
1
+ type OrigoLogoProps = {
2
+ className?: string;
3
+ };
4
+
5
+ export default function OrigoLogo({ className = "" }: OrigoLogoProps) {
6
+ return (
7
+ <svg
8
+ className={className}
9
+ viewBox="0 0 500 110"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ role="img"
12
+ aria-label="Origo"
13
+ >
14
+ <text
15
+ x="0"
16
+ y="85"
17
+ fill="white"
18
+ fontSize="96"
19
+ fontWeight="600"
20
+ letterSpacing="3"
21
+ fontFamily="Arial, Helvetica, sans-serif"
22
+ >
23
+ ORIGO
24
+ </text>
25
+
26
+ <path
27
+ d="M171 49 L193 85 L178 85 Z"
28
+ fill="#781BFF"
29
+ />
30
+ </svg>
31
+ );
32
+ }
@@ -0,0 +1,45 @@
1
+ import { useState } from "react";
2
+
3
+ const API_URL =
4
+ (import.meta as unknown as { env?: Record<string, string | undefined> }).env
5
+ ?.VITE_API_URL ?? "http://localhost:3000/api";
6
+
7
+ type PingState = "idle" | "loading" | "ok" | "error";
8
+
9
+ const labels: Record<PingState, string> = {
10
+ idle: "Ping API",
11
+ loading: "Pinging...",
12
+ ok: "API OK",
13
+ error: "API Error",
14
+ };
15
+
16
+ export default function PingButton() {
17
+ const [state, setState] = useState<PingState>("idle");
18
+
19
+ async function ping() {
20
+ setState("loading");
21
+
22
+ try {
23
+ const response = await fetch(`${API_URL}/health`);
24
+
25
+ if (!response.ok) {
26
+ throw new Error(`Request failed with ${response.status}`);
27
+ }
28
+
29
+ setState("ok");
30
+ } catch {
31
+ setState("error");
32
+ }
33
+ }
34
+
35
+ return (
36
+ <button
37
+ className={`ping-button ping-${state}`}
38
+ onClick={ping}
39
+ disabled={state === "loading"}
40
+ aria-live="polite"
41
+ >
42
+ {labels[state]}
43
+ </button>
44
+ );
45
+ }
@@ -0,0 +1,27 @@
1
+ @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");
2
+
3
+ :root {
4
+ font-family: "Inter", sans-serif;
5
+ color: #ffffff;
6
+ background: #030309;
7
+
8
+ font-synthesis: none;
9
+ text-rendering: optimizeLegibility;
10
+ -webkit-font-smoothing: antialiased;
11
+ -moz-osx-font-smoothing: grayscale;
12
+ }
13
+
14
+ * {
15
+ box-sizing: border-box;
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+
20
+ body {
21
+ min-width: 320px;
22
+ min-height: 100vh;
23
+ }
24
+
25
+ button {
26
+ font: inherit;
27
+ }
@@ -0,0 +1,17 @@
1
+ import { StrictMode } from "react";
2
+ import { createRoot } from "react-dom/client";
3
+
4
+ import App from "./App";
5
+ import "./index.css";
6
+
7
+ const rootElement = document.getElementById("root");
8
+
9
+ if (!rootElement) {
10
+ throw new Error("Root element not found");
11
+ }
12
+
13
+ createRoot(rootElement).render(
14
+ <StrictMode>
15
+ <App />
16
+ </StrictMode>,
17
+ );
@@ -0,0 +1,2 @@
1
+ declare module "*.css";
2
+ declare module "*.scss";
@@ -0,0 +1,23 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+
7
+ <link rel="icon" href="/favicon.ico" />
8
+
9
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
10
+
11
+ <meta name="theme-color" content="#030309" />
12
+
13
+ <meta name="description" content="Origo React starter template." />
14
+
15
+ <title>{{TITLE}}</title>
16
+ </head>
17
+
18
+ <body>
19
+ <div id="root"></div>
20
+ <script type="module" src="{{ENTRY_SCRIPT}}"></script>
21
+ </body>
22
+
23
+ </html>