How david15barrera/frontend_reservationsystem works
Main Components
a. Frontend (Angular SPA): This is the heart of the project.
b. Feature Modules:
• Auth Module – handles login, register, MFA, password recovery and confirmation.
• Common User Module – includes components for appointments, dashboard, service details, reservation, and settings for everyday users.
• Manager Module – comprises administrative interfaces for appointments administration, billing, business settings, client management, graphics, reports, editing services/users, and more.
• Landing Module – contains the landing page and associated user navigation for entry into the system.
c. Shared Components and Layouts: Reusable navigation bars (auth-navbar, landing-navbar, navbar) and layouts (auth-layout, client-layout, landing-layout, manager-layout) that maintain the look and feel across modules.
d. Core Services and Interceptors:
• API configuration and upload services (located in src/app/config/services).
• Auth session service and guard logic (in src/app/core/) that govern authentication state and route protection.
• HTTP interceptors (aut.interceptor.ts) to manage token-based communication with backend APIs.
e. State Management:
• Using the store directory for managing session and preferences state (likely via NgRx or a similar pattern).
Relationships and Interactions
• The Angular entry point (main.ts and app.component) bootstraps the module which then loads routing configurations from app.routes.ts.
• The feature modules (auth, common-user, manager, landing) work in tandem using Angular routing; each module has its own routing module to define local navigation.
• Services like api-config.service and upload-img.service communicate with external or backend APIs.
• The authentication flow and state management services interact to control secured access and persist session information.
• Shared components (navbars, layout components) provide consistent UI and get reused across feature modules.
• Interceptors sit at the HTTP layer, intercepting outgoing API requests to add authentication tokens and handling errors.
Architectural Patterns/Design Principles
• Modular Design – Separation into distinct Angular modules (auth, common-user, manager, landing) emphasizes a modular design approach.
• Component-Based Architecture – Every view is encapsulated in components (with HTML, SCSS, TypeScript) ensuring separation of concerns.
• State Management – Use of a store (broken into session and preferences) for centralized state handling.
• Service-Oriented – Business logic is abstracted into services for API communication, authentication, and handling utility operations.
• Routing and Guards – Use of Angular’s routing along with guards for secure navigation.
Relevant Technologies and Frameworks
• Angular CLI (version 18.2.0) – the core framework.
• Tailwind (indicated by tailwind.config.js) for styling.
• Testing frameworks such as Karma for unit testing.
• The use of NgRx-like patterns for state management (action, reducer, selectors files in the store folder).
• A block for “Angular Frontend Application” which further decomposes into Modules:
• Auth Module (detailing components like login, register, MFA, etc.)
• Common-User Module (covering appointments, reservation, dashboard, settings, etc.)
• Manager Module (covering billing, business, reports, etc.)
• Landing Module (for the initial landing page experience)
• A block for “Shared Components & Layouts” to show navigation bars and layout templates.
• A block for “Core Services” showing API-config, upload-img service, and authentication/session services.
• A block labeled “HTTP Interceptor” to indicate its role in managing API requests.
• A block for “State Management” detailing session and preferences store components.
• Optionally, include a documentation block (from Proyecto2_AYD1_Documentacion) to reference architectural and database scripts that might be useful for overall system integration.
Detail Matters
• That each component, module, and service is clearly labeled so that its responsibility is immediately understandable.
• Role of Angular routing in connecting different modules.
• Separation of concerns — how authentication, user/manager functionality, and layout design are decoupled.
• Dependency flows: e.g., authentication components depend on core services; UI components depend on shared layouts.