Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
2f4d136
Merge pull request #2 from param2610-cloud/feature/ola-maps-component
param2610-cloud Apr 18, 2025
3e7adbc
feat: Add @heroicons/react dependency and refactor ThemeToggle import…
shramana263 Apr 18, 2025
cede775
theme toggler
The-Parthib Apr 18, 2025
b8b3fe7
feat: add resource form components for basic info, details, location,…
param2610-cloud Apr 18, 2025
9ba323c
feat: Add Skill Sharing nav item to Sidebar
The-Parthib Apr 18, 2025
d2241df
add function to check if user registered in community
mrinmoymondalreal Apr 18, 2025
dc5c3de
feat: Add Skill Sharing functionality with SkillList and SkillSharing…
The-Parthib Apr 18, 2025
e563592
feat: Implement Quick Actions button with semicircle positioning and …
shramana263 Apr 18, 2025
11d4925
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
shramana263 Apr 18, 2025
23ab702
Refactor: Remove unused form components and related code
param2610-cloud Apr 18, 2025
11a6f6b
Merge pull request #3 from param2610-cloud/feature/post-creation
param2610-cloud Apr 18, 2025
ef52744
Merge branch 'dev' into feature/post-creation
param2610-cloud Apr 18, 2025
eb766cc
Merge pull request #4 from param2610-cloud/feature/post-creation
param2610-cloud Apr 18, 2025
fc3154b
feat: Update QuickActionsButton to navigate on action clicks and remo…
param2610-cloud Apr 18, 2025
832633b
Refactor Home and QuickAction components
shramana263 Apr 19, 2025
50f446c
fix: Update Skill Sharing route and sidebar link for consistency
The-Parthib Apr 19, 2025
0e76405
fix: Remove unnecessary onClose prop from SkillSharingForm in AuthRouter
The-Parthib Apr 19, 2025
e1f16df
feat: Implement Skill Sharing page with user authentication and skill…
The-Parthib Apr 19, 2025
fd4e906
added logic for skill share list show and form submit
mrinmoymondalreal Apr 19, 2025
1e09708
Merge branch 'feature/skill-sharing-community' of https://github.com/…
mrinmoymondalreal Apr 19, 2025
024a281
feat: Add Feed component to display aggregated posts and resources
shramana263 Apr 19, 2025
b3b0529
feat: Update Skill Sharing functionality with new routes and enhanced…
The-Parthib Apr 19, 2025
416005e
feat: Update CSS variables for NeighbourLink theme and add utility cl…
param2610-cloud Apr 19, 2025
fc25896
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 19, 2025
4c63d0f
added filter and distance calculate function
mrinmoymondalreal Apr 19, 2025
adc4c87
refactor: Remove unused code and improve state management in Home and…
shramana263 Apr 19, 2025
c4db80a
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
shramana263 Apr 19, 2025
98db74b
refactor: Comment out unused NewPostForm import in AuthRouter
shramana263 Apr 19, 2025
0fcf791
feat: Add Volunteer feature with Volunteer List and Volunteer Show pages
The-Parthib Apr 19, 2025
b2425b8
feat: Replace HandHelping icon with HandHeart in Sidebar and Voluntee…
The-Parthib Apr 19, 2025
3122371
Update README.md
param2610-cloud Apr 19, 2025
248c510
feat: Integrate NewPostForm and enhance QuickActionsButton to open mo…
shramana263 Apr 19, 2025
1ebecd9
added userid to field
mrinmoymondalreal Apr 19, 2025
c5430dd
added volunteer collection
mrinmoymondalreal Apr 19, 2025
eb93187
feat: Implement simple chat messaging interface and functionality
param2610-cloud Apr 19, 2025
c801b63
feat: Enhance Volunteer and Skill Sharing functionalities with user r…
param2610-cloud Apr 19, 2025
a2491bc
feat: Add LoadingModal component and enhance SkillSharingForm and Vol…
The-Parthib Apr 19, 2025
baaa03f
feat: Implement LoadingModal component and integrate it into Voluntee…
The-Parthib Apr 19, 2025
dc9e6f0
Merge branch 'feature/skill-sharing-community' of https://github.com/…
The-Parthib Apr 19, 2025
b4e6b8e
feat: Refactor state management in various components to improve clar…
The-Parthib Apr 19, 2025
ece6b41
Merge branch 'dev' into feature/skill-sharing-community
mrinmoymondalreal Apr 19, 2025
1e9aae3
Merge pull request #5 from param2610-cloud/feature/skill-sharing-comm…
param2610-cloud Apr 19, 2025
6c68e9e
added notification support
mrinmoymondalreal Apr 19, 2025
5006435
added realtime database
mrinmoymondalreal Apr 19, 2025
b0d4f1c
Merge pull request #6 from param2610-cloud/feature/notification
param2610-cloud Apr 19, 2025
154e811
refactor: Update positioning and styling of QuickActionsButton and Bo…
shramana263 Apr 19, 2025
83e3e34
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
shramana263 Apr 19, 2025
c1817ba
google translation
mrinmoymondalreal Apr 19, 2025
ee4f869
added notification page
mrinmoymondalreal Apr 19, 2025
171d216
feat: Add identity verification feature and integrate Gemini API for …
The-Parthib Apr 19, 2025
f36a3bc
feat: Update Sidebar and Home components, add AuthPosts and NotFoundPage
shramana263 Apr 19, 2025
74ad261
feat: Add Events Page and Event Management Features
param2610-cloud Apr 19, 2025
dec7045
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 19, 2025
9efa0e2
Merge pull request #7 from param2610-cloud/feature/local-langauge-tra…
param2610-cloud Apr 19, 2025
196b526
Merge branch 'dev' into feature/notification-page
param2610-cloud Apr 19, 2025
0e56ce6
Merge pull request #8 from param2610-cloud/feature/notification-page
param2610-cloud Apr 19, 2025
827c12f
Merge branch 'dev' into feature/skill-sharing-community
param2610-cloud Apr 19, 2025
42cfcdf
Merge pull request #9 from param2610-cloud/feature/skill-sharing-comm…
param2610-cloud Apr 19, 2025
b1ae5c6
feat: Update Sidebar navigation paths and improve Feed component func…
param2610-cloud Apr 19, 2025
e297eb9
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 19, 2025
254a7f4
feat: Add PromotionDetailsPage component and integrate with routing
param2610-cloud Apr 19, 2025
7563dc3
Refactor ReplyForm and UpdateCard components for improved image handl…
param2610-cloud Apr 19, 2025
a6ea108
feat: Enhance navigation buttons and improve UI elements across multi…
The-Parthib Apr 19, 2025
0187882
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
The-Parthib Apr 19, 2025
ba6de5e
feat: Replace Cog icon with Shapes in QuickActionsButton and update b…
The-Parthib Apr 19, 2025
cf716f7
feat: enhance loading states with skeleton components across multiple…
shramana263 Apr 19, 2025
db5383e
feat: enhance loading states with skeleton components across multiple…
shramana263 Apr 19, 2025
1e1e9e1
feat: remove unused imports and clean up code in NotificationPage, Au…
shramana263 Apr 19, 2025
4c23977
feat: Enhance location handling in Register component with permission…
param2610-cloud Apr 19, 2025
e653b18
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 19, 2025
2c39d2b
feat: remove unused imports and commented code across multiple compon…
The-Parthib Apr 19, 2025
e560645
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
The-Parthib Apr 19, 2025
3e64e41
feat: add error logging for geolocation failures in MapContainer
param2610-cloud Apr 19, 2025
6274ad1
Merge pull request #10 from param2610-cloud/dev
param2610-cloud Apr 19, 2025
30df22f
feat: implement notification system for high urgency resource posts t…
param2610-cloud Apr 19, 2025
f200673
Update README.md
shramana263 Apr 20, 2025
8606a72
feat: integrate mobile context for responsive sidebar and navigation …
shramana263 Apr 20, 2025
861c1d8
Refactor components to enhance UI and functionality
param2610-cloud Apr 20, 2025
0892adc
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 20, 2025
92bcd8a
fix: increase z-index for sidebar in ProfileCard, MessagesList, Updat…
shramana263 Apr 20, 2025
0393f93
feat: add event notification functionality for nearby users
param2610-cloud Apr 20, 2025
8f7e00f
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 20, 2025
ba527ea
Merge branch 'main' into dev
param2610-cloud Apr 20, 2025
4a0db64
Merge pull request #11 from param2610-cloud/dev
param2610-cloud Apr 20, 2025
42791da
feat: enhance user profile data fetching in NewPostForm component
param2610-cloud Apr 20, 2025
834f243
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 20, 2025
bc17140
Merge pull request #12 from param2610-cloud/dev
param2610-cloud Apr 20, 2025
f853dc9
fix notification && added hook useRealtimeNotification
mrinmoymondalreal Apr 20, 2025
9b1edbc
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
mrinmoymondalreal Apr 20, 2025
dda4883
added notification for messages
mrinmoymondalreal Apr 20, 2025
4b8eb04
feat: integrate Sonner for real-time notifications and add next-theme…
param2610-cloud Apr 20, 2025
ca62b13
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 20, 2025
88a18d4
Merge pull request #13 from param2610-cloud/dev
param2610-cloud Apr 20, 2025
c4b49cd
feat: update FloatingActionMenu and QuickActionsButton to include set…
shramana263 Apr 20, 2025
ad20944
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
shramana263 Apr 20, 2025
98db51e
feat: add user verification status to UserInfo and display verified icon
shramana263 Apr 20, 2025
5a5d3a8
feat: enhance geolocation handling and notifications in ReplyForm com…
param2610-cloud Apr 20, 2025
1090603
Merge branch 'dev' of https://github.com/param2610-cloud/NeighbourLin…
param2610-cloud Apr 20, 2025
f2a4201
feat: enhance user registration flow with Firestore document verifica…
param2610-cloud Apr 20, 2025
3739f9f
feat: implement real-time user document monitoring and toast notifica…
param2610-cloud Apr 20, 2025
8d87cdb
feat: update user verification status in ProfileCard and enhance Volu…
param2610-cloud Apr 20, 2025
a966b94
Merge pull request #14 from param2610-cloud/dev
param2610-cloud Apr 20, 2025
5154949
feat: add SampleCredentialCard component for demo credentials in Logi…
param2610-cloud Apr 20, 2025
93576b8
Merge pull request #15 from param2610-cloud/dev
param2610-cloud Apr 20, 2025
d7103e7
feat: implement Cloudinary integration for image and video display co…
param2610-cloud Apr 26, 2025
3c0d0d9
Refactor image upload functionality to use Cloudinary instead of AWS S3
param2610-cloud Apr 27, 2025
c92bb7a
refactor: remove S3 upload utility and integrate Cloudinary for file …
param2610-cloud Apr 27, 2025
f42adf2
docs: expand Business Scope section in README with detailed monetizat…
param2610-cloud May 5, 2025
10786e6
feat: add vercel.json for URL rewrites to serve index.html
param2610-cloud May 22, 2025
96b5d41
feat: add CreateBusiness component for business creation functionalit…
shramana263 Aug 4, 2025
9cad026
auto browser open
The-Parthib Aug 9, 2025
1577a76
added business form data to firebase and business dashboard
The-Parthib Aug 19, 2025
89a2c89
feat: Implement Event Details Page and Business Collection Interface
param2610-cloud Aug 19, 2025
de42839
Merge branch 'main' of https://github.com/param2610-cloud/NeighbourLink
param2610-cloud Aug 19, 2025
ca71199
feat: Enhance CreateBusiness component with image upload and business…
param2610-cloud Aug 19, 2025
b0a862c
feat: Add verification document upload functionality and improve busi…
The-Parthib Aug 19, 2025
5804158
feat: Refactor image upload logic and remove unused state variables i…
param2610-cloud Aug 19, 2025
e8754a0
fix: update sidebar path for business and integrate NeighbourLinkBusi…
param2610-cloud Aug 19, 2025
ddd0ae7
Refactor code structure for improved readability and maintainability
The-Parthib Aug 19, 2025
05b6a30
feat: Implement Business Details Modal for editing business profile i…
param2610-cloud Aug 19, 2025
4a6cbbf
refactor: Remove unused onSave prop from BusinessDetailsModal and rel…
param2610-cloud Aug 19, 2025
99f697f
feat: add imageUrl property to BusinessCollection interface for produ…
param2610-cloud Aug 19, 2025
5d6b923
Implement code changes to enhance functionality and improve performance
The-Parthib Aug 19, 2025
ff3f4f0
Refactor SearchResultMap to use Google Maps API; remove OlaMaps integ…
param2610-cloud Aug 20, 2025
467c12e
business part
The-Parthib Aug 20, 2025
2ed5fdf
Merge pull request #16 from param2610-cloud/feature/business
param2610-cloud Aug 20, 2025
a892836
Merge branch 'main' into google-map
param2610-cloud Aug 20, 2025
06334a6
Merge pull request #17 from param2610-cloud/google-map
param2610-cloud Aug 20, 2025
76da69b
Refactor PromotionDetailsPage to improve layout and enhance user expe…
param2610-cloud Aug 20, 2025
78ea2e9
Comment out the Floating Action Menu button in Home component
param2610-cloud Aug 20, 2025
b45c655
feat: add business interaction hooks and services
param2610-cloud Aug 20, 2025
67a6a1f
feat: Add Pujoguide components and functionality
shramana263 Aug 20, 2025
3c2c72f
chore: Remove unused image files dhaki.jpeg and dhaki.jpg
shramana263 Aug 20, 2025
34e5300
Add SearchResultHeader component and location utility functions
shramana263 Aug 21, 2025
0ce2994
Implement code changes to enhance functionality and improve performance
shramana263 Aug 21, 2025
c2814cb
feat: Update PandalCard and PujoPlanner components for improved UI an…
shramana263 Aug 21, 2025
43c965e
feat: Add payment support options in business creation
param2610-cloud Aug 21, 2025
4adede9
Merge branch 'main' into feature/pujoguide
param2610-cloud Aug 21, 2025
5032838
Merge pull request #18 from param2610-cloud/feature/pujoguide
param2610-cloud Aug 21, 2025
cd12264
feat: Enhance PromotionDetailsPage with business profile image and im…
The-Parthib Aug 21, 2025
61d8e3f
Add TextType component for animated text display and update PujoPlann…
shramana263 Aug 21, 2025
eea7489
feat: Enhance GoogleTranslation component with language selection and…
shramana263 Aug 21, 2025
c3ef45c
feat: Revamp Sidebar component with enhanced styling and improved use…
shramana263 Aug 21, 2025
47fbda2
feat: Add radius selection dropdown to Home component and adjust Quic…
shramana263 Aug 21, 2025
deac437
feat: Implement image zoom functionality and enhance media gallery in…
The-Parthib Aug 21, 2025
01e23d2
Merge pull request #19 from param2610-cloud/ui-update
param2610-cloud Aug 21, 2025
a86e13a
feat: enhance business collection with new interfaces and properties
param2610-cloud Aug 21, 2025
19ec223
feat: Add back to home button in PujoPlanner with navigation function…
The-Parthib Aug 21, 2025
6a3be14
Merge branch 'main' of https://github.com/param2610-cloud/NeighbourLink
The-Parthib Aug 21, 2025
b08f013
refactor: Enhance ImageDisplay component to extend HTML attributes
shramana263 Aug 21, 2025
f2c1f1c
feat: Integrate Stories component for user story display and add cust…
shramana263 Aug 21, 2025
501f007
Merge pull request #20 from param2610-cloud/ui-update
shramana263 Aug 21, 2025
e0b3d43
Refactor PujoPlanner to integrate backend services for pandal data re…
param2610-cloud Aug 21, 2025
77d93d3
Merge branch 'main' of https://github.com/param2610-cloud/NeighbourLink
param2610-cloud Aug 21, 2025
b041a08
fix: Adjust positioning and size of story count indicator and quick a…
shramana263 Aug 21, 2025
c409bba
Shuffle Post done
The-Parthib Aug 22, 2025
5cc6331
feed Fix done
The-Parthib Aug 22, 2025
61dadd6
fix 2
The-Parthib Aug 22, 2025
5c49202
fixed UI
The-Parthib Aug 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ dist-ssr
*.sln
*.sw?
.env
.env.production
.env.production
package-lock.json
402 changes: 364 additions & 38 deletions README.md

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { exec as execCallback } from 'child_process';
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import { promisify } from 'util';

