How amin-karimi/angular-sample-small-project works
Main Components
A. Core Layer
• Authentication (Auth Guard & Service)
• JWT Interceptor
• Error Handling Interceptor
• Core Models
B. Feature Modules Layer
• Sample Module (expandable for other modules)
• Module-specific Components
• Module-specific Services
• Module-specific Models
C. Shared Layer
• Shared Services (Alert Service)
• Potentially shared components/models
D. App Root Layer
• Main App Component
• Routing Configuration
• App Configuration
┌─────────────────────────────────────────┐
• App Module │
• ┘
• ↓ ↓ ↓
┌──────────┐ ┌─────────────────┐ ┌─────────┐
• Core │ │ Feature Modules │ │ Shared │
• ┘ └─────────────────┘ └─────────┘
Specific Implementation Details
a. Core Layer (Blue):
• Interceptors chain for HTTP requests
• Core services to their respective models
b. Feature Modules (Green):
• Sample module with its internal structure
• Component hierarchy within modules
• Lazy loading boundaries
c. Shared Layer (Yellow):
• Alert service connections to other modules
• Shared service availability
Important Architectural Aspects to Highlight
• Authentication Flow:
• Auth Guard ←→ Auth Service ←→ JWT Interceptor
• Error Handling:
• Error Interceptor → Alert Service
• Module Independence:
• Feature Modules ←→ Shared Services