create-vitnode-app 0.0.9-canary.7 → 0.0.9-canary.71
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.
- package/README.md +9 -9
- package/dist/index.cjs +35 -34
- package/package.json +11 -11
- package/templates/basic/.env.template +16 -0
- package/templates/basic/.gitignore_template +0 -11
- package/templates/basic/README.md +42 -0
- package/templates/basic/apps/backend/codegen.ts +1 -1
- package/templates/basic/apps/backend/drizzle.config.ts +1 -2
- package/templates/basic/apps/backend/src/app.module.ts +4 -7
- package/templates/basic/apps/backend/src/database/config.ts +4 -4
- package/templates/basic/apps/backend/src/database/database.module.ts +1 -1
- package/templates/basic/apps/backend/src/main.ts +4 -18
- package/templates/basic/apps/backend/src/plugins/plugins.module.ts +1 -1
- package/templates/basic/apps/backend/src/plugins/welcome/config.json +2 -2
- package/templates/basic/apps/frontend/global.d.ts +5 -4
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/[...slug]/page.tsx +7 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/legal/[code]/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/legal/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/login/layout.tsx +9 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/login/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/page.tsx +23 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/profile/[id]/page.tsx +5 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/register/confirm-email/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/register/layout.tsx +9 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/register/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/settings/devices/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/settings/files/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/settings/layout.tsx +13 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/settings/page.tsx +5 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/layout.tsx +9 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/not-found.tsx +5 -0
- package/templates/basic/apps/frontend/{app → src/app/[locale]/(main)}/global.css +7 -7
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/layout.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/(main)/not-found.tsx +5 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/[...slug]/page.tsx +7 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/advanced/files/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/dashboard/page.tsx +5 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/diagnostic/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/langs/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/[code]/dev/layout.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/[code]/dev/nav/page.tsx +7 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/[code]/dev/page.tsx +7 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/[code]/dev/permissions-admin/page.tsx +7 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/layout.tsx +9 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/ai/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/authorization/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/email/layout.tsx +9 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/email/logs/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/email/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/legal/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/main/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/metadata/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/settings/security/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/styles/editor/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/styles/nav/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/members/groups/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/members/staff/administrators/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/members/staff/moderators/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/members/users/[id]/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/members/users/layout.tsx +9 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/members/users/page.tsx +12 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/error.tsx +7 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/layout.tsx +13 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/not-found.tsx +5 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(vitnode)/core/styles/theme-editor/page.tsx +10 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(vitnode)/install/page.tsx +11 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/(vitnode)/page.tsx +5 -0
- package/templates/basic/apps/frontend/src/app/[locale]/admin/layout.tsx +9 -0
- package/templates/basic/apps/frontend/{app → src/app}/[locale]/layout.tsx +4 -4
- package/templates/basic/apps/frontend/{app → src/app}/layout.tsx +0 -2
- package/templates/basic/apps/frontend/src/app/not-found.tsx +8 -0
- package/templates/basic/apps/frontend/src/graphql/types.ts +1381 -0
- package/templates/basic/apps/frontend/src/i18n.ts +13 -0
- package/templates/basic/apps/frontend/src/middleware.ts +7 -0
- package/templates/basic/apps/frontend/src/plugins/admin/langs/en.json +647 -0
- package/templates/basic/apps/frontend/src/plugins/core/langs/en.json +345 -0
- package/templates/basic/apps/frontend/src/plugins/welcome/langs/en.json +17 -0
- package/templates/basic/apps/frontend/src/plugins/welcome/templates/default-page.tsx +40 -0
- package/templates/basic/apps/frontend/tailwind.config.ts +5 -5
- package/templates/basic/apps/frontend/tsconfig.json +1 -1
- package/templates/basic/turbo.json +2 -1
- package/templates/docker/docker-compose-dev.yml +1 -1
- package/templates/eslint/apps/backend/eslint.config.mjs +4 -0
- package/templates/eslint/apps/frontend/eslint.config.mjs +4 -0
- package/templates/basic/.env_template +0 -5
- package/templates/basic/apps/backend/src/plugins/welcome/admin/database/functions.ts +0 -6
- package/templates/basic/apps/frontend/app/[locale]/(main)/layout.tsx +0 -11
- package/templates/basic/apps/frontend/i18n.ts +0 -13
- package/templates/basic/apps/frontend/middleware.ts +0 -7
- package/templates/basic/apps/frontend/plugins/welcome/langs/en.json +0 -5
- package/templates/basic/apps/frontend/plugins/welcome/langs/pl.json +0 -5
- package/templates/basic/apps/frontend/plugins/welcome/templates/default-page.tsx +0 -38
- package/templates/basic/tsconfig.json +0 -4
- package/templates/eslint/apps/backend/.eslintrc.json +0 -5
- package/templates/eslint/apps/frontend/.eslintrc.json +0 -4
- /package/templates/basic/apps/frontend/{app/[locale] → src/app/[locale]/(main)/(layout)}/error.tsx +0 -0
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-vitnode-app",
|
|
3
|
-
"version": "0.0.9-canary.
|
|
3
|
+
"version": "0.0.9-canary.71",
|
|
4
4
|
"description": "Create a new VitNode app in seconds.",
|
|
5
5
|
"author": "VitNode Team",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://vitnode.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/VitNode/vitnode.git",
|
|
11
11
|
"directory": "packages/create-vitnode-app"
|
|
12
12
|
},
|
|
13
13
|
"type": "module",
|
|
@@ -26,23 +26,23 @@
|
|
|
26
26
|
"nest.js"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"figlet": "^1.
|
|
30
|
-
"picocolors": "^1.0
|
|
29
|
+
"figlet": "^1.8.0",
|
|
30
|
+
"picocolors": "^1.1.0",
|
|
31
31
|
"prompts": "^2.4.2",
|
|
32
|
-
"validate-npm-package-name": "^
|
|
32
|
+
"validate-npm-package-name": "^6.0.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/cross-spawn": "^6.0.6",
|
|
36
|
-
"@types/figlet": "^1.
|
|
37
|
-
"@types/node": "^22.
|
|
36
|
+
"@types/figlet": "^1.7.0",
|
|
37
|
+
"@types/node": "^22.7.5",
|
|
38
38
|
"@types/prompts": "^2.4.9",
|
|
39
39
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
40
40
|
"commander": "^12.1.0",
|
|
41
41
|
"cross-spawn": "^7.0.3",
|
|
42
|
-
"ora": "^8.0
|
|
43
|
-
"tsup": "^8.
|
|
44
|
-
"typescript": "^5.
|
|
45
|
-
"eslint-config-typescript-vitnode": "0.0.9-canary.
|
|
42
|
+
"ora": "^8.1.0",
|
|
43
|
+
"tsup": "^8.3.0",
|
|
44
|
+
"typescript": "^5.6.3",
|
|
45
|
+
"eslint-config-typescript-vitnode": "0.0.9-canary.71"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"lint": "eslint .",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
NEXT_PUBLIC_BACKEND_URL=http://localhost:8080
|
|
2
|
+
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
|
|
3
|
+
|
|
4
|
+
# ! Database
|
|
5
|
+
DB_USER=root
|
|
6
|
+
DB_PASSWORD=root
|
|
7
|
+
# DB_HOST=database
|
|
8
|
+
# DB_DATABASE=vitnode
|
|
9
|
+
# DB_PORT=5432
|
|
10
|
+
# DB_SSL=false
|
|
11
|
+
|
|
12
|
+
# !!! SECIURE ENVIRONMENT VARIABLES !!!
|
|
13
|
+
# Automatically generated by create-vitnode-app
|
|
14
|
+
# Do not change this environment below, unless you know what you are doing
|
|
15
|
+
# Changing these values may break your session and other security features
|
|
16
|
+
LOGIN_TOKEN_SECRET=vitnode_secret
|
|
@@ -49,20 +49,9 @@ yarn-error.log*
|
|
|
49
49
|
!/apps/backend/uploads/public/index.html
|
|
50
50
|
!/apps/backend/uploads/private/index.html
|
|
51
51
|
!/apps/backend/uploads/temp/index.html
|
|
52
|
-
/apps/backend/schema.gql
|
|
53
52
|
|
|
54
53
|
## Configuration
|
|
55
|
-
/apps/backend/src/plugins/*/admin/database/migrations
|
|
56
54
|
/apps/backend/src/plugins/core/
|
|
57
55
|
|
|
58
56
|
## Frontend
|
|
59
|
-
/apps/frontend/app/not-found.tsx
|
|
60
|
-
/apps/frontend/app/\[\locale\]\/(main)/(vitnode)
|
|
61
|
-
/apps/frontend/app/\[\locale\]\/(main)/page.tsx
|
|
62
|
-
/apps/frontend/app/\[\locale\]\/admin/layout.tsx
|
|
63
|
-
/apps/frontend/app/\[\locale\]\/admin/(vitnode)
|
|
64
|
-
/apps/frontend/app/\[\locale\]\/admin/(auth)/(vitnode)
|
|
65
|
-
/apps/frontend/app/\[\locale\]\/admin/(auth)/layout.tsx
|
|
66
|
-
/apps/frontend/plugins/admin
|
|
67
|
-
/apps/frontend/plugins/core
|
|
68
57
|
/apps/frontend/next-env.d.ts
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<br>
|
|
3
|
+
<a href="https://vitnode.com/" target="_blank">
|
|
4
|
+
<picture>
|
|
5
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_dark.svg">
|
|
6
|
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_light.svg">
|
|
7
|
+
<img alt="VitNode Logo" src="https://raw.githubusercontent.com/VitNode/vitnode/canary/assets/logo/vitnode_logo_light.svg" width="400">
|
|
8
|
+
</picture>
|
|
9
|
+
</a>
|
|
10
|
+
<br>
|
|
11
|
+
<br>
|
|
12
|
+
</p>
|
|
13
|
+
|
|
14
|
+
# VitNode App
|
|
15
|
+
|
|
16
|
+
This is a basic template for a VitNode app.
|
|
17
|
+
|
|
18
|
+
## Getting Started
|
|
19
|
+
|
|
20
|
+
To get started, run the following commands:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pnpm i
|
|
24
|
+
# or
|
|
25
|
+
npm i
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Development
|
|
29
|
+
|
|
30
|
+
To start the development server, you need to create a `.env` file in the root of the project from `.env.example`.
|
|
31
|
+
|
|
32
|
+
In the `development` environment, you can just copy and paste the content of `.env.example` to `.env`.
|
|
33
|
+
|
|
34
|
+
### Development server
|
|
35
|
+
|
|
36
|
+
To start the development server, run the following command:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
pnpm dev
|
|
40
|
+
# or
|
|
41
|
+
npm run dev
|
|
42
|
+
```
|
|
@@ -4,7 +4,7 @@ import { codegenConfig } from 'vitnode-backend';
|
|
|
4
4
|
import { CodegenConfig } from '@graphql-codegen/cli';
|
|
5
5
|
|
|
6
6
|
const config: CodegenConfig = codegenConfig({
|
|
7
|
-
pathOutGql: join(process.cwd(), '..', 'frontend', 'graphql'),
|
|
7
|
+
pathOutGql: join(process.cwd(), '..', 'frontend', 'src', 'graphql'),
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
export default config;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { join } from 'path';
|
|
2
|
-
|
|
3
1
|
import { Module } from '@nestjs/common';
|
|
2
|
+
import { join } from 'path';
|
|
4
3
|
import { VitNodeCoreModule } from 'vitnode-backend';
|
|
5
4
|
|
|
6
|
-
import {
|
|
7
|
-
import { DATABASE_ENVS, schemaDatabase } from './database';
|
|
5
|
+
import { DATABASE_ENVS, schemaDatabase } from './database/config';
|
|
8
6
|
import { DatabaseModule } from './database/database.module';
|
|
7
|
+
import { PluginsModule } from './plugins/plugins.module';
|
|
9
8
|
|
|
10
9
|
@Module({
|
|
11
10
|
imports: [
|
|
12
11
|
VitNodeCoreModule.register({
|
|
13
|
-
|
|
14
|
-
envFile: join(process.cwd(), '..', '..', '.env'),
|
|
15
|
-
},
|
|
12
|
+
pathToEnvFile: join(process.cwd(), '..', '..', '.env'),
|
|
16
13
|
database: {
|
|
17
14
|
config: DATABASE_ENVS,
|
|
18
15
|
schemaDatabase,
|
|
@@ -10,10 +10,10 @@ export const schemaDatabase = {
|
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
export const DATABASE_ENVS = {
|
|
13
|
-
host: process.env.DB_HOST
|
|
13
|
+
host: process.env.DB_HOST ?? 'localhost',
|
|
14
14
|
port: process.env.DB_PORT ? +process.env.DB_PORT : 5432,
|
|
15
|
-
user: process.env.DB_USER
|
|
16
|
-
password: process.env.DB_PASSWORD
|
|
17
|
-
database: process.env.DB_DATABASE
|
|
15
|
+
user: process.env.DB_USER ?? 'root',
|
|
16
|
+
password: process.env.DB_PASSWORD ?? 'root',
|
|
17
|
+
database: process.env.DB_DATABASE ?? 'vitnode',
|
|
18
18
|
ssl: process.env.DB_SSL ? process.env.DB_SSL === 'true' : false,
|
|
19
19
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
import { NestFactory } from '@nestjs/core';
|
|
3
1
|
import { INestApplication } from '@nestjs/common';
|
|
2
|
+
import { NestFactory } from '@nestjs/core';
|
|
4
3
|
import { nestjsMainApp } from 'vitnode-backend';
|
|
5
4
|
|
|
6
5
|
import { AppModule } from './app.module';
|
|
@@ -8,20 +7,7 @@ import { AppModule } from './app.module';
|
|
|
8
7
|
async function bootstrap() {
|
|
9
8
|
const app: INestApplication = await NestFactory.create(AppModule);
|
|
10
9
|
|
|
11
|
-
nestjsMainApp(app, {
|
|
12
|
-
cors: {
|
|
13
|
-
origin: [
|
|
14
|
-
process.env.NEXT_PUBLIC_FRONTEND_URL
|
|
15
|
-
? process.env.NEXT_PUBLIC_FRONTEND_URL
|
|
16
|
-
: 'http://localhost:3000',
|
|
17
|
-
],
|
|
18
|
-
},
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
await app.listen(process.env.PORT ?? '8080', '', () => {
|
|
22
|
-
console.log(
|
|
23
|
-
`Application is running on: http://localhost:${process.env.PORT ?? 8080}/graphql`,
|
|
24
|
-
);
|
|
25
|
-
});
|
|
10
|
+
void nestjsMainApp(app, {});
|
|
26
11
|
}
|
|
27
|
-
|
|
12
|
+
|
|
13
|
+
void bootstrap();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import core from '@/plugins/core/langs/en.json';
|
|
2
|
+
import admin from '@/plugins/admin/langs/en.json';
|
|
3
|
+
import welcome from '@/plugins/welcome/langs/en.json';
|
|
4
|
+
// ! === IMPORT ===
|
|
4
5
|
|
|
5
|
-
type Messages = typeof core & typeof admin & typeof welcome;
|
|
6
|
+
type Messages = typeof core & typeof admin & typeof welcome; // ! === MODULE ===
|
|
6
7
|
|
|
7
8
|
declare global {
|
|
8
9
|
interface IntlMessages extends Messages {}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
generateMetadataItemLegal,
|
|
3
|
+
ItemLegalView,
|
|
4
|
+
} from 'vitnode-frontend/views/theme/views/legal/item/item-legal-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataItemLegal;
|
|
7
|
+
|
|
8
|
+
export default function Page(
|
|
9
|
+
props: React.ComponentProps<typeof ItemLegalView>,
|
|
10
|
+
) {
|
|
11
|
+
return <ItemLegalView {...props} />;
|
|
12
|
+
}
|
package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/login/layout.tsx
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TranslationsProvider } from 'vitnode-frontend/components/translations-provider';
|
|
2
|
+
|
|
3
|
+
export default function Layout({ children }: { children: React.ReactNode }) {
|
|
4
|
+
return (
|
|
5
|
+
<TranslationsProvider namespaces="core.sign_in">
|
|
6
|
+
{children}
|
|
7
|
+
</TranslationsProvider>
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// ! DO NOT TOUCH THIS FILE!!! IT IS GENERATED BY VITNODE-CLI
|
|
2
|
+
// ! If you remove this then default page plugin will not work
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { getSessionData } from 'vitnode-frontend/graphql/get-session-data';
|
|
5
|
+
import { generateMetadataDefaultPage } from 'vitnode-frontend/views/theme/views/default-page';
|
|
6
|
+
|
|
7
|
+
export const generateMetadata = generateMetadataDefaultPage;
|
|
8
|
+
|
|
9
|
+
export default async function Page() {
|
|
10
|
+
const {
|
|
11
|
+
core_sessions__authorization: { plugin_default },
|
|
12
|
+
} = await getSessionData();
|
|
13
|
+
|
|
14
|
+
const PageFromTheme = React.lazy(async () =>
|
|
15
|
+
import(`@/plugins/${plugin_default}/templates/default-page`).then(
|
|
16
|
+
module => ({
|
|
17
|
+
default: module.default,
|
|
18
|
+
}),
|
|
19
|
+
),
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
return <PageFromTheme />;
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ConfirmEmailSignUpView,
|
|
3
|
+
metadataConfirmEmailSignUp,
|
|
4
|
+
} from 'vitnode-frontend/views/theme/views/auth/sign/up/confirm-email/confirm-email-sign-up-view';
|
|
5
|
+
|
|
6
|
+
export const metadata = metadataConfirmEmailSignUp;
|
|
7
|
+
|
|
8
|
+
export default function Page(
|
|
9
|
+
props: React.ComponentProps<typeof ConfirmEmailSignUpView>,
|
|
10
|
+
) {
|
|
11
|
+
return <ConfirmEmailSignUpView {...props} />;
|
|
12
|
+
}
|
package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/register/layout.tsx
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TranslationsProvider } from 'vitnode-frontend/components/translations-provider';
|
|
2
|
+
|
|
3
|
+
export default function Layout({ children }: { children: React.ReactNode }) {
|
|
4
|
+
return (
|
|
5
|
+
<TranslationsProvider namespaces="core.sign_up">
|
|
6
|
+
{children}
|
|
7
|
+
</TranslationsProvider>
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DevicesSettingsView,
|
|
3
|
+
generateMetadataDevicesSettings,
|
|
4
|
+
} from 'vitnode-frontend/views/theme/views/settings/views/devices/devices-settings-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataDevicesSettings;
|
|
7
|
+
|
|
8
|
+
export default function Page() {
|
|
9
|
+
return <DevicesSettingsView />;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FilesSettingsView,
|
|
3
|
+
generateMetadataFilesSettings,
|
|
4
|
+
} from 'vitnode-frontend/views/theme/views/settings/views/files/files-settings-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataFilesSettings;
|
|
7
|
+
|
|
8
|
+
export default function Page(
|
|
9
|
+
props: React.ComponentProps<typeof FilesSettingsView>,
|
|
10
|
+
) {
|
|
11
|
+
return <FilesSettingsView {...props} />;
|
|
12
|
+
}
|
package/templates/basic/apps/frontend/src/app/[locale]/(main)/(layout)/(vitnode)/settings/layout.tsx
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
generateMetadataLayoutSettings,
|
|
4
|
+
LayoutSettingsView,
|
|
5
|
+
} from 'vitnode-frontend/views/theme/views/settings/layout';
|
|
6
|
+
|
|
7
|
+
export const generateMetadata = generateMetadataLayoutSettings;
|
|
8
|
+
|
|
9
|
+
export default function Layout(
|
|
10
|
+
props: React.ComponentProps<typeof LayoutSettingsView>,
|
|
11
|
+
) {
|
|
12
|
+
return <LayoutSettingsView {...props} />;
|
|
13
|
+
}
|
|
@@ -42,23 +42,23 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
.dark {
|
|
45
|
-
--background:
|
|
45
|
+
--background: 220 11% 6%;
|
|
46
46
|
--foreground: 0 0% 98%;
|
|
47
|
-
--card:
|
|
47
|
+
--card: 225 11% 8%;
|
|
48
48
|
--card-foreground: 0 0% 98%;
|
|
49
49
|
/* --popover: var(--card); */
|
|
50
50
|
/* --popover-foreground: var(--card-foreground); */
|
|
51
51
|
--primary: 220 83% 60%;
|
|
52
52
|
--primary-foreground: 220 40% 98%;
|
|
53
|
-
--secondary:
|
|
53
|
+
--secondary: 216 10% 18%;
|
|
54
54
|
--secondary-foreground: 0 0% 98%;
|
|
55
|
-
--muted:
|
|
56
|
-
--muted-foreground: 216
|
|
57
|
-
--accent:
|
|
55
|
+
--muted: 228 11% 12%;
|
|
56
|
+
--muted-foreground: 216 0% 68%;
|
|
57
|
+
--accent: 228 11% 14%;
|
|
58
58
|
--accent-foreground: 0 0% 98%;
|
|
59
59
|
--destructive: 359 78% 55%;
|
|
60
60
|
--destructive-foreground: 210 40% 98%;
|
|
61
|
-
--border:
|
|
61
|
+
--border: 228 10% 16%;
|
|
62
62
|
/* --input: var(--border); */
|
|
63
63
|
/* --ring: var(--primary); */
|
|
64
64
|
--cover: 216 64% 39%;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TranslationsProvider } from 'vitnode-frontend/components/translations-provider';
|
|
2
|
+
import { AuthLayout } from 'vitnode-frontend/views/layout/auth/auth-layout';
|
|
3
|
+
|
|
4
|
+
import './global.css';
|
|
5
|
+
|
|
6
|
+
export default function Layout({ children }: { children: React.ReactNode }) {
|
|
7
|
+
return (
|
|
8
|
+
<TranslationsProvider namespaces={[]}>
|
|
9
|
+
<AuthLayout>{children}</AuthLayout>
|
|
10
|
+
</TranslationsProvider>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FilesAdvancedCoreAdminView,
|
|
3
|
+
generateMetadataFilesAdvancedCoreAdmin,
|
|
4
|
+
} from 'vitnode-frontend/views/admin/views/core/advanced/files/files-advanced-core-admin-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataFilesAdvancedCoreAdmin;
|
|
7
|
+
|
|
8
|
+
export default function Page(
|
|
9
|
+
props: React.ComponentProps<typeof FilesAdvancedCoreAdminView>,
|
|
10
|
+
) {
|
|
11
|
+
return <FilesAdvancedCoreAdminView {...props} />;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DiagnosticToolsView,
|
|
3
|
+
generateMetadataDiagnosticAdmin,
|
|
4
|
+
} from 'vitnode-frontend/views/admin/views/core/diagnostic/diagnostic-tools-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataDiagnosticAdmin;
|
|
7
|
+
|
|
8
|
+
export default function Page() {
|
|
9
|
+
return <DiagnosticToolsView />;
|
|
10
|
+
}
|
package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/langs/page.tsx
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
generateMetadataLangsCoreAdmin,
|
|
3
|
+
LangsCoreAdminView,
|
|
4
|
+
} from 'vitnode-frontend/views/admin/views/core/langs/langs-core-admin-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataLangsCoreAdmin;
|
|
7
|
+
|
|
8
|
+
export default function Page(
|
|
9
|
+
props: React.ComponentProps<typeof LangsCoreAdminView>,
|
|
10
|
+
) {
|
|
11
|
+
return <LangsCoreAdminView {...props} />;
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DevPluginAdminLayout,
|
|
3
|
+
generateMetadataDevPluginAdminLayout,
|
|
4
|
+
} from 'vitnode-frontend/admin/core/plugins/views/dev/layout/layout';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataDevPluginAdminLayout;
|
|
7
|
+
|
|
8
|
+
export default function Layout(
|
|
9
|
+
props: React.ComponentProps<typeof DevPluginAdminLayout>,
|
|
10
|
+
) {
|
|
11
|
+
return <DevPluginAdminLayout {...props} />;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { OverviewDevPluginAdminView } from 'vitnode-frontend/views/admin/views/core/plugins/views/dev/overview';
|
|
2
|
+
|
|
3
|
+
export default function Page(
|
|
4
|
+
props: React.ComponentProps<typeof OverviewDevPluginAdminView>,
|
|
5
|
+
) {
|
|
6
|
+
return <OverviewDevPluginAdminView {...props} />;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PermissionsAdminDevPluginAdminView } from 'vitnode-frontend/views/admin/views/core/plugins/views/dev/permissions-admin/permissions-admin';
|
|
2
|
+
|
|
3
|
+
export default function Page(
|
|
4
|
+
props: React.ComponentProps<typeof PermissionsAdminDevPluginAdminView>,
|
|
5
|
+
) {
|
|
6
|
+
return <PermissionsAdminDevPluginAdminView {...props} />;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TranslationsProvider } from 'vitnode-frontend/components/translations-provider';
|
|
2
|
+
|
|
3
|
+
export default function Layout({ children }: { children: React.ReactNode }) {
|
|
4
|
+
return (
|
|
5
|
+
<TranslationsProvider namespaces="admin.core.plugins">
|
|
6
|
+
{children}
|
|
7
|
+
</TranslationsProvider>
|
|
8
|
+
);
|
|
9
|
+
}
|
package/templates/basic/apps/frontend/src/app/[locale]/admin/(auth)/(vitnode)/core/plugins/page.tsx
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
generateMetadataPluginsAdmin,
|
|
3
|
+
PluginsAdminView,
|
|
4
|
+
} from 'vitnode-frontend/views/admin/views/core/plugins/plugins-admin-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataPluginsAdmin;
|
|
7
|
+
|
|
8
|
+
export default function Page(
|
|
9
|
+
props: React.ComponentProps<typeof PluginsAdminView>,
|
|
10
|
+
) {
|
|
11
|
+
return <PluginsAdminView {...props} />;
|
|
12
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AiSettingsCoreAdminView,
|
|
3
|
+
generateMetadataAiSettingsAdmin,
|
|
4
|
+
} from 'vitnode-frontend/views/admin/views/core/settings/ai/ai-settings-core-admin-view';
|
|
5
|
+
|
|
6
|
+
export const generateMetadata = generateMetadataAiSettingsAdmin;
|
|
7
|
+
|
|
8
|
+
export default function Page() {
|
|
9
|
+
return <AiSettingsCoreAdminView />;
|
|
10
|
+
}
|