# RapidSewa Laravel Backend - Final Deploy Guide

## Admin Details

Web admin panel:

```text
https://your-domain.com/admin/login
```

Default admin:

```text
Email: admin@pronto.local
Phone: 9999999999
Password: admin12345
```

Customer demo:

```text
Phone: 8888888888
Password: customer123
OTP in local/debug mode: 123456
```

Change admin password after first login.

## Which Folder Upload

Upload this folder:

```text
pronto-laravel-backend
```

Then set your hosting/domain document root to:

```text
pronto-laravel-backend/public
```

Do not point the domain to the project root. Laravel must run from the `public` folder.

## Server Upload With SSH

1. Upload the full `pronto-laravel-backend` folder to server.
2. Point domain document root to:

```text
pronto-laravel-backend/public
```

3. Copy `.env.mysql.example` to `.env`.
4. Update these values:

```text
APP_URL=https://your-domain.com
DB_DATABASE=pronto_backend
DB_USERNAME=your_mysql_user
DB_PASSWORD=your_mysql_password
```

5. Run commands from project root:

```bash
composer install --no-dev --optimize-autoloader
php artisan key:generate
php artisan migrate --seed --force
php artisan storage:link
php artisan config:cache
php artisan route:cache
```

If vendor folder is uploaded and your server has no Composer, skip `composer install`.

## cPanel Without SSH

1. Create MySQL database in cPanel.
2. Import this file in phpMyAdmin:

```text
database/pronto_mysql_full_import.sql
```

3. Edit `.env` with MySQL database, username, password.
4. Make sure domain root points to `public`.

## MySQL Database

Recommended:

```bash
php artisan migrate --seed --force
```

This creates all MySQL tables and seed data.

Optional seed SQL file:

```text
database/pronto_mysql_seed.sql
```

Use it only after migrations if you want to seed from phpMyAdmin instead of `php artisan db:seed`.

If your hosting has no SSH/terminal, use this full phpMyAdmin import:

```text
database/pronto_mysql_full_import.sql
```

This file creates tables and imports demo/admin seed data.

Demo SQLite database is included for quick local check:

```text
database/database.sqlite
```

## Main Admin URLs

```text
/admin/login
/admin/dashboard
/admin/module/services
/admin/module/bookings
/admin/module/customers
/admin/module/vendors
/admin/module/support-tickets
/admin/tracking
/admin/reports
```

## Main API URLs

```text
POST /api/v1/admin/login
POST /api/v1/auth/otp/send
POST /api/v1/auth/otp/verify
GET  /api/v1/catalog/services
POST /api/v1/cart
POST /api/v1/cart/{cart}/items
POST /api/v1/cart/{cart}/quote
POST /api/v1/bookings
POST /api/v1/bookings/{booking}/pay
POST /api/v1/payments/{payment}/verify
POST /api/v1/pro/apply
POST /api/v1/buddy/register
GET  /api/v1/admin/dashboard
```

Use Bearer token from login response:

```text
Authorization: Bearer YOUR_TOKEN
```

## Features Included

- OTP customer login
- admin password login
- professional colorful web admin panel with dropdown menu
- dashboard with today management, expert/customer graph and income
- staff role and permission management
- zone, city, area, hub, Google map key management
- customer address management
- customer add/edit/remove, wallet, Rapid Coin and profile fields
- vendor add/edit/remove, services, plan, wallet, documents, bank, address, online/offline
- city/locality/service-area API
- service category and service management with icon, image slider, HTML content editor, MRP, sale price, hourly rate
- cart and quote pricing
- coupon, fee, tax calculation
- instant, scheduled, recurring booking base
- hourly booking management
- live expert tracking screen
- app banners and onboarding screens API
- complaints and SOS management
- FAQ category, CMS pages and language management
- email and SMS templates
- payment order and local verification
- Razorpay payment gateway settings
- wallet top-up and transactions
- cancellation and refund policy
- professional application and onboarding base
- Pro job offer and assignment flow
- Buddy referral code and rewards base
- support tickets and messages
- CMS pages, FAQ, notification templates
- audit logs, analytics events, webhooks

## Payment Gateway

Currently `PAYMENT_GATEWAY=local`.

For live gateway, connect Razorpay/Cashfree in:

```text
app/Http/Controllers/Api/V1/PaymentController.php
app/Http/Controllers/Api/V1/WebhookController.php
```

## Important

This is a production-ready starter backend, not the private original Pronto code. Update branding, legal text, payment provider keys, SMS provider, and final pricing rules before public launch.
