Skip to content

Premkumar1845/PlacePulse

Repository files navigation

๐Ÿ“PlacePulse - Real Time Place Intelligence

PlacePulse Banner

React Vite Google Maps License

Discover nearby places based on your mood or intent. Just tell us how you feel!

Demo โ€ข Features โ€ข Installation โ€ข Usage โ€ข Tech Stack


๐ŸŽฏ What is PlacePulse?

PlacePulse is a modern, intelligent place discovery application that helps users find nearby places based on their mood or intent. Instead of searching for specific place types, simply describe what you're in the mood for:

  • ๐Ÿต "coffee" โ†’ Finds cafes, coffee shops, bakeries
  • ๐Ÿ’ผ "work" โ†’ Finds co-working spaces, cafes with wifi, libraries
  • ๐ŸŒ™ "date night" โ†’ Finds romantic restaurants, bars, theaters
  • ๐Ÿ” "quick bite" โ†’ Finds fast food, casual dining, food courts
  • ๐Ÿ˜Œ "chill" โ†’ Finds parks, lounges, bookstores

Features

๐Ÿ” Smart Search

  • Mood-Based Discovery - Natural language search understands your intent
  • Google Places Autocomplete - Search by actual place names
  • Quick Mood Picks - One-click preset moods with beautiful gradients
  • Intelligent Mapping - AI-powered mood-to-place-type algorithm

๐Ÿ—บ๏ธ Interactive Map

  • Real-Time Markers - See all results on an interactive Google Map
  • Custom Markers - Numbered markers with selection highlighting
  • Info Windows - Quick preview on marker click
  • User Location - Centered on your current position

๐Ÿ“‹ Rich Results

  • Detailed Cards - Photos, ratings, distance, price level
  • Opening Hours - Real-time open/closed status
  • Distance Calculator - Walking & driving time estimates
  • Filter & Sort - By rating, distance, price, open now

๐ŸŽจ Beautiful UI/UX

  • Dark/Light Theme - Toggle with smooth sun/moon animation
  • Responsive Design - Perfect on desktop, tablet, and mobile
  • Smooth Animations - Polished micro-interactions
  • Modern Design System - Custom design tokens

๐Ÿ“ฑ Mobile Optimized

  • List/Map Toggle - Switch views on mobile
  • Touch Friendly - Optimized for touch interactions
  • Fast Loading - Optimized for performance

๐Ÿ–ผ๏ธ Screenshots

Dark Mode Light Mode
Dark Mode Light Mode
Search Autocomplete Place Details
Search Details

๐Ÿš€ Installation

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Google Cloud Platform account with billing enabled

Step 1: Clone the Repository

git clone https://github.com/Premkumar1845/PlacePulse.git
cd PlacePulse

Step 2: Install Dependencies

npm install

Step 3: Configure Google Maps API

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable these APIs:
    • Maps JavaScript API
    • Places API
    • Geocoding API
  4. Create an API key and restrict it to your domains

Step 4: Set Environment Variables

Create a .env file in the root directory:

VITE_GOOGLE_MAPS_API_KEY=your_google_maps_api_key_here

Step 5: Run the App

npm run dev

Open https://placepulse-chi.vercel.app in your browser.


๐Ÿ› ๏ธ Tech Stack

Category Technology
Frontend React 18.2, Vite 5.0
Styling CSS3 with Design Tokens
Maps Google Maps JavaScript API
Places Google Places API
State React Hooks
Build Vite, ESBuild

๐Ÿ“ Project Structure

PlacePulse/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/          # React components
โ”‚   โ”‚   โ”œโ”€โ”€ App/            # Main app component
โ”‚   โ”‚   โ”œโ”€โ”€ Header/         # Header with location & theme
โ”‚   โ”‚   โ”œโ”€โ”€ SearchBar/      # Search with autocomplete
โ”‚   โ”‚   โ”œโ”€โ”€ Map/            # Google Maps integration
โ”‚   โ”‚   โ”œโ”€โ”€ PlacesList/     # Results list
โ”‚   โ”‚   โ”œโ”€โ”€ PlaceCard/      # Individual place card
โ”‚   โ”‚   โ”œโ”€โ”€ PlaceDetails/   # Full place details modal
โ”‚   โ”‚   โ”œโ”€โ”€ Filters/        # Filter & sort controls
โ”‚   โ”‚   โ””โ”€โ”€ ThemeToggle/    # Dark/light mode toggle
โ”‚   โ”œโ”€โ”€ hooks/              # Custom React hooks
โ”‚   โ”‚   โ”œโ”€โ”€ useGeolocation  # User location tracking
โ”‚   โ”‚   โ”œโ”€โ”€ usePlaces       # Places search logic
โ”‚   โ”‚   โ””โ”€โ”€ useTheme        # Theme management
โ”‚   โ”œโ”€โ”€ services/           # API services
โ”‚   โ”‚   โ”œโ”€โ”€ mapsLoader.js   # Google Maps loader
โ”‚   โ”‚   โ””โ”€โ”€ placesApi.js    # Places API wrapper
โ”‚   โ”œโ”€โ”€ utils/              # Utilities
โ”‚   โ”‚   โ”œโ”€โ”€ constants.js    # App constants
โ”‚   โ”‚   โ”œโ”€โ”€ moodMapping.js  # Mood to places mapping
โ”‚   โ”‚   โ””โ”€โ”€ filterSort.js   # Filter/sort logic
โ”‚   โ””โ”€โ”€ styles/             # Global styles
โ”‚       โ””โ”€โ”€ tokens.css      # Design tokens
โ”œโ”€โ”€ .env                    # Environment variables
โ”œโ”€โ”€ vite.config.js          # Vite configuration
โ””โ”€โ”€ package.json            # Dependencies

๐ŸŽฎ Usage

Basic Search

  1. Type a mood like "coffee", "lunch", or "date night"
  2. Click a suggestion or press Enter
  3. Browse results on the list or map
  4. Click a place for more details

Quick Picks

Click any of the preset mood buttons:

  • โ˜• Coffee - Cafes & coffee shops
  • ๐Ÿฝ๏ธ Lunch - Restaurants & eateries
  • ๐Ÿ˜Œ Chill - Relaxed hangout spots
  • ๐Ÿ’ผ Work - Productive workspaces
  • ๐ŸŒ™ Date - Romantic venues
  • ๐Ÿ” Quick Bite - Fast & casual food

Filters

  • Rating: 3+, 4+, 4.5+ stars
  • Distance: 500m, 1km, 2km, 5km
  • Price: $, $$, $$$, $$$$
  • Open Now: Currently open places only

๐Ÿ”ง Configuration

Environment Variables

Variable Description Required
VITE_GOOGLE_MAPS_API_KEY Google Maps API key Yes

API Key Setup

Your Google Cloud API key needs these APIs enabled:

  • โœ… Maps JavaScript API
  • โœ… Places API
  • โœ… Geocoding API

Recommended restrictions:

  • HTTP referrers (websites)
  • API restrictions (only enabled APIs)

๐Ÿ“ฆ Build for Production

# Build the app
npm run build

# Preview production build
npm run preview

The build output will be in the dist/ folder.


๐Ÿš€ Deployment

Vercel (Recommended)

npm i -g vercel
vercel --prod

Netlify

npm run build
# Upload dist/ folder to Netlify

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "preview"]

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ™ Acknowledgments


โญ Star this repo if you find it useful!

About

A React-based smart nearby places recommender using Google Maps and Places APIs with mood-based filtering, real-time location support, and dynamic sorting.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors