Architecture - vue d'ensemble
Principe general
Nanoxi StarterKit v3 est un CMS maison bati sur Umbraco 7.15.10 (.NET Framework 4.8), en architecture hybride ASP.NET WebForms + MVC5 (heritage Umbraco 7). Un seul socle de code sert 30+ sites clients. Le code est organise en trois grandes couches :
- Base (
src/Nanoxi.Cms.Base/, ~35 projets) : le socle CMS commun a tous les clients. Compilee viaStarterKitv3_base.sln. Toujours buildee. - Shop (
src/Nanoxi.Cms.Shop/, ~28 projets) : la couche e-commerce uCommerce 8.4.1. Compilee viaStarterKitv3_shop.sln, uniquement si le client active le shop. - Custom (
src/Nanoxi.Cms.Custom/<Client>/) : l'implementation specifique d'un client. Une solutionStarterKitv3_<skin>.slnpar client.
Le build assemble ces couches dans le dossier website/ (racine ASP.NET WebForms), point de deploiement final.
Couches base / shop / custom
Base (Nanoxi.Cms.Base.*)
| Famille | Projets | Responsabilite |
|---|---|---|
App.Api | Nanoxi.Cms.Base.App.Api | Controllers API (UmbracoApiController) |
App.Mvc | Nanoxi.Cms.Base.App.Mvc | Controllers MVC, vues |
App.Handler | Nanoxi.Cms.Base.App.Handler | Handlers HTTP / evenements Umbraco |
App.Job | Nanoxi.Cms.Base.App.Job | Jobs Quartz.NET |
App.Mail / App.EmailMonitoring | ... | Envoi et monitoring d'emails |
App.Member.Data / App.Member.Mvc | ... | Espace membre / intranet |
App.I18n | ... | Dictionnaire / traductions |
App.Validation | ... | Validation |
App.License | ... | Verification de licence Nanoxi |
App.UrlRewriting / App.LinkChecker | ... | Reecriture d'URL, verification de liens |
App.Install / App.InstallPackages / App.Migrations | ... | Installation et migration du site |
App.Backoffice / App.Plugins / App.Tree | ... | Personnalisation backoffice Umbraco |
App.Ioc.Configuration / App.Ioc.Models | ... | Configuration IoC (Autofac) |
App.Aspose | ... | Generation documents (Aspose.Cells/Pdf/Email) |
Content.Data / Content.Search / Content.Widget / Content.Syndication / Content.Extension | ... | Coeur contenu : donnees, recherche Examine, widgets, RSS, extensions |
Contour.Providers / Forms.Security | ... | Umbraco Forms (ex-Contour) + securite |
Shop (Nanoxi.Cms.Shop.*)
| Projet | Responsabilite |
|---|---|
Shop.Api | Endpoints API shop (ex. ProductSynchroApiController) |
Shop.UCommerce / Shop.UCommerceWebForms | Integration uCommerce |
Shop.Module / Shop.Data | Logique metier + acces donnees shop |
Shop.Synchronization | Synchro catalogue (conteneur Castle Windsor) |
Shop.Shipping / Shop.Stock / Shop.TrackAndTrace | Livraison, stock, suivi |
Shop.Print / Shop.Export | Documents PDF, exports |
Shop.Member.Data / Shop.Member.Mvc | Comptes clients shop |
Shop.Widget / Shop.Mvc / Shop.WebForms | UI shop |
Shop.IedsUtil | Utilitaires specifiques au client IEDS |
Custom (Nanoxi.Cms.Custom.<Client>.*)
Un dossier par client (Cmveo, Ieds, Davidchoco, Biofruits, ...). Sous-structure typique : Data, Mvc, Shop. Chaque client a sa propre solution StarterKitv3_<skin>.sln. Voir ../modules/customer-skins.md.
Hybride WebForms + MVC
Umbraco 7 melange ASP.NET WebForms (.aspx, Site/, webparts) et MVC5 (controllers, vues Razor .cshtml). Les deux coexistent dans website/. Les nouveaux developpements passent par MVC ; certaines parties heritees (et uCommerce) restent en WebForms.
IoC (injection de dependances)
- Autofac : cote Nanoxi / Umbraco (
App.Ioc.Configuration,App.Ioc.Models). - Castle Windsor : utilise par uCommerce et la synchronisation shop (
Shop.Synchronization.SynchroWindsorContainer).
Les deux conteneurs coexistent : Autofac pour le CMS, Windsor pour la pile uCommerce.
Acces aux donnees
- Contenu editorial : API Umbraco (noeuds, IPublishedContent).
- Tables custom : petaPoco (ORM par defaut d'Umbraco), tables prefixees
nanoxi_*(ex.nanoxi_IchMatchingGlobalMedia). - Schema de base : scripts
db/u7_base-<version>.sql; donnees de seed dansdata/.
Flux de build (assemblage)
- Clean (bin/obj base + shop + customer)
- Build :
StarterKitv3_base.sln - Build-Shop :
StarterKitv3_shop.sln(siIsShopEnabled()) - Build-Customer :
StarterKitv3_<skin>.sln(si la solution existe) - Download-Umbraco : recupere/prepare les binaires Umbraco
- Postbuild : copie vues, templates, JS, ressources, LESS compiles vers
website/ - uCommerce setup : extraction + installation des packages uCommerce (si shop)
- Umbraco packages : extraction + installation (Umbraco Forms, ...)
- Database : restore / create / scratch SQL (cibles Review-App)
Detail dans build-deploy.md. La cible CI-Build produit un website/ deployable sans toucher a la DB ni a IIS.
Fichiers cles
| Sujet | Fichier |
|---|---|
| Orchestration build | build.cake |
| Bootstrapper | build.ps1 |
| Includes Cake | cake/PostBuildSkins.cake |
| Config par client | doc/StarterKitv3_InfosTechniques.json (+ _Schema.json) |
| Versioning | src/SharedAssemblyInfo.cs |
| Patches Umbraco | src/Nanoxi.Cms.Resources/Umbraco/ |
| Synchro shop IEDS | src/Nanoxi.Cms.Custom/Ieds/... + Shop.Synchronization |

