h3ravel-monorepo 0.1.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 (176) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +11 -0
  3. package/.github/workflows/release.yml +42 -0
  4. package/.husky/pre-commit +1 -0
  5. package/LICENSE +21 -0
  6. package/README.md +65 -0
  7. package/docs/.gitkeep +0 -0
  8. package/eslint.config.js +17 -0
  9. package/examples/basic-app/.env.example +54 -0
  10. package/examples/basic-app/package.json +27 -0
  11. package/examples/basic-app/public/h3ravel-logo.svg +23 -0
  12. package/examples/basic-app/public/main.js +13 -0
  13. package/examples/basic-app/src/Exceptions/.gitkeep +0 -0
  14. package/examples/basic-app/src/config/app.ts +125 -0
  15. package/examples/basic-app/src/config/filesystem.ts +59 -0
  16. package/examples/basic-app/src/http/controllers/HomeController.ts +17 -0
  17. package/examples/basic-app/src/http/controllers/UserController.ts +29 -0
  18. package/examples/basic-app/src/http/middlewares/AuthMiddleware.ts +8 -0
  19. package/examples/basic-app/src/index.ts +30 -0
  20. package/examples/basic-app/src/resources/views/index.edge +383 -0
  21. package/examples/basic-app/src/routes/api.ts +17 -0
  22. package/examples/basic-app/src/routes/web.ts +6 -0
  23. package/examples/basic-app/src/storage/app/public/.gitkeep +0 -0
  24. package/examples/basic-app/tsconfig.json +8 -0
  25. package/package.json +36 -0
  26. package/packages/cache/node_modules/.bin/tsc +21 -0
  27. package/packages/cache/node_modules/.bin/tsserver +21 -0
  28. package/packages/cache/package.json +26 -0
  29. package/packages/cache/src/CacheManager.ts +1 -0
  30. package/packages/cache/src/Contracts/.gitkeep +0 -0
  31. package/packages/cache/src/Drivers/MemoryCache.ts +1 -0
  32. package/packages/cache/src/Drivers/RedisCache.ts +1 -0
  33. package/packages/cache/src/Helpers.ts +1 -0
  34. package/packages/cache/src/Providers/CacheServiceProvider.ts +16 -0
  35. package/packages/cache/src/index.ts +9 -0
  36. package/packages/cache/tests/.gitkeep +0 -0
  37. package/packages/cache/tsconfig.json +9 -0
  38. package/packages/cache/vite.config.ts +9 -0
  39. package/packages/config/node_modules/.bin/tsc +21 -0
  40. package/packages/config/node_modules/.bin/tsserver +21 -0
  41. package/packages/config/package.json +34 -0
  42. package/packages/config/src/ConfigRepository.ts +51 -0
  43. package/packages/config/src/Contracts/.gitkeep +0 -0
  44. package/packages/config/src/EnvLoader.ts +16 -0
  45. package/packages/config/src/Helpers.ts +1 -0
  46. package/packages/config/src/Providers/ConfigServiceProvider.ts +46 -0
  47. package/packages/config/src/index.ts +8 -0
  48. package/packages/config/tests/.gitkeep +0 -0
  49. package/packages/config/tsconfig.json +8 -0
  50. package/packages/config/vite.config.ts +9 -0
  51. package/packages/console/node_modules/.bin/tsc +21 -0
  52. package/packages/console/node_modules/.bin/tsserver +21 -0
  53. package/packages/console/package.json +26 -0
  54. package/packages/console/src/Commands/MakeController.ts +1 -0
  55. package/packages/console/src/Commands/MakeModel.ts +1 -0
  56. package/packages/console/src/Commands/MakeResource.ts +1 -0
  57. package/packages/console/src/Contracts/.gitkeep +0 -0
  58. package/packages/console/src/IO/.gitkeep +0 -0
  59. package/packages/console/src/Kernel.ts +1 -0
  60. package/packages/console/src/Musketeer.ts +4 -0
  61. package/packages/console/src/Providers/ConsoleServiceProvider.ts +16 -0
  62. package/packages/console/src/index.ts +10 -0
  63. package/packages/console/tests/.gitkeep +0 -0
  64. package/packages/console/tsconfig.json +8 -0
  65. package/packages/console/vite.config.ts +9 -0
  66. package/packages/core/node_modules/.bin/tsc +21 -0
  67. package/packages/core/node_modules/.bin/tsserver +21 -0
  68. package/packages/core/package.json +29 -0
  69. package/packages/core/src/Application.ts +164 -0
  70. package/packages/core/src/Container.ts +71 -0
  71. package/packages/core/src/Contracts/.gitkeep +0 -0
  72. package/packages/core/src/Contracts/BindingsContract.ts +37 -0
  73. package/packages/core/src/Controller.ts +20 -0
  74. package/packages/core/src/Exceptions/Handler.ts +1 -0
  75. package/packages/core/src/Http/Kernel.ts +47 -0
  76. package/packages/core/src/Providers/AppServiceProvider.ts +18 -0
  77. package/packages/core/src/Providers/ViewServiceProvider.ts +19 -0
  78. package/packages/core/src/ServiceProvider.ts +21 -0
  79. package/packages/core/src/Utils/PathLoader.ts +46 -0
  80. package/packages/core/src/index.ts +14 -0
  81. package/packages/core/tests/.gitkeep +0 -0
  82. package/packages/core/tsconfig.json +8 -0
  83. package/packages/core/vite.config.ts +9 -0
  84. package/packages/database/node_modules/.bin/tsc +21 -0
  85. package/packages/database/node_modules/.bin/tsserver +21 -0
  86. package/packages/database/package.json +26 -0
  87. package/packages/database/src/Contracts/.gitkeep +0 -0
  88. package/packages/database/src/Migrations/.gitkeep +0 -0
  89. package/packages/database/src/Model.ts +1 -0
  90. package/packages/database/src/Providers/DatabaseServiceProvider.ts +16 -0
  91. package/packages/database/src/Query/.gitkeep +0 -0
  92. package/packages/database/src/index.ts +6 -0
  93. package/packages/database/src/tests/.gitkeep +0 -0
  94. package/packages/database/tsconfig.json +8 -0
  95. package/packages/database/vite.config.ts +9 -0
  96. package/packages/http/node_modules/.bin/tsc +21 -0
  97. package/packages/http/node_modules/.bin/tsserver +21 -0
  98. package/packages/http/package.json +28 -0
  99. package/packages/http/src/Contracts/ControllerContracts.ts +13 -0
  100. package/packages/http/src/Contracts/HttpContract.ts +7 -0
  101. package/packages/http/src/Middleware/LogRequests.ts +9 -0
  102. package/packages/http/src/Middleware.ts +5 -0
  103. package/packages/http/src/Providers/HttpServiceProvider.ts +22 -0
  104. package/packages/http/src/Request.ts +59 -0
  105. package/packages/http/src/Resources/ApiResource.ts +39 -0
  106. package/packages/http/src/Resources/JsonResource.ts +201 -0
  107. package/packages/http/src/Response.ts +80 -0
  108. package/packages/http/src/index.ts +13 -0
  109. package/packages/http/tests/.gitkeep +0 -0
  110. package/packages/http/tsconfig.json +8 -0
  111. package/packages/http/vite.config.ts +9 -0
  112. package/packages/mail/node_modules/.bin/tsc +21 -0
  113. package/packages/mail/node_modules/.bin/tsserver +21 -0
  114. package/packages/mail/package.json +26 -0
  115. package/packages/mail/src/Contracts/.gitkeep +0 -0
  116. package/packages/mail/src/Drivers/SES.ts +1 -0
  117. package/packages/mail/src/Drivers/SMTP.ts +1 -0
  118. package/packages/mail/src/Helpers.ts +1 -0
  119. package/packages/mail/src/Mailable.ts +1 -0
  120. package/packages/mail/src/Mailer.ts +1 -0
  121. package/packages/mail/src/Providers/MailServiceProvider.ts +16 -0
  122. package/packages/mail/src/index.ts +10 -0
  123. package/packages/mail/tests/.gitkeep +0 -0
  124. package/packages/mail/tsconfig.json +8 -0
  125. package/packages/mail/vite.config.ts +9 -0
  126. package/packages/queue/node_modules/.bin/tsc +21 -0
  127. package/packages/queue/node_modules/.bin/tsserver +21 -0
  128. package/packages/queue/package.json +26 -0
  129. package/packages/queue/src/Contracts/.gitkeep +0 -0
  130. package/packages/queue/src/Drivers/MemoryDriver.ts +1 -0
  131. package/packages/queue/src/Drivers/RedisDriver.ts +1 -0
  132. package/packages/queue/src/Jobs/.gitkeep +0 -0
  133. package/packages/queue/src/Providers/QueueServiceProvider.ts +16 -0
  134. package/packages/queue/src/QueueManager.ts +1 -0
  135. package/packages/queue/src/Workers/.gitkeep +0 -0
  136. package/packages/queue/src/index.ts +8 -0
  137. package/packages/queue/tests/.gitkeep +0 -0
  138. package/packages/queue/tsconfig.json +8 -0
  139. package/packages/queue/vite.config.ts +9 -0
  140. package/packages/router/node_modules/.bin/tsc +21 -0
  141. package/packages/router/node_modules/.bin/tsserver +21 -0
  142. package/packages/router/package.json +27 -0
  143. package/packages/router/src/Contracts/.gitkeep +0 -0
  144. package/packages/router/src/Controller.ts +1 -0
  145. package/packages/router/src/Decorators/ApiResource.ts +1 -0
  146. package/packages/router/src/Decorators/Controller.ts +1 -0
  147. package/packages/router/src/Decorators/Get.ts +1 -0
  148. package/packages/router/src/Decorators/Middleware.ts +1 -0
  149. package/packages/router/src/Decorators/Post.ts +1 -0
  150. package/packages/router/src/Middleware/.gitkeep +0 -0
  151. package/packages/router/src/Providers/AssetsServiceProvider.ts +53 -0
  152. package/packages/router/src/Providers/RouteServiceProvider.ts +44 -0
  153. package/packages/router/src/Route.ts +1 -0
  154. package/packages/router/src/Router.ts +180 -0
  155. package/packages/router/src/index.ts +14 -0
  156. package/packages/router/tests/.gitkeep +0 -0
  157. package/packages/router/tsconfig.json +8 -0
  158. package/packages/router/vite.config.ts +9 -0
  159. package/packages/support/node_modules/.bin/tsc +21 -0
  160. package/packages/support/node_modules/.bin/tsserver +21 -0
  161. package/packages/support/package.json +26 -0
  162. package/packages/support/src/Contracts/ObjContract.ts +53 -0
  163. package/packages/support/src/Contracts/StrContract.ts +6 -0
  164. package/packages/support/src/Facades/.gitkeep +0 -0
  165. package/packages/support/src/Helpers/Arr.ts +33 -0
  166. package/packages/support/src/Helpers/Number.ts +194 -0
  167. package/packages/support/src/Helpers/Obj.ts +220 -0
  168. package/packages/support/src/Helpers/Str.ts +256 -0
  169. package/packages/support/src/index.ts +10 -0
  170. package/packages/support/tests/.gitkeep +0 -0
  171. package/packages/support/tsconfig.json +8 -0
  172. package/packages/support/vite.config.ts +9 -0
  173. package/pnpm-workspace.yaml +7 -0
  174. package/tsconfig.json +26 -0
  175. package/tsup.config.ts +15 -0
  176. package/vite.base.config.ts +12 -0