const exec = promisify(execCallback);
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// Ensure the service worker is copied correctly
const serviceWorkerSrc = path.join(__dirname, 'public', 'firebase-messaging-sw.js');
const serviceWorkerDest = path.join(__dirname, 'dist', 'firebase-messaging-sw.js');

async function deploy() {
try {
// Read the service worker file
let serviceWorkerContent = fs.readFileSync(serviceWorkerSrc, 'utf8');

// Replace placeholder values with actual environment variables
serviceWorkerContent = serviceWorkerContent
.replace('<VITE_FB_API_KEY>', process.env.VITE_FB_API_KEY)
.replace('<VITE_FB_AUTH_DOMAIN>', process.env.VITE_FB_AUTH_DOMAIN)
.replace('<VITE_FB_PROJECT_ID>', process.env.VITE_FB_PROJECT_ID)
.replace('<VITE_FB_STORAGE_BUCKET>', process.env.VITE_FB_STORAGE_BUCKET)
.replace('<VITE_FB_MESSAGING_SENDER_ID>', process.env.VITE_FB_MESSAGING_SENDER_ID)
.replace('<VITE_FB_APP_ID>', process.env.VITE_FB_APP_ID);

// Ensure dist directory exists
if (!fs.existsSync('dist')) {
fs.mkdirSync('dist');
}

// Write the modified service worker to the dist folder
fs.writeFileSync(serviceWorkerDest, serviceWorkerContent);

// Build the project
console.log('Building the application...');
const { stdout: buildOutput } = await exec('npm run build');
console.log('Build completed successfully!');
console.log(buildOutput);

// Copy the service worker to the dist folder
try {
await fs.promises.copyFile(serviceWorkerSrc, serviceWorkerDest);
console.log('Service worker copied successfully!');
} catch (err) {
console.error('Error copying service worker:', err);
return;
}

// Deploy to Firebase
console.log('Deploying to Firebase...');
const { stdout: deployOutput } = await exec('firebase deploy');
console.log('Deployment completed successfully!');
console.log(deployOutput);
} catch (error) {
console.error('Error during deployment process:', error);
process.exit(1);
}
}

deploy();
295 changes: 295 additions & 0 deletions docs/GoogleMapsGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,295 @@
# Google Maps Integration Guide

This guide explains how to implement Google Maps JavaScript API features in your React application, based on best practices and the components we've created.

## 🚀 Features Implemented

- ✅ **Basic Map Display** - Show Google Maps with custom center and zoom
- ✅ **Markers** - Add custom markers with colors, icons, and info windows
- ✅ **Current Location** - Get and display user's current location
- ✅ **Address Search** - Geocoding and reverse geocoding
- ✅ **Distance Calculation** - Calculate distance and duration between points
- ✅ **Interactive Features** - Map clicks, marker dragging, info windows
- ✅ **Directions** - Generate direction URLs for Google Maps and Apple Maps
- ✅ **Error Handling** - Proper error handling for API failures
- ✅ **TypeScript Support** - Full TypeScript definitions

## 📁 File Structure

```
src/
├── components/
│ ├── events/
│ │ ├── EventDetailsPanel.tsx # Event details with map
│ │ └── LocationInfo.tsx # Distance and directions component
│ └── examples/
│ └── GoogleMapsDemo.tsx # Complete demo component
├── utils/google_map/
│ ├── GoogleMapsViewer.tsx # Main map component
│ ├── GoogleMapsUtils.ts # Utility functions
│ └── MapInit.ts # Map initialization utilities
```

