pcorm

๐Ÿบ Happy Hour Near Me

A fun, mobile-first React app that helps you discover nearby happy hours with a map view, filters, and deal detailsโ€”visually inspired by Yelp.

โœจ Features

๐Ÿ› ๏ธ Tech Stack

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone <repository-url>
    cd happy-hour-app
    
  2. Install dependencies:
    npm install
    
  3. Start the development server:
    npm run dev
    
  4. Open your browser and navigate to http://localhost:5173

๐Ÿ“ฑ Usage

Finding Happy Hours

  1. Allow Location Access: The app will request your location to show nearby venues
  2. Browse Venues: View venues in list or map mode
  3. Filter Results: Use the filter bar to narrow down options:
    • Deal type (drinks/food)
    • Time window (now/tonight/weekend)
    • Price range ($/\(/\)$)
    • Neighborhood
    • Search radius

Interacting with Venues

Map Features

๐Ÿ—๏ธ Project Structure

src/
โ”œโ”€โ”€ components/          # React components
โ”‚   โ”œโ”€โ”€ VenueCard.tsx   # Individual venue display
โ”‚   โ”œโ”€โ”€ FiltersBar.tsx  # Filtering and sorting controls
โ”‚   โ”œโ”€โ”€ MapView.tsx     # Interactive map component
โ”‚   โ””โ”€โ”€ VenueDetail.tsx # Detailed venue modal
โ”œโ”€โ”€ store/              # State management
โ”‚   โ””โ”€โ”€ useStore.ts     # Zustand store
โ”œโ”€โ”€ types/              # TypeScript definitions
โ”‚   โ””โ”€โ”€ index.ts        # Type interfaces
โ”œโ”€โ”€ utils/              # Utility functions
โ”‚   โ””โ”€โ”€ timeUtils.ts    # Time calculations
โ”œโ”€โ”€ data/               # Mock data
โ”‚   โ””โ”€โ”€ seed.json       # Sample venues
โ””โ”€โ”€ App.tsx             # Main application component

๐ŸŽจ Design System

Colors

Components

๐Ÿ“Š Data Model

Venue Structure

interface Venue {
  id: string;
  name: string;
  coords: { lat: number; lng: number };
  neighborhood: string;
  priceTier: 1 | 2 | 3;
  rating: number;
  deals: Deal[];
  photos: string[];
  url?: string;
  phone?: string;
  address: string;
  hours: { [key: string]: string };
}

Deal Structure

interface Deal {
  type: 'drink' | 'food';
  label: string;
  days: string[];
  start: string;
  end: string;
}

๐Ÿ”ง Configuration

Map Features

The app uses Leaflet with OpenStreetMap:

Environment Variables

Create a .env file for API configuration (when switching from mock data):

VITE_API_BASE_URL=your_api_url_here

Customization

๐Ÿงช Testing

Run the test suite:

npm test

Run tests in watch mode:

npm run test:watch

๐Ÿ“ฆ Building for Production

Build the app for production:

npm run build

Preview the production build:

npm run preview

๐Ÿš€ Deployment

The app can be deployed to any static hosting service:

๐Ÿ”ฎ Future Enhancements

๐Ÿค Contributing

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

๐Ÿ“„ License

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

๐Ÿ™ Acknowledgments


Happy Hour Near Me - Find the best deals around you! ๐Ÿบโœจ