@@ -0,0 +1,8 @@
1
+ # Changesets
2
+
3
+ Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4
+ with multi-package repos, or single-package repos to help you version and publish your code. You can
5
+ find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6
+
7
+ We have a quick list of common questions to get you started engaging with this project in
8
+ [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3
+ "changelog": "@changesets/cli/changelog",
4
+ "commit": false,
5
+ "fixed": [],
6
+ "linked": [],
7
+ "access": "restricted",
8
+ "baseBranch": "main",
9
+ "updateInternalDependencies": "patch",
10
+ "ignore": []
11
+ }
@@ -0,0 +1,42 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ release:
14
+ name: Create Release PR or Publish
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@v4
20
+
21
+ - name: Setup Node.js
22
+ uses: actions/setup-node@v4
23
+ with:
24
+ node-version: 20
25
+ registry-url: 'https://registry.npmjs.org/'
26
+
27
+ - name: Setup pnpm
28
+ uses: pnpm/action-setup@v2
29
+ with:
30
+ version: 10
31
+
32
+ - name: Install dependencies
33
+ run: pnpm install --frozen-lockfile
34
+
35
+ - name: Create Release PR or Publish
36
+ uses: changesets/action@v1
37
+ with:
38
+ publish: pnpm release
39
+ commit: 'chore(release): version packages'
40
+ env:
41
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1 @@
1
+ pnpm barrel # && pnpm lint
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 h3ravel
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,65 @@
1
+ <p align="center"><a href="https://h3ravel.toneflix.net" target="_blank"><img src="https://raw.githubusercontent.com/h3ravel/assets/refs/heads/main/logo-full.svg" width="400" alt="H3ravel Logo"></a></p>
2
+
3
+ # About H3ravel
4
+
5
+ H3ravel is a modern TypeScript runtime-agnostic web framework built on top of [H3](https://h3.dev), designed to bring the elegance and developer experience of [Laravel](https://laravel.com) to the JavaScript ecosystem.
6
+
7
+ ## Features
8
+
9
+ - Laravel-inspired architecture – Service Container, Service Providers, Middleware, Facades
10
+ - Clean Routing – Dedicated routes directory with web and api route files
11
+ - Controllers with decorators – Class-based controllers like Laravel
12
+ - HTTP Kernel – Centralized middleware and request lifecycle handling
13
+ - Eloquent-like ORM – Fluent, model-based database interactions (planned)
14
+ - Musketeer CLI, our Powerful Artisan-like command-line tool for generating code and running tasks
15
+ - Modular Services – Mail, Queue, Cache, Broadcasting support
16
+ - Runtime Agnostic – Works seamlessly across Node.js, Bun, and Deno
17
+ - Type-safe everything – Fully written in TypeScript
18
+
19
+ ## Why H3ravel?
20
+
21
+ While modern JavaScript frameworks focus on speed and minimalism, they often lack the developer experience and structure found in PHP’s Laravel. H3ravel aims to fill that gap by providing:
22
+
23
+ - Laravel’s elegance – Familiar MVC patterns, expressive routing, service providers, and middleware.
24
+ - TypeScript-first approach – Strong typing and modern DX out of the box.
25
+ - Built on H3 – A lightweight, framework-agnostic HTTP library that’s:
26
+ - Fast – Optimized for speed with minimal overhead.
27
+ - Flexible – Works with any runtime or deployment target.
28
+ - Composable – Lets us build a layered Laravel-like architecture without restrictions.
29
+ - Runtime agnosticism – Unlike many Node frameworks, H3ravel runs on Node.js, Bun, or Deno with no extra setup.
30
+
31
+ This combination delivers the productivity of Laravel while leveraging the modern JavaScript ecosystem and runtime flexibility.
32
+
33
+ ## Philosophy
34
+
35
+ - Laravel DX, TypeScript speed – H3ravel brings Laravel’s expressive syntax and architecture to JavaScript with full type safety.
36
+ - Minimal, yet scalable – Built on H3’s tiny but powerful HTTP handling, keeping your app fast and maintainable.
37
+ - Runtime Freedom – Designed to run on Node.js, Bun, and Deno without code changes.
38
+ - Convention over configuration – Opinionated structure for faster development.
39
+
40
+ ## Roadmap
41
+
42
+ - [ ] Application container with service providers
43
+ - [ ] Middleware pipeline and HTTP kernel
44
+ - [ ] Routing system (with decorators)
45
+ - [ ] CLI (artisan-like commands)
46
+ - [ ] ORM with relationships (Eloquent-style)
47
+ - [ ] Queues, Mail, Events, Broadcasting
48
+ - [ ] Config management and environment handling
49
+ - [ ] First-class runtime adapters (Node, Bun, Deno)
50
+
51
+ ## Contributing
52
+
53
+ Thank you for considering contributing to the H3ravel framework! The contribution guide can be found in the [H3ravel documentation](#!).
54
+
55
+ ## Code of Conduct
56
+
57
+ In order to ensure that the H3ravel community is welcoming to all, please review and abide by the [Code of Conduct](#).
58
+
59
+ ## Security Vulnerabilities
60
+
61
+ If you discover a security vulnerability within H3ravel, please send an e-mail to Legacy via hamzas.legacy@toneflix.ng. All security vulnerabilities will be promptly addressed.
62
+
63
+ ## License
64
+
65
+ The H3ravel framework is open-sourced software licensed under the [MIT license](LICENSE).
package/docs/.gitkeep ADDED
File without changes
@@ -0,0 +1,17 @@
1
+ // eslint.config.js
2
+ import js from '@eslint/js'
3
+ import tseslint from 'typescript-eslint'
4
+
5
+ export default tseslint.config(
6
+ js.configs.recommended,
7
+ ...tseslint.configs.recommended,
8
+ {
9
+ ignores: ['dist/**', 'node_modules/**'],
10
+ rules: {
11
+ 'semi': ['error', 'never'],
12
+ 'quotes': ['error', 'single'],
13
+ 'no-unused-vars': ['warn', { 'argsIgnorePattern': '^_|_' }],
14
+ '@typescript-eslint/no-explicit-any': 'off'
15
+ }
16
+ }
17
+ )
@@ -0,0 +1,54 @@
1
+ APP_NAME=H3ravel
2
+ APP_ENV=local
3
+ APP_KEY=
4
+ APP_DEBUG=true
5
+ APP_TIMEZONE=UTC
6
+ APP_URL=http://localhost
7
+
8
+ APP_LOCALE=en
9
+ APP_FALLBACK_LOCALE=en
10
+ APP_FAKER_LOCALE=en_US
11
+
12
+ BCRYPT_ROUNDS=12
13
+
14
+ DB_CONNECTION=sqlite
15
+ # DB_HOST=127.0.0.1
16
+ # DB_PORT=3306
17
+ # DB_DATABASE=h3ravel
18
+ # DB_USERNAME=root
19
+ # DB_PASSWORD=
20
+
21
+ SESSION_DRIVER=database
22
+ SESSION_LIFETIME=120
23
+ SESSION_ENCRYPT=false
24
+ SESSION_PATH=/
25
+ SESSION_DOMAIN=null
26
+
27
+ BROADCAST_DRIVER=redis
28
+ BROADCAST_CONNECTION=log
29
+ FILESYSTEM_DISK=local
30
+ QUEUE_CONNECTION=database
31
+
32
+ CACHE_STORE=database
33
+ CACHE_PREFIX=
34
+
35
+ MEMCACHED_HOST=127.0.0.1
36
+
37
+ REDIS_HOST=127.0.0.1
38
+ REDIS_PASSWORD=null
39
+ REDIS_PORT=6379
40
+
41
+ MAIL_MAILER=log
42
+ MAIL_HOST=127.0.0.1
43
+ MAIL_PORT=2525
44
+ MAIL_USERNAME=null
45
+ MAIL_PASSWORD=null
46
+ MAIL_ENCRYPTION=null
47
+ MAIL_FROM_ADDRESS="no-reply@example.com"
48
+ MAIL_FROM_NAME="${APP_NAME}"
49
+
50
+ AWS_ACCESS_KEY_ID=
51
+ AWS_SECRET_ACCESS_KEY=
52
+ AWS_DEFAULT_REGION=us-east-1
53
+ AWS_BUCKET=
54
+ AWS_USE_PATH_STYLE_ENDPOINT=false
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@h3ravel/example",
3
+ "version": "0.1.0",
4
+ "description": "Example H3ravel App.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "build": "tsup",
10
+ "dev": "tsx watch src/index.ts",
11
+ "start": "node dist/index.js",
12
+ "lint": "eslint . --ext .ts",
13
+ "test": "vitest"
14
+ },
15
+ "dependencies": {
16
+ "h3": "^2.0.0-beta.1",
17
+ "@h3ravel/core": "workspace:*",
18
+ "@h3ravel/router": "workspace:*",
19
+ "@h3ravel/http": "workspace:*",
20
+ "@h3ravel/config": "workspace:*",
21
+ "reflect-metadata": "^0.2.2"
22
+ },
23
+ "devDependencies": {
24
+ "tsx": "^4.0.0",
25
+ "typescript": "^5.4.0"
26
+ }
27
+ }
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ width="431.39624"
4
+ height="500"
5
+ viewBox="0 0 114.14025 132.29167"
6
+ version="1.1"
7
+ id="svg1"
8
+ xml:space="preserve"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ xmlns:svg="http://www.w3.org/2000/svg"
11
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
12
+ xmlns:cc="http://creativecommons.org/ns#"
13
+ xmlns:dc="http://purl.org/dc/elements/1.1/"><defs
14
+ id="defs1" /><metadata
15
+ id="metadata1"><rdf:RDF><cc:Work
16
+ rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
17
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><path
18
+ style="fill:#037ff2;fill-opacity:1;stroke-width:1.55663"
19
+ d="m 204.44383,131.15987 c -2.12406,-1.15288 -50.1052,-29.92477 -51.58519,-30.93306 l -1.54447,-1.052223 V 67.066723 34.958865 l 1.33854,-1.010327 c 0.7362,-0.555684 8.56664,-5.259325 17.40099,-10.452545 24.37242,-14.3271965 32.45693,-19.1097877 33.34915,-19.7286322 0.98866,-0.6856916 3.24269,-0.7326775 4.46589,-0.092983 1.32965,0.6952644 44.04027,25.6591242 47.64563,27.8483232 1.69894,1.031564 3.50598,2.249611 4.01565,2.706758 l 0.92669,0.831131 v 31.989296 c 0,29.954594 -0.0459,32.028821 -0.72076,32.610921 -0.81234,0.700623 -27.34864,16.694983 -39.70913,23.934153 -4.45439,2.60878 -9.13096,5.40345 -10.39239,6.2104 -2.81679,1.80184 -3.86335,2.07497 -5.1906,1.35457 z m -1.96908,-25.30024 -0.11581,-16.371518 -6.65153,-3.912672 c -3.65835,-2.151953 -6.80242,-3.974099 -6.98681,-4.049254 -0.18431,-0.0751 -3.25524,1.665537 -6.82407,3.868134 -3.56881,2.202598 -9.58375,5.872061 -13.36653,8.154376 -3.78277,2.282297 -6.80814,4.219261 -6.72303,4.304375 0.23795,0.237958 40.34331,24.293009 40.57747,24.338239 0.11334,0.022 0.15378,-7.32741 0.0902,-16.33168 z m 18.87886,9.13869 c 6.66941,-3.97786 16.70162,-9.95494 22.29386,-13.28242 l 10.16781,-6.049911 0.0248,-26.691153 0.0248,-26.691129 -1.56933,0.950027 c -0.86311,0.522507 -10.96282,6.602758 -22.44355,13.511664 l -20.87411,12.561666 -0.003,26.461867 c -0.002,14.554029 0.0542,26.461859 0.12379,26.461859 0.0696,0 5.58332,-3.25461 12.25276,-7.23247 z m -8.2573,-22.524235 0.003,-12.870564 2.05581,-1.087902 2.05584,-1.087902 v 5.259214 5.259215 l 3.89064,-2.112037 3.89066,-2.112012 0.12489,-5.531938 0.1249,-5.531912 1.9563,-1.148724 1.95634,-1.148752 0.002,7.298462 c 8.3e-4,4.014153 0.12132,9.915403 0.26766,13.113938 l 0.26602,5.815476 -1.93362,1.133185 c -1.06347,0.623235 -2.01584,1.050895 -2.11635,0.950375 -0.32673,-0.32671 -0.54757,-2.926216 -0.57593,-6.778893 l -0.0278,-3.772706 -3.90973,2.12527 -3.90976,2.125241 -0.003,5.580958 -0.003,5.580993 -1.86437,0.9058 c -1.0254,0.49815 -1.95207,0.90576 -2.05928,0.90576 -0.10728,0 -0.19338,-5.791743 -0.19146,-12.870545 z m 20.16114,-0.737215 c -0.87141,-0.871378 -1.63099,-2.49854 -1.63099,-3.493791 0,-0.533896 3.58495,-2.952605 3.87545,-2.614712 0.0723,0.08418 0.34848,0.570016 0.61367,1.079705 1.415,2.719685 6.56205,-1.101602 6.70784,-4.980051 0.0955,-2.538293 -1.49626,-3.432035 -3.78356,-2.1245 -1.55071,0.88648 -1.64869,0.793747 -1.63178,-1.54447 0.0138,-2.042798 0.10453,-2.223724 1.62482,-3.274847 2.06517,-1.427886 2.89663,-2.721529 2.9679,-4.617757 0.16039,-4.263028 -4.69428,-3.011969 -5.90698,1.52227 -0.4125,1.542324 -0.78371,1.978976 -2.50456,2.946333 -1.11115,0.624593 -2.10089,1.055001 -2.19946,0.956463 -0.35297,-0.352996 0.64082,-4.448824 1.47729,-6.088474 1.79415,-3.516762 6.60909,-6.977845 9.72102,-6.987611 2.90026,-0.0081 4.68475,3.135018 3.86227,6.80506 -0.46053,2.054901 -1.37776,4.098468 -2.32649,5.183371 -0.51788,0.592162 -0.44565,0.693779 0.64874,0.912641 2.70174,0.540334 3.62109,5.154074 1.78031,8.934538 -2.72746,5.601454 -10.66852,10.012841 -13.29549,7.385832 z m -60.09566,-8.838476 c 8.02776,-4.870235 14.92181,-8.854954 15.32011,-8.854954 0.58476,0 8.88379,4.683174 12.97598,7.322368 l 0.92667,0.597662 V 75.416941 68.870384 L 182.1341,56.732991 C 170.99633,50.057445 161.03454,44.108715 159.99673,43.513584 l -1.8869,-1.082015 V 67.0925 c 0,13.563518 0.10261,24.660931 0.22805,24.660903 0.12544,-5.6e-5 6.79618,-3.9848 14.82394,-8.855009 z m 76.46268,-46.131991 c 0.0452,-0.224474 -3.93965,-2.7944 -8.85508,-5.711133 -10.52413,-6.245003 -31.30128,-18.378599 -31.47104,-18.378737 -0.0649,-2.8e-5 -0.0688,9.869903 -0.008,21.933241 l 0.11004,21.933322 -3.53063,2.223669 -3.53062,2.223671 1.89964,1.109439 1.89963,1.109469 21.70208,-13.017518 c 11.93602,-7.159597 21.73902,-13.201059 21.78416,-13.425423 z m -50.42396,18.377389 3.19975,-1.995343 0.0952,-20.235903 c 0.0523,-11.129763 0.0341,-20.23593 -0.0404,-20.23593 -0.1513,0 -5.55486,3.168221 -26.54277,15.563016 l -14.32269,8.458548 16.99977,10.193052 c 9.34987,5.606185 17.09244,10.205402 17.20569,10.220477 0.11334,0.0165 1.64581,-0.87047 3.40568,-1.967917 z m 137.95493,37.372993 c -7.7864,-1.116379 -12.65637,-5.68418 -13.87728,-13.01623 l -0.29148,-1.750404 h 4.46994 4.46998 l 0.7201,2.027419 c 1.24815,3.514342 4.46971,5.291346 8.79046,4.84878 3.16321,-0.324003 5.41539,-1.638194 6.35527,-3.708445 1.34785,-2.96878 0.89703,-5.54077 -1.32127,-7.538177 -1.40299,-1.263244 -3.38632,-1.807429 -6.58736,-1.807429 h -2.82155 v -3.445458 -3.445458 l 2.88257,-0.206318 c 4.92893,-0.352666 7.75959,-3.141922 7.30263,-7.195881 -0.35604,-3.15884 -2.94853,-5.064284 -6.89032,-5.064284 -3.88454,0 -6.02071,1.553822 -7.21922,5.251208 l -0.7009,2.162242 h -4.51922 -4.51925 l 0.28412,-1.750403 c 1.39335,-8.584512 10.33928,-14.534726 19.6748,-13.086264 8.16164,1.266326 14.02068,7.361349 13.3474,13.884991 -0.30364,2.941766 -2.12012,6.133534 -4.51305,7.929931 l -1.88913,1.418205 1.51398,0.694961 c 1.96223,0.90073 4.3793,3.444743 5.25358,5.52952 0.88908,2.12007 0.8784,6.523255 -0.022,9.235348 -1.52478,4.59069 -6.70544,8.316025 -12.63547,9.085951 -3.46628,0.450042 -3.75723,0.447875 -7.25687,-0.0539 z m 54.8174,-0.09408 c -2.54758,-0.836221 -4.41799,-2.122272 -5.61331,-3.859607 -1.52028,-2.209557 -1.93487,-3.546553 -1.9246,-6.206435 0.0248,-6.423482 4.24502,-9.528707 14.6119,-10.751458 7.2567,-0.855918 6.79567,-0.697355 6.79567,-2.337364 0,-3.179583 -2.18798,-5.109097 -5.79351,-5.109097 -2.34966,0 -4.31068,1.028179 -5.08892,2.668188 -0.35728,0.752924 -0.6496,1.579324 -0.6496,1.836453 0,0.324854 -1.22527,0.431506 -4.01559,0.349611 l -4.01562,-0.117738 0.13892,-1.647436 c 0.33039,-3.921338 3.04217,-7.364926 7.01894,-8.913081 1.80605,-0.703105 3.22034,-0.906783 6.43352,-0.926479 6.26021,-0.03851 9.89334,1.35551 12.40754,4.760337 1.84517,2.498843 2.12871,4.634263 2.35593,17.743854 l 0.21237,12.252766 h -4.0901 -4.09009 l -0.0489,-1.750403 c -0.0276,-0.962707 -0.007,-2.0209 0.0377,-2.351532 0.0476,-0.330659 -0.71804,0.207694 -1.70157,1.195986 -0.98356,0.988456 -2.59128,2.154759 -3.57275,2.591823 -2.3098,1.028611 -7.12471,1.321229 -9.4081,0.571749 z m 10.54186,-7.39447 c 0.91834,-0.607703 2.05265,-1.862888 2.53112,-2.800755 1.02218,-2.003624 1.64029,-6.440289 0.82725,-5.937809 -0.28035,0.173307 -2.73672,0.650095 -5.45864,1.059651 -3.83264,0.576672 -5.16262,0.945404 -5.89646,1.634836 -1.89292,1.778299 -1.50666,5.221006 0.74446,6.63555 1.83339,1.152053 5.00898,0.893055 7.25227,-0.591473 z m 60.07189,7.377111 c -8.75605,-2.526188 -13.45499,-11.759557 -11.25842,-22.122723 1.84212,-8.690807 8.36548,-13.581978 17.36538,-13.020489 7.60046,0.474172 12.23681,4.768341 13.9675,12.936586 0.32801,1.548238 0.59964,3.880651 0.60357,5.183151 l 0.007,2.368174 H 471.5337 459.79572 v 1.04287 c 0,1.278402 1.02013,3.797188 1.97203,4.869191 0.96009,1.081217 3.73044,2.305536 5.2355,2.31376 2.45737,0.01376 4.50272,-0.869643 6.2739,-2.708764 l 1.74344,-1.810318 h 3.91957 c 4.54148,0 4.68071,0.172757 2.92683,3.633978 -1.2773,2.520602 -4.21607,5.217373 -7.14853,6.559926 -2.82282,1.292289 -8.94788,1.673289 -12.13201,0.754657 z m 11.6243,-21.835996 c 0,-2.249582 -2.64029,-5.378878 -5.09636,-6.040223 -4.02499,-1.083832 -7.59171,1.059346 -9.31757,5.598758 l -0.39256,1.032442 h 7.40327 c 6.15682,0 7.40322,-0.09931 7.40322,-0.590977 z M 281.04959,68.469357 V 44.77361 l 4.4275,0.116913 c 3.17035,0.08362 4.44208,0.262986 4.47893,0.631719 0.0283,0.283178 0.0746,4.595641 0.10291,9.583312 l 0.0515,9.068425 9.57568,-0.110587 9.57569,-0.110589 0.1106,-9.575664 0.11058,-9.575693 h 4.31692 4.3169 v 23.6818 23.681828 h -4.52329 -4.52324 l 0.26462,-10.29643 0.26465,-10.296429 h -9.74463 -9.74463 v 10.296429 10.29643 h -4.53045 -4.53043 z m 81.95972,6.383345 V 57.540245 l 4.22155,0.117464 4.22152,0.117464 v 2.780096 c 0,1.529065 0.022,2.780095 0.0481,2.780068 0.0275,-2.8e-5 0.5378,-0.73983 1.13615,-1.643971 0.59832,-0.904169 1.78129,-2.099851 2.62881,-2.657102 1.79828,-1.182314 5.04032,-1.996279 6.49608,-1.630931 0.99957,0.250882 1.01679,0.327798 1.01679,4.535065 v 4.279863 h -2.61226 c -3.47491,0 -5.85363,1.221899 -7.2723,3.73565 -1.00977,1.789219 -1.03214,2.021011 -1.1587,12.017895 l -0.12903,10.193491 h -4.2984 -4.2984 z m 64.62251,16.192149 c -1.98629,-5.168847 -11.90475,-32.693555 -11.90475,-33.036869 0,-0.283892 1.59088,-0.438908 4.5039,-0.438908 h 4.50387 l 4.27921,12.919806 4.27922,12.919808 4.2934,-12.816841 4.29339,-12.816839 4.47574,-0.117465 4.47572,-0.117462 -0.26327,1.049114 c -0.25362,1.010216 -7.31841,20.768422 -10.45927,29.25126 l -1.52495,4.118606 -5.2561,0.115263 -5.25607,0.115264 z M 487.39038,68.483304 V 44.801477 h 4.32449 4.32451 v 23.681827 23.681827 h -4.32451 -4.32449 z"
20
+ id="path6" /><path
21
+ style="fill:#037ff2;fill-opacity:1;stroke-width:1.56408"
22
+ d="M 55.675504,130.6611 C 53.541277,129.5027 5.3305212,100.5931 3.8434522,99.579971 L 2.2915942,98.522719 V 66.261211 33.999697 l 1.344943,-1.015161 C 4.3762582,32.426194 12.244179,27.700044 21.120803,22.481971 45.609842,8.0862105 53.733037,3.2807317 54.629554,2.658925 55.622927,1.9699518 57.887748,1.9227422 59.116797,2.5655 c 1.335998,0.6985918 44.250893,25.781918 47.873463,27.981594 1.70705,1.0365 3.52272,2.260376 4.03483,2.719711 l 0.93112,0.835108 v 32.142381 c 0,30.097927 -0.0461,32.182099 -0.7242,32.766985 -0.81623,0.703972 -27.479313,16.774881 -39.898961,24.048691 -4.47569,2.62126 -9.174639,5.42931 -10.442121,6.24013 -2.830247,1.81046 -3.881816,2.08491 -5.215424,1.36105 z M 53.697009,105.23975 53.580731,88.789891 46.897357,84.858501 C 43.2215,82.69625 40.062386,80.865383 39.877098,80.789868 c -0.185275,-0.07545 -3.270805,1.673509 -6.856706,3.886646 -3.585903,2.213138 -9.629634,5.900161 -13.430509,8.193401 -3.800879,2.293207 -6.840715,4.239454 -6.755191,4.324968 0.239091,0.239108 40.53638,24.409287 40.771658,24.454727 0.113821,0.0221 0.154595,-7.36247 0.09066,-16.40986 z m 18.969174,9.18245 c 6.701338,-3.99691 16.78159,-10.0026 22.400562,-13.34599 l 10.216305,-6.078872 0.026,-26.818884 0.026,-26.81886 -1.57682,0.954573 c -0.86726,0.525008 -11.015125,6.634355 -22.550831,13.576324 l -20.974009,12.62178 -0.0028,26.588496 c -0.0015,14.623693 0.0544,26.588513 0.12433,26.588513 0.06993,0 5.61007,-3.27019 12.311409,-7.26708 z m -8.296795,-22.632043 0.0033,-12.932154 2.065661,-1.093109 2.065664,-1.093107 v 5.284382 5.284382 l 3.909264,-2.122145 3.909269,-2.122116 0.125546,-5.558414 0.125548,-5.558384 1.965686,-1.154222 1.965687,-1.15425 0.0015,7.333391 c 8.34e-4,4.033362 0.121817,9.962852 0.268833,13.176696 l 0.267314,5.843313 -1.94285,1.138588 c -1.068566,0.626239 -2.025492,1.05594 -2.126503,0.954945 -0.328266,-0.328285 -0.550167,-2.940228 -0.578689,-6.811349 l -0.02786,-3.790755 -3.928439,2.135443 -3.928439,2.135408 -0.003,5.607658 -0.003,5.607712 -1.873301,0.91013 c -1.030316,0.50054 -1.961428,0.9101 -2.069144,0.9101 -0.107712,0 -0.194287,-5.819458 -0.192351,-12.932143 z m 20.257605,-0.740735 c -0.875562,-0.87555 -1.638788,-2.510503 -1.638788,-3.510518 0,-0.53645 3.602123,-2.966734 3.894009,-2.627223 0.07269,0.08459 0.350158,0.572744 0.616612,1.084871 1.421774,2.732707 6.593439,-1.106873 6.739949,-5.003884 0.0959,-2.550438 -1.50342,-3.448457 -3.801657,-2.134665 -1.558143,0.890722 -1.65659,0.797545 -1.639606,-1.551862 0.01492,-2.052572 0.105032,-2.234366 1.632605,-3.290519 2.075058,-1.434718 2.910488,-2.734552 2.982118,-4.639855 0.161,-4.283428 -4.716754,-3.026382 -5.935281,1.529554 -0.414479,1.549707 -0.787446,1.988448 -2.516544,2.960434 -1.116475,0.627582 -2.110965,1.060049 -2.209983,0.96104 -0.35468,-0.354685 0.643881,-4.470113 1.484357,-6.117611 1.802715,-3.533591 6.640731,-7.011236 9.767531,-7.021049 2.91413,-0.0083 4.70711,3.15002 3.8807,6.837625 -0.46272,2.064735 -1.38433,4.118082 -2.33761,5.208176 -0.52032,0.594994 -0.44774,0.697099 0.65187,0.917008 2.71462,0.54292 3.63834,5.178741 1.78879,8.977295 -2.74047,5.628264 -10.719498,10.060753 -13.359072,7.421183 z M 24.243746,82.168644 c 8.066177,-4.893542 14.993223,-8.89733 15.393438,-8.89733 0.587547,0 8.9263,4.705585 13.038063,7.357409 l 0.931113,0.600522 V 74.651388 68.073503 L 33.258995,55.878025 C 22.067946,49.170533 12.058466,43.193336 11.015701,42.595356 L 9.1197722,41.508163 v 24.778945 c 0,13.628429 0.103098,24.778947 0.229113,24.778919 0.126017,-5.5e-5 6.8286998,-4.003869 14.8948748,-8.897383 z M 101.07223,35.815886 c 0.0453,-0.225548 -3.958425,-2.807773 -8.897315,-5.738463 -10.574527,-6.274887 -31.4511,-18.466551 -31.621671,-18.466689 -0.06528,-2.8e-5 -0.06902,9.917134 -0.0085,22.038202 l 0.110473,22.038285 -3.547516,2.234311 -3.547514,2.23431 1.908732,1.114751 1.908729,1.11478 21.805943,-13.079815 C 91.176825,42.111699 101.02661,36.041324 101.07197,35.815886 Z m -50.665149,18.465334 3.215065,-2.004892 0.09555,-20.332742 c 0.05255,-11.183024 0.03419,-20.332769 -0.04074,-20.332769 -0.152163,0 -5.581434,3.183383 -26.669799,15.637494 l -14.391223,8.499026 17.081115,10.24183 c 9.394614,5.633015 17.174229,10.254241 17.288032,10.269389 0.113832,0.01658 1.653695,-0.874637 3.42198,-1.977336 z"
23
+ id="path6-9" /></svg>
@@ -0,0 +1,13 @@
1
+ fetch("/assets/h3ravel-logo.svg")
2
+ .then(response => response.text())
3
+ .then(svgXml => {
4
+ const svgDataUrl = `data:image/svg+xml;base64,${btoa(svgXml)}`;
5
+ console.log('%c ', `
6
+ background-image: url(${svgDataUrl});
7
+ padding-top: 2px;
8
+ padding-left: 7px;
9
+ background-size: contain;
10
+ background-position: center center;
11
+ background-repeat: no-repeat;
12
+ `, 'H3ravel - Welcome to the future of web frameworks!');
13
+ });
File without changes
@@ -0,0 +1,125 @@
1
+ import { Application } from "@h3ravel/core"
2
+
3
+ export default (app: Application) => {
4
+ const env = app.make('env');
5
+
6
+ return {
7
+ /*
8
+ |--------------------------------------------------------------------------
9
+ | Application Name
10
+ |--------------------------------------------------------------------------
11
+ |
12
+ | This value is the name of your application, which will be used when the
13
+ | framework needs to place the application's name in a notification or
14
+ | other UI elements where an application name needs to be displayed.
15
+ |
16
+ */
17
+
18
+ name: env('APP_NAME', 'H3ravel'),
19
+ /*
20
+ |--------------------------------------------------------------------------
21
+ | Application Environment
22
+ |--------------------------------------------------------------------------
23
+ |
24
+ | This value determines the "environment" your application is currently
25
+ | running in. This may determine how you prefer to configure various
26
+ | services the application utilizes. Set this in your ".env" file.
27
+ |
28
+ */
29
+
30
+ env: env('APP_ENV', 'production'),
31
+
32
+ /*
33
+ |--------------------------------------------------------------------------
34
+ | Application Debug Mode
35
+ |--------------------------------------------------------------------------
36
+ |
37
+ | When your application is in debug mode, detailed error messages with
38
+ | stack traces will be shown on every error that occurs within your
39
+ | application. If disabled, a simple generic error page is shown.
40
+ |
41
+ */
42
+
43
+ debug: env('APP_DEBUG', false),
44
+
45
+ /*
46
+ |--------------------------------------------------------------------------
47
+ | Application URL
48
+ |--------------------------------------------------------------------------
49
+ |
50
+ | This URL is used by the console to properly generate URLs when using
51
+ | the Artisan command line tool. You should set this to the root of
52
+ | the application so that it's available within Artisan commands.
53
+ |
54
+ */
55
+
56
+ url: env('APP_URL', 'http://localhost'),
57
+
58
+ /*
59
+ |--------------------------------------------------------------------------
60
+ | Application Timezone
61
+ |--------------------------------------------------------------------------
62
+ |
63
+ | Here you may specify the default timezone for your application, which
64
+ | will be used by the PHP date and date-time functions. The timezone
65
+ | is set to "UTC" by default as it is suitable for most use cases.
66
+ |
67
+ */
68
+
69
+ timezone: env('APP_TIMEZONE', 'UTC'),
70
+
71
+ /*
72
+ |--------------------------------------------------------------------------
73
+ | Application Locale Configuration
74
+ |--------------------------------------------------------------------------
75
+ |
76
+ | The application locale determines the default locale that will be used
77
+ | by Laravel's translation / localization methods. This option can be
78
+ | set to any locale for which you plan to have translation strings.
79
+ |
80
+ */
81
+
82
+ locale: env('APP_LOCALE', 'en'),
83
+
84
+ fallback_locale: env('APP_FALLBACK_LOCALE', 'en'),
85
+
86
+ faker_locale: env('APP_FAKER_LOCALE', 'en_US'),
87
+
88
+ /*
89
+ |--------------------------------------------------------------------------
90
+ | Encryption Key
91
+ |--------------------------------------------------------------------------
92
+ |
93
+ | This key is utilized by Laravel's encryption services and should be set
94
+ | to a random, 32 character string to ensure that all encrypted values
95
+ | are secure. You should do this prior to deploying the application.
96
+ |
97
+ */
98
+
99
+ cipher: 'AES-256-CBC',
100
+
101
+ key: env('APP_KEY'),
102
+
103
+ previous_keys: {
104
+ ...String(env('APP_PREVIOUS_KEYS', '')).split(',').filter(e => !!e)
105
+ },
106
+
107
+ /*
108
+ |--------------------------------------------------------------------------
109
+ | Maintenance Mode Driver
110
+ |--------------------------------------------------------------------------
111
+ |
112
+ | These configuration options determine the driver used to determine and
113
+ | manage Laravel's "maintenance mode" status. The "cache" driver will
114
+ | allow maintenance mode to be controlled across multiple machines.
115
+ |
116
+ | Supported drivers: "file", "cache"
117
+ |
118
+ */
119
+
120
+ maintenance: {
121
+ driver: env('APP_MAINTENANCE_DRIVER', 'file'),
122
+ store: env('APP_MAINTENANCE_STORE', 'database'),
123
+ },
124
+ }
125
+ }
@@ -0,0 +1,59 @@
1
+ import { Application } from "@h3ravel/core"
2
+
3
+ export default (app: Application) => {
4
+ const env = app.make('env');
5
+
6
+ return {
7
+
8
+ /*
9
+ |--------------------------------------------------------------------------
10
+ | Public Mask
11
+ |--------------------------------------------------------------------------
12
+ |
13
+ | Because of our current setup, we cannot serve static assets directly from
14
+ | the root path of our app, (Attempting to serve /logo.png will break the /
15
+ | route) because of this, static assets in the public directory will be
16
+ | served from a masked path.
17
+ |
18
+ */
19
+
20
+ public_mask: 'assets',
21
+
22
+ /*
23
+ |--------------------------------------------------------------------------
24
+ | Filesystem Disks
25
+ |--------------------------------------------------------------------------
26
+ |
27
+ | Below you may configure as many filesystem disks as necessary, and you
28
+ | may even configure multiple disks for the same driver. Examples for
29
+ | most supported storage drivers are configured here for reference.
30
+ |
31
+ | Supported Drivers: "local", "*ftp", "*sftp", "*s3"
32
+ |
33
+ */
34
+
35
+ disks: {
36
+ public: {
37
+ driver: 'local',
38
+ root: app.getPath('storage', 'app/public'),
39
+ url: env('APP_URL') + '/storage',
40
+ visibility: 'public'
41
+ }
42
+ },
43
+
44
+ /*
45
+ |--------------------------------------------------------------------------
46
+ | Symbolic Links
47
+ |--------------------------------------------------------------------------
48
+ |
49
+ | Here you may configure the symbolic links that will be created when the
50
+ | `storage:link` Artisan command is executed. The array keys should be
51
+ | the locations of the links and the values should be their targets.
52
+ |
53
+ */
54
+
55
+ links: {
56
+ [app.getPath('public')]: app.getPath('storage', 'app/public'),
57
+ },
58
+ }
59
+ }
@@ -0,0 +1,17 @@
1
+ import { Controller } from '@h3ravel/core'
2
+ import { HttpContext } from '@h3ravel/http'
3
+
4
+ export class HomeController extends Controller {
5
+ public async index ({ response }: HttpContext) {
6
+ const view = this.app.make('view')
7
+
8
+ return response.html(await view.render('index', {
9
+ links: {
10
+ documentation: 'https://h3ravel.toneflix.net/docs',
11
+ performance: 'https://h3ravel.toneflix.net/performance',
12
+ integration: 'https://h3ravel.toneflix.net/h3-integration',
13
+ features: 'https://h3ravel.toneflix.net/features',
14
+ }
15
+ }))
16
+ }
17
+ }
@@ -0,0 +1,29 @@
1
+ import { Controller } from '@h3ravel/core'
2
+ import { HttpContext } from '@h3ravel/http'
3
+
4
+ export class UserController extends Controller {
5
+ index () {
6
+ return [{ id: 1, name: 'John Doe' }]
7
+ }
8
+
9
+ async store ({ request, response }: HttpContext) {
10
+ return response
11
+ .setStatusCode(202)
12
+ .json({ message: `User ${await request.input('name')} created` })
13
+ }
14
+
15
+ show ({ request, response }: HttpContext) {
16
+ return response
17
+ .json({ id: request.input('id'), name: 'John Doe' })
18
+ }
19
+
20
+ async update ({ request, response }: HttpContext) {
21
+ return response
22
+ .setStatusCode(201)
23
+ .json({ message: `User ${await request.input('name')} updated` })
24
+ }
25
+
26
+ destroy ({ request }: HttpContext) {
27
+ return { message: `User ${request.input('id')} deleted` }
28
+ }
29
+ }
@@ -0,0 +1,8 @@
1
+ import { HttpContext, Middleware } from '@h3ravel/http'
2
+
3
+ export class AuthMiddleware extends Middleware {
4
+ async handle ({ request }: HttpContext, next: () => Promise<unknown>): Promise<unknown> {
5
+ console.log(`auth middleware`, request.getEvent('method'), 'request')
6
+ return next()
7
+ }
8
+ }
@@ -0,0 +1,30 @@
1
+ import 'reflect-metadata'
2
+
3
+ import { Application } from '@h3ravel/core'
4
+ import { Kernel } from '@h3ravel/core'
5
+ import { LogRequests } from '@h3ravel/http'
6
+
7
+ async function bootstrap () {
8
+ const app = new Application(process.cwd())
9
+
10
+ app.registerProviders([
11
+ (await import('@h3ravel/cache')).CacheServiceProvider,
12
+ (await import('@h3ravel/queue')).QueueServiceProvider,
13
+ (await import('@h3ravel/mail')).MailServiceProvider
14
+ ])
15
+
16
+ await app.registerConfiguredProviders()
17
+ await app.boot()
18
+
19
+ const h3App = app.make('http.app')
20
+ const serve = app.make('http.serve')
21
+
22
+ const kernel = new Kernel([new LogRequests()])
23
+
24
+ h3App.use((event) => kernel.handle(event, async () => undefined))
25
+
26
+ serve(h3App, { port: 3000 })
27
+ console.log('🚀 H3ravel Boilerplate running at http://localhost:3000')
28
+ }
29
+
30
+ bootstrap()