chore: migrate from npm to pnpm for package management across documentation and scripts
This commit is contained in:
@@ -6,7 +6,7 @@ Source lives in `src/`, with Next.js routes under `src/app` (UI) and API handler
|
|||||||
|
|
||||||
## Build, Test & Operational Commands
|
## Build, Test & Operational Commands
|
||||||
|
|
||||||
Start local development with `npm run dev` (Turbopack). Build production artifacts using `npm run build` and serve them via `npm run start`. Lint and type-check with `npm run lint`; run formatting verification through `npm run prettier:check` or fix issues via `npm run prettier:format`. Operational validations include `npm run backup:list`, `npm run backup:verify`, and cache utilities such as `npm run cache:stats`.
|
Start local development with `pnpm run dev` (Turbopack). Build production artifacts using `pnpm run build` and serve them via `pnpm run start`. Lint and type-check with `pnpm run lint`; run formatting verification through `pnpm run prettier:check` or fix issues via `pnpm run prettier:format`. Operational validations include `pnpm run backup:list`, `pnpm run backup:verify`, and cache utilities such as `pnpm run cache:stats`.
|
||||||
|
|
||||||
## Coding Style & Naming
|
## Coding Style & Naming
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ All theming goes through CSS variables defined in `src/app/globals.css` and appl
|
|||||||
|
|
||||||
## Testing & Verification
|
## Testing & Verification
|
||||||
|
|
||||||
Today’s automated coverage relies on linting plus targeted scripts (e.g., `npm run test:story-points`, `npm run test:jira-fields`). When adding data flows or schedulers, contribute new headless scripts under `scripts/` and document manual QA steps in PRs. Name fixtures after the feature they back (`backlog-config.json`) and ensure linting passes before review.
|
Today's automated coverage relies on linting plus targeted scripts (e.g., `pnpm run test:story-points`, `pnpm run test:jira-fields`). When adding data flows or schedulers, contribute new headless scripts under `scripts/` and document manual QA steps in PRs. Name fixtures after the feature they back (`backlog-config.json`) and ensure linting passes before review.
|
||||||
|
|
||||||
## TODO Tracking & Workflow
|
## TODO Tracking & Workflow
|
||||||
|
|
||||||
|
|||||||
56
BACKUP.md
56
BACKUP.md
@@ -40,16 +40,16 @@ TowerControl dispose d'un système de sauvegarde automatique et manuel complet p
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Voir la configuration actuelle
|
# Voir la configuration actuelle
|
||||||
npm run backup:config
|
pnpm run backup:config
|
||||||
|
|
||||||
# Modifier la fréquence
|
# Modifier la fréquence
|
||||||
tsx scripts/backup-manager.ts config-set interval=daily
|
pnpm tsx scripts/backup-manager.ts config-set interval=daily
|
||||||
|
|
||||||
# Modifier le nombre max de sauvegardes
|
# Modifier le nombre max de sauvegardes
|
||||||
tsx scripts/backup-manager.ts config-set maxBackups=10
|
pnpm tsx scripts/backup-manager.ts config-set maxBackups=10
|
||||||
|
|
||||||
# Activer/désactiver la compression
|
# Activer/désactiver la compression
|
||||||
tsx scripts/backup-manager.ts config-set compression=true
|
pnpm tsx scripts/backup-manager.ts config-set compression=true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Personnalisation du dossier de sauvegarde
|
### Personnalisation du dossier de sauvegarde
|
||||||
@@ -59,10 +59,10 @@ tsx scripts/backup-manager.ts config-set compression=true
|
|||||||
BACKUP_STORAGE_PATH="./custom-backups"
|
BACKUP_STORAGE_PATH="./custom-backups"
|
||||||
|
|
||||||
# Via variable temporaire (une seule fois)
|
# Via variable temporaire (une seule fois)
|
||||||
BACKUP_STORAGE_PATH="./my-backups" npm run backup:create
|
BACKUP_STORAGE_PATH="./my-backups" pnpm run backup:create
|
||||||
|
|
||||||
# Exemple avec un chemin absolu
|
# Exemple avec un chemin absolu
|
||||||
BACKUP_STORAGE_PATH="/var/backups/towercontrol" npm run backup:create
|
BACKUP_STORAGE_PATH="/var/backups/towercontrol" pnpm run backup:create
|
||||||
```
|
```
|
||||||
|
|
||||||
## Utilisation
|
## Utilisation
|
||||||
@@ -87,29 +87,29 @@ BACKUP_STORAGE_PATH="/var/backups/towercontrol" npm run backup:create
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Créer une sauvegarde immédiate
|
# Créer une sauvegarde immédiate
|
||||||
npm run backup:create
|
pnpm run backup:create
|
||||||
|
|
||||||
# Lister toutes les sauvegardes
|
# Lister toutes les sauvegardes
|
||||||
npm run backup:list
|
pnpm run backup:list
|
||||||
|
|
||||||
# Vérifier l'intégrité de la base
|
# Vérifier l'intégrité de la base
|
||||||
npm run backup:verify
|
pnpm run backup:verify
|
||||||
|
|
||||||
# Voir la configuration
|
# Voir la configuration
|
||||||
npm run backup:config
|
pnpm run backup:config
|
||||||
|
|
||||||
# Démarrer le planificateur
|
# Démarrer le planificateur
|
||||||
npm run backup:start
|
pnpm run backup:start
|
||||||
|
|
||||||
# Arrêter le planificateur
|
# Arrêter le planificateur
|
||||||
npm run backup:stop
|
pnpm run backup:stop
|
||||||
|
|
||||||
# Statut du planificateur
|
# Statut du planificateur
|
||||||
npm run backup:status
|
pnpm run backup:status
|
||||||
|
|
||||||
# Commandes avancées (tsx requis)
|
# Commandes avancées (pnpm tsx requis)
|
||||||
tsx scripts/backup-manager.ts delete <filename>
|
pnpm tsx scripts/backup-manager.ts delete <filename>
|
||||||
tsx scripts/backup-manager.ts restore <filename> --force
|
pnpm tsx scripts/backup-manager.ts restore <filename> --force
|
||||||
```
|
```
|
||||||
|
|
||||||
## Planificateur automatique
|
## Planificateur automatique
|
||||||
@@ -130,13 +130,13 @@ En production, le planificateur démarre automatiquement 30 secondes après le l
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Démarrer manuellement
|
# Démarrer manuellement
|
||||||
npm run backup:start
|
pnpm run backup:start
|
||||||
|
|
||||||
# Arrêter
|
# Arrêter
|
||||||
npm run backup:stop
|
pnpm run backup:stop
|
||||||
|
|
||||||
# Voir le statut
|
# Voir le statut
|
||||||
npm run backup:status
|
pnpm run backup:status
|
||||||
```
|
```
|
||||||
|
|
||||||
## Fichiers de sauvegarde
|
## Fichiers de sauvegarde
|
||||||
@@ -184,10 +184,10 @@ Chaque sauvegarde contient :
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Restaurer avec confirmation
|
# Restaurer avec confirmation
|
||||||
tsx scripts/backup-manager.ts restore towercontrol_2025-01-15T10-30-00-000Z.db.gz
|
pnpm tsx scripts/backup-manager.ts restore towercontrol_2025-01-15T10-30-00-000Z.db.gz
|
||||||
|
|
||||||
# Restaurer en forçant (sans confirmation)
|
# Restaurer en forçant (sans confirmation)
|
||||||
tsx scripts/backup-manager.ts restore towercontrol_2025-01-15T10-30-00-000Z.db.gz --force
|
pnpm tsx scripts/backup-manager.ts restore towercontrol_2025-01-15T10-30-00-000Z.db.gz --force
|
||||||
```
|
```
|
||||||
|
|
||||||
## Vérification d'intégrité
|
## Vérification d'intégrité
|
||||||
@@ -202,11 +202,11 @@ tsx scripts/backup-manager.ts restore towercontrol_2025-01-15T10-30-00-000Z.db.g
|
|||||||
### Commandes
|
### Commandes
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Via npm script
|
# Via pnpm script
|
||||||
npm run backup:verify
|
pnpm run backup:verify
|
||||||
|
|
||||||
# Via CLI complet
|
# Via CLI complet
|
||||||
tsx scripts/backup-manager.ts verify
|
pnpm tsx scripts/backup-manager.ts verify
|
||||||
```
|
```
|
||||||
|
|
||||||
### Vérifications effectuées
|
### Vérifications effectuées
|
||||||
@@ -226,10 +226,10 @@ Le système supprime automatiquement les anciennes sauvegardes selon `maxBackups
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Supprimer une sauvegarde spécifique
|
# Supprimer une sauvegarde spécifique
|
||||||
tsx scripts/backup-manager.ts delete towercontrol_2025-01-15T10-30-00-000Z.db.gz
|
pnpm tsx scripts/backup-manager.ts delete towercontrol_2025-01-15T10-30-00-000Z.db.gz
|
||||||
|
|
||||||
# Forcer la suppression
|
# Forcer la suppression
|
||||||
tsx scripts/backup-manager.ts delete towercontrol_2025-01-15T10-30-00-000Z.db.gz --force
|
pnpm tsx scripts/backup-manager.ts delete towercontrol_2025-01-15T10-30-00-000Z.db.gz --force
|
||||||
```
|
```
|
||||||
|
|
||||||
### Surveillance des logs
|
### Surveillance des logs
|
||||||
@@ -267,8 +267,8 @@ chmod 755 backups/
|
|||||||
df -h
|
df -h
|
||||||
|
|
||||||
# Supprimer d'anciennes sauvegardes
|
# Supprimer d'anciennes sauvegardes
|
||||||
tsx scripts/backup-manager.ts list
|
pnpm tsx scripts/backup-manager.ts list
|
||||||
tsx scripts/backup-manager.ts delete <filename>
|
pnpm tsx scripts/backup-manager.ts delete <filename>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Logs de debug
|
### Logs de debug
|
||||||
|
|||||||
12
DOCKER.md
12
DOCKER.md
@@ -94,10 +94,10 @@ docker-compose down -v --rmi all
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Sauvegarder les données
|
# Sauvegarder les données
|
||||||
docker-compose exec towercontrol npm run backup:create
|
docker-compose exec towercontrol pnpm run backup:create
|
||||||
|
|
||||||
# Lister les sauvegardes
|
# Lister les sauvegardes
|
||||||
docker-compose exec towercontrol npm run backup:list
|
docker-compose exec towercontrol pnpm run backup:list
|
||||||
|
|
||||||
# Accéder au shell du conteneur
|
# Accéder au shell du conteneur
|
||||||
docker-compose exec towercontrol sh
|
docker-compose exec towercontrol sh
|
||||||
@@ -107,13 +107,13 @@ docker-compose exec towercontrol sh
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Migrations Prisma
|
# Migrations Prisma
|
||||||
docker-compose exec towercontrol npx prisma migrate deploy
|
docker-compose exec towercontrol pnpm prisma migrate deploy
|
||||||
|
|
||||||
# Reset de la base (dev uniquement)
|
# Reset de la base (dev uniquement)
|
||||||
docker-compose exec towercontrol-dev npx prisma migrate reset
|
docker-compose exec towercontrol-dev pnpm prisma migrate reset
|
||||||
|
|
||||||
# Studio Prisma (dev)
|
# Studio Prisma (dev)
|
||||||
docker-compose exec towercontrol-dev npx prisma studio
|
docker-compose exec towercontrol-dev pnpm prisma studio
|
||||||
```
|
```
|
||||||
|
|
||||||
## 🔍 Debugging
|
## 🔍 Debugging
|
||||||
@@ -155,7 +155,7 @@ kill -9 <PID>
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Restaurer depuis une sauvegarde
|
# Restaurer depuis une sauvegarde
|
||||||
docker-compose exec towercontrol npm run backup:restore filename.db.gz
|
docker-compose exec towercontrol pnpm run backup:restore filename.db.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
**Permissions**
|
**Permissions**
|
||||||
|
|||||||
23
Dockerfile
23
Dockerfile
@@ -1,6 +1,11 @@
|
|||||||
# Multi-stage Dockerfile for Next.js with Prisma
|
# Multi-stage Dockerfile for Next.js with Prisma
|
||||||
FROM node:20-alpine AS base
|
FROM node:20-alpine AS base
|
||||||
|
|
||||||
|
# Install pnpm
|
||||||
|
ENV PNPM_HOME="/pnpm"
|
||||||
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
RUN corepack enable
|
||||||
|
|
||||||
# Install dependencies only when needed
|
# Install dependencies only when needed
|
||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||||
@@ -8,9 +13,9 @@ RUN apk add --no-cache libc6-compat
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install dependencies based on the preferred package manager
|
# Install dependencies based on the preferred package manager
|
||||||
COPY package.json package-lock.json* ./
|
COPY package.json pnpm-lock.yaml* ./
|
||||||
RUN \
|
RUN \
|
||||||
if [ -f package-lock.json ]; then npm install --legacy-peer-deps; \
|
if [ -f pnpm-lock.yaml ]; then pnpm install --frozen-lockfile; \
|
||||||
else echo "Lockfile not found." && exit 1; \
|
else echo "Lockfile not found." && exit 1; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -24,13 +29,13 @@ COPY . .
|
|||||||
ENV DATABASE_URL="file:/tmp/build.db"
|
ENV DATABASE_URL="file:/tmp/build.db"
|
||||||
|
|
||||||
# Generate Prisma client
|
# Generate Prisma client
|
||||||
RUN npx prisma generate
|
RUN pnpm prisma generate
|
||||||
|
|
||||||
# Initialize the database schema for build time
|
# Initialize the database schema for build time
|
||||||
RUN npx prisma migrate deploy || npx prisma db push
|
RUN pnpm prisma migrate deploy || pnpm prisma db push
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
RUN npm run build
|
RUN pnpm run build
|
||||||
|
|
||||||
# Production image, copy all the files and run next
|
# Production image, copy all the files and run next
|
||||||
FROM base AS runner
|
FROM base AS runner
|
||||||
@@ -60,9 +65,11 @@ RUN chown nextjs:nodejs .next
|
|||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||||
|
|
||||||
# Copy Prisma files
|
# Copy Prisma schema
|
||||||
COPY --from=builder /app/prisma ./prisma
|
COPY --from=builder /app/prisma ./prisma
|
||||||
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
|
||||||
|
# Copy pnpm node_modules (includes .pnpm store with Prisma client)
|
||||||
|
COPY --from=builder /app/node_modules ./node_modules
|
||||||
|
|
||||||
# Create data directory for SQLite and backups
|
# Create data directory for SQLite and backups
|
||||||
RUN mkdir -p /app/data/backups && chown -R nextjs:nodejs /app/data
|
RUN mkdir -p /app/data/backups && chown -R nextjs:nodejs /app/data
|
||||||
@@ -77,4 +84,4 @@ USER nextjs
|
|||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Start the application with database migration
|
# Start the application with database migration
|
||||||
CMD ["sh", "-c", "npx prisma migrate deploy && node server.js"]
|
CMD ["sh", "-c", "pnpm prisma migrate deploy && node server.js"]
|
||||||
|
|||||||
157
PNPM_MIGRATION.md
Normal file
157
PNPM_MIGRATION.md
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
# Migration vers pnpm
|
||||||
|
|
||||||
|
## ✅ Changements effectués
|
||||||
|
|
||||||
|
### 1. Nettoyage npm
|
||||||
|
|
||||||
|
- ✅ Suppression de `node_modules/`
|
||||||
|
- ✅ Suppression de `package-lock.json`
|
||||||
|
|
||||||
|
### 2. Installation pnpm
|
||||||
|
|
||||||
|
- ✅ Installation des dépendances avec `pnpm install`
|
||||||
|
- ✅ Création de `pnpm-lock.yaml`
|
||||||
|
- ✅ Ajout de `tailwindcss` comme dépendance dev explicite (requis par pnpm)
|
||||||
|
|
||||||
|
### 3. Configuration
|
||||||
|
|
||||||
|
- ✅ Création de `.npmrc` avec :
|
||||||
|
- `enable-pre-post-scripts=true`
|
||||||
|
- `auto-install-peers=true`
|
||||||
|
- ✅ Rebuild des packages critiques : `@prisma/client`, `prisma`, `esbuild`, `sharp`, `@tailwindcss/oxide`
|
||||||
|
|
||||||
|
### 4. Scripts package.json
|
||||||
|
|
||||||
|
- ✅ Remplacement de tous les `npx` par `pnpm` dans les scripts
|
||||||
|
- Scripts modifiés :
|
||||||
|
- `backup:*` (create, list, verify, config, start, stop, status)
|
||||||
|
- `cache:*` (monitor, stats, cleanup, clear)
|
||||||
|
- `test:*` (story-points, jira-fields)
|
||||||
|
|
||||||
|
### 5. Dockerfile
|
||||||
|
|
||||||
|
- ✅ Installation de pnpm via `corepack enable`
|
||||||
|
- ✅ Variables d'environnement `PNPM_HOME` et `PATH`
|
||||||
|
- ✅ Remplacement de `package-lock.json` par `pnpm-lock.yaml`
|
||||||
|
- ✅ Remplacement de `npm install` par `pnpm install --frozen-lockfile`
|
||||||
|
- ✅ Remplacement de tous les `npx`/`npm` par `pnpm`
|
||||||
|
|
||||||
|
### 6. docker-compose.yml
|
||||||
|
|
||||||
|
- ✅ Mise à jour du service `towercontrol-dev` pour utiliser pnpm
|
||||||
|
|
||||||
|
### 7. Documentation
|
||||||
|
|
||||||
|
- ✅ Mise à jour de `README.md` :
|
||||||
|
- Prérequis : `pnpm 9+` au lieu de `npm` ou `yarn`
|
||||||
|
- Toutes les commandes d'installation et d'utilisation
|
||||||
|
- Scripts disponibles
|
||||||
|
|
||||||
|
## 🧪 Tests effectués
|
||||||
|
|
||||||
|
- ✅ `pnpm install` - Installation réussie
|
||||||
|
- ✅ `pnpm prisma generate` - Génération du client Prisma OK
|
||||||
|
- ✅ `pnpm run lint` - Linting réussi
|
||||||
|
- ✅ `pnpm run build` - Build de production réussi
|
||||||
|
|
||||||
|
## 📦 Nouvelles dépendances ajoutées
|
||||||
|
|
||||||
|
- `tailwindcss` (devDependencies) - Requis explicitement pour l'import CSS avec pnpm
|
||||||
|
|
||||||
|
## ⚠️ Points d'attention
|
||||||
|
|
||||||
|
### Warning workspace root
|
||||||
|
|
||||||
|
Un warning apparaît lors du build :
|
||||||
|
|
||||||
|
```
|
||||||
|
Warning: Next.js inferred your workspace root, but it may not be correct.
|
||||||
|
We detected multiple lockfiles and selected the directory of /Users/julien.froidefond/package-lock.json
|
||||||
|
```
|
||||||
|
|
||||||
|
**Cause** : Un `package-lock.json` existe dans `/Users/julien.froidefond/`
|
||||||
|
|
||||||
|
**Solutions** :
|
||||||
|
|
||||||
|
1. Supprimer le lockfile parent si inutilisé
|
||||||
|
2. Ou ajouter dans `next.config.ts` :
|
||||||
|
```typescript
|
||||||
|
turbopack: {
|
||||||
|
root: process.cwd(),
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Peer dependency warning
|
||||||
|
|
||||||
|
```
|
||||||
|
@emoji-mart/react 1.1.1 requires peer react@"^16.8 || ^17 || ^18" but found 19.1.0
|
||||||
|
```
|
||||||
|
|
||||||
|
**Impact** : Aucun pour le moment, le projet fonctionne avec React 19
|
||||||
|
**Action** : À surveiller lors des mises à jour de `@emoji-mart/react`
|
||||||
|
|
||||||
|
## 🚀 Commandes usuelles
|
||||||
|
|
||||||
|
### Développement
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm install # Installer les dépendances
|
||||||
|
pnpm run dev # Mode développement
|
||||||
|
pnpm run build # Build de production
|
||||||
|
pnpm run start # Démarrer en production
|
||||||
|
```
|
||||||
|
|
||||||
|
### Base de données
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm prisma studio # Interface graphique
|
||||||
|
pnpm prisma generate # Regénérer le client
|
||||||
|
pnpm prisma db push # Appliquer le schéma
|
||||||
|
```
|
||||||
|
|
||||||
|
### Qualité
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm run lint # ESLint
|
||||||
|
pnpm run prettier:format # Formatter
|
||||||
|
pnpm run prettier:check # Vérifier le formatage
|
||||||
|
```
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose up -d # Production (port 3006)
|
||||||
|
docker compose --profile dev up -d # Développement (port 3005)
|
||||||
|
docker compose down # Arrêter
|
||||||
|
docker compose build --no-cache # Rebuild complet
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📝 Avantages de pnpm
|
||||||
|
|
||||||
|
1. **Performance** : Installation plus rapide (liens symboliques)
|
||||||
|
2. **Espace disque** : Économie grâce au store global
|
||||||
|
3. **Sécurité** : Structure node_modules stricte (pas d'accès aux dépendances non déclarées)
|
||||||
|
4. **Monorepo** : Support natif des workspaces
|
||||||
|
5. **Déterminisme** : Lockfile plus fiable
|
||||||
|
|
||||||
|
## 🔄 Rollback vers npm
|
||||||
|
|
||||||
|
Si besoin de revenir à npm :
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Supprimer pnpm
|
||||||
|
rm -rf node_modules pnpm-lock.yaml .npmrc
|
||||||
|
|
||||||
|
# Restaurer les anciens scripts dans package.json
|
||||||
|
# Restaurer l'ancien Dockerfile
|
||||||
|
# Restaurer l'ancien docker-compose.yml
|
||||||
|
|
||||||
|
# Réinstaller avec npm
|
||||||
|
npm install --legacy-peer-deps
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Date de migration** : 16 octobre 2025
|
||||||
|
**Version pnpm** : 10.15.1
|
||||||
|
**Version Node** : 20
|
||||||
32
README.md
32
README.md
@@ -81,7 +81,7 @@ TowerControl est un gestionnaire de tâches **standalone** conçu pour les déve
|
|||||||
### Prérequis
|
### Prérequis
|
||||||
|
|
||||||
- **Node.js** 18+
|
- **Node.js** 18+
|
||||||
- **npm** ou **yarn**
|
- **pnpm** 9+
|
||||||
|
|
||||||
### Installation locale
|
### Installation locale
|
||||||
|
|
||||||
@@ -91,17 +91,17 @@ git clone https://github.com/votre-repo/towercontrol.git
|
|||||||
cd towercontrol
|
cd towercontrol
|
||||||
|
|
||||||
# Installer les dépendances
|
# Installer les dépendances
|
||||||
npm install
|
pnpm install
|
||||||
|
|
||||||
# Configurer la base de données
|
# Configurer la base de données
|
||||||
npx prisma generate
|
pnpm prisma generate
|
||||||
npx prisma db push
|
pnpm prisma db push
|
||||||
|
|
||||||
# (Optionnel) Ajouter des données de test
|
# (Optionnel) Ajouter des données de test
|
||||||
npm run seed
|
pnpm run seed
|
||||||
|
|
||||||
# Démarrer en développement
|
# Démarrer en développement
|
||||||
npm run dev
|
pnpm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
L'application sera accessible sur **http://localhost:3000**
|
L'application sera accessible sur **http://localhost:3000**
|
||||||
@@ -273,22 +273,22 @@ towercontrol/
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Développement
|
# Développement
|
||||||
npm run dev # Démarrer en mode dev avec Turbopack
|
pnpm run dev # Démarrer en mode dev avec Turbopack
|
||||||
npm run build # Build de production
|
pnpm run build # Build de production
|
||||||
npm run start # Démarrer en production
|
pnpm run start # Démarrer en production
|
||||||
|
|
||||||
# Base de données
|
# Base de données
|
||||||
npx prisma studio # Interface graphique BDD
|
pnpm prisma studio # Interface graphique BDD
|
||||||
npx prisma generate # Regénérer le client Prisma
|
pnpm prisma generate # Regénérer le client Prisma
|
||||||
npx prisma db push # Appliquer le schema à la BDD
|
pnpm prisma db push # Appliquer le schema à la BDD
|
||||||
npx prisma migrate dev # Créer une migration
|
pnpm prisma migrate dev # Créer une migration
|
||||||
|
|
||||||
# Qualité de code
|
# Qualité de code
|
||||||
npm run lint # ESLint + Prettier
|
pnpm run lint # ESLint + Prettier
|
||||||
npx tsc --noEmit # Vérification TypeScript
|
pnpm tsc --noEmit # Vérification TypeScript
|
||||||
|
|
||||||
# Scripts utilitaires
|
# Scripts utilitaires
|
||||||
npm run seed # Ajouter des données de test
|
pnpm run seed # Ajouter des données de test
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -64,16 +64,16 @@ BACKUP_STORAGE_PATH="./data/backups"
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Créer une sauvegarde manuelle
|
# Créer une sauvegarde manuelle
|
||||||
npm run backup:create
|
pnpm run backup:create
|
||||||
|
|
||||||
# Lister les sauvegardes
|
# Lister les sauvegardes
|
||||||
npm run backup:list
|
pnpm run backup:list
|
||||||
|
|
||||||
# Voir la configuration
|
# Voir la configuration
|
||||||
npm run backup:config
|
pnpm run backup:config
|
||||||
|
|
||||||
# Restaurer une sauvegarde (dev uniquement)
|
# Restaurer une sauvegarde (dev uniquement)
|
||||||
npm run backup:restore filename.db.gz
|
pnpm run backup:restore filename.db.gz
|
||||||
```
|
```
|
||||||
|
|
||||||
## ⚠️ Important
|
## ⚠️ Important
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ services:
|
|||||||
- /app/.next
|
- /app/.next
|
||||||
- ./data:/app/data # Dossier local data/ vers /app/data
|
- ./data:/app/data # Dossier local data/ vers /app/data
|
||||||
command: >
|
command: >
|
||||||
sh -c "npm install &&
|
sh -c "pnpm install &&
|
||||||
npx prisma generate &&
|
pnpm prisma generate &&
|
||||||
npx prisma migrate deploy &&
|
pnpm prisma migrate deploy &&
|
||||||
npm run dev"
|
pnpm run dev"
|
||||||
profiles:
|
profiles:
|
||||||
- dev
|
- dev
|
||||||
# 📁 Structure des données :
|
# 📁 Structure des données :
|
||||||
|
|||||||
11566
package-lock.json
generated
11566
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
27
package.json
27
package.json
@@ -7,19 +7,19 @@
|
|||||||
"build": "next build --turbopack",
|
"build": "next build --turbopack",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"backup:create": "npx tsx scripts/backup-manager.ts create",
|
"backup:create": "pnpm tsx scripts/backup-manager.ts create",
|
||||||
"backup:list": "npx tsx scripts/backup-manager.ts list",
|
"backup:list": "pnpm tsx scripts/backup-manager.ts list",
|
||||||
"backup:verify": "npx tsx scripts/backup-manager.ts verify",
|
"backup:verify": "pnpm tsx scripts/backup-manager.ts verify",
|
||||||
"backup:config": "npx tsx scripts/backup-manager.ts config",
|
"backup:config": "pnpm tsx scripts/backup-manager.ts config",
|
||||||
"backup:start": "npx tsx scripts/backup-manager.ts scheduler-start",
|
"backup:start": "pnpm tsx scripts/backup-manager.ts scheduler-start",
|
||||||
"backup:stop": "npx tsx scripts/backup-manager.ts scheduler-stop",
|
"backup:stop": "pnpm tsx scripts/backup-manager.ts scheduler-stop",
|
||||||
"backup:status": "npx tsx scripts/backup-manager.ts scheduler-status",
|
"backup:status": "pnpm tsx scripts/backup-manager.ts scheduler-status",
|
||||||
"cache:monitor": "npx tsx scripts/cache-monitor.ts",
|
"cache:monitor": "pnpm tsx scripts/cache-monitor.ts",
|
||||||
"cache:stats": "npx tsx scripts/cache-monitor.ts stats",
|
"cache:stats": "pnpm tsx scripts/cache-monitor.ts stats",
|
||||||
"cache:cleanup": "npx tsx scripts/cache-monitor.ts cleanup",
|
"cache:cleanup": "pnpm tsx scripts/cache-monitor.ts cleanup",
|
||||||
"cache:clear": "npx tsx scripts/cache-monitor.ts clear",
|
"cache:clear": "pnpm tsx scripts/cache-monitor.ts clear",
|
||||||
"test:story-points": "npx tsx scripts/test-story-points.ts",
|
"test:story-points": "pnpm tsx scripts/test-story-points.ts",
|
||||||
"test:jira-fields": "npx tsx scripts/test-jira-fields.ts",
|
"test:jira-fields": "pnpm tsx scripts/test-jira-fields.ts",
|
||||||
"prettier:format": "prettier --write .",
|
"prettier:format": "prettier --write .",
|
||||||
"prettier:check": "prettier --check .",
|
"prettier:check": "prettier --check .",
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
"knip": "^5.64.0",
|
"knip": "^5.64.0",
|
||||||
"lint-staged": "^15.5.2",
|
"lint-staged": "^15.5.2",
|
||||||
"prettier": "^3.6.2",
|
"prettier": "^3.6.2",
|
||||||
|
"tailwindcss": "^4.1.14",
|
||||||
"tsx": "^4.19.2",
|
"tsx": "^4.19.2",
|
||||||
"typescript": "^5"
|
"typescript": "^5"
|
||||||
},
|
},
|
||||||
|
|||||||
7277
pnpm-lock.yaml
generated
Normal file
7277
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user