Skip to content

Commit 840e59e

Browse files
committed
Update README
1 parent 29de774 commit 840e59e

File tree

1 file changed

+117
-6
lines changed

1 file changed

+117
-6
lines changed

README.md

Lines changed: 117 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Laravel Skeleton React
1+
# Laravel Skeleton (React)
22

33
This is the Moon Pixels skeleton for building Laravel applications with Inertia and React.
44

@@ -54,10 +54,10 @@ alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
5454
touch database/database.sqlite
5555
```
5656

57-
7. Run the migrations
57+
7. Run the migrations and seed the database
5858

5959
```shell
60-
sail artisan migrate
60+
sail artisan migrate:fresh --seed
6161
```
6262

6363
8. Install the NPM dependencies
@@ -66,10 +66,121 @@ alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
6666
sail npm install
6767
```
6868

69-
9. Start the development server
69+
9. Build the assets
7070

7171
```shell
72-
sail npm run dev
72+
sail npm run build
7373
```
7474

75-
10. Visit `http://localhost` in your browser
75+
10. Run the tests
76+
77+
```shell
78+
sail composer test
79+
```
80+
81+
If the tests pass, you should be good to go.
82+
83+
### Post-installation steps
84+
85+
Once you have the project set up, you may also want to perform the following post-installation steps:
86+
87+
#### Starting the development server
88+
89+
You can now start the development server by running:
90+
91+
```shell
92+
sail npm run dev
93+
```
94+
95+
The application should now be available at [http://localhost](http://localhost).
96+
97+
#### Creating public storage symlink
98+
99+
To store files in the `public` directory, you need to create a symlink to the `storage/app/public` directory. You can do
100+
this by running:
101+
102+
```shell
103+
sail artisan storage:link
104+
```
105+
106+
#### Running backend code checks via composer
107+
108+
There are a few composer scripts available for running code checks. You can run the following commands to check the
109+
code:
110+
111+
```shell
112+
# Run Rector automatic refactoring
113+
sail composer rector
114+
115+
# Run Pint code styling
116+
sail composer pint
117+
118+
# Run PHPStan static analysis
119+
sail composer stan
120+
121+
# Run Pest tests
122+
sail composer test
123+
124+
# Run all checks
125+
sail composer checks
126+
```
127+
128+
> You should always run `sail composer checks` before pushing your code. This will ensure that your code is clean and
129+
> passes all checks that are enforced by the project CI/CD pipeline.
130+
131+
#### Running frontend code checks via npm
132+
133+
There are also a few npm scripts available for running code checks. You can run the following commands to check the
134+
code:
135+
136+
```shell
137+
# Run ESLint static analysis
138+
sail npm run lint
139+
140+
# Run Prettier code styling
141+
sail npm run format
142+
143+
# Run all checks
144+
sail npm run checks
145+
```
146+
147+
> You should always run `sail npm run checks` before pushing your code. This will ensure that your code is clean and
148+
> passes all checks that are enforced by the project CI/CD pipeline.
149+
150+
## Additional services
151+
152+
The project comes with a few additional services which are enabled by default. These services are detailed below.
153+
154+
### Redis
155+
156+
Redis is used for caching and session management by default in the environment file. The Redis service is available on
157+
port `6379`. You can adjust this port in the environment file by updating the `FORWARD_REDIS_PORT` variable.
158+
159+
You may also use Redis for the queue service. To do this, update the `QUEUE_CONNECTION` variable in the environment file
160+
to `redis`. Laravel Horizon is used to manage the queues. You can access the Horizon dashboard
161+
at [http://localhost/horizon](http://localhost/horizon). Remember, if you make a change to the queue configuration or
162+
any jobs while using the Redis queue driver, you will need to restart the queue worker for the changes to take effect.
163+
You can do this by running:
164+
165+
```shell
166+
sail artisan horizon:terminate
167+
```
168+
169+
> For the most part, you should use the `sync` queue driver for local development.
170+
171+
### MinIO
172+
173+
MinIO is an S3-compatible object storage service. The MinIO service is available on port `9000`. You can access the
174+
MinIO dashboard at [http://localhost:8900](http://localhost:8900). The default username and password for the console are
175+
`sail` and `password`, respectively. By default, the environment file is set to use the `local` disk for file storage.
176+
However, you can update it to use MinIO by updating the `FILESYSTEM_DISK` variable in the environment file to `s3`.
177+
178+
You can update the ports used by MinIO by updating the `FORWARD_MINIO_PORT` and `FORWARD_MINIO_DASHBOARD_PORT` variables
179+
in the environment file.
180+
181+
### Mailpit
182+
183+
Mailpit is a simple mail testing service. The Mailpit service is available on port `1025` and you can access the Mailpit
184+
dashboard at [http://localhost:8025](http://localhost:8025). By default, the environment file is set to use the Mailpit
185+
service for emails. If you need to change the ports, you can update the `FORWARD_MAILPIT_PORT` and
186+
`FORWARD_MAILPIT_DASHBOARD_PORT` variables in the environment file.

0 commit comments

Comments
 (0)