# Project Overview — L'Ami Fiduciaire

> Generated: 2026-03-08 | Scan Level: Quick

## Purpose

L'Ami Fiduciaire is a web-based client management platform designed for fiduciary and accounting firms. It enables firms to manage their client base, organize document folders (dossiers), exchange files and messages with external clients, and handle multi-workspace operations with role-based access control.

## Key Features

- **Multi-Tenant Workspaces** — Firms can operate multiple workspaces, each with its own set of clients, folders, and users. Users switch between workspaces seamlessly.
- **Client Management** — Full CRUD for clients with status tracking, legal form classification, and assignment of responsable/suivi contacts.
- **Folder/Dossier System** — Create and manage folders with priority levels, status tracking, type categorization, and confirmation workflows.
- **Client Portal** — External clients receive email invitations with secure token-based links to upload files, confirm folders, or refuse actions — no account required.
- **Document Exchange** — File upload/download via Spatie Media Library with folder-scoped media management.
- **Messaging** — In-folder messaging system for communication between firm users and clients.
- **Email Notifications** — Automated email system for folder invitations, file requests, confirmations, status updates, and messages.
- **Two-Factor Authentication** — TOTP-based 2FA via Laravel Fortify for enhanced account security.
- **Activity Logging** — Audit trail via Spatie Activity Log for tracking user actions.
- **Admin Panel** — Admin-only user and workspace management.

## Tech Stack Summary

| Layer | Technology |
|-------|-----------|
| Backend | Laravel 12 (PHP 8.4) |
| Frontend | Vue 3 + TypeScript + Inertia.js v2 |
| Styling | Tailwind CSS 4 + shadcn-vue |
| Database | MySQL 8.4 |
| Auth | Laravel Fortify (2FA support) |
| Build | Vite 7 |
| DevOps | Docker/Sail + GitHub Actions |

## Architecture

- **Type:** Full-Stack Monolith
- **Pattern:** Server-Driven SPA (Inertia.js)
- **Repository:** Single repository (monolith)

Controllers render Vue pages via Inertia.js, eliminating the need for a traditional REST API. Laravel Wayfinder generates TypeScript route functions for type-safe frontend navigation.

## Domain Model

```
Workspace ←→ User (many-to-many via WorkspaceUser with roles)
    │
    └── Client (belongs to workspace)
          │
          └── Folder (belongs to client)
                ├── Message (folder messages)
                ├── Media (file attachments via Spatie)
                └── FolderInvitation (token-based external access)
```
