Architecture
Overview
Aether is a modern, lightweight Content Management System built on top of LiteNode, designed for developers who need a flexible, extensible platform for creating dynamic websites and static sites. The architecture follows a modular design pattern with clear separation of concerns, making it easy to maintain, extend, and customize.
Key Features
- Dual Mode Operation: Dynamic CMS and Static Site Generator
- Theme System: Flexible theme architecture with custom templates
- Content Types: Posts, Pages, and Custom Pages
- Media Management: Image and document handling with metadata
- User Management: Role-based access control
- API-First: Complete REST API for all operations
- Extensible: Hook system for plugins and customizations
System Architecture
Directory Structure
📦 Root
├── 📁 assets/ # Static assets (CSS, JS)
├── 📁 content/ # Content storage
│ ├── 📁 data/ # Content files and configuration
│ │ ├── 📁 posts/ # Blog posts (Markdown)
│ │ ├── 📁 pages/ # Static pages (Markdown)
│ │ ├── 📁 custom/ # Custom pages (Markdown)
│ │ ├── 📄 settings.json
│ │ ├── 📄 users.json
│ │ └── 📄 menu.json
│ ├── 📁 themes/ # Theme files
│ └── 📁 uploads/ # Media uploads
├── 📁 core/ # Core application code
│ ├── 📁 admin/ # Admin interface
│ ├── 📁 api/ # API endpoints
│ ├── 📁 lib/ # Core libraries
│ ├── 📁 routes/ # Frontend routes
│ ├── 📁 utils/ # Utility functions
| └── 📄 app.js # Core application setup
└── 📄 index.js # Application entry point
Core Modules
1. Content Management
The content management system is centered around these core modules:
- ContentManager (
core/lib/content/content-manager.js
): Orchestrates all content-related operations - ContentItemManager (
core/lib/content/modules/content-item-manager.js
): Handles CRUD operations for content items (posts and pages) - ContentQueryManager (
core/lib/content/modules/content-query-manager.js
): Manages content queries, filtering, and retrieval
The CMS stores content as Markdown files with YAML frontmatter for metadata.
2. Theme System
The theme system manages site appearance and templating:
- ThemeManager (
core/lib/theme/theme-manager.js
): Main coordinator for theme operations - ThemeDiscovery (
core/lib/theme/modules/theme-discovery.js
): Scans for available themes - ThemeTemplateResolver (
core/lib/theme/modules/theme-template-resolver.js
): Resolves template paths - ThemeInstaller (
core/lib/theme/modules/theme-installer.js
): Handles theme installation - ThemeMarketplaceCDN (
core/lib/theme/modules/theme-marketplace-cdn.js
): Integrates with theme marketplace
3. Authentication System
The authentication system handles users, sessions, and security:
- AuthManager (
core/lib/auth/auth-manager.js
): Coordinates authentication modules - UserManager (
core/lib/auth/modules/user-manager.js
): Manages user accounts - SessionManager (
core/lib/auth/modules/session-manager.js
): Handles login sessions - PasswordService (
core/lib/auth/modules/password-service.js
): Secure password hashing - RateLimiter (
core/lib/auth/modules/rate-limiter.js
): Prevents brute-force attacks
4. File Storage
Handles uploads and media management:
- FileStorage (
core/lib/store/file-storage.js
): Manages file uploads - FileManager (
core/lib/store/modules/file-manager.js
): Core file operations - ImageHandler (
core/lib/store/modules/image-handler.js
): Image-specific operations - DocumentHandler (
core/lib/store/modules/document-handler.js
): Document-specific operations - MetadataManager (
core/lib/store/modules/metadata-manager.js
): Manages file metadata
5. Hook System
Provides extensibility through hooks:
- HookSystem (
core/lib/hooks.js
): Implements actions and filters - Hook utilities for content optimization
6. Navigation & Menu Management
- GlobalMenuManager (
core/lib/global-menu-manager.js
): Manages site-wide navigation
7. Settings Management
- SettingsService (
core/lib/settings-service.js
): Centralized settings with caching
8. API Layer
RESTful API endpoints for different functionalities:
- Content API, Media API, User API, Theme API, and Static Generator API
9. Route System
- Frontend routes for rendering content
- Admin routes for the control panel
- SEO routes (sitemap, RSS)
- Custom page routes
10. Static Site Generator
- StaticSiteGenerator (
core/utils/static-generator.js
): Converts the dynamic site to static HTML
These modules work together in a modular architecture, with clear separation of concerns. The system follows a pattern where managers coordinate specialized modules that handle specific aspects of functionality. Each major component (content, theme, auth, file storage) follows this pattern, making the system maintainable and extensible.