# Vedica.ai — Production Deploy Guide

Domain: **https://vedica.ai**  
Stack: Laravel 13 + Livewire + Vite (built assets) + SQLite (or MySQL)

---

## Admin panel?

**Nahi hai — aur abhi jarurat bhi nahi.**

| Feature | Kaise manage |
|---------|----------------|
| Schemes (100 Central) | Code + `SchemeSeeder` → reseed / deploy |
| Pages (About, FAQ, Contact…) | Blade views in code |
| Contact form | Email/log — no CMS |

Baad me schemes non-dev logins se edit karni hon to Filament/admin add kar sakte ho. Launch ke liye skip.

---

## Server requirements

- PHP **8.3+** (8.4 OK)
- Extensions: `mbstring`, `openssl`, `pdo`, `tokenizer`, `xml`, `ctype`, `json`, `bcmath`, `fileinfo`, `sqlite3` (agar SQLite) ya `pdo_mysql`
- Composer 2
- HTTPS (Let’s Encrypt / host SSL)
- Document root = project ka **`public/`** folder (bahut zaroori)

---

## A) Files kya upload karein

Local project: `E:\Startup\vedica`

### Zip me ye LOAO:
- `app/`, `bootstrap/`, `config/`, `database/` (migrations + seeders + `database.sqlite` optional)
- `public/` (**including `public/build/`** — Vite build already)
- `resources/`, `routes/`, `storage/` (empty structure), `vendor/` (agar server pe composer nahi chalega)
- `artisan`, `composer.json`, `composer.lock`
- `.env.production.example` → server pe copy karke `.env` banao
- `DEPLOY.md`

### Zip se HATAO:
- `node_modules/`
- `.git/`
- `.env` (local secrets — production pe naya banao)
- `storage/logs/*`, `storage/framework/cache/*` (empty dirs rakhna)

Ready zip (agar generate kiya): `E:\Startup\vedica-deploy.zip`

---

## B) Install steps (VPS / Cloud — recommended)

SSH pe project folder me:

```bash
# 1) Upload / git clone project
cd /var/www/vedica   # apna path

# 2) Dependencies
composer install --no-dev --optimize-autoloader

# 3) Env
cp .env.production.example .env
php artisan key:generate
# .env edit: APP_URL=https://vedica.ai , mail, DB

# 4) Permissions
chmod -R ug+rwx storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache   # user host ke hisaab se

# 5) Database (SQLite example)
touch database/database.sqlite
php artisan migrate --force
php artisan db:seed --class=SchemeSeeder --force

# 6) Optimize
php artisan config:cache
php artisan route:cache
php artisan view:cache

# 7) Web server: document root → /var/www/vedica/public
```

Nginx example `root`:

```nginx
root /var/www/vedica/public;
index index.php;
location / {
    try_files $uri $uri/ /index.php?$query_string;
}
```

Apache: `public/.htaccess` already Laravel default; vhost `DocumentRoot` = `.../public`.

DNS: `A` record **vedica.ai** (+ `www` agar chahiye) → server IP. SSL on.

---

## C) Shared hosting (cPanel / Plesk)

1. Zip upload → extract outside `public_html` (e.g. `~/vedica`)
2. **Document root** ko `~/vedica/public` pe point karo  
   - ya `public_html` ke andar `public/` contents copy karke `index.php` paths adjust (messy — avoid)
3. PHP 8.3 select karo
4. SSH/Terminal:
   - `composer install --no-dev`
   - `.env` banao, `key:generate`, `migrate`, `db:seed --class=SchemeSeeder --force`
   - `config:cache` / `route:cache` / `view:cache`
5. `storage` + `bootstrap/cache` writable (755/775)

Agar host pe Composer nahi: local pe `composer install --no-dev` karke `vendor/` zip me daal ke upload.

---

## D) Production `.env` checklist

```env
APP_NAME=Vedica
APP_ENV=production
APP_DEBUG=false
APP_URL=https://vedica.ai

DB_CONNECTION=sqlite
# OR MySQL:
# DB_CONNECTION=mysql
# DB_HOST=127.0.0.1
# DB_DATABASE=vedica
# DB_USERNAME=...
# DB_PASSWORD=...

MAIL_MAILER=smtp
MAIL_HOST=...
MAIL_PORT=587
MAIL_USERNAME=...
MAIL_PASSWORD=...
MAIL_FROM_ADDRESS=hello@vedica.ai
MAIL_FROM_NAME=Vedica
```

Contact form tab email bhejega jab `MAIL_FROM_ADDRESS` set ho aur `hello@example.com` na ho.

---

## E) Launch checklist

- [ ] https://vedica.ai opens (not http mixed)
- [ ] Home + `/schemes` + one scheme detail OK
- [ ] `/check` eligibility OK
- [ ] CSS/JS load (View Source → `/build/assets/...`)
- [ ] `APP_DEBUG=false`
- [ ] Sitemap: `https://vedica.ai/sitemap.xml`
- [ ] Contact form test
- [ ] Scheme count ~100

---

## F) Baad me schemes update

Local pe seeder edit → deploy code → server pe:

```bash
php artisan db:seed --class=SchemeSeeder --force
php artisan view:clear
```

(Seeder pehle schemes wipe karke dubara seed karta hai — production pe carefully.)

---

## G) FAQ Bank / Admin

Abhi skip. Live ke baad FAQ hubs + optional admin alag phase.