## 🔧 Setup

### 1. Environment Variables

Add your Google Maps API key to your `.env` file:

```env
VITE_GOOGLE_MAP_API_KEY=your_google_maps_api_key_here
```

### 2. API Key Configuration

Make sure your Google Maps API key has the following APIs enabled:
- Maps JavaScript API
- Geocoding API
- Distance Matrix API
- Places API (optional)

## 🛠️ Usage Examples

### Basic Map Display

```tsx
import GoogleMapsViewer from '@/utils/google_map/GoogleMapsViewer';

function MyMapComponent() {
return (
<GoogleMapsViewer
center={{ lat: 22.5726, lng: 88.3639 }}
zoom={15}
height="400px"
/>
);
}
```

### Map with Markers

```tsx
const markers = [
{
position: { lat: 22.5726, lng: 88.3639 },
color: '#4CAF50',
title: 'Kolkata',
description: 'City of Joy'
},
{
position: { lat: 22.5825, lng: 88.3700 },
color: '#F44336',
title: 'Victoria Memorial',
description: 'Historic monument'
}
];

<GoogleMapsViewer
center={{ lat: 22.5726, lng: 88.3639 }}
zoom={13}
markers={markers}
height="400px"
showCurrentLocation={true}
showDirectionsButton={true}
/>
```

