What is the Angular 18 Archetype?
The Angular 18 Archetype is a production-ready starter template built with Angular 18.2, featuring a well-structured architecture based on industry best practices. This archetype provides a solid foundation for building scalable Angular applications with built-in internationalization support and a modular folder structure. The project follows the file and folder structure principles outlined in Alberto Basalo’s Angular structure guide, ensuring your application remains maintainable as it grows.Key features and benefits
Modern Angular 18.2
Built with the latest Angular 18.2, featuring standalone components, signals, and the new application builder
Internationalization ready
Pre-configured ngx-translate integration with English and Spanish translations out of the box
Organized architecture
Clean separation between core, shared, and feature modules following industry best practices
TypeScript path aliases
Pre-configured path mappings for cleaner imports: @ui/, @domain/, @state/, @services/, @api/, @env/
SCSS styling
Pre-configured SCSS support for scalable styling architecture
Testing setup
Karma and Jasmine configured for unit testing with coverage reports
Architecture overview
The archetype organizes code into three main layers:Core layer
Contains singleton services, guards, interceptors, and application-wide components:- language-switch: Multi-language support service and component
- layout: Layout components like cookies banner and error handling
- providers: Authentication guard and interceptor
Shared layer
Reusable code shared across features:- domain: Type definitions (User, Notification, AccessToken)
- services/state: State management stores (auth, notifications)
- services/utils: Utility services (local storage, platform detection)
- ui: Reusable UI components
Configuration
Centralized configuration for:- HTTP loader factory for translations
- Application bootstrap configuration
- Route definitions
The archetype uses Angular’s standalone components approach, eliminating the need for NgModules and enabling better tree-shaking.
Who should use this archetype?
This archetype is ideal for:- Teams starting new Angular projects who want to follow best practices from day one
- Developers building enterprise applications that require scalability and maintainability
- Projects requiring internationalization with support for multiple languages
- Teams wanting a structured approach to organizing Angular applications
Prerequisites
Before using this archetype, ensure you have:Node.js 18.x or later
Git (optional)
Required if cloning the repository. Download from git-scm.com
What’s included
The archetype comes pre-configured with:package.json dependencies