create-vitnode-app 0.1.6 → 1.2.0-canary.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 (94) hide show
  1. package/{templates → copy-of-vitnode-app}/eslint/.prettierrc.mjs +1 -1
  2. package/{templates/eslint/apps/frontend → copy-of-vitnode-app/eslint}/eslint.config.mjs +1 -2
  3. package/copy-of-vitnode-app/root/next.config.ts +11 -0
  4. package/{templates/basic/apps/frontend → copy-of-vitnode-app/root}/postcss.config.mjs +1 -2
  5. package/copy-of-vitnode-app/root/src/app/[locale]/(main)/[...rest]/page.tsx +5 -0
  6. package/copy-of-vitnode-app/root/src/app/[locale]/(main)/layout.tsx +10 -0
  7. package/copy-of-vitnode-app/root/src/app/[locale]/(main)/not-found.tsx +5 -0
  8. package/copy-of-vitnode-app/root/src/app/[locale]/(main)/page.tsx +113 -0
  9. package/copy-of-vitnode-app/root/src/app/[locale]/admin/(auth)/layout.tsx +7 -0
  10. package/copy-of-vitnode-app/root/src/app/[locale]/admin/not-found.tsx +5 -0
  11. package/copy-of-vitnode-app/root/src/app/[locale]/admin/page.tsx +5 -0
  12. package/copy-of-vitnode-app/root/src/app/[locale]/layout.tsx +35 -0
  13. package/copy-of-vitnode-app/root/src/app/api/[...route]/route.ts +17 -0
  14. package/copy-of-vitnode-app/root/src/app/global-error.tsx +27 -0
  15. package/copy-of-vitnode-app/root/src/app/globals.css +119 -0
  16. package/{templates/basic/apps/frontend → copy-of-vitnode-app/root}/src/app/layout.tsx +1 -1
  17. package/copy-of-vitnode-app/root/src/app/not-found.tsx +13 -0
  18. package/copy-of-vitnode-app/root/src/vitnode.api.config.ts +5 -0
  19. package/copy-of-vitnode-app/root/tsconfig.json +21 -0
  20. package/dist/src/create/create-vitnode.js +26 -0
  21. package/dist/src/helpers/get-available-package-managers.js +24 -0
  22. package/dist/src/helpers/get-package-json.js +2 -0
  23. package/dist/src/helpers/is-folder-empty.js +49 -0
  24. package/dist/src/helpers/is-writeable.js +11 -0
  25. package/dist/src/helpers/packages-json.js +1 -0
  26. package/dist/src/helpers/validate-pkg.js +14 -0
  27. package/dist/src/index.js +65 -0
  28. package/dist/src/plugin/index.js +18 -0
  29. package/dist/src/prepare/prepare.js +16 -0
  30. package/dist/src/questions.js +46 -0
  31. package/dist/src/validation.js +40 -0
  32. package/dist/tsconfig.tsbuildinfo +1 -0
  33. package/package.json +15 -23
  34. package/README.md +0 -40
  35. package/dist/index.cjs +0 -49
  36. package/templates/basic/.env.template +0 -16
  37. package/templates/basic/.gitignore_template +0 -58
  38. package/templates/basic/README.md +0 -44
  39. package/templates/basic/apps/backend/drizzle.config.ts +0 -9
  40. package/templates/basic/apps/backend/nest-cli.json +0 -15
  41. package/templates/basic/apps/backend/src/app.module.ts +0 -24
  42. package/templates/basic/apps/backend/src/database/config.ts +0 -16
  43. package/templates/basic/apps/backend/src/database/database.module.ts +0 -17
  44. package/templates/basic/apps/backend/src/database/database.service.ts +0 -9
  45. package/templates/basic/apps/backend/src/main.ts +0 -13
  46. package/templates/basic/apps/backend/src/plugins/plugins.module.ts +0 -8
  47. package/templates/basic/apps/backend/src/plugins/welcome/admin/admin.module.ts +0 -4
  48. package/templates/basic/apps/backend/src/plugins/welcome/admin/database/index.ts +0 -1
  49. package/templates/basic/apps/backend/src/plugins/welcome/config.json +0 -12
  50. package/templates/basic/apps/backend/src/plugins/welcome/welcome.module.ts +0 -8
  51. package/templates/basic/apps/backend/tsconfig.build.json +0 -4
  52. package/templates/basic/apps/backend/tsconfig.json +0 -15
  53. package/templates/basic/apps/backend/uploads/index.html +0 -0
  54. package/templates/basic/apps/backend/uploads/private/index.html +0 -0
  55. package/templates/basic/apps/backend/uploads/public/index.html +0 -0
  56. package/templates/basic/apps/backend/uploads/temp/index.html +0 -0
  57. package/templates/basic/apps/frontend/global.d.ts +0 -11
  58. package/templates/basic/apps/frontend/next.config.ts +0 -6
  59. package/templates/basic/apps/frontend/public/sw.js +0 -3
  60. package/templates/basic/apps/frontend/src/app/[locale]/(main)/[...slug]/page.tsx +0 -10
  61. package/templates/basic/apps/frontend/src/app/[locale]/(main)/footer.tsx +0 -18
  62. package/templates/basic/apps/frontend/src/app/[locale]/(main)/layout.tsx +0 -12
  63. package/templates/basic/apps/frontend/src/app/[locale]/(main)/not-found.tsx +0 -5
  64. package/templates/basic/apps/frontend/src/app/[locale]/(main)/page.tsx +0 -9
  65. package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/[...slug]/page.tsx +0 -12
  66. package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/error.tsx +0 -9
  67. package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/layout.tsx +0 -13
  68. package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/not-found.tsx +0 -5
  69. package/templates/basic/apps/frontend/src/app/[locale]/admin/page.tsx +0 -5
  70. package/templates/basic/apps/frontend/src/app/[locale]/layout.tsx +0 -13
  71. package/templates/basic/apps/frontend/src/app/global.css +0 -94
  72. package/templates/basic/apps/frontend/src/app/not-found.tsx +0 -8
  73. package/templates/basic/apps/frontend/src/app/robots.ts +0 -9
  74. package/templates/basic/apps/frontend/src/app/sitemap.ts +0 -9
  75. package/templates/basic/apps/frontend/src/i18n.ts +0 -13
  76. package/templates/basic/apps/frontend/src/middleware.ts +0 -8
  77. package/templates/basic/apps/frontend/src/plugins/admin/langs/en.json +0 -710
  78. package/templates/basic/apps/frontend/src/plugins/core/langs/en.json +0 -408
  79. package/templates/basic/apps/frontend/src/plugins/welcome/langs/en.json +0 -15
  80. package/templates/basic/apps/frontend/src/plugins/welcome/templates/default-page.tsx +0 -40
  81. package/templates/basic/apps/frontend/tailwind.config.ts +0 -16
  82. package/templates/basic/apps/frontend/tsconfig.json +0 -33
  83. package/templates/basic/apps/shared/plugins/welcome/example.dto.ts +0 -0
  84. package/templates/basic/apps/shared/tsconfig.json +0 -15
  85. package/templates/basic/turbo.json +0 -34
  86. package/templates/docker/apps/backend/DockerFile +0 -31
  87. package/templates/docker/apps/frontend/DockerFile +0 -38
  88. package/templates/docker/deploy.sh +0 -213
  89. package/templates/docker/docker-compose-dev.yml +0 -35
  90. package/templates/docker/docker-compose.yml +0 -56
  91. package/templates/eslint/apps/backend/eslint.config.mjs +0 -4
  92. package/templates/eslint/apps/shared/eslint.config.mjs +0 -4
  93. package/templates/pnpm/pnpm-workspace.yaml +0 -2
  94. /package/{templates/basic/apps/frontend/public → copy-of-vitnode-app/root/src/app}/favicon.ico +0 -0