### Using Utility Functions

```tsx
import {
getCurrentLocation,
geocodeAddress,
calculateDistanceAndDuration,
getDirectionUrls
} from '@/utils/google_map/GoogleMapsUtils';

// Get current location
const currentLoc = await getCurrentLocation();

// Search for address
const coordinates = await geocodeAddress('Times Square, New York');

// Calculate distance
const result = await calculateDistanceAndDuration(
{ lat: 40.7128, lng: -74.0060 }, // New York
{ lat: 34.0522, lng: -118.2437 } // Los Angeles
);

// Get direction URLs
const urls = getDirectionUrls(fromLocation, toLocation);
window.open(urls.googleMaps, '_blank');
```

### Event Location with Distance Info

```tsx
import LocationInfo from '@/components/events/LocationInfo';

function EventDetails({ event }) {
return (
<div>
<h2>{event.title}</h2>

{/* Show distance and directions */}
<LocationInfo
eventLocation={{
lat: event.location.latitude,
lng: event.location.longitude
}}
eventTitle={event.title}
/>

{/* Show map */}
<GoogleMapsViewer
center={{ lat: event.location.latitude, lng: event.location.longitude }}
markers={[{
position: { lat: event.location.latitude, lng: event.location.longitude },
title: event.title,
description: event.description
}]}
showCurrentLocation={true}
showDirectionsButton={true}
/>
</div>
);
}
```

