docs(readme) : replace default Nuxt template with project documentation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-04 10:37:59 +01:00
parent c06c852493
commit 8f5f25b3e7

111
README.md
View File

@@ -1,75 +1,78 @@
# Nuxt Minimal Starter
# Inventory Frontend
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
Frontend de l'application de gestion d'inventaire industriel Malio.
## Setup
## Stack
Make sure to install dependencies:
| Tech | Version |
|------|---------|
| Nuxt | 4 (SPA, SSR off) |
| Vue | 3 Composition API |
| TypeScript | 5.7 |
| CSS | TailwindCSS 4 + DaisyUI 5 |
| Icônes | unplugin-icons (Lucide) |
| Tests | Vitest |
## Prérequis
- Node.js >= 20
- npm
- Backend Symfony démarré (API sur `http://localhost:8081/api`)
## Installation
```bash
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun install
```
## Development Server
Start the development server on `http://localhost:3000`:
## Développement
```bash
# npm
npm run dev
# pnpm
pnpm dev
# yarn
yarn dev
# bun
bun run dev
```
## Production
Le serveur de dev est accessible sur `http://localhost:3001`.
Build the application for production:
## Commandes
```bash
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
npm run dev # Serveur de développement
npm run build # Build production
npm run lint:fix # Correction ESLint
npx nuxi typecheck # Vérification TypeScript (0 erreurs attendu)
npm run test # Tests unitaires Vitest
```
Locally preview production build:
## Structure
```bash
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
```
app/
├── pages/ # Pages Nuxt (file-based routing)
├── components/ # Composants Vue (auto-imported)
├── composables/ # Composables Vue (auto-imported)
├── shared/ # Types, utils, validation
│ └── utils/ # Utilitaires partagés
├── middleware/ # Auth middleware global
├── services/ # Service layer (wrappers useApi)
└── utils/ # Utilitaires Nuxt
```
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
## Conventions
- **Composables** : `interface Deps { ... }` + `export function useXxx(deps: Deps)`
- **Communication** : Props + Events uniquement (pas de provide/inject)
- **API** : `useApi.ts` avec `credentials: 'include'` (auth session/cookie)
- **Content-Type** : `application/ld+json` pour POST/PUT, `application/merge-patch+json` pour PATCH
- **Auto-imports** : Nuxt auto-importe `components/` et `composables/`
## Auth
Authentification par session (cookies), pas de JWT. Le middleware global `profile.global.ts` protège les routes.
## Submodule
Ce repo est un submodule git du repo principal [Inventory](https://gitea.malio.fr/MALIO-DEV/Inventory). Workflow :
1. Commiter ici d'abord
2. Commiter dans le repo principal pour mettre à jour le pointeur submodule
3. Pousser les deux repos