Skip to content

feat: Improved home Page and implemented schema of saved routes#5

Merged
kaihere14 merged 4 commits into
kaihere14:mainfrom
GURUDAS-DEV:main
Feb 14, 2026
Merged

feat: Improved home Page and implemented schema of saved routes#5
kaihere14 merged 4 commits into
kaihere14:mainfrom
GURUDAS-DEV:main

Conversation

@GURUDAS-DEV

@GURUDAS-DEV GURUDAS-DEV commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features
    • Added interactive map with point-and-click location picking for source and destination.
    • Integrated geolocation to automatically detect and display user's current location with address resolution.
    • Enabled reverse geocoding to convert map coordinates to readable addresses.
    • Introduced route favorites functionality for saving preferred routes.
    • Enhanced map with loading indicators and error handling for improved user feedback.

GURUDAS-DEV and others added 4 commits February 14, 2026 12:20
- Added HomeMap component to display a Mapbox map with geolocation features.
- Updated Home page to render the HomeMap component.
- Introduced PrivateLayout component for consistent layout structure.
- Updated TypeScript configuration to include additional type definitions.
- Added Mapbox GL and related dependencies to package.json and package-lock.json.
- Created global.d.ts for Mapbox CSS module declaration.
@GURUDAS-DEV GURUDAS-DEV reopened this Feb 14, 2026
@coderabbitai

coderabbitai Bot commented Feb 14, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The changes introduce interactive map-based location selection on the client side with geolocation and reverse geocoding capabilities, alongside a comprehensive Mongoose route schema on the server side to persist route data with geographic coordinates and multiple routing options.

Changes

Cohort / File(s) Summary
Client-Side Map Interactivity
client/components/home/HomeMap.tsx
Added geolocation retrieval, reverse geocoding, interactive marker placement, picking mode for source/destination selection, map click handlers, and dynamic UI overlays with loading/error state management.
Server-Side Route Schema
server/src/Schema/route.schema.ts
Introduced Mongoose route schema with TypeScript interfaces for geographic points/line strings, route options, compound indexes for geospatial and user queries, and exported Route model for data persistence.

Sequence Diagram

sequenceDiagram
    actor User
    participant Map as Map Component
    participant Geolocation as Geolocation API
    participant Geocoder as Reverse Geocoder
    participant UI as UI State
    
    User->>Map: Click map or request current location
    Map->>Geolocation: Request user coordinates
    Geolocation-->>Map: Return lat/lng
    Map->>Geocoder: Reverse geocode coordinates
    Geocoder-->>Map: Return address string
    Map->>Map: Update marker position
    Map->>UI: Set location (source or destination)
    UI-->>User: Display address & marker on map
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 A hoppy map where clicks do bloom,
Coordinates dance through digital room,
From geo to markers, a journey so bright,
The schema's a burrow, perfectly tight,
Routes now remembered, locations take flight!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kaihere14 kaihere14 merged commit ddf0482 into kaihere14:main Feb 14, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants