Skip to content

Commit 8f4004f

Browse files
committed
feat: admin and user dashboards. Github CI. Svelte linting. new logo
1 parent ae55408 commit 8f4004f

File tree

67 files changed

+1527
-883
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1527
-883
lines changed

.env.example

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ APP_NAME=Laravelte
22
APP_ENV=local
33
APP_KEY=
44
APP_DEBUG=true
5-
APP_URL=http://localhost
5+
APP_URL=http://laravelte.test
6+
SESSION_DOMAIN=laravelte.test
7+
SANCTUM_STATEFUL_DOMAINS=laravelte.test
68

79
LOG_CHANNEL=stack
810
LOG_DEPRECATIONS_CHANNEL=null
@@ -17,19 +19,21 @@ DB_USERNAME=root
1719
DB_PASSWORD=
1820

1921
BROADCAST_DRIVER=log
20-
CACHE_DRIVER=file
22+
CACHE_DRIVER=redis
23+
CACHE_PREFIX="laravelte_"
2124
FILESYSTEM_DISK=local
2225
QUEUE_CONNECTION=sync
23-
SESSION_DRIVER=database
26+
SESSION_DRIVER=redis
2427
SESSION_LIFETIME=120
28+
SESSION_CONNECTION="session"
2529

2630
MEMCACHED_HOST=127.0.0.1
2731

2832
REDIS_HOST=127.0.0.1
2933
REDIS_PASSWORD=null
3034
REDIS_PORT=6379
3135

32-
MAIL_MAILER=smtp
36+
MAIL_MAILER=log
3337
MAIL_HOST=mailpit
3438
MAIL_PORT=1025
3539
MAIL_USERNAME=null
@@ -57,3 +61,6 @@ VITE_PUSHER_HOST="${PUSHER_HOST}"
5761
VITE_PUSHER_PORT="${PUSHER_PORT}"
5862
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
5963
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
64+
65+
DEMO_USERNAME="acelords"
66+
DEMO_PASSWORD="acelords"

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: acelords
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: acelords
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/deploy-ci.yml

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# script to deploy the laravel upstream to the dev server
2+
# required secrets: HOST, USERNAME, PASSWORD, APP_PATH, APPNAME, SLACK_WEBHOOK, SSH_PRIVATE_KEY
3+
4+
# If you are using OpenSSH
5+
# If you are currently using OpenSSH and are getting the following error:
6+
# ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey]
7+
# Make sure that your key algorithm of choice is supported. On Ubuntu 20.04 or later you must explicitly allow the use of the ssh-rsa algorithm. Add the following line to your OpenSSH daemon file (which is either /etc/ssh/sshd_config or a drop-in file under /etc/ssh/sshd_config.d/):
8+
# CASignatureAlgorithms +ssh-rsa
9+
10+
name: Deploy Laravelte to Production
11+
12+
# Controls when the workflow will run
13+
on:
14+
# Triggers the workflow on push or pull request events but only for the "main" branch
15+
push:
16+
branches: [ "main" ]
17+
pull_request:
18+
branches: [ "main" ]
19+
20+
# Allows you to run this workflow manually from the Actions tab
21+
workflow_dispatch:
22+
23+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
24+
jobs:
25+
# This workflow contains a single job called "build"
26+
build:
27+
# The type of runner that the job will run on
28+
runs-on: ubuntu-latest
29+
30+
# setup services
31+
services:
32+
redis:
33+
image: redis
34+
# Set health checks to wait until redis has started
35+
options: >-
36+
--health-cmd "redis-cli ping"
37+
--health-interval 10s
38+
--health-timeout 5s
39+
--health-retries 5
40+
ports:
41+
# Maps port 6379 on service container to the host
42+
- 6379:6379
43+
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
php-versions: ['8.1']
48+
operating-system: [ubuntu-latest]
49+
dependency-stability: [ prefer-stable ]
50+
51+
# Steps represent a sequence of tasks that will be executed as part of the job
52+
steps:
53+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
54+
- uses: actions/checkout@v3
55+
- uses: actions/setup-node@v3
56+
with:
57+
node-version: 18
58+
check-latest: true
59+
60+
- name: Setup PHP, with composer and extensions
61+
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
62+
with:
63+
php-version: ${{ matrix.php-versions }}
64+
extensions: mbstring, dom, fileinfo, mysql, libxml, xml, xmlwriter, dom, tokenizer, filter, json, phar, pcre, openssl, pdo, intl, curl
65+
66+
- name: Get composer cache directory
67+
id: composer-cache
68+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
69+
70+
- name: Cache composer dependencies
71+
uses: actions/cache@v1
72+
with:
73+
path: ${{ steps.composer-cache.outputs.dir }}
74+
# Use composer.json for key, if composer.lock is not committed.
75+
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
76+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
77+
restore-keys: ${{ runner.os }}-composer-
78+
79+
# Run tests on Laravel
80+
- name: Copy .env
81+
run: php -r "file_exists('.env') || copy('.env.testing', '.env');"
82+
- name: Install Dependencies
83+
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
84+
- name: Create Database
85+
run: |
86+
mkdir -p database
87+
touch database/database.sqlite
88+
- name: Run Migrations
89+
env:
90+
DB_CONNECTION: sqlite
91+
DB_DATABASE: database/database.sqlite
92+
run: php artisan migrate --force
93+
- name: Generate key
94+
run: php artisan key:generate --force
95+
- name: Directory Permissions
96+
run: chmod -R 777 storage bootstrap/cache
97+
98+
# Run npm tests
99+
- name: Build and Test Node Packages
100+
run: |
101+
pnpm i
102+
npm run build
103+
104+
# Run php tests
105+
- name: Execute tests (Unit and Feature tests) via Pest
106+
env:
107+
DB_CONNECTION: sqlite
108+
DB_DATABASE: database/database.sqlite
109+
run: ./vendor/bin/pest
110+
111+
# Deploy to prod server
112+
- name: Deploying System
113+
uses: appleboy/ssh-action@master
114+
with:
115+
host: ${{ secrets.HOST }}
116+
username: ${{ secrets.USERNAME }}
117+
# password: ${{ secrets.PASSWORD }}
118+
key: ${{ secrets.SSH_PRIVATE_KEY }}
119+
script: |
120+
cd ${{ secrets.APP_PATH }}
121+
git reset --hard
122+
git clean -fd
123+
php artisan down
124+
git pull --ff
125+
composer install --no-interaction --prefer-dist --optimize-autoloader -q
126+
php artisan migrate --force
127+
export NVM_DIR=~/.nvm
128+
source ~/.nvm/nvm.sh
129+
pnpm i
130+
npm run build
131+
php artisan up
132+
133+
- name: Slack success notification
134+
if: success()
135+
uses: rtCamp/action-slack-notify@master
136+
env:
137+
SLACK_CHANNEL: acelords-and-apps
138+
SLACK_COLOR: good
139+
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
140+
SLACK_MESSAGE: '${{ secrets.APPNAME }}: Deployment achieved with success'
141+
SLACK_TITLE: CI
142+
SLACK_USERNAME: GitHub
143+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
144+
145+
- name: Slack error notification
146+
if: failure()
147+
uses: rtCamp/action-slack-notify@master
148+
env:
149+
SLACK_CHANNEL: acelords-and-apps
150+
SLACK_COLOR: danger
151+
SLACK_ICON: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
152+
SLACK_MESSAGE: '${{ secrets.APPNAME }}: The deployment has failed'
153+
SLACK_TITLE: CI
154+
SLACK_USERNAME: GitHub
155+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

