# CRM SYNOLUVIA

Application Laravel / Vue 3 / Inertia pour la prospection SYNOLUVIA.

## Etat du projet

Lots deployes :

- Lot 0 : initialisation Laravel / Vue / Inertia.
- Lot 1 : migrations et modeles CRM.
- Lot 2 : import Excel.
- Lot 3 : tableau de bord.
- Lot 4 : liste prospects.
- Lot 5 : fiche prospect.
- Lots 6 et 7 : creation/modification prospects et interactions.
- Lots 8 et 9 : notes internes et relances.
- Lots 10 et 11 : modeles e-mail, fichiers, parametres et logs.
- Lot 12 : preparation production OVH.

## Installation locale VM Linux

```bash
cd ~/programme/crm
composer install
npm install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
npm run dev
```

Dans un second terminal :

```bash
cd ~/programme/crm
php artisan serve
```

Acces local :

```text
http://127.0.0.1:8000
```

Compte de test :

```text
admin@synoluvia.local
password
```

## Import Excel

Le fichier Excel doit etre place dans :

```text
storage/app/imports/crm_synoluvia.xlsx
```

Dry-run :

```bash
php artisan crm:import-excel storage/app/imports/crm_synoluvia.xlsx --dry-run
```

Import reel :

```bash
php artisan crm:import-excel storage/app/imports/crm_synoluvia.xlsx
```

## Preparation OVH

Le deploiement cible est :

```text
programme/crm
```

Le domaine ou sous-domaine doit pointer vers :

```text
programme/crm/public
```

Documents utiles :

```text
docs/DEPLOIEMENT_OVH.md
docs/SAUVEGARDE_MYSQL_OVH.md
docs/CHECKLIST_PRODUCTION.md
.env.production.example
```

Page de controle admin :

```text
/production-ovh
```

Commandes production courantes :

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

Build front :

```bash
npm ci
npm run build
```

## Tests

```bash
php artisan test
npm run build
```
