Skip to content

Latest commit

Β 

History

History
113 lines (89 loc) Β· 2.9 KB

File metadata and controls

113 lines (89 loc) Β· 2.9 KB

Jersey Produce Vendors

A mobile-first Progressive Web App (PWA) to map local produce vendors in Jersey, with a special focus on "Hedge Veg" stalls and farm shops.

Features

  • πŸ—ΊοΈ Interactive map showing vendor locations across Jersey
  • πŸ₯• Browse locally available produce by type
  • πŸ” Search for vendors by name, parish, or produce type
  • ⭐ Save favorite vendors for quick access
  • πŸ“± Mobile-first responsive design
  • 🌟 Review system for sharing experiences
  • πŸ“· Photo gallery for each vendor location
  • πŸ“‹ Detailed vendor information including operating hours

Tech Stack

  • React 18 with TypeScript
  • Vite for build tooling
  • Leaflet for interactive maps
  • Supabase for backend (Auth, Database, Storage)
  • PostGIS for geospatial features
  • Tailwind CSS for styling
  • Docker for containerization

Prerequisites

  • Node.js 20 or later
  • Docker and Docker Compose
  • Supabase account and project
  • Tailscale (for development)

Getting Started

  1. Clone the repository:

    git clone https://github.com/willtwilson/jersey-produce-vendors.git
    cd jersey-produce-vendors
  2. Install dependencies:

    npm install
  3. Copy environment variables:

    cp .env.example .env
  4. Update .env with your Supabase credentials:

    VITE_SUPABASE_URL=your_supabase_project_url
    VITE_SUPABASE_ANON_KEY=your_supabase_anon_key
    
  5. Start the development server:

    npm run dev
  6. Build for production:

    npm run build

Database Setup

The application requires a Supabase database with the following tables:

  • vendors
  • produce
  • vendor_produce
  • operating_hours
  • vendor_photos
  • reviews

SQL scripts for database setup are located in the scrapers directory:

  • create_vendors_table.sql: Creates the table structure
  • seed_vendors.sql: Seeds the database with initial vendor data

To set up the database:

  1. Create a new Supabase project
  2. Run the SQL scripts in the Supabase SQL editor
  3. Enable Row Level Security (RLS) policies as needed

Project Structure

jersey-produce-vendors/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/    # Reusable components
β”‚   β”‚   └── ui/        # UI components
β”‚   β”œβ”€β”€ pages/         # Page components
β”‚   β”œβ”€β”€ contexts/      # React context providers
β”‚   β”œβ”€β”€ hooks/         # Custom hooks
β”‚   β”œβ”€β”€ lib/           # Library code
β”‚   β”œβ”€β”€ services/      # Service layer
β”‚   └── types/         # TypeScript types
β”œβ”€β”€ public/            # Static assets
└── scrapers/          # SQL scripts for database setup

Contributing

  1. Fork the repository
  2. Create your 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.