## 🎛️ Component Props

### GoogleMapsViewer Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `center` | `Coordinates` | Kolkata coords | Map center point |
| `zoom` | `number` | `15` | Initial zoom level |
| `markers` | `MarkerData[]` | `[]` | Array of markers to display |
| `height` | `string` | `'300px'` | Map container height |
| `showCurrentLocation` | `boolean` | `false` | Show user's current location |
| `enableGeolocation` | `boolean` | `true` | Enable geolocation features |
| `mapType` | `string` | `'roadmap'` | Map type (roadmap, satellite, etc.) |
| `showDirectionsButton` | `boolean` | `false` | Show directions in info windows |
| `onMapClick` | `function` | - | Callback for map clicks |
| `onMarkerDrag` | `function` | - | Callback for marker drag |

### MarkerData Interface

```tsx
interface MarkerData {
position: { lat: number; lng: number };
color?: string; // Hex color for marker
draggable?: boolean; // Whether marker can be dragged
title?: string; // Marker title
description?: string; // Additional description
icon?: string; // Custom icon URL
}
```

## 🔍 Available Utility Functions

| Function | Description | Returns |
|----------|-------------|---------|
| `getCurrentLocation()` | Get user's current location | `Promise<Coordinates \| null>` |
| `geocodeAddress(address)` | Convert address to coordinates | `Promise<Coordinates \| null>` |
| `reverseGeocode(coords)` | Convert coordinates to address | `Promise<string \| null>` |
| `calculateDistanceAndDuration(from, to)` | Calculate distance and travel time | `Promise<{distance, duration} \| null>` |
| `getDirectionUrls(from, to)` | Generate direction URLs | `{googleMaps: string, appleMaps: string}` |
| `calculateStraightLineDistance(p1, p2)` | Calculate straight-line distance in km | `number` |
| `isValidCoordinates(coords)` | Validate coordinate object | `boolean` |

