Logo Lanfrica

Ed-pr/ghana-care-finder

Domaine:

healthcare

Type de record:

software
Créateur:
Ed-
Hôte:
# 🇬🇭 Ghana Care Finder Find the right healthcare facility fast across Ghana — including a Tourist Emergency Mode that maps attractions to their nearest hospitals. --- ## 🚀 Launching on Lovable (Recommended — No Terminal Needed) ### Step 1 — Import to Lovable 1. Go to **lovable.dev** → create an account 2. Click **New project → Import from GitHub** (push this repo first) OR click **New project** and upload the zip directly ### Step 2 — Connect Supabase 1. In Lovable, click the **Supabase** integration button 2. Create a free Supabase project at **supabase.com** 3. Lovable auto-injects `VITE_SUPABASE_URL` and `VITE_SUPABASE_ANON_KEY` ### Step 3 — Run the database migration 1. In Supabase dashboard → **SQL Editor** 2. Open `supabase/migrations/001_schema_and_rls.sql` from this repo 3. Paste the entire contents and click **Run** ### Step 4 — Seed the database 1. In `src/pages/admin/FacilityManager.tsx`, temporarily add: ```tsx import { seedDatabase } from '../../data/seed'; // Inside the component JSX: 🌱 Seed Database ``` 2. In the Lovable preview, go to `/admin/facilities` 3. Sign up for an account, promote yourself to `superadmin` in Supabase: - Supabase → Table Editor → `user_roles` → find your row → change `role` to `superadmin` 4. Click **🌱 Seed Database** once 5. Remove the seed button and save ### Step 5 — Enable Google Auth (optional) 1. Supabase → Authentication → Providers → Google → enable 2. Add your Google OAuth credentials ### Step 6 — Publish Click **Publish** in Lovable — you get a live URL instantly. --- ## 🛠 Tech Stack - **React 18** + TypeScript + Vite - **Supabase** — PostgreSQL database, Auth, real-time - **TanStack Query** — data fetching and caching - **Zustand** — UI state (search, filters, GPS) - **React Router v6** — client-side routing - **React Hook Form + Zod** — form validation --- ## 📁 Project Structure ``` src/ lib/ supabase.ts, database.types.ts hooks/ useAuth, useFacilities, useReviews, useUsers, useAuditLog …