- PHP 75.3%
- Blade 21.8%
- JavaScript 1.3%
- Dockerfile 1.1%
- CSS 0.3%
- Other 0.2%
|
|
||
|---|---|---|
| .github/workflows | ||
| app | ||
| bootstrap | ||
| config | ||
| database | ||
| kubernetes | ||
| public | ||
| resources | ||
| routes | ||
| storage | ||
| tests | ||
| .editorconfig | ||
| .env.example | ||
| .env.example.production | ||
| .gitattributes | ||
| .gitignore | ||
| artisan | ||
| composer.json | ||
| composer.lock | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| herd.yml | ||
| package-lock.json | ||
| package.json | ||
| phpunit.xml | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| vite.config.js | ||
Cloud Native Mauritius
Prerequisites
Clone the repository and ensure the followings are installed:
- PHP 8.2/8.3
- PHP Composer
- NPM
- SQLite
Install Dependencies
-
Install all necessary PHP dependencies.
composer install -
Install all necessary Node.js dependencies.
npm install
Setting Up Laravel
-
Copy
.env.exampleto.envin the project root.cp .env.example .env -
Generate a unique application key.
php artisan key:generate
Setting storage
```bash
php artisan storage:link
```
Setting Up SQLite for Development
-
Run the migration command
php artisan migrate --seed # if already setup, run php artisan migrate:fresh --seed # This will clear the database with new data -
When prompted to create a new SQLite database, type
yes. -
Seed the database with dummy data.
php artisan migrate:fresh --seed
Run the Frontend Stack for Development
Ensure you are in the root directory and run the following commands:
-
Start the Laravel development server.
php artisan serve # or use Herd (https://herd.laravel.com/) -
Generate ide helper.
composer run ide -
Start the frontend development server.
npm run dev -
The application should now be accessible on port
8000(orhttp://cloudnativemauritius.com.teston herd) -
Advanced dev tool available on
<host>/__clockwork
Testing on mobile
Set VITE_HMR_HOST to the local IP address of your machine. You'll also have to update the APP_URL
To quickly get the ip, run npm run dev -- --host and you'll see something like Network: http://x.x.x.x
VITE_HMR_HOST=192.168.100.200
Run php artisan serve --port 8000 --host 192.168.100.200 and npm run dev -- --host
In this case, if your phone is connected to the same network, you should be able to access the site on your phone on 192.168.100.200:8000