vasuzex 1.0.11 → 2.0.6
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/.env.example +14 -0
- package/CHANGELOG.md +146 -0
- package/README.md +494 -502
- package/TODO.md +248 -0
- package/apps/pilot-test/api/.env.example +8 -0
- package/apps/pilot-test/api/README.md +105 -0
- package/apps/pilot-test/api/config/database.js +27 -0
- package/apps/pilot-test/api/database/migrations/2025_12_06_19_20_57_create_users_table.js +21 -0
- package/apps/pilot-test/api/database/seeders/UserSeeder.js +30 -0
- package/apps/pilot-test/api/package.json +26 -0
- package/apps/pilot-test/api/src/app.js +67 -0
- package/apps/pilot-test/api/src/controllers/AuthController.js +90 -0
- package/apps/pilot-test/api/src/controllers/BaseController.js +25 -0
- package/apps/pilot-test/api/src/helpers/env.js +8 -0
- package/apps/pilot-test/api/src/index.js +112 -0
- package/apps/pilot-test/api/src/middleware/authMiddleware.js +48 -0
- package/apps/pilot-test/api/src/middleware/errorHandler.js +30 -0
- package/apps/pilot-test/api/src/models/User.js +76 -0
- package/apps/pilot-test/api/src/requests/AuthRequests.js +16 -0
- package/apps/pilot-test/api/src/routes/auth.routes.js +20 -0
- package/apps/pilot-test/api/src/routes/index.js +33 -0
- package/apps/pilot-test/api/src/routes/post.routes.js +25 -0
- package/apps/pilot-test/api/src/services/AuthService.js +95 -0
- package/bin/create-vasuzex.js +150 -33
- package/bin/create-vasuzex.js.backup +699 -0
- package/config/cache.cjs +11 -0
- package/config/cdn.cjs +221 -0
- package/config/geoip.cjs +52 -12
- package/config/index.cjs +8 -0
- package/config/logging.cjs +22 -4
- package/config/media.cjs +67 -1
- package/config/payment.cjs +184 -0
- package/config/security.cjs +230 -0
- package/database/index.js +19 -0
- package/examples/client-config-routes.js +151 -0
- package/examples/debug-example.js +165 -0
- package/examples/formatter-example.js +265 -0
- package/examples/geoip-example.js +235 -0
- package/examples/indian-validators-example.js +282 -0
- package/examples/integration-test.mjs +101 -0
- package/examples/location-example.js +322 -0
- package/examples/sms-example.js +401 -0
- package/examples/test-client-config.mjs +98 -0
- package/examples/upload-example.js +595 -0
- package/framework/Console/Commands/generate-app.js +34 -2
- package/framework/Console/Commands/utils/apiStructure.js +48 -2
- package/framework/Console/Commands/utils/apiTemplates.js +208 -19
- package/framework/Console/Commands/utils/mediaServerTemplates.js +2 -2
- package/framework/Console/Commands/utils/packageManager.js +49 -41
- package/framework/Console/Commands/utils/templateGenerator.js +683 -48
- package/framework/Console/Commands/utils/validation.js +4 -5
- package/framework/Console/Commands/utils/webStructure.js +39 -2
- package/framework/Exceptions/ApiError.js +74 -0
- package/framework/Exceptions/ErrorTypes.js +133 -0
- package/framework/Exceptions/Handler.js +226 -0
- package/framework/Exceptions/asyncHandler.js +42 -0
- package/framework/Exceptions/index.js +23 -0
- package/framework/Foundation/BaseApp.js +27 -0
- package/framework/Foundation/BaseServer.js +6 -0
- package/framework/Foundation/BaseService.js +384 -0
- package/framework/Foundation/Bootstrap/LoadConfiguration.js +1 -1
- package/framework/Foundation/Bootstrap/LoadEnvironmentVariables.js +1 -1
- package/framework/Foundation/Providers/AuthServiceProvider.js +1 -1
- package/framework/Foundation/Providers/BroadcastServiceProvider.js +1 -1
- package/framework/Foundation/Providers/CacheServiceProvider.js +1 -1
- package/framework/Foundation/Providers/CookieServiceProvider.js +1 -1
- package/framework/Foundation/Providers/EncryptionServiceProvider.js +1 -1
- package/framework/Foundation/Providers/EventServiceProvider.js +1 -1
- package/framework/Foundation/Providers/HashServiceProvider.js +1 -1
- package/framework/Foundation/Providers/LogServiceProvider.js +1 -1
- package/framework/Foundation/Providers/NotificationServiceProvider.js +1 -1
- package/framework/Foundation/Providers/QueueServiceProvider.js +1 -1
- package/framework/Foundation/Providers/RateLimiterServiceProvider.js +1 -1
- package/framework/Foundation/Providers/SessionServiceProvider.js +1 -1
- package/framework/Foundation/Providers/TranslationServiceProvider.js +1 -1
- package/framework/Foundation/Providers/ValidationServiceProvider.js +1 -1
- package/framework/Foundation/index.js +1 -0
- package/framework/Http/ClientConfigGenerator.js +304 -0
- package/framework/Http/Middleware/Authenticate.js +125 -0
- package/framework/Http/Middleware/Authorize.js +232 -0
- package/framework/Http/Middleware/HandleErrors.js +62 -0
- package/framework/Http/Middleware/MediaServerMiddleware.js +452 -0
- package/framework/Http/Middleware/RateLimiter.js +133 -0
- package/framework/Http/Middleware/SecurityMiddleware.js +234 -0
- package/framework/Http/Middleware/ValidateRequest.js +218 -0
- package/framework/Http/Middleware/index.js +64 -0
- package/framework/Http/index.js +4 -0
- package/framework/Patterns/RepositoryFactory.js +238 -0
- package/framework/Patterns/ServiceFactory.js +151 -0
- package/framework/Patterns/index.js +13 -0
- package/framework/Services/Cache/CacheManager.js +21 -0
- package/framework/Services/Cache/Stores/FileStore.js +203 -0
- package/framework/Services/Cache/Stores/MemoryStore.js +189 -0
- package/framework/Services/Formatter/FormatterServiceProvider.js +1 -1
- package/framework/Services/GeoIP/GeoIPManager.js +211 -95
- package/framework/Services/GeoIP/GeoIPServiceProvider.js +1 -1
- package/framework/Services/GeoIP/Providers/GeoIPProvider.js +218 -0
- package/framework/Services/GeoIP/Providers/IP2LocationProvider.js +205 -0
- package/framework/Services/GeoIP/Providers/MaxMindProvider.js +176 -0
- package/framework/Services/GeoIP/Providers/index.js +5 -0
- package/framework/Services/Log/Drivers/ConsoleLogger.js +28 -2
- package/framework/Services/Log/Drivers/FileLogger.js +79 -8
- package/framework/Services/Log/Drivers/SyslogLogger.js +123 -0
- package/framework/Services/Log/LogManager.js +18 -2
- package/framework/Services/Media/CDNManager.js +265 -0
- package/framework/Services/Media/MediaServiceProvider.js +1 -1
- package/framework/Services/Media/index.js +2 -0
- package/framework/Services/Payment/Gateways/PhonePeGateway.js +304 -0
- package/framework/Services/Payment/Gateways/RazorpayGateway.js +393 -0
- package/framework/Services/Payment/Gateways/StripeGateway.js +416 -0
- package/framework/Services/Payment/PaymentGateway.js +204 -0
- package/framework/Services/Payment/PaymentManager.js +259 -0
- package/framework/Services/Payment/index.js +5 -0
- package/framework/Services/index.js +1 -0
- package/framework/Support/Arr.js +14 -0
- package/framework/Support/Helpers/DateHelper.js +585 -0
- package/framework/Support/Helpers/DebugHelper.js +186 -0
- package/framework/Support/Helpers/JwtHelper.js +370 -0
- package/framework/Support/Helpers/OtpHelper.js +370 -0
- package/framework/Support/Helpers/PaginationHelper.js +381 -0
- package/framework/Support/Helpers/ResponseHelper.js +253 -0
- package/framework/Support/Helpers/SanitizationHelper.js +363 -0
- package/framework/Support/Helpers/ValidationHelper.js +319 -0
- package/framework/Support/Helpers/index.js +24 -0
- package/framework/Support/index.js +1 -0
- package/framework/index.js +7 -0
- package/framework/package.json +4 -0
- package/frontend/client/Alerts/SwalHelper.js +110 -0
- package/frontend/client/Alerts/index.js +6 -0
- package/frontend/client/Config/ConfigLoader.js +193 -0
- package/frontend/client/Config/index.js +6 -0
- package/frontend/client/Errors/FormErrorHandler.js +220 -0
- package/frontend/client/Errors/index.js +13 -0
- package/frontend/client/Formatters/CurrencyFormatter.js +72 -0
- package/frontend/client/Formatters/DateFormatter.js +76 -0
- package/frontend/client/Formatters/PhoneFormatter.js +29 -0
- package/frontend/client/Formatters/RelativeTimeFormatter.js +73 -0
- package/frontend/client/Formatters/index.js +16 -0
- package/frontend/client/Http/ApiClient.js +256 -0
- package/frontend/client/Http/index.js +6 -0
- package/frontend/client/Storage/LocalStorage.js +86 -0
- package/frontend/client/Storage/index.js +6 -0
- package/frontend/client/Validation/Validators.js +203 -0
- package/frontend/client/Validation/YupValidators.js +81 -0
- package/frontend/client/Validation/index.js +7 -0
- package/frontend/client/index.js +39 -0
- package/frontend/client/package.json +84 -0
- package/frontend/react-ui/components/Autocomplete/Autocomplete.jsx +369 -0
- package/frontend/react-ui/components/Autocomplete/index.js +10 -0
- package/frontend/react-ui/components/DataTable/DataTable.jsx +359 -0
- package/frontend/react-ui/components/DataTable/Filters.jsx +63 -0
- package/frontend/react-ui/components/DataTable/Pagination.jsx +153 -0
- package/frontend/react-ui/components/DataTable/TableActions.jsx +53 -0
- package/frontend/react-ui/components/DataTable/TableBody.jsx +188 -0
- package/frontend/react-ui/components/DataTable/TableHeader.jsx +117 -0
- package/frontend/react-ui/components/DataTable/index.js +16 -0
- package/frontend/react-ui/components/Forms/FormButtons.jsx +94 -0
- package/frontend/react-ui/components/Forms/FormField.jsx +135 -0
- package/frontend/react-ui/components/Forms/FormGroup.jsx +58 -0
- package/frontend/react-ui/components/Forms/ValidationMessage.jsx +51 -0
- package/frontend/react-ui/components/Forms/index.js +12 -0
- package/frontend/react-ui/components/PhotoManager/PhotoManager.jsx +335 -0
- package/frontend/react-ui/components/PhotoManager/index.js +10 -0
- package/frontend/react-ui/hooks/index.js +16 -0
- package/frontend/react-ui/hooks/useAnnouncer.js +66 -0
- package/frontend/react-ui/hooks/useApiClient.js +37 -0
- package/frontend/react-ui/hooks/useAppConfig.js +35 -0
- package/frontend/react-ui/hooks/useDebounce.js +48 -0
- package/frontend/react-ui/hooks/useFocusTrap.js +82 -0
- package/frontend/react-ui/hooks/useKeyboardNavigation.js +128 -0
- package/frontend/react-ui/hooks/useLocalStorage.js +79 -0
- package/frontend/react-ui/hooks/useValidationErrors.js +130 -0
- package/frontend/react-ui/index.js +21 -0
- package/frontend/react-ui/package.json +114 -0
- package/frontend/react-ui/providers/ApiClientProvider.jsx +68 -0
- package/frontend/react-ui/providers/AppConfigProvider.jsx +84 -0
- package/frontend/react-ui/providers/VasuzexProvider.jsx +66 -0
- package/frontend/react-ui/providers/index.js +11 -0
- package/frontend/react-ui/styles/accessibility.css +200 -0
- package/frontend/react-ui/utils/accessibility.js +130 -0
- package/frontend/react-ui/utils/index.js +16 -0
- package/jest.config.js +16 -0
- package/jest.config.test.cjs +20 -0
- package/jsconfig.json +23 -0
- package/package.json +66 -33
- package/test-results.txt +6880 -0
- package/config/README.md +0 -54
- package/framework/Services/Formatter/README.md +0 -379
- package/framework/Services/GeoIP/README.md +0 -409
- package/framework/Services/Location/README.md +0 -555
- package/framework/Services/SMS/README.md +0 -707
- package/framework/Services/Upload/README.md +0 -935
- package/framework/Services/Validation/README.md +0 -481
package/.env.example
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Environment
|
|
2
|
+
NODE_ENV=development
|
|
3
|
+
|
|
4
|
+
# Database
|
|
5
|
+
POSTGRES_HOST=localhost
|
|
6
|
+
POSTGRES_PORT=5432
|
|
7
|
+
POSTGRES_DB=neastore_dev
|
|
8
|
+
POSTGRES_USER=postgres
|
|
9
|
+
POSTGRES_PASSWORD=password
|
|
10
|
+
|
|
11
|
+
# App Ports (auto-generated from folder names)
|
|
12
|
+
# Pattern: apps/{folder-name} -> {FOLDER_NAME}_PORT (strict mandatory)
|
|
13
|
+
BLOG_API_PORT=3001
|
|
14
|
+
TODO_API_PORT=3002
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to Vasuzex will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.0.11] - 2025-12-04
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- **CRITICAL**: Fixed `.js.js` double extension bug in database model imports
|
|
12
|
+
- Changed `vasuzex/Database/Relations.js` to `vasuzex/Database/Relations`
|
|
13
|
+
- Fixed in Post.js and Comment.js source models
|
|
14
|
+
- Resolves "Cannot find module Relations.js.js" error on fresh installations
|
|
15
|
+
- Root cause: package.json exports already adds `.js`, so imports shouldn't include it
|
|
16
|
+
|
|
17
|
+
## [1.0.10] - 2025-12-04
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
- **CRITICAL**: Fixed database model import paths in PostController and CommentController
|
|
21
|
+
- Changed from `../../../database/models/` (3 levels) to `../../../../../database/models/` (5 levels)
|
|
22
|
+
- Fixes "Cannot find module Post.js" error when starting API server
|
|
23
|
+
|
|
24
|
+
## [1.0.9] - 2025-12-04
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- **CRITICAL**: Added missing API dependencies (`bcryptjs`, `jsonwebtoken`, `joi`) to package.json template
|
|
28
|
+
- API apps now include all required authentication and validation dependencies
|
|
29
|
+
- Fixes "Cannot find package 'bcryptjs'" error on fresh installations
|
|
30
|
+
|
|
31
|
+
## [1.0.8] - 2025-12-04
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
- **CRITICAL**: Fixed Vite index.html location - moved from `public/index.html` to root `index.html`
|
|
35
|
+
- React/Vue/Svelte apps now properly serve on browser (404 issue resolved)
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
- Full Blog CRUD functionality with proper backend integration
|
|
39
|
+
- PostController with create, read, update, delete operations
|
|
40
|
+
- Post model with validation
|
|
41
|
+
- Blog routes with authentication middleware
|
|
42
|
+
- Comment functionality for posts
|
|
43
|
+
- Proper error handling and validation
|
|
44
|
+
|
|
45
|
+
## [1.0.7] - 2025-12-04
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
- Fixed root package.json scripts to use `turbo run dev` instead of `pnpm --parallel --stream dev`
|
|
49
|
+
- Added `start` script to root package.json
|
|
50
|
+
- Fixed detectVasuzexDependency to never return `workspace:*` for fresh installs
|
|
51
|
+
- Apps now correctly use the same vasuzex version as root package.json
|
|
52
|
+
- Removed workspace:* dependency that was breaking fresh project installs
|
|
53
|
+
|
|
54
|
+
## [1.0.6] - 2025-12-04
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
- Media server now generates for Full Stack template (API + Web + Media Server)
|
|
58
|
+
- Previously media server was only generated for API + Media template
|
|
59
|
+
|
|
60
|
+
## [1.0.5] - 2025-12-04
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
- **CRITICAL**: Fixed double `.js` extension bug in database model imports
|
|
64
|
+
- Changed: `import Model from 'vasuzex/Database/Model.js'` → `import Model from 'vasuzex/Database/Model'`
|
|
65
|
+
- Changed: `import { Hash } from 'vasuzex/Support/Facades/index.js'` → `import { Hash } from 'vasuzex/Support/Facades'`
|
|
66
|
+
- This was causing `Model.js.js` resolution errors in fresh projects
|
|
67
|
+
- Affected files: User.js, Post.js, Comment.js, Task.js
|
|
68
|
+
|
|
69
|
+
## [1.0.4] - 2025-12-04
|
|
70
|
+
|
|
71
|
+
### Added
|
|
72
|
+
- **Web Framework Scaffolding**: Full support for React, Vue, Svelte with Vite
|
|
73
|
+
- Interactive framework selection during `generate:app --type web`
|
|
74
|
+
- Auto-configured Vite setup for each framework
|
|
75
|
+
- Complete starter templates with working counter examples
|
|
76
|
+
- `--framework` flag for direct framework selection
|
|
77
|
+
- **Health Route**: Added `/health` endpoint to all generated API apps
|
|
78
|
+
- **Media Facade**: Exported `Media` facade from main framework entry point
|
|
79
|
+
- **Port Conflict Warnings**: Added warnings in .env and console when generating multiple apps
|
|
80
|
+
|
|
81
|
+
### Fixed
|
|
82
|
+
- **Critical Template Bug**: Fixed `this.app.get()` → `this.express.get()` in generated apps
|
|
83
|
+
- **BaseServer/BaseApp API**: Complete redesign to match template expectations
|
|
84
|
+
- BaseServer now accepts options object: `{appName, projectRoot, port}`
|
|
85
|
+
- BaseApp enhanced with `build()`, `registerRoute()`, `setupRoutes()` methods
|
|
86
|
+
- **Import Paths**: Fixed all centralized database imports (5 levels up from src/)
|
|
87
|
+
- **Turbo Dependency**: Added `turbo@^2.6.1` to root devDependencies in project generator
|
|
88
|
+
- **Auto-Install**: Fixed `pnpm install` to run automatically after app generation
|
|
89
|
+
- **NPX Commands**: Changed from `npx vasuzex` to `pnpm vasuzex` in create-vasuzex for reliability
|
|
90
|
+
- **pnpm Compatibility**: Upgraded from pnpm@8.0.0 to pnpm@10.0.0 for Node v25 support
|
|
91
|
+
|
|
92
|
+
### Changed
|
|
93
|
+
- **Production Status**: Framework now production-ready (95% complete)
|
|
94
|
+
- **Root Dev Command**: `pnpm dev` now runs all apps in parallel using turbo
|
|
95
|
+
- **Package Manager**: Updated packageManager field to pnpm@10.0.0
|
|
96
|
+
|
|
97
|
+
### Dependencies
|
|
98
|
+
- Added: `joi@^17.13.3`, `bcryptjs@^2.4.3`, `jsonwebtoken@^9.0.2`
|
|
99
|
+
- Updated: `pnpm@10.0.0`, `turbo@^2.6.1`
|
|
100
|
+
|
|
101
|
+
## [1.0.3] - 2025-12-03
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
- Initial stable release
|
|
105
|
+
- Modularized generator utilities (12 utility files)
|
|
106
|
+
- Comprehensive API scaffolding
|
|
107
|
+
- Media server generation
|
|
108
|
+
- Database migrations and seeders
|
|
109
|
+
- Eloquent ORM integration
|
|
110
|
+
|
|
111
|
+
### Changed
|
|
112
|
+
- Refactored monolithic generator files into modular structure
|
|
113
|
+
- Improved code organization and maintainability
|
|
114
|
+
|
|
115
|
+
## [1.0.2] - 2025-12-01
|
|
116
|
+
|
|
117
|
+
### Fixed
|
|
118
|
+
- Minor bug fixes
|
|
119
|
+
- Documentation improvements
|
|
120
|
+
|
|
121
|
+
## [1.0.1] - 2025-11-30
|
|
122
|
+
|
|
123
|
+
### Fixed
|
|
124
|
+
- Package export issues
|
|
125
|
+
- CLI command registration
|
|
126
|
+
|
|
127
|
+
## [1.0.0] - 2025-11-29
|
|
128
|
+
|
|
129
|
+
### Added
|
|
130
|
+
- Initial release
|
|
131
|
+
- Laravel-inspired architecture
|
|
132
|
+
- GuruORM integration
|
|
133
|
+
- Facade pattern
|
|
134
|
+
- Service Container
|
|
135
|
+
- Database migrations
|
|
136
|
+
- Authentication scaffolding
|
|
137
|
+
- Media server
|
|
138
|
+
- Zero-configuration setup
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
[1.0.4]: https://github.com/rishicool/vasuzex/compare/v1.0.3...v1.0.4
|
|
143
|
+
[1.0.3]: https://github.com/rishicool/vasuzex/compare/v1.0.2...v1.0.3
|
|
144
|
+
[1.0.2]: https://github.com/rishicool/vasuzex/compare/v1.0.1...v1.0.2
|
|
145
|
+
[1.0.1]: https://github.com/rishicool/vasuzex/compare/v1.0.0...v1.0.1
|
|
146
|
+
[1.0.0]: https://github.com/rishicool/vasuzex/releases/tag/v1.0.0
|