@anmol0493/fullstack-app 1.0.0

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 (88) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +24 -0
  3. package/backend-express/.env.example +2 -0
  4. package/backend-express/index.js +2 -0
  5. package/backend-express/package-lock.json +1939 -0
  6. package/backend-express/package.json +25 -0
  7. package/backend-express/src/config/db.js +20 -0
  8. package/backend-express/src/controller/auth.js +71 -0
  9. package/backend-express/src/middleware/auth.js +36 -0
  10. package/backend-express/src/middleware/validator.js +16 -0
  11. package/backend-express/src/models/user.js +26 -0
  12. package/backend-express/src/routes/auth.js +25 -0
  13. package/backend-express/src/server.js +28 -0
  14. package/backend-express/src/utils/constants.js +14 -0
  15. package/backend-express/src/utils/helper.js +30 -0
  16. package/backend-express/src/utils/schema/auth.js +34 -0
  17. package/backend-nestjs/.env.example +3 -0
  18. package/backend-nestjs/.prettierrc +4 -0
  19. package/backend-nestjs/README.md +99 -0
  20. package/backend-nestjs/eslint.config.mjs +35 -0
  21. package/backend-nestjs/nest-cli.json +8 -0
  22. package/backend-nestjs/package.json +99 -0
  23. package/backend-nestjs/pnpm-lock.yaml +7848 -0
  24. package/backend-nestjs/src/app.controller.ts +12 -0
  25. package/backend-nestjs/src/app.module.ts +13 -0
  26. package/backend-nestjs/src/app.service.ts +8 -0
  27. package/backend-nestjs/src/common/decorators/user.decorator.ts +8 -0
  28. package/backend-nestjs/src/common/dtos/common.dto.ts +87 -0
  29. package/backend-nestjs/src/common/enum/index.ts +0 -0
  30. package/backend-nestjs/src/common/exceptions/custom.exception.ts +28 -0
  31. package/backend-nestjs/src/common/filters/http-exception.filter.ts +46 -0
  32. package/backend-nestjs/src/common/guard/permission.guard.ts +18 -0
  33. package/backend-nestjs/src/common/middleware/auth.middleware.ts +20 -0
  34. package/backend-nestjs/src/common/pipes/validation.pipe.ts +61 -0
  35. package/backend-nestjs/src/common/utils/constants.ts +36 -0
  36. package/backend-nestjs/src/common/utils/helper.ts +43 -0
  37. package/backend-nestjs/src/core/core.module.ts +8 -0
  38. package/backend-nestjs/src/core/jwt/jwt.module.ts +10 -0
  39. package/backend-nestjs/src/core/jwt/jwt.service.ts +45 -0
  40. package/backend-nestjs/src/core/prisma/prisma.module.ts +9 -0
  41. package/backend-nestjs/src/core/prisma/prisma.service.ts +17 -0
  42. package/backend-nestjs/src/core/prisma/schema.prisma +27 -0
  43. package/backend-nestjs/src/main.ts +26 -0
  44. package/backend-nestjs/src/module/auth/auth.controller.ts +30 -0
  45. package/backend-nestjs/src/module/auth/auth.module.ts +10 -0
  46. package/backend-nestjs/src/module/auth/auth.service.ts +83 -0
  47. package/backend-nestjs/src/module/auth/dto/index.ts +28 -0
  48. package/backend-nestjs/src/module/index.module.ts +17 -0
  49. package/backend-nestjs/src/scripts/migrate.js +40 -0
  50. package/backend-nestjs/tsconfig.build.json +4 -0
  51. package/backend-nestjs/tsconfig.json +22 -0
  52. package/frontend/.env.example +1 -0
  53. package/frontend/README.md +54 -0
  54. package/frontend/eslint.config.js +28 -0
  55. package/frontend/index.html +13 -0
  56. package/frontend/package-lock.json +3813 -0
  57. package/frontend/package.json +43 -0
  58. package/frontend/public/vite.svg +1 -0
  59. package/frontend/src/App.tsx +24 -0
  60. package/frontend/src/assets/react.svg +1 -0
  61. package/frontend/src/components/Layout.tsx +59 -0
  62. package/frontend/src/components/ui/AlertDialog.tsx +47 -0
  63. package/frontend/src/components/ui/Button.tsx +61 -0
  64. package/frontend/src/components/ui/CommonAlertDialog.tsx +57 -0
  65. package/frontend/src/components/ui/FormInput.tsx +73 -0
  66. package/frontend/src/components/ui/Loader.tsx +7 -0
  67. package/frontend/src/hook/useFetchUser.ts +38 -0
  68. package/frontend/src/index.css +1 -0
  69. package/frontend/src/lib/constants.ts +24 -0
  70. package/frontend/src/lib/schema.ts +12 -0
  71. package/frontend/src/lib/utils.ts +71 -0
  72. package/frontend/src/main.tsx +11 -0
  73. package/frontend/src/pages/Home.tsx +5 -0
  74. package/frontend/src/pages/Login.tsx +67 -0
  75. package/frontend/src/pages/Signup.tsx +67 -0
  76. package/frontend/src/redux/api/auth.ts +19 -0
  77. package/frontend/src/redux/slice/auth.ts +39 -0
  78. package/frontend/src/redux/store.ts +30 -0
  79. package/frontend/src/routes/index.tsx +20 -0
  80. package/frontend/src/routes/middleware.ts +18 -0
  81. package/frontend/src/types/index.ts +12 -0
  82. package/frontend/src/vite-env.d.ts +1 -0
  83. package/frontend/tsconfig.app.json +26 -0
  84. package/frontend/tsconfig.json +7 -0
  85. package/frontend/tsconfig.node.json +24 -0
  86. package/frontend/vite.config.ts +19 -0
  87. package/package.json +34 -0
  88. package/scripts/setup.js +73 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Anmol Dobariya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # Full-Stack Template
2
+
3
+ This is a **full-stack template** designed to help developers quickly bootstrap projects with a modern tech stack:
4
+ - **Frontend**: Vite + React (fast development with hot module replacement)
5
+ - **Backend Options**:
6
+ - **Express**: Lightweight and flexible Node.js framework.
7
+ - **NestJS**: A progressive Node.js framework built on TypeScript.
8
+
9
+ ## Features
10
+ - Modular structure for frontend and backend.
11
+ - Support for both Express and NestJS backends.
12
+ - Environment variable configuration for flexibility.
13
+ - Ready-to-use scripts for setup and development.
14
+
15
+ ## Getting Started
16
+
17
+ ### Prerequisites
18
+ - [Node.js](https://nodejs.org/) (v16 or higher)
19
+ - [npm](https://www.npmjs.com/)
20
+
21
+ ### Installation
22
+ - ```bash
23
+ npx @anmol040903/fullstack-app my-project
24
+ ```
@@ -0,0 +1,2 @@
1
+ MONGODB_URL=mongodb://localhost:27017/test
2
+ JWT_SECRET_KEY=v478n983475g9834gy
@@ -0,0 +1,2 @@
1
+ require("dotenv").config();
2
+ require("./src/server");