.phpstorm.meta.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@
198198
'queue.worker' => \Illuminate\Queue\Worker::class,
199199
'redirect' => \Illuminate\Routing\Redirector::class,
200200
'redis' => \Illuminate\Redis\RedisManager::class,
201+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
201202
'router' => \Illuminate\Routing\Router::class,
202203
'session' => \Illuminate\Session\SessionManager::class,
203204
'session.store' => \Illuminate\Session\Store::class,
@@ -398,6 +399,7 @@
398399
'queue.worker' => \Illuminate\Queue\Worker::class,
399400
'redirect' => \Illuminate\Routing\Redirector::class,
400401
'redis' => \Illuminate\Redis\RedisManager::class,
402+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
401403
'router' => \Illuminate\Routing\Router::class,
402404
'session' => \Illuminate\Session\SessionManager::class,
403405
'session.store' => \Illuminate\Session\Store::class,
@@ -598,6 +600,7 @@
598600
'queue.worker' => \Illuminate\Queue\Worker::class,
599601
'redirect' => \Illuminate\Routing\Redirector::class,
600602
'redis' => \Illuminate\Redis\RedisManager::class,
603+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
601604
'router' => \Illuminate\Routing\Router::class,
602605
'session' => \Illuminate\Session\SessionManager::class,
603606
'session.store' => \Illuminate\Session\Store::class,
@@ -798,6 +801,7 @@
798801
'queue.worker' => \Illuminate\Queue\Worker::class,
799802
'redirect' => \Illuminate\Routing\Redirector::class,
800803
'redis' => \Illuminate\Redis\RedisManager::class,
804+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
801805
'router' => \Illuminate\Routing\Router::class,
802806
'session' => \Illuminate\Session\SessionManager::class,
803807
'session.store' => \Illuminate\Session\Store::class,
@@ -998,6 +1002,7 @@
9981002
'queue.worker' => \Illuminate\Queue\Worker::class,
9991003
'redirect' => \Illuminate\Routing\Redirector::class,
10001004
'redis' => \Illuminate\Redis\RedisManager::class,
1005+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
10011006
'router' => \Illuminate\Routing\Router::class,
10021007
'session' => \Illuminate\Session\SessionManager::class,
10031008
'session.store' => \Illuminate\Session\Store::class,
@@ -1198,6 +1203,7 @@
11981203
'queue.worker' => \Illuminate\Queue\Worker::class,
11991204
'redirect' => \Illuminate\Routing\Redirector::class,
12001205
'redis' => \Illuminate\Redis\RedisManager::class,
1206+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
12011207
'router' => \Illuminate\Routing\Router::class,
12021208
'session' => \Illuminate\Session\SessionManager::class,
12031209
'session.store' => \Illuminate\Session\Store::class,
@@ -1398,6 +1404,7 @@
13981404
'queue.worker' => \Illuminate\Queue\Worker::class,
13991405
'redirect' => \Illuminate\Routing\Redirector::class,
14001406
'redis' => \Illuminate\Redis\RedisManager::class,
1407+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
14011408
'router' => \Illuminate\Routing\Router::class,
14021409
'session' => \Illuminate\Session\SessionManager::class,
14031410
'session.store' => \Illuminate\Session\Store::class,
@@ -1598,6 +1605,7 @@
15981605
'queue.worker' => \Illuminate\Queue\Worker::class,
15991606
'redirect' => \Illuminate\Routing\Redirector::class,
16001607
'redis' => \Illuminate\Redis\RedisManager::class,
1608+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
16011609
'router' => \Illuminate\Routing\Router::class,
16021610
'session' => \Illuminate\Session\SessionManager::class,
16031611
'session.store' => \Illuminate\Session\Store::class,
@@ -1798,6 +1806,7 @@
17981806
'queue.worker' => \Illuminate\Queue\Worker::class,
17991807
'redirect' => \Illuminate\Routing\Redirector::class,
18001808
'redis' => \Illuminate\Redis\RedisManager::class,
1809+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
18011810
'router' => \Illuminate\Routing\Router::class,
18021811
'session' => \Illuminate\Session\SessionManager::class,
18031812
'session.store' => \Illuminate\Session\Store::class,
@@ -1998,6 +2007,7 @@
19982007
'queue.worker' => \Illuminate\Queue\Worker::class,
19992008
'redirect' => \Illuminate\Routing\Redirector::class,
20002009
'redis' => \Illuminate\Redis\RedisManager::class,
2010+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
20012011
'router' => \Illuminate\Routing\Router::class,
20022012
'session' => \Illuminate\Session\SessionManager::class,
20032013
'session.store' => \Illuminate\Session\Store::class,
@@ -2198,6 +2208,7 @@
21982208
'queue.worker' => \Illuminate\Queue\Worker::class,
21992209
'redirect' => \Illuminate\Routing\Redirector::class,
22002210
'redis' => \Illuminate\Redis\RedisManager::class,
2211+
'redis.connection' => \Illuminate\Redis\Connections\PhpRedisConnection::class,
22012212
'router' => \Illuminate\Routing\Router::class,
22022213
'session' => \Illuminate\Session\SessionManager::class,
22032214
'session.store' => \Illuminate\Session\Store::class,

