The Vehicle Info Application is a project developed to display vehicle-related information such as brands, models, and vehicle types. The application features an intuitive user interface, dynamic filtering capabilities, and a responsive design, all while adhering to web accessibility standards.
- Angular: The main framework used to build the frontend application.
- RxJS: For managing asynchronous data streams and implementing reactive programming.
- NgRx: To handle state management efficiently.
- Angular Material: For a modern, responsive UI design and prebuilt components.
- TypeScript: Ensuring strong typing and reducing runtime errors.
- SCSS: For writing modular, maintainable styles.
- CDK Virtual Scroll: To enhance performance by rendering only visible items in large datasets.
- VPIC API: The external API used to fetch vehicle-related data.
The application was designed to meet the following requirements:
-
Display a list of vehicle brands:
- The application fetches the brands from the VPIC API.
- Brands are displayed in a scrollable, searchable list.
-
Filter brands dynamically:
- Users can search for brands using an input field.
- The list updates in real-time as users type.
-
Provide details for each brand:
- Clicking on a brand navigates to a detail view showing models and vehicle types associated with that brand.
-
Follow web accessibility best practices:
- Semantic HTML elements and ARIA attributes are used for improved accessibility.
- Alerts are used to notify users of loading states and search results.
-
Responsive and performant UI:
- The app uses Angular Material components for responsiveness.
- Virtual scrolling ensures performance with large datasets.
src/
βββ app/
βββ features/
β βββ brands/
β βββ components/
β β βββ brand-list/
β β βββ brand-list.component.ts
β β βββ brand-list.component.html
β β βββ brand-list.component.scss
β β βββ brand-detail/
β β βββ brand-detail.component.ts
β β βββ brand-detail.component.html
β β βββ brand-detail.component.scss
βββ data-access/
β βββ brands/
β βββ services/
β β βββ brand.service.ts
β βββ store/
β β βββ brand.actions.ts
β β βββ brand.effects.ts
β β βββ brand.reducer.ts
β β βββ brand.selectors.ts
β βββ models/
β βββ brand.model.ts
βββ app.state.ts
β
-
BrandListComponent:
- Displays the searchable list of brands.
- Handles user input for filtering.
-
BrandDetailsComponent:
- Shows models and vehicle types for the selected brand.
- Includes tabs for switching between models and types.
-
VehicleService:
- Handles API calls to fetch brands, models, and vehicle types.
-
NgRx Store:
- Manages the state of brands and ensures efficient updates.
-
Fetching Data:
- Used the VPIC API to retrieve data.
- Implemented
VehicleService
to abstract API calls.
-
State Management:
- Leveraged NgRx for managing the list of brands, ensuring scalability and maintainability.
-
Search Functionality:
- Implemented with a debounced subject to reduce API calls and improve user experience.
-
Dynamic Routing:
- Utilized Angular Router for navigation between the brand list and brand details views.
-
Accessibility:
- Added ARIA roles and live regions for dynamic content updates.
- Used keyboard navigation for interactive elements.
-
Performance Optimization:
- Used CDK Virtual Scroll for rendering large datasets efficiently.
- Node.js (v14 or higher)
- Angular CLI
-
Clone the repository:
git clone https://github.com/your-repo/vehicle-info-app.git
-
Install dependencies:
cd vehicle-info-app npm install
-
Run the application:
ng serve
-
Open the application in your browser at:
http://localhost:4200
- Include end-to-end tests.
- Implement a dark mode toggle for better user experience.
This project demonstrates a robust approach to building a scalable and accessible Angular application. By leveraging modern frameworks, adhering to best practices, and focusing on performance and usability, the Vehicle Info Application delivers a seamless user experience.