@@ -1,13 +0,0 @@
1
- import { INestApplication, NestApplicationOptions } from '@nestjs/common';
2
- import { NestFactory } from '@nestjs/core';
3
- import { nestFactoryOptions, nestjsMainApp } from 'vitnode-backend/main';
4
-
5
- import { AppModule } from './app.module';
6
-
7
- async function bootstrap() {
8
- const options: NestApplicationOptions = nestFactoryOptions;
9
- const app: INestApplication = await NestFactory.create(AppModule, options);
10
-
11
- void nestjsMainApp(app, {});
12
- }
13
- void bootstrap();
@@ -1,8 +0,0 @@
1
- import { Module } from '@nestjs/common';
2
-
3
- import { WelcomeModule } from './welcome/welcome.module';
4
-
5
- @Module({
6
- imports: [WelcomeModule],
7
- })
8
- export class PluginsModule {}
@@ -1,4 +0,0 @@
1
- import { Module } from '@nestjs/common';
2
-
3
- @Module({})
4
- export class AdminWelcomeModule {}
@@ -1,12 +0,0 @@
1
- {
2
- "$schema": "https://api.vitnode.com/public/vitnode/plugin.schema.json",
3
- "name": "Welcome",
4
- "description": "Basic plugin with default page.",
5
- "version": "1.0.0",
6
- "version_code": 1,
7
- "code": "welcome",
8
- "author": "VitNode",
9
- "author_url": "https://vitnode.com/",
10
- "support_url": "https://github.com/VitNode/vitnode/issues",
11
- "nav": []
12
- }
@@ -1,8 +0,0 @@
1
- import { Module } from '@nestjs/common';
2
-
3
- import { AdminWelcomeModule } from './admin/admin.module';
4
-
5
- @Module({
6
- imports: [AdminWelcomeModule],
7
- })
8
- export class WelcomeModule {}
@@ -1,4 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "exclude": ["node_modules", "test", "dist", "**/*spec.ts", "uploads"]
4
- }
@@ -1,15 +0,0 @@
1
- {
2
- "$schema": "https://json.schemastore.org/tsconfig",
3
- "extends": "eslint-config-typescript-vitnode/tsconfig.nest.json",
4
- "compilerOptions": {
5
- "target": "ESNext",
6
- "module": "es2015",
7
- "moduleResolution": "bundler",
8
- "baseUrl": "./",
9
- "outDir": "./dist",
10
- "paths": {
11
- "@/*": ["./src/*"]
12
- }
13
- },
14
- "exclude": ["uploads"]
15
- }
File without changes
@@ -1,11 +0,0 @@
1
- import type core from '@/plugins/core/langs/en.json';
2
- import type admin from '@/plugins/admin/langs/en.json';
3
- import type welcome from '@/plugins/welcome/langs/en.json';
4
-
5
- type Messages = typeof core & typeof admin & typeof welcome;
6
-
7
- declare module 'next-intl' {
8
- interface AppConfig {
9
- Messages: Messages;
10
- }
11
- }
@@ -1,6 +0,0 @@
1
- import type { NextConfig } from 'next';
2
- import VitNodeConfig from 'vitnode-frontend/next.config';
3
-
4
- const nextConfig: NextConfig = {};
5
-
6
- export default VitNodeConfig(nextConfig);
@@ -1,3 +0,0 @@
1
- 'use strict';
2
-
3
- self.addEventListener('install', () => {});
@@ -1,10 +0,0 @@
1
- import {
2
- DynamicView,
3
- generateMetadataDynamic,
4
- } from 'vitnode-frontend/views/theme/views/dynamic-view';
5
-
6
- export const generateMetadata = generateMetadataDynamic;
7
-
8
- export default function Page(props: React.ComponentProps<typeof DynamicView>) {
9
- return <DynamicView {...props} />;
10
- }
@@ -1,18 +0,0 @@
1
- import { getTranslations } from 'next-intl/server';
2
- import { Link } from 'vitnode-frontend/navigation';
3
-
4
- export const Footer = async () => {
5
- const t = await getTranslations('core.legal');
6
-
7
- return (
8
- <footer className="container mb-14 mt-6 flex flex-col items-center justify-between gap-4 border-t py-6 text-sm sm:mb-0 sm:flex-row">
9
- <Link className="text-muted-foreground" href="https://vitnode.com/">
10
- Powered by <span className="text-primary font-medium">VitNode</span>
11
- </Link>
12
-
13
- <div>
14
- <Link href="/legal">{t('title')}</Link>
15
- </div>
16
- </footer>
17
- );
18
- };
@@ -1,12 +0,0 @@
1
- import { ThemeLayout } from 'vitnode-frontend/views/theme/layout/theme-layout';
2
-
3
- import { Footer } from './footer';
4
-
5
- export default function Layout({ children }: { children: React.ReactNode }) {
6
- return (
7
- <>
8
- <ThemeLayout>{children}</ThemeLayout>
9
- <Footer />
10
- </>
11
- );
12
- }
@@ -1,5 +0,0 @@
1
- import { ErrorView } from 'vitnode-frontend/views/theme/views/error/error-view';
2
-
3
- export default function NotFoundPage() {
4
- return <ErrorView code="404" />;
5
- }
@@ -1,9 +0,0 @@
1
- import DefaultPage from '@/plugins/welcome/templates/default-page';
2
- import React from 'react';
3
- import { generateMetadataDefaultPage } from 'vitnode-frontend/views/theme/views/default-page';
4
-
5
- export const generateMetadata = generateMetadataDefaultPage;
6
-
7
- export default function Page() {
8
- return <DefaultPage />;
9
- }
@@ -1,12 +0,0 @@
1
- import {
2
- DynamicAdminView,
3
- generateMetadataDynamic,
4
- } from 'vitnode-frontend/admin/dynamic-admin-view';
5
-
6
- export const generateMetadata = generateMetadataDynamic;
7
-
8
- export default function Page(
9
- props: React.ComponentProps<typeof DynamicAdminView>,
10
- ) {
11
- return <DynamicAdminView {...props} />;
12
- }
@@ -1,9 +0,0 @@
1
- 'use client';
2
-
3
- import { WrapperError } from 'vitnode-frontend/views/theme/views/error/wrapper-error';
4
-
5
- export default function Error(
6
- props: React.ComponentProps<typeof WrapperError>,
7
- ) {
8
- return <WrapperError {...props} />;
9
- }
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import {
3
- AdminLayout,
4
- generateMetadataAdminLayout,
5
- } from 'vitnode-frontend/views/admin/layout/admin-layout';
6
-
7
- export const generateMetadata = generateMetadataAdminLayout;
8
-
9
- export default function Layout(
10
- props: React.ComponentProps<typeof AdminLayout>,
11
- ) {
12
- return <AdminLayout {...props} />;
13
- }
@@ -1,5 +0,0 @@
1
- import { ErrorView } from 'vitnode-frontend/views/theme/views/error/error-view';
2
-
3
- export default function NotFoundPage() {
4
- return <ErrorView code="404" />;
5
- }
@@ -1,5 +0,0 @@
1
- import { SignInAdminView } from 'vitnode-frontend/admin/sign-in/sign-in-admin-view';
2
-
3
- export default function Page() {
4
- return <SignInAdminView />;
5
- }
@@ -1,13 +0,0 @@
1
- import { GeistSans } from 'geist/font/sans';
2
- import {
3
- generateMetadataRootLayout,
4
- RootLayout,
5
- } from 'vitnode-frontend/views/layout/root-layout';
6
-
7
- export const generateMetadata = generateMetadataRootLayout;
8
-
9
- export default function Layout(
10
- props: Omit<React.ComponentProps<typeof RootLayout>, 'className'>,
11
- ) {
12
- return <RootLayout className={GeistSans.className} {...props} />;
13
- }
@@ -1,94 +0,0 @@
1
- @tailwind components;
2
- @tailwind utilities;
3
- @tailwind base;
4
-
5
- @layer base {
6
- * {
7
- @apply border-border;
8
- }
9
-
10
- body {
11
- @apply bg-background text-foreground;
12
- }
13
-
14
- a {
15
- @apply text-primary;
16
- }
17
-
18
- :root:not(.dark) {
19
- --background: 217 20% 96%;
20
- --foreground: 213 5% 8%;
21
- --card: 220 40% 100%;
22
- --card-foreground: 213deg 26% 7%;
23
- --popover: var(--card);
24
- --popover-foreground: var(--card-foreground);
25
- --primary: 220 58% 47%;
26
- --primary-foreground: 220 40% 98%;
27
- --secondary: 220 42% 94%;
28
- --secondary-foreground: 210 40% 2%;
29
- --muted: 220 40% 96%;
30
- --muted-foreground: 220 8% 44%;
31
- --accent: 220 40% 94%;
32
- --accent-foreground: 222 47% 11%;
33
- --destructive: 0 57% 43%;
34
- --destructive-foreground: 210 40% 98%;
35
- --border: 220 40% 90%;
36
- --input: var(--border);
37
- --ring: var(--primary);
38
- --radius: 0.5rem;
39
- --cover: 220 80% 67%;
40
- --cover-foreground: 210 40% 98%;
41
-
42
- --chart-1: 12 76% 61%;
43
- --chart-2: 173 58% 39%;
44
- --chart-3: 197 37% 24%;
45
- --chart-4: 43 74% 66%;
46
- --chart-5: 27 87% 67%;
47
- }
48
-
49
- .dark {
50
- --background: 220 11% 6%;
51
- --foreground: 0 0% 98%;
52
- --card: 225 15% 9%;
53
- --card-foreground: 0 0% 98%;
54
- --popover: var(--card);
55
- --popover-foreground: var(--card-foreground);
56
- --primary: 220 83% 60%;
57
- --primary-foreground: 220 40% 98%;
58
- --secondary: 216 10% 18%;
59
- --secondary-foreground: 0 0% 98%;
60
- --muted: 225 15% 12%;
61
- --muted-foreground: 216 0% 68%;
62
- --accent: 225 15% 14%;
63
- --accent-foreground: 0 0% 98%;
64
- --destructive: 359 78% 55%;
65
- --destructive-foreground: 210 40% 98%;
66
- --border: 228 10% 16%;
67
- --input: var(--border);
68
- --ring: var(--primary);
69
- --radius: 0.5rem;
70
- --cover: 216 64% 39%;
71
- --cover-foreground: 210 40% 98%;
72
-
73
- --chart-1: 220 70% 50%;
74
- --chart-2: 160 60% 45%;
75
- --chart-3: 30 80% 55%;
76
- --chart-4: 280 65% 60%;
77
- --chart-5: 340 75% 55%;
78
- }
79
- }
80
-
81
- @layer components {
82
- .underline-strike-through {
83
- text-decoration: underline line-through;
84
- }
85
-
86
- .no-scrollbar {
87
- -ms-overflow-style: none;
88
- scrollbar-width: none;
89
-
90
- &::-webkit-scrollbar {
91
- display: none;
92
- }
93
- }
94
- }
@@ -1,8 +0,0 @@
1
- // ! DO NOT TOUCH THIS FILE!!! IT IS GENERATED BY VITNODE-CLI
2
- 'use client';
3
-
4
- import { NotFoundView } from 'vitnode-frontend/views/theme/views/not-found';
5
-
6
- export default function NotFound() {
7
- return <NotFoundView />;
8
- }
@@ -1,9 +0,0 @@
1
- import type { MetadataRoute } from 'next';
2
-
3
- import { rootRobots } from 'vitnode-frontend/robots';
4
-
5
- export default async function robots(): Promise<MetadataRoute.Robots> {
6
- const robots = await rootRobots();
7
-
8
- return robots;
9
- }
@@ -1,9 +0,0 @@
1
- import type { MetadataRoute } from 'next';
2
-
3
- import { rootSitemap } from 'vitnode-frontend/sitemap';
4
-
5
- export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
6
- const sitemap = await rootSitemap();
7
-
8
- return sitemap;
9
- }
@@ -1,13 +0,0 @@
1
- import { getRequestConfig } from 'next-intl/server';
2
- import { i18nConfigVitNode } from 'vitnode-frontend/i18n';
3
-
4
- export default getRequestConfig(async ({ requestLocale }) => {
5
- const config = await i18nConfigVitNode({
6
- pathsToMessagesFromPlugins: async ({ plugin, locale }) => {
7
- return await import(`./plugins/${plugin}/langs/${locale}.json`);
8
- },
9
- requestLocale,
10
- });
11
-
12
- return config;
13
- });
@@ -1,8 +0,0 @@
1
- import { createMiddleware } from 'vitnode-frontend/middleware';
2
-
3
- export default createMiddleware();
4
-
5
- export const config = {
6
- matcher:
7
- '/((?!_next|robots.txt|api|sw.js|sitemap.xml|robots.txt|favicon.ico).*)',
8
- };