nebula-starter-kit 0.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.
- package/README.md +107 -0
- package/dist/index.js +8 -0
- package/dist/run.js +112 -0
- package/dist/utils/addService.js +204 -0
- package/dist/utils/appName.js +75 -0
- package/dist/utils/deployNow.js +18 -0
- package/dist/utils/generateFiles.js +326 -0
- package/dist/utils/generateSchemas.js +58 -0
- package/dist/utils/listServices.js +24 -0
- package/dist/utils/replaceServiceNames.js +42 -0
- package/dist/utils/telemetryAddon.js +91 -0
- package/package.json +31 -0
- package/templates/core/audit/audit.controller.ts +125 -0
- package/templates/core/audit/audit.module.ts +10 -0
- package/templates/core/audit/audit.schema.ts +14 -0
- package/templates/core/audit/audit.service.ts +47 -0
- package/templates/core/auth/auth.controller.ts +207 -0
- package/templates/core/auth/auth.dto.ts +50 -0
- package/templates/core/auth/auth.module.ts +10 -0
- package/templates/core/auth/auth.service.ts +178 -0
- package/templates/core/auth/utils.ts +160 -0
- package/templates/core/constants/environment.db.ts +27 -0
- package/templates/core/constants/environment.module.ts +9 -0
- package/templates/core/constants/environment.service.ts +69 -0
- package/templates/core/core.controller.ts +35 -0
- package/templates/core/core.module.ts +22 -0
- package/templates/core/database/database.module.ts +20 -0
- package/templates/core/database/database.provider.ts +32 -0
- package/templates/core/database/database.service.ts +168 -0
- package/templates/core/database/database.types.ts +13 -0
- package/templates/core/filters/audit.decorator.ts +5 -0
- package/templates/core/filters/audit.interceptor.ts +74 -0
- package/templates/core/filters/http-exception.filter.ts +43 -0
- package/templates/core/filters/success-message.decorator.ts +5 -0
- package/templates/core/filters/success-response.interceptor.ts +35 -0
- package/templates/core/summarize/summarize.controller.ts +74 -0
- package/templates/core/summarize/summarize.dto.ts +13 -0
- package/templates/core/summarize/summarize.module.ts +9 -0
- package/templates/core/summarize/summarize.service.ts +54 -0
- package/templates/nest-cli.json +8 -0
- package/templates/package.json +52 -0
- package/templates/service/src/__name__.controller.ts +15 -0
- package/templates/service/src/__name__.module.ts +11 -0
- package/templates/service/src/__name__.schema.ts +15 -0
- package/templates/service/src/__name__.service.ts +12 -0
- package/templates/service/src/lambda.ts +60 -0
- package/templates/tsconfig.json +28 -0
- package/templates/ui/README.md +36 -0
- package/templates/ui/eslint.config.mjs +18 -0
- package/templates/ui/next.config.ts +8 -0
- package/templates/ui/package.json +33 -0
- package/templates/ui/postcss.config.mjs +7 -0
- package/templates/ui/public/file.svg +1 -0
- package/templates/ui/public/globe.svg +1 -0
- package/templates/ui/public/next.svg +1 -0
- package/templates/ui/public/vercel.svg +1 -0
- package/templates/ui/public/window.svg +1 -0
- package/templates/ui/src/app/LandingPage.tsx +98 -0
- package/templates/ui/src/app/ai/summarize/page.tsx +115 -0
- package/templates/ui/src/app/context/AuthContext.tsx +48 -0
- package/templates/ui/src/app/favicon.ico +0 -0
- package/templates/ui/src/app/globals.css +26 -0
- package/templates/ui/src/app/layout.tsx +37 -0
- package/templates/ui/src/app/page.tsx +7 -0
- package/templates/ui/src/app/services/page.tsx +99 -0
- package/templates/ui/src/components/Auth.css +252 -0
- package/templates/ui/src/components/Auth.tsx +455 -0
- package/templates/ui/src/components/Error.tsx +32 -0
- package/templates/ui/src/components/FormInput.tsx +77 -0
- package/templates/ui/src/components/Loading.tsx +10 -0
- package/templates/ui/src/components/Login.tsx +171 -0
- package/templates/ui/src/components/Popup.css +90 -0
- package/templates/ui/src/components/Signup.tsx +155 -0
- package/templates/ui/src/utils/axiosInstance.ts +37 -0
- package/templates/ui/src/utils/axiosRawInstance.ts +33 -0
- package/templates/ui/src/utils/util.constant.ts +0 -0
- package/templates/ui/src/utils/util.function.ts +165 -0
- package/templates/ui/src/utils/util.type.ts +64 -0
- package/templates/ui/src/utils/variables.ts +6 -0
- package/templates/ui/tailwind.config.js +8 -0
- package/templates/ui/tsconfig.json +43 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export type Mode =
|
|
2
|
+
| 'signup'
|
|
3
|
+
| 'login'
|
|
4
|
+
| 'confirm'
|
|
5
|
+
| 'forgotPassword'
|
|
6
|
+
| 'resetPassword';
|
|
7
|
+
export type UserFormProps = {
|
|
8
|
+
mode: Mode;
|
|
9
|
+
onSuccess: () => void;
|
|
10
|
+
handleMode: (val: Mode) => void;
|
|
11
|
+
};
|
|
12
|
+
export type Props = {
|
|
13
|
+
label: string;
|
|
14
|
+
name: string;
|
|
15
|
+
value: string | number;
|
|
16
|
+
type?: string;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
errors: Record<string, string>;
|
|
21
|
+
touched: Record<string, boolean>;
|
|
22
|
+
allowTogglePassword?: boolean;
|
|
23
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
24
|
+
};
|
|
25
|
+
export interface TextareaProps {
|
|
26
|
+
label: string;
|
|
27
|
+
name: string;
|
|
28
|
+
value: string;
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
required?: boolean;
|
|
31
|
+
rows?: number;
|
|
32
|
+
errors: Record<string, string>;
|
|
33
|
+
touched: Record<string, boolean>;
|
|
34
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type Step =
|
|
38
|
+
| 'signup'
|
|
39
|
+
| 'popup'
|
|
40
|
+
| 'confirm'
|
|
41
|
+
| 'login'
|
|
42
|
+
| 'home'
|
|
43
|
+
| 'submit'
|
|
44
|
+
| 'forgotPassword'
|
|
45
|
+
| 'resetPassword';
|
|
46
|
+
|
|
47
|
+
export type Values = {
|
|
48
|
+
email: string;
|
|
49
|
+
password: string;
|
|
50
|
+
name: string;
|
|
51
|
+
confirmationCode: string | undefined;
|
|
52
|
+
score?: string;
|
|
53
|
+
newPassword?: string;
|
|
54
|
+
confirmPassword?: string;
|
|
55
|
+
signupError?: string;
|
|
56
|
+
loginError?: string;
|
|
57
|
+
submitError?: string;
|
|
58
|
+
confirmError?: string;
|
|
59
|
+
deleteError?: string;
|
|
60
|
+
fetchScoresError?: string;
|
|
61
|
+
fetchHighestScoreError?: string;
|
|
62
|
+
forgotPasswordError?: string;
|
|
63
|
+
resetPasswordError?: string;
|
|
64
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const appName = process.env.NEXT_PUBLIC_APP_NAME || 'NebulaStarter';
|
|
2
|
+
export const appServices = process.env.NEXT_PUBLIC_SERVICES
|
|
3
|
+
? process.env.NEXT_PUBLIC_SERVICES.split(',')[0]
|
|
4
|
+
: '';
|
|
5
|
+
export const apiUrl =
|
|
6
|
+
process.env.NEXT_PUBLIC_API_URL || 'http://localhost:3001';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"strict": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"module": "esnext",
|
|
15
|
+
"moduleResolution": "bundler",
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"isolatedModules": true,
|
|
18
|
+
"jsx": "react-jsx",
|
|
19
|
+
"incremental": true,
|
|
20
|
+
"plugins": [
|
|
21
|
+
{
|
|
22
|
+
"name": "next"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"paths": {
|
|
26
|
+
"@/*": [
|
|
27
|
+
"./src/*"
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"include": [
|
|
32
|
+
"next-env.d.ts",
|
|
33
|
+
"**/*.ts",
|
|
34
|
+
"**/*.tsx",
|
|
35
|
+
".next/types/**/*.ts",
|
|
36
|
+
".next/dev/types/**/*.ts",
|
|
37
|
+
"**/*.mts"
|
|
38
|
+
],
|
|
39
|
+
"exclude": [
|
|
40
|
+
"node_modules"
|
|
41
|
+
]
|
|
42
|
+
// "exclude": ["node_modules"]
|
|
43
|
+
}
|