Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit 9de7ef7

Browse files
author
GoodM4ven
committed
Release v1.3.0
- Integrated Soketi container for real-time broadcasting - Modified environment variables - Installed Pusher PHP Server package - Enabled `BroadcastServiceProvider` in `app.php` - Installed `laravel-echo` and `pusher-js` packages - Readied up and exposed `Echo` in `bootstrap.js` - Removed `public/build` Vite assets - Updated [README]
1 parent f878f6b commit 9de7ef7

File tree

14 files changed

+325
-397
lines changed

14 files changed

+325
-397
lines changed

.env.example

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ MEDIA_DISK=s3
2222
FILAMENT_FILESYSTEM_DRIVER=s3
2323

2424
SCOUT_DRIVER=database
25-
BROADCAST_DRIVER=log
25+
BROADCAST_DRIVER=pusher
2626
CACHE_DRIVER=file
2727
QUEUE_CONNECTION=sync
2828

@@ -55,16 +55,16 @@ AWS_ENDPOINT=http://minio:9000
5555
AWS_URL=http://localhost:9000/local
5656
AWS_USE_PATH_STYLE_ENDPOINT=true
5757

58-
PUSHER_APP_ID=
59-
PUSHER_APP_KEY=
60-
PUSHER_APP_SECRET=
61-
PUSHER_HOST=
62-
PUSHER_PORT=443
63-
PUSHER_SCHEME=https
58+
PUSHER_APP_ID=app-id
59+
PUSHER_APP_KEY=app-key
60+
PUSHER_APP_SECRET=app-secret
61+
PUSHER_HOST=soketi
62+
PUSHER_PORT=6001
63+
PUSHER_SCHEME=http
6464
PUSHER_APP_CLUSTER=mt1
6565

6666
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
67-
VITE_PUSHER_HOST="${PUSHER_HOST}"
67+
VITE_PUSHER_HOST="localhost"
6868
VITE_PUSHER_PORT="${PUSHER_PORT}"
6969
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
7070
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

.env.production

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ MEDIA_DISK=s3
2222
FILAMENT_FILESYSTEM_DRIVER=s3
2323

2424
SCOUT_DRIVER=database
25-
BROADCAST_DRIVER=log
25+
BROADCAST_DRIVER=pusher
2626
CACHE_DRIVER=file
2727
QUEUE_CONNECTION=sync
2828

@@ -56,9 +56,9 @@ AWS_BUCKET=# REQUIRED
5656
AWS_ENDPOINT=https://fra1.digitaloceanspaces.com/ # UPDATE fra1
5757
AWS_USE_PATH_STYLE_ENDPOINT=false
5858

