How omerblgn/carrentalfrontend works
CarRental is an Angular frontend for browsing cars, managing accounts, and completing rentals, with separate administration screens for catalog and role management. The main customer flow is routed to the car catalog, through car details and rental-date validation, then to payment and rental creation. Services call an external API; local storage supplies authentication and user context. Source excerpts show the customer flow and selected service calls; unsampled screens and services are represented only where the routes or source index establish their role.
Main entry points: app.routes.ts Route table · car-detail.component.ts Car details · payment.component.ts Payment screen · user.service.ts User service
Components 21
Application shell
- App shell
src/app/app.component.ts - Route table
src/app/app.routes.ts
Car discovery
- Car catalog
src/app/components/car/car.component.ts - Catalog filters
src/app/components/filter - Car details
src/app/components/car-detail/car-detail.component.ts - Car services
src/app/services/car.service.ts - Car images
src/app/services/car-image.service.ts
Identity and accounts
- Login and registration
src/app/components/login/login.component.ts - Authentication service
src/app/services/auth.service.ts - Profile and users
src/app/components/profile/profile.component.ts - User service
src/app/services/user.service.ts - Local session
src/app/services/local-storage.service.ts - Route guards
src/app/guards
Rental checkout
- Rental dates
src/app/components/datepicker/datepicker.component.ts - Payment screen
src/app/components/payment/payment.component.ts - Rental service
src/app/services/rental.service.ts - Saved cards
src/app/services/credit-card.service.ts - Payment service
src/app/services/payment.service.ts
Administration
- Admin console
src/app/components/admin
Other components
- Customer
- Rental API
Connections 31
- Customer → Route table: opens routes
src/app/app.routes.ts - Route table → App shell: loads shell
- Route table → Car catalog: routes to
src/app/app.routes.ts - Route table → Car details: routes to
src/app/app.routes.ts - Route table → Login and registration: routes to
src/app/app.routes.ts - Route table → Profile and users: routes to
src/app/app.routes.ts - Route table → Payment screen: routes to
src/app/app.routes.ts - Route table → Admin console: routes to
src/app/app.routes.ts - Car catalog → Catalog filters: uses filters
src/app/components/car/car.component.ts - Car catalog → Car services: loads cars
src/app/components/car/car.component.ts - Car details → Car services: loads details
src/app/components/car-detail/car-detail.component.ts - Car details → Car images: loads images
src/app/components/car-detail/car-detail.component.ts - Car details → Rental service: checks availability
src/app/components/car-detail/car-detail.component.ts - Car details → User service: looks up user
src/app/components/car-detail/car-detail.component.ts - Car details → Payment screen: navigates with rental
src/app/components/car-detail/car-detail.component.ts - Login and registration → Authentication service: authenticates
src/app/services/auth.service.ts - Authentication service → Local session: checks token
src/app/services/auth.service.ts - Profile and users → User service: updates profile
src/app/services/user.service.ts - Route guards → Local session: checks session
src/app/guards/admin.guard.ts - Route guards → User service: checks claims
src/app/guards/admin.guard.ts - Payment screen → Payment service: submits payment
src/app/components/payment/payment.component.ts - Payment screen → Rental service: creates rental
src/app/components/payment/payment.component.ts - Payment screen → Saved cards: loads or saves cards
src/app/components/payment/payment.component.ts - Payment screen → User service: looks up account
src/app/components/payment/payment.component.ts - Car services → Rental API: HTTP requests
src/app/services/car.service.ts - Authentication service → Rental API: HTTP requests
src/app/services/auth.service.ts - User service → Rental API: HTTP requests
src/app/services/user.service.ts - Rental service → Rental API: HTTP requests
src/app/services/rental.service.ts - Car images → Rental API: HTTP requests
src/app/services/car-image.service.ts - Saved cards → Rental API: HTTP requests
- Payment service → Rental API: HTTP requests