@mrbryan1502/create-symfony-vue 1.0.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 (45) hide show
  1. package/bin/index.js +142 -0
  2. package/package.json +30 -0
  3. package/template/.editorconfig +25 -0
  4. package/template/.env +48 -0
  5. package/template/.env.dev +4 -0
  6. package/template/.env.test +3 -0
  7. package/template/.gitattributes +9 -0
  8. package/template/.prettierignore +46 -0
  9. package/template/.prettierrc +9 -0
  10. package/template/.vscode/extensions.json +17 -0
  11. package/template/.vscode/settings.json +19 -0
  12. package/template/README.md +172 -0
  13. package/template/assets/app.css +3 -0
  14. package/template/assets/main.ts +11 -0
  15. package/template/assets/router/index.ts +13 -0
  16. package/template/assets/src/App.vue +571 -0
  17. package/template/assets/styles/app.css +3 -0
  18. package/template/bin/console +21 -0
  19. package/template/bin/phpunit +4 -0
  20. package/template/compose.override.yaml +18 -0
  21. package/template/compose.yaml +25 -0
  22. package/template/composer.json +122 -0
  23. package/template/composer.lock +10332 -0
  24. package/template/config/bundles.php +16 -0
  25. package/template/config/preload.php +5 -0
  26. package/template/config/reference.php +1696 -0
  27. package/template/config/routes/framework.yaml +4 -0
  28. package/template/config/routes/pentatrion_vite.yaml +9 -0
  29. package/template/config/routes/security.yaml +3 -0
  30. package/template/config/routes/web_profiler.yaml +8 -0
  31. package/template/config/routes.yaml +11 -0
  32. package/template/config/services.yaml +23 -0
  33. package/template/importmap.php +22 -0
  34. package/template/package.json +47 -0
  35. package/template/phpunit.dist.xml +44 -0
  36. package/template/pnpm-lock.yaml +2715 -0
  37. package/template/public/index.php +9 -0
  38. package/template/src/Controller/AppController.php +16 -0
  39. package/template/src/Kernel.php +11 -0
  40. package/template/symfony.lock +319 -0
  41. package/template/templates/app.html.twig +13 -0
  42. package/template/templates/base.html.twig +26 -0
  43. package/template/tests/bootstrap.php +13 -0
  44. package/template/tsconfig.json +17 -0
  45. package/template/vite.config.js +29 -0