.prettierrc

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
{
2-
"useTabs": true,
3-
"singleQuote": true,
4-
"trailingComma": "none",
5-
"printWidth": 100,
6-
"plugins": ["prettier-plugin-svelte"],
7-
"pluginSearchDirs": ["."],
8-
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
2+
"semi": false,
3+
"singleQuote": true,
4+
"arrowParens": "avoid",
5+
"printWidth": 120
96
}

README.md

Lines changed: 14 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,29 @@
1-
<p align="center"><a href="https://laravel.com" target="_blank"><img src="https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg" width="400" alt="Laravel Logo"></a></p>
1+
![Laravelte Logo](public/img/laravelte-logo-full.png "text")
22

33
<p align="center">
4-
<a href="https://github.com/laravel/framework/actions"><img src="https://github.com/laravel/framework/workflows/tests/badge.svg" alt="Build Status"></a>
5-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/dt/laravel/framework" alt="Total Downloads"></a>
6-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/v/laravel/framework" alt="Latest Stable Version"></a>
7-
<a href="https://packagist.org/packages/laravel/framework"><img src="https://img.shields.io/packagist/l/laravel/framework" alt="License"></a>
4+
<a href="https://github.com/lexxyungcarter/laravelte/actions"><img src="https://github.com/lexxyungcarter/laravelte/workflows/tests/badge.svg" alt="Build Status"></a>
85
</p>
96

107

11-
## About Laravel
8+
## About Laravelte
129

13-
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel takes the pain out of development by easing common tasks used in many web projects, such as:
10+
Laravelte is an entire webapp based on the [Laravel](https://laravel.com) web application framework and [Svelte](https://svelte.com) frontend. The main goals of this project is to provide a quick way to get started with your projects.
1411

15-
- [Simple, fast routing engine](https://laravel.com/docs/routing).
16-
- [Powerful dependency injection container](https://laravel.com/docs/container).
17-
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage.
18-
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent).
19-
- Database agnostic [schema migrations](https://laravel.com/docs/migrations).
20-
- [Robust background job processing](https://laravel.com/docs/queues).
12+
It features:
13+
- [All Laravel Features](https://laravel.com).
14+
- Quick Frontend Scaffolding via [Svelte](https://svelte.com) via [Inertiajs](https://inertiajs.com). Svelte is extremely fast, and provides less boilerplate as compared to [Vue](https://vuejs.org) and [React](https://react.com).
15+
- Different **Admin** and **User** dashboard support.
16+
- CI/CD via [Github Actions](https://github.com/).
17+
- [Laravel Actions](https://laravelactions.com/): Instead of creating controllers, jobs, listeners and so on, it allows you to create a PHP class that handles a specific task and run that class as anything you want.
18+
- [Redis support](https://laravel.com/docs/queues) and Laravel Queues.
2119
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting).
2220

2321
Laravel is accessible, powerful, and provides tools required for large, robust applications.
2422

25-
## Learning Laravel
23+
Tooling:
24+
- Vite
25+
- pnpm
2626

27-
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
28-
29-
You may also try the [Laravel Bootcamp](https://bootcamp.laravel.com), where you will be guided through building a modern Laravel application from scratch.
30-
31-
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 2000 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills by digging into our comprehensive video library.
32-
33-
## Laravel Sponsors
34-
35-
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
36-
37-
### Premium Partners
38-
39-
- **[Vehikl](https://vehikl.com/)**
40-
- **[Tighten Co.](https://tighten.co)**
41-
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
42-
- **[64 Robots](https://64robots.com)**
43-
- **[Cubet Techno Labs](https://cubettech.com)**
44-
- **[Cyber-Duck](https://cyber-duck.co.uk)**
45-
- **[Many](https://www.many.co.uk)**
46-
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
47-
- **[DevSquad](https://devsquad.com)**
48-
- **[Curotec](https://www.curotec.com/services/technologies/laravel/)**
49-
- **[OP.GG](https://op.gg)**
50-
- **[WebReinvent](https://webreinvent.com/?utm_source=laravel&utm_medium=github&utm_campaign=patreon-sponsors)**
51-
- **[Lendio](https://lendio.com)**
5227

5328
## Contributing
5429

0 commit comments

Comments
 (0)