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 ```bash
# npm
npm install npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun install
``` ```
## Development Server ## Développement
Start the development server on `http://localhost:3000`:
```bash ```bash
# npm
npm run dev 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 ```bash
# npm npm run dev # Serveur de développement
npm run build npm run build # Build production
npm run lint:fix # Correction ESLint
# pnpm npx nuxi typecheck # Vérification TypeScript (0 erreurs attendu)
pnpm build npm run test # Tests unitaires Vitest
# yarn
yarn build
# bun
bun run build
``` ```
Locally preview production build: ## Structure
```bash ```
# npm app/
npm run preview ├── pages/ # Pages Nuxt (file-based routing)
├── components/ # Composants Vue (auto-imported)
# pnpm ├── composables/ # Composables Vue (auto-imported)
pnpm preview ├── shared/ # Types, utils, validation
│ └── utils/ # Utilitaires partagés
# yarn ├── middleware/ # Auth middleware global
yarn preview ├── services/ # Service layer (wrappers useApi)
└── utils/ # Utilitaires Nuxt
# bun
bun run preview
``` ```
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