@@ -0,0 +1,571 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue';
3
+
4
+ const counter = ref(0);
5
+
6
+ function increment() {
7
+ counter.value++;
8
+ }
9
+
10
+ function decrement() {
11
+ counter.value--;
12
+ }
13
+
14
+ function reset() {
15
+ counter.value = 0;
16
+ }
17
+ </script>
18
+
19
+ <template>
20
+ <div class="app">
21
+ <header class="hero">
22
+ <div class="hero-bg"></div>
23
+ <div class="hero-content">
24
+ <h1 class="title">
25
+ <span class="title-symfony">Symfony</span>
26
+ <span class="title-plus">+</span>
27
+ <span class="title-vue">Vue</span>
28
+ </h1>
29
+
30
+ <p class="subtitle">
31
+ Plantilla moderna para aplicaciones web robustas y reactivas
32
+ </p>
33
+
34
+ <div class="tech-tags">
35
+ <span class="tag tag-php">PHP 8</span>
36
+ <span class="tag tag-symfony">Symfony 7</span>
37
+ <span class="tag tag-vue">Vue 3</span>
38
+ <span class="tag tag-ts">TypeScript</span>
39
+ </div>
40
+ </div>
41
+ </header>
42
+
43
+ <main class="main">
44
+ <section class="card counter-card">
45
+ <h2 class="card-title">
46
+ <svg
47
+ width="24"
48
+ height="24"
49
+ viewBox="0 0 24 24"
50
+ fill="none"
51
+ stroke="currentColor"
52
+ stroke-width="2"
53
+ stroke-linecap="round"
54
+ stroke-linejoin="round"
55
+ >
56
+ <rect x="2" y="3" width="20" height="14" rx="2" ry="2" />
57
+ <line x1="8" y1="21" x2="16" y2="21" />
58
+ <line x1="12" y1="17" x2="12" y2="21" />
59
+ </svg>
60
+ Contador de ejemplo
61
+ </h2>
62
+
63
+ <div class="counter-display">
64
+ <span class="counter-value">{{ counter }}</span>
65
+ </div>
66
+
67
+ <div class="counter-actions">
68
+ <button class="btn btn-increment" @click="increment">
69
+ <svg
70
+ width="16"
71
+ height="16"
72
+ viewBox="0 0 24 24"
73
+ fill="none"
74
+ stroke="currentColor"
75
+ stroke-width="2.5"
76
+ stroke-linecap="round"
77
+ >
78
+ <line x1="12" y1="5" x2="12" y2="19" />
79
+ <line x1="5" y1="12" x2="19" y2="12" />
80
+ </svg>
81
+ Incrementar
82
+ </button>
83
+ <button class="btn btn-decrement" @click="decrement">
84
+ <svg
85
+ width="16"
86
+ height="16"
87
+ viewBox="0 0 24 24"
88
+ fill="none"
89
+ stroke="currentColor"
90
+ stroke-width="2.5"
91
+ stroke-linecap="round"
92
+ >
93
+ <line x1="5" y1="12" x2="19" y2="12" />
94
+ </svg>
95
+ Decrementar
96
+ </button>
97
+ <button class="btn btn-reset" @click="reset">
98
+ <svg
99
+ width="16"
100
+ height="16"
101
+ viewBox="0 0 24 24"
102
+ fill="none"
103
+ stroke="currentColor"
104
+ stroke-width="2.5"
105
+ stroke-linecap="round"
106
+ stroke-linejoin="round"
107
+ >
108
+ <polyline points="1 4 1 10 7 10" />
109
+ <path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10" />
110
+ </svg>
111
+ Reset
112
+ </button>
113
+ </div>
114
+ </section>
115
+
116
+ <section class="cards-grid">
117
+ <div class="card info-card">
118
+ <div class="card-icon card-icon-1">
119
+ <svg
120
+ width="28"
121
+ height="28"
122
+ viewBox="0 0 24 24"
123
+ fill="none"
124
+ stroke="currentColor"
125
+ stroke-width="2"
126
+ stroke-linecap="round"
127
+ stroke-linejoin="round"
128
+ >
129
+ <path d="M12 2L2 7l10 5 10-5-10-5z" />
130
+ <path d="M2 17l10 5 10-5" />
131
+ <path d="M2 12l10 5 10-5" />
132
+ </svg>
133
+ </div>
134
+ <h3>Backend robusto</h3>
135
+ <p>
136
+ Symfony 7 con PHP 8, Doctrine, y las mejores prácticas del
137
+ ecosistema.
138
+ </p>
139
+ </div>
140
+
141
+ <div class="card info-card">
142
+ <div class="card-icon card-icon-2">
143
+ <svg
144
+ width="28"
145
+ height="28"
146
+ viewBox="0 0 24 24"
147
+ fill="none"
148
+ stroke="currentColor"
149
+ stroke-width="2"
150
+ stroke-linecap="round"
151
+ stroke-linejoin="round"
152
+ >
153
+ <polygon
154
+ points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"
155
+ />
156
+ </svg>
157
+ </div>
158
+ <h3>Frontend reactivo</h3>
159
+ <p>
160
+ Vue 3 con Composition API, TypeScript y Vite para máxima velocidad.
161
+ </p>
162
+ </div>
163
+
164
+ <div class="card info-card">
165
+ <div class="card-icon card-icon-3">
166
+ <svg
167
+ width="28"
168
+ height="28"
169
+ viewBox="0 0 24 24"
170
+ fill="none"
171
+ stroke="currentColor"
172
+ stroke-width="2"
173
+ stroke-linecap="round"
174
+ stroke-linejoin="round"
175
+ >
176
+ <circle cx="12" cy="12" r="10" />
177
+ <polyline points="12 6 12 12 16 14" />
178
+ </svg>
179
+ </div>
180
+ <h3>Listo para producción</h3>
181
+ <p>
182
+ Integración completa, hot reload, y build optimizado desde el
183
+ inicio.
184
+ </p>
185
+ </div>
186
+ </section>
187
+ </main>
188
+
189
+ <footer class="footer">
190
+ <p>
191
+ Hecho con <span class="heart">&hearts;</span> para desarrolladores
192
+ Symfony & Vue
193
+ </p>
194
+ </footer>
195
+ </div>
196
+ </template>
197
+
198
+ <style scoped>
199
+ * {
200
+ margin: 0;
201
+ padding: 0;
202
+ box-sizing: border-box;
203
+ }
204
+
205
+ .app {
206
+ font-family:
207
+ 'Inter',
208
+ 'Segoe UI',
209
+ system-ui,
210
+ -apple-system,
211
+ sans-serif;
212
+ min-height: 100vh;
213
+ background: #0f0f1a;
214
+ color: #e0e0e0;
215
+ overflow-x: hidden;
216
+ }
217
+
218
+ /* ===== HERO ===== */
219
+ .hero {
220
+ position: relative;
221
+ min-height: 85vh;
222
+ display: flex;
223
+ align-items: center;
224
+ justify-content: center;
225
+ overflow: hidden;
226
+ }
227
+
228
+ .hero-bg {
229
+ position: absolute;
230
+ inset: 0;
231
+ background:
232
+ radial-gradient(
233
+ ellipse 80% 60% at 50% -10%,
234
+ rgba(74, 144, 226, 0.15) 0%,
235
+ transparent 60%
236
+ ),
237
+ radial-gradient(
238
+ ellipse 60% 50% at 80% 80%,
239
+ rgba(66, 184, 131, 0.1) 0%,
240
+ transparent 50%
241
+ ),
242
+ radial-gradient(
243
+ ellipse 50% 40% at 20% 90%,
244
+ rgba(255, 255, 255, 0.03) 0%,
245
+ transparent 50%
246
+ );
247
+ }
248
+
249
+ .hero-content {
250
+ position: relative;
251
+ z-index: 1;
252
+ text-align: center;
253
+ padding: 2rem;
254
+ max-width: 800px;
255
+ }
256
+
257
+ /* Logos */
258
+ .logos {
259
+ display: flex;
260
+ align-items: center;
261
+ justify-content: center;
262
+ gap: 1.5rem;
263
+ margin-bottom: 2.5rem;
264
+ }
265
+
266
+ .logo-wrapper {
267
+ width: 140px;
268
+ height: 50px;
269
+ display: flex;
270
+ align-items: center;
271
+ justify-content: center;
272
+ }
273
+
274
+ .logo-svg {
275
+ width: 100%;
276
+ height: 100%;
277
+ }
278
+
279
+ .logo-plus {
280
+ display: flex;
281
+ align-items: center;
282
+ justify-content: center;
283
+ opacity: 0.5;
284
+ }
285
+
286
+ /* Title */
287
+ .title {
288
+ font-size: clamp(2.5rem, 6vw, 4.5rem);
289
+ font-weight: 800;
290
+ letter-spacing: -0.03em;
291
+ margin-bottom: 1rem;
292
+ display: flex;
293
+ align-items: center;
294
+ justify-content: center;
295
+ gap: 0.4em;
296
+ flex-wrap: wrap;
297
+ }
298
+
299
+ .title-symfony {
300
+ background: linear-gradient(135deg, #4a90e2, #7b5ea7);
301
+ -webkit-background-clip: text;
302
+ -webkit-text-fill-color: transparent;
303
+ background-clip: text;
304
+ }
305
+
306
+ .title-plus {
307
+ color: rgba(255, 255, 255, 0.3);
308
+ font-weight: 300;
309
+ }
310
+
311
+ .title-vue {
312
+ background: linear-gradient(135deg, #42b883, #35a372);
313
+ -webkit-background-clip: text;
314
+ -webkit-text-fill-color: transparent;
315
+ background-clip: text;
316
+ }
317
+
318
+ /* Subtitle */
319
+ .subtitle {
320
+ font-size: clamp(1rem, 2vw, 1.25rem);
321
+ color: rgba(255, 255, 255, 0.5);
322
+ margin-bottom: 2rem;
323
+ font-weight: 400;
324
+ }
325
+
326
+ /* Tech tags */
327
+ .tech-tags {
328
+ display: flex;
329
+ flex-wrap: wrap;
330
+ gap: 0.6rem;
331
+ justify-content: center;
332
+ }
333
+
334
+ .tag {
335
+ padding: 0.4rem 1rem;
336
+ border-radius: 999px;
337
+ font-size: 0.8rem;
338
+ font-weight: 600;
339
+ letter-spacing: 0.02em;
340
+ border: 1px solid rgba(255, 255, 255, 0.1);
341
+ background: rgba(255, 255, 255, 0.04);
342
+ color: rgba(255, 255, 255, 0.7);
343
+ transition: all 0.2s;
344
+ }
345
+
346
+ .tag:hover {
347
+ transform: translateY(-1px);
348
+ border-color: rgba(255, 255, 255, 0.25);
349
+ background: rgba(255, 255, 255, 0.08);
350
+ }
351
+
352
+ .tag-symfony {
353
+ border-color: rgba(74, 144, 226, 0.3);
354
+ color: #7db8f0;
355
+ }
356
+ .tag-vue {
357
+ border-color: rgba(66, 184, 131, 0.3);
358
+ color: #42b883;
359
+ }
360
+ .tag-php {
361
+ border-color: rgba(156, 132, 207, 0.3);
362
+ color: #9c84cf;
363
+ }
364
+ .tag-ts {
365
+ border-color: rgba(49, 120, 198, 0.3);
366
+ color: #3178c6;
367
+ }
368
+
369
+ /* ===== MAIN ===== */
370
+ .main {
371
+ max-width: 900px;
372
+ margin: 0 auto;
373
+ padding: 0 1.5rem 4rem;
374
+ }
375
+
376
+ /* Card base */
377
+ .card {
378
+ background: rgba(255, 255, 255, 0.03);
379
+ border: 1px solid rgba(255, 255, 255, 0.06);
380
+ border-radius: 1.25rem;
381
+ padding: 2rem;
382
+ backdrop-filter: blur(12px);
383
+ transition: all 0.3s ease;
384
+ }
385
+
386
+ .card:hover {
387
+ border-color: rgba(255, 255, 255, 0.12);
388
+ background: rgba(255, 255, 255, 0.05);
389
+ }
390
+
391
+ /* Counter card */
392
+ .counter-card {
393
+ text-align: center;
394
+ margin-bottom: 2.5rem;
395
+ }
396
+
397
+ .card-title {
398
+ display: flex;
399
+ align-items: center;
400
+ justify-content: center;
401
+ gap: 0.5rem;
402
+ font-size: 1.1rem;
403
+ font-weight: 600;
404
+ color: rgba(255, 255, 255, 0.6);
405
+ margin-bottom: 1.5rem;
406
+ }
407
+
408
+ .counter-display {
409
+ margin: 2rem 0;
410
+ }
411
+
412
+ .counter-value {
413
+ font-size: clamp(4rem, 10vw, 7rem);
414
+ font-weight: 800;
415
+ letter-spacing: -0.04em;
416
+ background: linear-gradient(135deg, #4a90e2, #42b883);
417
+ -webkit-background-clip: text;
418
+ -webkit-text-fill-color: transparent;
419
+ background-clip: text;
420
+ line-height: 1;
421
+ }
422
+
423
+ .counter-actions {
424
+ display: flex;
425
+ flex-wrap: wrap;
426
+ gap: 0.75rem;
427
+ justify-content: center;
428
+ }
429
+
430
+ /* Buttons */
431
+ .btn {
432
+ display: inline-flex;
433
+ align-items: center;
434
+ gap: 0.5rem;
435
+ padding: 0.75rem 1.5rem;
436
+ border-radius: 0.75rem;
437
+ border: none;
438
+ font-size: 0.9rem;
439
+ font-weight: 600;
440
+ cursor: pointer;
441
+ transition: all 0.2s ease;
442
+ color: white;
443
+ }
444
+
445
+ .btn:active {
446
+ transform: scale(0.96);
447
+ }
448
+
449
+ .btn-increment {
450
+ background: linear-gradient(135deg, #42b883, #35a372);
451
+ box-shadow: 0 4px 15px rgba(66, 184, 131, 0.25);
452
+ }
453
+
454
+ .btn-increment:hover {
455
+ box-shadow: 0 6px 25px rgba(66, 184, 131, 0.4);
456
+ transform: translateY(-2px);
457
+ }
458
+
459
+ .btn-decrement {
460
+ background: linear-gradient(135deg, #e74c3c, #c0392b);
461
+ box-shadow: 0 4px 15px rgba(231, 76, 60, 0.25);
462
+ }
463
+
464
+ .btn-decrement:hover {
465
+ box-shadow: 0 6px 25px rgba(231, 76, 60, 0.4);
466
+ transform: translateY(-2px);
467
+ }
468
+
469
+ .btn-reset {
470
+ background: rgba(255, 255, 255, 0.08);
471
+ box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
472
+ }
473
+
474
+ .btn-reset:hover {
475
+ background: rgba(255, 255, 255, 0.14);
476
+ transform: translateY(-2px);
477
+ }
478
+
479
+ /* ===== CARDS GRID ===== */
480
+ .cards-grid {
481
+ display: grid;
482
+ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
483
+ gap: 1.5rem;
484
+ }
485
+
486
+ .info-card {
487
+ text-align: center;
488
+ }
489
+
490
+ .card-icon {
491
+ width: 56px;
492
+ height: 56px;
493
+ border-radius: 1rem;
494
+ display: flex;
495
+ align-items: center;
496
+ justify-content: center;
497
+ margin: 0 auto 1.25rem;
498
+ }
499
+
500
+ .card-icon-1 {
501
+ background: linear-gradient(
502
+ 135deg,
503
+ rgba(74, 144, 226, 0.15),
504
+ rgba(74, 144, 226, 0.05)
505
+ );
506
+ color: #4a90e2;
507
+ }
508
+ .card-icon-2 {
509
+ background: linear-gradient(
510
+ 135deg,
511
+ rgba(66, 184, 131, 0.15),
512
+ rgba(66, 184, 131, 0.05)
513
+ );
514
+ color: #42b883;
515
+ }
516
+ .card-icon-3 {
517
+ background: linear-gradient(
518
+ 135deg,
519
+ rgba(255, 255, 255, 0.1),
520
+ rgba(255, 255, 255, 0.03)
521
+ );
522
+ color: rgba(255, 255, 255, 0.7);
523
+ }
524
+
525
+ .info-card h3 {
526
+ font-size: 1.05rem;
527
+ font-weight: 700;
528
+ margin-bottom: 0.6rem;
529
+ color: rgba(255, 255, 255, 0.85);
530
+ }
531
+
532
+ .info-card p {
533
+ font-size: 0.9rem;
534
+ line-height: 1.6;
535
+ color: rgba(255, 255, 255, 0.45);
536
+ }
537
+
538
+ /* ===== FOOTER ===== */
539
+ .footer {
540
+ text-align: center;
541
+ padding: 2rem 1.5rem;
542
+ border-top: 1px solid rgba(255, 255, 255, 0.05);
543
+ color: rgba(255, 255, 255, 0.3);
544
+ font-size: 0.85rem;
545
+ }
546
+
547
+ .heart {
548
+ color: #e74c3c;
549
+ display: inline-block;
550
+ animation: heartbeat 1.4s ease-in-out infinite;
551
+ }
552
+
553
+ @keyframes heartbeat {
554
+ 0%,
555
+ 100% {
556
+ transform: scale(1);
557
+ }
558
+ 25% {
559
+ transform: scale(1.15);
560
+ }
561
+ 35% {
562
+ transform: scale(1);
563
+ }
564
+ 45% {
565
+ transform: scale(1.1);
566
+ }
567
+ 55% {
568
+ transform: scale(1);
569
+ }
570
+ }
571
+ </style>
@@ -0,0 +1,3 @@
1
+ body {
2
+ background-color: skyblue;
3
+ }
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env php
2
+ <?php
3
+
4
+ use App\Kernel;
5
+ use Symfony\Bundle\FrameworkBundle\Console\Application;
6
+
7
+ if (!is_dir(dirname(__DIR__).'/vendor')) {
8
+ throw new LogicException('Dependencies are missing. Try running "composer install".');
9
+ }
10
+
11
+ if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
12
+ throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
13
+ }
14
+
15
+ require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
16
+
17
+ return function (array $context) {
18
+ $kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
19
+
20
+ return new Application($kernel);
21
+ };
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env php
2
+ <?php
3
+
4
+ require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
@@ -0,0 +1,18 @@
1
+
2
+ services:
3
+ ###> doctrine/doctrine-bundle ###
4
+ database:
5
+ ports:
6
+ - "5432"
7
+ ###< doctrine/doctrine-bundle ###
8
+
9
+ ###> symfony/mailer ###
10
+ mailer:
11
+ image: axllent/mailpit
12
+ ports:
13
+ - "1025"
14
+ - "8025"
15
+ environment:
16
+ MP_SMTP_AUTH_ACCEPT_ANY: 1
17
+ MP_SMTP_AUTH_ALLOW_INSECURE: 1
18
+ ###< symfony/mailer ###
@@ -0,0 +1,25 @@
1
+
2
+ services:
3
+ ###> doctrine/doctrine-bundle ###
4
+ database:
5
+ image: postgres:${POSTGRES_VERSION:-16}-alpine
6
+ environment:
7
+ POSTGRES_DB: ${POSTGRES_DB:-app}
8
+ # You should definitely change the password in production
9
+ POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
10
+ POSTGRES_USER: ${POSTGRES_USER:-app}
11
+ healthcheck:
12
+ test: ["CMD", "pg_isready", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-app}"]
13
+ timeout: 5s
14
+ retries: 5
15
+ start_period: 60s
16
+ volumes:
17
+ - database_data:/var/lib/postgresql/data:rw
18
+ # You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
19
+ # - ./docker/db/data:/var/lib/postgresql/data:rw
20
+ ###< doctrine/doctrine-bundle ###
21
+
22
+ volumes:
23
+ ###> doctrine/doctrine-bundle ###
24
+ database_data:
25
+ ###< doctrine/doctrine-bundle ###