A web app that helps customers in Tamale, Ghana find shops selling products they need — with pinpoint map locations. Traders can create accounts and list products.
# Tamale Market Finder (TMF)
A lightweight web app that helps customers in Tamale, Ghana find shops selling the products they need — with pinpoint locations on a map. Traders can create accounts and list their products, similar to a simplified Shopify.
## Features
### For Customers
- 🔍 Search for products by name or category
- 📍 See shop locations on an interactive map (OpenStreetMap)
- 🧭 Get directions to any shop
- 📋 Browse products by market area (Central Market, Aboabo, etc.)
- 📱 Mobile-friendly — works great on phones
### For Traders / Shop Owners
- 🏪 Create a shop profile (name, category, location, contact)
- 📦 Add and manage products (name, price, description, photo, stock status)
- 📍 Set shop location using GPS or manual coordinates
- 🆓 Free to join — no fees
## Tech Stack (All Free)
- **Frontend**: HTML, CSS, vanilla JavaScript (no framework)
- **Maps**: Leaflet.js + OpenStreetMap (free, no API key)
- **Backend & Database**: Supabase (free tier — PostgreSQL, Auth, Storage)
- **Hosting**: GitHub Pages (free)
## Quick Start
### 1. Set up Supabase (5 minutes)
1. Go to supabase.com and create a free account
2. Create a new project
3. Go to Settings → API to get your Project URL and anon key
4. Open `app.js` and replace:
```js
const SUPABASE_URL = 'YOUR_SUPABASE_URL';
const SUPABASE_ANON_KEY = 'YOUR_SUPABASE_ANON_KEY';
```
with your actual credentials
### 2. Create Database Tables
Run this SQL in the Supabase SQL Editor:
```sql
-- Create shops table
CREATE TABLE shops (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
created_by UUID REFERENCES auth.users(id),
owner_name TEXT,
shop_name TEXT NOT NULL,
category TEXT,
description TEXT,
latitude DOUBLE PRECISION,
longitude DOUBLE PRECISION,
address TEXT,
phone TEXT,
opening_hours TEXT,
market_area TEXT,
created_date TIMESTAMPTZ DEFAULT NOW(),
updated_date TIMESTAMPTZ DEFAULT NOW()
);
-- Create products table
CREATE TABLE products (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
shop_id UUID REFERENCES shops …