59-
PUSHER_APP_ID=
60-
PUSHER_APP_KEY=
61-
PUSHER_APP_SECRET=
59+
PUSHER_APP_ID=# REQUIRED
60+
PUSHER_APP_KEY=# REQUIRED
61+
PUSHER_APP_SECRET=# REQUIRED
6262
PUSHER_HOST=127.0.0.1
6363
PUSHER_PORT=443
6464
PUSHER_SCHEME=https

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Until the customization feature is ready, this preset is clearly *opinionated*.
2121
3. [Redis](https://redis.io/):alpine (Port: 6379)
2222
4. [Mailhog](https://github.com/mailhog/MailHog):latest (Port: 1025 | [8025](http://localhost:8025))
2323
5. [MinIO](https://min.io/):latest (Port: 9000 | [8900](http://localhost:8900))
24+
6. [Soketi](https://soketi.app/):latest-16-alpine (Port: 6001 | [9601](http://localhost:9601/usage))
2425

2526
### Packages
2627

@@ -37,11 +38,13 @@ Until the customization feature is ready, this preset is clearly *opinionated*.
3738
### Opinionated (To Be Optional)
3839

3940
- [Pest](https://pestphp.com) v1.2.0 (Testing Framework)
41+
- [Laravel Echo](https://laravel.com/docs/broadcasting) v1.13.0 (Soketi)
42+
- [Pusher PHP Server](https://github.com/pusher/pusher-http-php) v7.0.2 (Soketi)
4043
- [Laravel Telescope](https://laravel.com/docs/telescope) v4.9.0 (Local Only)
4144
- [Laravel Scout](https://laravel.com/docs/scout) v9.4.10 (**Database** Driver)
4245
- [Media-Library](https://github.com/spatie/laravel-medialibrary) v10.4.1
4346
- [Filament](https://filamentphp.com) v2.0.0 ([Admin](https://filamentphp.com/docs/admin), [Forms](https://filamentphp.com/docs/forms) and [Tables](https://filamentphp.com/docs/tables))
44-
- Including Spatie's [Media-Library](https://filamentphp.com/docs/2.x/spatie-laravel-media-library-plugin/installation) Plugin
47+
- Including Spatie's [Media-Library](https://filamentphp.com/docs/spatie-laravel-media-library-plugin/installation) Plugin
4548
- [Good Loader](https://github.com/GoodM4ven/good-loader) v1.1.1
4649
- [Good Night](https://github.com/GoodM4ven/good-night) v1.0.0
4750

@@ -79,6 +82,8 @@ Until the customization feature is ready, this preset is clearly *opinionated*.
7982
> **Warning**
8083
> Please be aware that Vite's traffic is **blocked by Brave browser's Shield** feature. So make sure you click on it and disable it for `localhost`.
8184
85+
- Uncommented and therefore exposed Laravel [`Echo`](resources/js/bootstrap.js#L21) for real-time broadcasting; as Soketi is already setup with Pusher's boilerplate.
86+
8287
</p>
8388
</details>
8489

@@ -297,7 +302,6 @@ If you're done with the project and wish to **delete** it completely, do the fol
297302
- [x] Create a separate package for easier installation.
298303
- (The details are over [here](https://github.com/GoodM4ven/tall-stack-builder#TODOs))
299304
- [ ] Rework documentation.
300-
- [ ] Integrate [Soketi](https://github.com/soketi/soketi) as an alternative for real-time [broadcasting](https://laravel.com/docs/9.x/broadcasting).
301305
- [ ] Integrate [Cypress](https://github.com/laracasts/cypress) as a [front-end testing](https://cypress.io) framework.
302306
- [ ] Write [Pest](https://pestphp.com) and [Cypress](https://cypress.io) tests, one day!
303307
- [ ] Create a wiki page for VSC extensions and shortcuts.
@@ -320,6 +324,7 @@ If you're done with the project and wish to **delete** it completely, do the fol
320324
- The original TALL Stack preset and their home [design](https://github.com/laravel-frontend-presets/tall/blob/master/stubs/default/resources/views/welcome.blade.php).
321325
- TailwindCSS [Snippets](https://github.com/Pondorasti/tailwindcss-snippets) repository.
322326
- [RhysLees](https://github.com/RhysLees) for the "interactive prompts" tip.
327+
- [rennokki](https://github.com/rennokki) for Soketi and [oanhnn](https://github.com/oanhnn) for its integration.
323328
324329
If you like the preset, please do 🌟 every repository linked around here; except this preset.
325330

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"laravel/tinker": "^2.7",
3535
"league/flysystem-aws-s3-v3": "^3.0",
3636
"livewire/livewire": "^2.10",
37+
"pusher/pusher-php-server": "^7.0",
3738
"spatie/laravel-medialibrary": "^10.0.0"
3839
},
3940
"require-dev": {

composer.lock

Lines changed: 198 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/app.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@
191191
*/
192192
App\Providers\AppServiceProvider::class,
193193
App\Providers\AuthServiceProvider::class,
194-
// App\Providers\BroadcastServiceProvider::class,
194+
App\Providers\BroadcastServiceProvider::class,
195195
App\Providers\EventServiceProvider::class,
196196
App\Providers\RouteServiceProvider::class,
197197
App\Providers\FilamentServiceProvider::class,

docker-compose.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ services:
2626
- mysql
2727
- redis
2828
- minio
29+
- soketi
2930
mysql:
3031
image: 'mysql/mysql-server:8.0'
3132
ports:
@@ -82,6 +83,26 @@ services:
8283
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
8384
retries: 3
8485
timeout: 5s
86+
soketi:
87+
image: 'quay.io/soketi/soketi:latest-16-alpine'
88+
environment:
89+
SOKETI_DEBUG: '${SOKETI_DEBUG:-1}'
90+
SOKETI_METRICS_ENABLED: '${SOKETI_METRICS_ENABLED:-1}'
91+
SOKETI_METRICS_SERVER_PORT: '9601'
92+
SOKETI_DEFAULT_APP_ENABLED: '${SOKETI_DEFAULT_APP_ENABLED:-1}'
93+
SOKETI_DEFAULT_APP_ENABLE_CLIENT_MESSAGES: ${SOKETI_DEFAULT_APP_ENABLE_CLIENT_MESSAGES:-false}
94+
SOKETI_DEFAULT_APP_ID: '${PUSHER_APP_ID:-app-id}'
95+
SOKETI_DEFAULT_APP_KEY: '${PUSHER_APP_KEY:-app-key}'
96+
SOKETI_DEFAULT_APP_SECRET: '${PUSHER_APP_SECRET:-app-secret}'
97+
ports:
98+
- '${SOKETI_PORT:-6001}:6001'
99+
- '${SOKETI_METRICS_SERVER_PORT:-9601}:9601'
100+
networks:
101+
- sail
102+
healthcheck:
103+
test: ['CMD', 'wget', '--no-verbose', '--spider', 'http://localhost:6001']
104+
retries: 3
105+
timeout: 5s
85106
networks:
86107
sail:
87108
driver: bridge

0 commit comments

Comments
 (0)