Repository navigation
SmartSite 4.0.2 — a simpler project layout
SmartSite's source is now organized into six folders: app, components, hooks, lib, payload and types. Website features, content schema and dependency versions are preserved.
- Group native collections, globals, access rules, schema fields, lifecycle hooks, plugins and MCP under src/payload. Keep payload.config.ts and generated payload-types.ts at the source root.
- Bring dashboard components, navigation, styles, providers and CMS primitives together under src/components/cms. Consolidate editor field components under components/fields; place blocks and website providers under components too.
- Move routing, caching, data, rendering, search, sitemaps, publication services and shared helpers into src/lib. Shared React hooks remain in src/hooks.
- Reduce root configuration clutter: release metadata moves to config/smartsite-release.json; the optional self-hosting example moves to docker/smartsite-deployment.example.json; the exact file-move map lives in docs/upgrades/4.0.2/file-map.json. Remove the unused staging-sync config and two placeholder text files. Existing private deployment configuration and generated export manifests retain their paths.
- Update imports, Payload component references and generated import map, scripts, standalone fixtures, documentation and both Codex and Claude skill sets. Clarify which CMS sidebar is active.
- Keep self-hosting state absent from fresh starters and ordinary local/hosted setup. Both agent kits generate it only when self-hosting is chosen; existing deployment state remains compatible.
- Resolve the remaining navigation lint warnings while preserving full-document preview exit and Payload logout. Lint now requires zero warnings; browser tests cover preview cookies, query preservation and logout.
- Preserve the native 3.x upgrade kit's original source mappings while targeting the new layout and exact 4.0.2 release. Keep the 4.0.0 migration epoch unchanged.
Upgrading from 4.0.1: follow docs/workflows/upgrading.md and the exact move map. Reconcile customized source and imports through a reviewed three-way merge, preserve environment and site identity, and verify standalone before deployment. No database migration, bootstrap, seeding or credential rotation is needed for this layout update. Existing 3.0.0 and 3.0.1 sites use the versioned native Payload upgrade kit.
Verification includes frozen standalone installation, type-check, lint, unit and HTTP/MCP tests, actual frontend/CMS browser checks, production builds, source/data upgrade and rollback, and fresh Codex/Claude documentation-routing evaluations. The source comparison against the verified 4.0.1 release confirms 373 application source files are unchanged after resolving moved import paths and generated import-map identifiers; the two reviewed navigation updates have real browser regression coverage, and the relocated media collection retains the existing project-root upload directory. Published archives include checksums and a file manifest.