Architecture Overview
The Odontología Frontend application is built using Angular’s standalone components architecture. This modern approach eliminates the need for NgModules and provides a more streamlined component structure.Standalone Components
All components in the application use thestandalone: true flag, which allows them to:
- Self-contained imports: Each component explicitly declares its dependencies
- Direct usage: Components can be imported directly without module wrappers
- Simplified testing: Standalone components are easier to test in isolation
- Better tree-shaking: Unused code is more easily eliminated from production builds
Component Categories
The application components are organized into several categories:Layout Components
Header
Top navigation bar displaying page titles and user information
Menu
Collapsible sidebar navigation with route links
Feature Components
Patient List
Searchable table view of all patients with filtering
Appointment View
Manage and edit appointments with status updates
Calendar View
Weekly calendar grid showing appointments by day and time
Import Pattern
The application follows a consistent import pattern across all components:- Angular Core: Component decorator, lifecycle hooks, signals
- Angular Common: CommonModule for directives like
*ngIfand*ngFor - Forms: FormsModule for template-driven forms with
[(ngModel)] - Router: Navigation and routing functionality
- Services: Application-specific services for data management
- Child Components: Other standalone components used in templates
Styling Approach
Each component has its own CSS file using Angular’s component-scoped styling:- Scoped styles: Styles are automatically scoped to the component
- CSS variables: Global design tokens defined in
app.css - BEM methodology: Class names follow Block-Element-Modifier convention
- Responsive design: Mobile-first approach with media queries
State Management
Components use Angular signals for reactive state management:Creates a writable signal for local component state
Converts Observables to signals for seamless integration
Derives values from other signals with automatic updates
Service Integration
Components interact with services for data operations:- PatientService: CRUD operations for patient data
- AppointmentService: Manage appointments and calendar data
- Router: Navigation between views
Template Patterns
Common template patterns used across components:Conditional Rendering
List Rendering
Two-way Binding
Event Handling
Dynamic Classes
Next Steps
Explore the individual component documentation to learn about specific implementations:- Header Component - Dynamic page titles
- Menu Component - Collapsible navigation
- Patient List - Search and filter patients
- Appointment View - Manage appointments
- Calendar View - Weekly schedule visualization