# Hostinger Shared Hosting – Deployment Checklist

If the site shows only the skeleton preloader, the Vue app is not loading. Follow this checklist.

## 1. Environment (.env on the server)

```env
APP_ENV=production
APP_DEBUG=false
APP_URL=https://ronnieridge.com
```

If assets are on another domain or use a different base URL:

```env
ASSET_URL=https://ronnieridge.com
```

## 2. Remove Vite dev file (critical!)

Before deploying, **delete `public/hot`** if it exists. This file is created when you run `npm run dev` locally. If it's on the server, Laravel will try to load assets from your local dev server instead of the built files → site stays on skeleton.

```bash
# Locally, before zipping:
del public\hot
# or: rm public/hot
```

Or delete `public/hot` on the server after uploading.

## 3. Build assets

On your local machine (after deleting `public/hot`):

```bash
npm run build
```

This creates `public/build/manifest.json` and `public/build/assets/*.js` and `*.css`.

Upload the entire `public/build/` folder (with `manifest.json` and the `assets/` subfolder) to your Hostinger hosting.

## 4. Document root

Your domain’s document root must point at the Laravel `public` folder.

Correct structure:

```
public_html/          ← Document root
├── index.php         (from Laravel public/)
├── .htaccess
├── build/
│   ├── manifest.json
│   └── assets/
│       ├── app-xxx.js
│       ├── vendor-xxx.js
│       └── ...
└── ...
```

If the project root is above `public_html`, set the domain’s document root to `public_html/public` (or the path where Laravel’s `public` folder lives).

## 5. Verify assets load

Open DevTools (F12) → Network tab. Refresh the page.

- JS/CSS from `/build/assets/` should return 200.
- If they return 404, the `build` folder is missing or in the wrong place.

## 6. Files to upload

- All contents of `public/` (index.php, .htaccess, build/, images/, favicon.ico, etc.)
- App code: `app/`, `config/`, `database/`, `resources/`, `routes/`, `bootstrap/`, `storage/`, `vendor/`
- `.env` (with production values), `composer.json`, `artisan`

## 7. Admin login – .env for production

Add these to `.env` on the server so admin login works over HTTPS:

```env
SESSION_SECURE_COOKIE=true
SANCTUM_STATEFUL_DOMAINS=ronnieridge.com
```

Then run:

```bash
php artisan config:clear
php artisan config:cache
```

Ensure the admin user exists:

```bash
php artisan db:seed --class=AdminSeeder
```

Default: **admin@gmail.com** / **admin**

## 8. After deploy

```bash
php artisan config:cache
php artisan route:cache
php artisan view:cache
```

If using queues or scheduled tasks, configure a cron job on the host.