## 🎨 Styling and Customization

### Custom Map Styles

```tsx
const darkMapStyles = [
{
"elementType": "geometry",
"stylers": [{"color": "#242f3e"}]
},
// ... more styles
];

<GoogleMapsViewer
styles={darkMapStyles}
mapType="roadmap"
/>
```

### Custom Marker Icons

```tsx
const markers = [
{
position: { lat: 22.5726, lng: 88.3639 },
icon: '/path/to/custom-icon.png',
title: 'Custom Icon Marker'
}
];
```

## 🚨 Error Handling

The components include comprehensive error handling:

- **API Loading Errors**: Displays error message if Google Maps fails to load
- **Geolocation Errors**: Handles permission denied and other location errors
- **Geocoding Errors**: Graceful fallback when address lookup fails
- **Network Errors**: Proper error states for network issues

## 📱 Mobile Considerations

- **Touch Gestures**: Maps use `gestureHandling: 'cooperative'` for better mobile experience
- **Responsive Design**: Components are fully responsive
- **Performance**: Lazy loading and cleanup to prevent memory leaks

## 🔐 Security Best Practices

1. **API Key Security**: Store API keys in environment variables
2. **Domain Restrictions**: Restrict API key usage to your domains
3. **API Quotas**: Monitor and set appropriate quotas
4. **HTTPS Only**: Geolocation requires HTTPS in production

## 📊 Performance Tips

1. **Lazy Loading**: Maps are loaded only when needed
2. **Marker Cleanup**: Proper cleanup prevents memory leaks
3. **Debounced Search**: Implement debouncing for address search
4. **Efficient Re-renders**: Components use proper dependency arrays

## 🧪 Testing

For testing components that use Google Maps:

```tsx
// Mock Google Maps API for tests
global.google = {
maps: {
Map: jest.fn(),
Marker: jest.fn(),
InfoWindow: jest.fn(),
// ... other mocks
}
};
```

## 📚 Additional Resources

- [Google Maps JavaScript API Documentation](https://developers.google.com/maps/documentation/javascript)
- [React Google Maps Integration Guide](https://developers.google.com/maps/documentation/javascript/react-map)
- [Google Maps API Key Setup](https://developers.google.com/maps/gmp-get-started)

## 🤝 Contributing

When contributing to the Google Maps integration:

1. Follow TypeScript best practices
2. Add proper error handling
3. Include cleanup in useEffect hooks
4. Test with different locations and edge cases
5. Update documentation for new features

---

This integration provides a solid foundation for Google Maps functionality in your React application. The components are designed to be reusable, well-documented, and production-ready.
Loading