Skip to content

Structure du Projet (PP Tree)

Date : 2026-09-06
Approche : Monorepo avec Trunk-based Development
Environnements : dev, prod


/home/anderson/PP/
├── apps/
│ ├── web/ # Projet Astro (amn-astro)
│ │ ├── src/
│ │ ├── public/
│ │ ├── astro.config.mjs
│ │ └── package.json
│ └── studio/ # Projet Sanity (amn)
│ ├── schemas/
│ ├── studio/
│ └── package.json
├── services/ # Workers Cloudflare
│ ├── middleware/
│ │ ├── src/
│ │ ├── wrangler.toml
│ │ └── package.json
│ ├── form-handler/
│ ├── cms-webhook-receiver/
│ ├── media-upload/
│ ├── media-cleanup/
│ └── sanity-backup/
├── docs/ # Documentation
│ ├── L1_Contenu/
│ │ ├── sanity/
│ │ ├── astro/
│ │ └── cloudflare/
│ ├── L2_Presentation/
│ │ ├── astro/
│ │ └── pagefind/
│ └── L3_Backend/
│ └── cloudflare/
├── GettingStarted/ # Guides
│ ├── Sprint0-Setup-Initial.TODO.md
│ ├── Sprint0-Setup-Initial.DONE.md
│ ├── Day1-Setup-Local.md
│ └── outputs-for-wrangler-toml-config.md
├── .github/ # CI/CD
│ ├── workflows/
│ │ ├── ci.yml
│ │ ├── deploy-dev.yml
│ │ └── deploy-prod.yml
│ └── pull_request_template.md
├── wrangler.toml # Configuration Wrangler globale
├── package.json # Root package.json (scripts monorepo)
├── .env.example # Variables d'environnement
└── .gitignore

/home/anderson/PP/
├── amn/ # Projet Sanity
├── amn-astro/ # Projet Astro
├── docs/ # Documentation
├── .wrangler/ # Configuration Wrangler
├── GettingStarted/ # Guides
├── Templates/ # Templates (ancien)
├── .github/ # CI/CD
├── wrangler.toml # Configuration Wrangler (créé)
└── .env.example # Variables d'environnement (créé)

  1. Créer la structure monorepo

    • Créer apps/
    • Déplacer amn-astro/ → apps/web/
    • Déplacer amn/ → apps/studio/
    • Créer services/ (pour les futurs Workers)
  2. Nettoyer

    • Supprimer Templates/ (ancien)
    • Supprimer .wrangler/ (configuration locale, non nécessaire)
  3. Créer le root package.json

    • Scripts pour le monorepo
    • Workspaces npm

{
"name": "pp-monorepo",
"version": "1.0.0",
"private": true,
"workspaces": [
"apps/*",
"services/*"
],
"scripts": {
"dev": "npm run dev --workspace=apps/web",
"dev:studio": "npm run dev --workspace=apps/studio",
"build": "npm run build --workspace=apps/web",
"build:studio": "npm run build --workspace=apps/studio",
"test": "npm run test --workspaces",
"lint": "npm run lint --workspaces",
"typecheck": "npm run typecheck --workspaces"
},
"devDependencies": {
"@types/node": "^20.0.0",
"typescript": "^5.0.0"
}
}

  • Monorepo : Gestion unifiée des dépendances
  • Workspaces npm : Partage des dépendances
  • Séparation claire : apps vs services
  • Scalabilité : Facile d’ajouter de nouveaux services
  • CI/CD simplifié : Un seul repository