feat: real Halal Monitor via Overpass API + user-contributed yellow markers
- Replace hardcoded KL mock data with live OpenStreetMap Overpass API
- Support 15+ major cities worldwide (London, Dubai, Tokyo, NY, etc.)
- Bounding-box queries (faster than radius search)
- HTTP/1.1 fix for Overpass Apache compat
- Nominatim geocoding for city search
- 6-hour file-based cache per grid cell
- 3-mirror Overpass fallback with retry on timeout
- User-contributed places with yellow (⭐) markers
- 'Add Place' modal with name/type/address/notes form
- Map tap-to-pin coordinates for new places
- Delete own submissions from detail modal
- Prisma UserPlace model + API routes
Closes: Halal Monitor showing only KL data
This commit is contained in:
@@ -40,6 +40,7 @@ model User {
|
||||
cashouts CashoutRequest[]
|
||||
halalBookmarks HalalBookmark[]
|
||||
halalUsage HalalUsage?
|
||||
userPlaces UserPlace[]
|
||||
ownedGroups Group[] @relation("GroupOwner")
|
||||
groupMemberships GroupMember[]
|
||||
forumThreads ForumThread[]
|
||||
@@ -241,6 +242,23 @@ model HalalUsage {
|
||||
periodEnd DateTime?
|
||||
}
|
||||
|
||||
model UserPlace {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
name String
|
||||
address String
|
||||
lat Float
|
||||
lng Float
|
||||
type String // "mosque" | "restaurant" | "cafe"
|
||||
notes String?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
@@index([userId])
|
||||
@@index([lat, lng])
|
||||
}
|
||||
|
||||
model Notification {
|
||||
id String @id @default(cuid())
|
||||
userId String
|
||||
|
||||
Reference in New Issue
Block a user