Whenever you create an AEM application it must be comprised of a single AEM package. This package can contain sub-packages include things like code, JSON, etc.
AEM requires a separation of content and code. A single package can’t contain both /app and runtime-writable areas (/content, /conf, /home, and /apps).
AEM Folder Structure
| Folder Name | Description |
| ui.frontend | JavaScript + CSS (Immutable) |
| core | OSGI Bundle (Immutable) |
| ui.apps | ClientLibs (Immutable) |
| ui.config | osgiconfig (Immutable) |
| content | Mutable data only |
Mutable vs Immutable in AEM
JCR Folder Structure
| Folder | Description |
| /apps | Stores all custom templates, components, bundles and definitions related to your browser. |
| /conf | All configurations for your website. Stores dynamic templates and policies for your website |
| /content | Stores all content for your website |
| /etc | Resources related to utilities and tools |
| /home | AEM users and group information |
| /libs | Stores libraries and definitions for the core functionality of AEM. |
| /oak:index | Contains Jackrabbit Oak index definitions |
| /system | Used by Apache Oak only |
| /var | Contains the files that are updated by the system such as logs. Also, contains Java servlets in source and compiled forms that are generated from component scripts. |