provapraticafrontend/README.md
AV77web 59e7343598
All checks were successful
Deploy to VPS / build (push) Successful in 18s
Deploy to VPS / deploy (push) Successful in 13s
messaggi di conferma su rimborsi, messaggio per accesso neagato e altro
2026-06-09 16:28:25 +02:00

61 lines
1.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Frontend Gestione Rimborsi Spese Aziendali (Prova S5)
Applicazione web CSR (React + Vite + TypeScript) per la gestione dei rimborsi spese.
## URL produzione
| Risorsa | URL |
|---------|-----|
| Applicazione | https://provapraticafrontend.andreavillari.it |
| API backend | https://provapraticabackend.andreavillari.it |
| Documentazione API (Swagger) | https://provapraticabackend.andreavillari.it/api/docs |
## Credenziali di test
Password comune: `Password123!`
| Ruolo | Email |
|-------|-------|
| Responsabile amministrativo | `admin@azienda.it` |
| Dipendente | `mario.rossi@azienda.it` |
| Dipendente | `marco.bianchi@azienda.it` |
| Dipendente | `anna.verdi@azienda.it` |
Dalla pagina **Registrati** è possibile creare nuovi account scegliendo il ruolo.
## Funzionalità
- Login / registrazione / logout
- Dashboard differenziata per ruolo
- Dipendente: creazione, elenco, filtri, modifica ed eliminazione richieste in attesa
- Responsabile: gestione di tutte le richieste, approvazione, rifiuto, liquidazione
- Statistiche aggregate per mese e categoria
## Avvio locale
Configurare il file `.env` (`VITE_API_URL` vuoto in sviluppo per usare il proxy Vite verso il backend locale).
```bash
npm install
npm run dev
```
Con `VITE_API_URL` vuoto, Vite inoltra le chiamate `/api` al backend su `http://localhost:3003`.
Build di produzione:
```bash
VITE_API_URL=https://provapraticabackend.andreavillari.it npm run build
```
Con Docker:
```bash
docker compose up -d --build
```
L'app è servita da nginx sulla porta `3002`.
## Deploy
Push su `main` → Forgejo Actions → SSH sul VPS → `docker compose up -d --build` in `/root/provapraticafrontend`.