A modern Angular application for managing and visualizing transit lines and their stops. The application provides an interactive map interface to view transit lines, manage stops, and analyze passenger data.
- πΊοΈ Interactive map visualization using MapLibre GL
- π Real-time data visualization for:
- Passenger boarding/alighting counts
- Population reachability analysis (walking/biking)
- Stop-specific statistics
- β¨ Modern UI with Material Design
- π Transit line management:
- Add/remove transit lines
- Add/edit/remove stops
- Filter stops based on various criteria
- π± Responsive design with mobile support
- π Real-time state management with NgRx
- π― OnPush change detection for optimal performance
- Framework: Angular 18.2.4
- State Management: NgRx 18.0.2
- UI Components: Angular Material 18.2.4
- Maps: MapLibre GL 4.7.0
- Build Tools: Angular CLI 18.2.4
- Testing: Jest 29.7.0
- Styling: SCSS with Material Design
- Node.js (v18 or higher)
- npm (v9 or higher)
- A MapTiler API key
-
Clone the repository:
git clone [repository-url] cd typescript-challenge-frontend -
Install dependencies:
npm install
-
Create environment file: Create a
.envfile in the root directory with:MAPTILER_API_KEY=your_api_key_here -
Start the development server:
npm run serve
-
Open your browser and navigate to
http://localhost:4200
src/
βββ app/ # Application components
β βββ home/ # Home component (main view)
β βββ detail/ # Detail component (stop details)
β βββ manage-lines/ # Line management dialogs
β βββ styles/ # Global styles
βββ services/ # API and utility services
βββ store/ # NgRx state management
βββ types/ # TypeScript interfaces
βββ environments/ # Environment configurations
The main view displaying the transit lines list and map interface. Features:
- Expandable transit line list
- Stop visualization
- Floating action button for line management
Displays detailed information about selected stops:
- Passenger statistics
- Population reachability data
- Stop editing capabilities
Interactive map showing:
- Transit line routes
- Stop locations with real-time data
- Color-coded visualization based on selected metrics
Uses NgRx for predictable state management:
- Actions for all transit line operations
- Selectors for computed data visualization
- Effects for API communication
- Entity adapters for efficient data management
RESTful API integration with endpoints for:
- Transit line CRUD operations
- Stop management
- Data filtering and visualization
- Unit tests using Jest
- Component testing with Angular Testing Library
- E2E testing capabilities
Run tests with:
npm test- ESLint configuration for code quality
- Prettier for code formatting
- Angular style guide compliance
- Strict TypeScript configuration
Run linting:
npm run lintFormat code:
npm run prettier- OnPush change detection
- Lazy loading of components
- Efficient state management with NgRx
- Optimized map rendering
- ARIA labels and roles
- Keyboard navigation support
- Screen reader compatibility
- High contrast support
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Real-time transit updates
- Advanced filtering capabilities
- User authentication
- Mobile app version
- Offline support
- Multi-language support
This project is licensed under the MIT License - see the LICENSE file for details.
- Angular team for the amazing framework
- MapLibre GL for the mapping capabilities
- Material Design team for the UI components