Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

siraajul/Loo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

12 Commits

Repository files navigation


Loo app icon

Loo

Find a clean washroom in Dhaka β€” fast.

Community-powered Β· Free forever Β· Built for Bangladesh

iOS Swift SwiftUI MapLibre PRs Welcome License


Finding a clean public washroom in Dhaka is hard.
Dead apps, outdated listings, zero community input.
Loo fixes that β€” open-source, OSM-powered, built by the community for the city.


✨ What it does

Feature Description
πŸ—Ί Live OSM Map OpenStreetMap tiles via MapLibre β€” no Google, no fees, always up to date
πŸ’§ Liquid Glass UI iOS 26 floating Liquid Glass top bar β€” search, filter, profile pills over the map
πŸ“ Locate Me Tap to recenter on yourself anytime; auto-center on first GPS fix
🧭 Compass Finder Real-time rotating arrow guides you turn-by-turn with haptic pulses as you get closer
πŸ“‹ Nearby Sheet 5 closest washrooms sorted by live GPS distance, updating as you move
🚺 Women-Friendly Badge At-a-glance pink/grey pill on every listing β€” no more guessing
🌈 Hijra-Inclusive Bangladesh's third gender is a first-class category, with its own marker color
πŸ•Œ Wudu Area Mosques expose whether ritual ablution facilities are available
πŸ‘Ά Baby Changing & Menstrual Products Surfaced as filterable amenities, not buried metadata
βœ… Freshness Signal "Verified recently / this month / old / unverified" pill β€” community trust at a glance
⏰ Open Now Live parse of opening hours (24/7 or HH:mm-HH:mm) β€” filter and chip in detail
🧼 Cleanliness Score Separate sub-rating from overall rating, color-coded
πŸŽ› Real Filters Gender, women-friendly, accessible, free, open-now, amenities β€” actually applied to map + list
βž• Submit a Washroom Crowdsource new locations with map preview
πŸ” Auth Phone OTP sign-in via Supabase β€” no email required (backend pending)

πŸ“± Screens

Onboarding β€” the first 5 seconds sell the inclusivity story

Welcome Built for everyone Permission priming

Map β€” iOS 26 Liquid Glass top bar, floating pills over OpenStreetMap

First-launch permission prompt Glass pills + locate-me + nearby sheet

Detail & Finder β€” at-a-glance trust signals

Women-friendly Β· Freshness Β· Open-now Β· Cleanliness Turn-by-turn compass with haptics

Filters β€” actually filter the map + nearby list

Gender Β· Inclusivity Β· Accessibility Amenities Β· Min rating

Profile β€” same Liquid Glass language as onboarding

Submit & Sign-in flow

Pin a new washroom Accessibility Β· Fee Β· Notes Sign in (demo) Phone OTP (demo)

πŸ— Architecture

App Flow

graph TD
 A([App Launch]) --> B[looApp]
 B --> C[ContentView]
 C --> D[NavigationStack\nAppRouter]
 D --> E[πŸ—Ί MapView]
 D --> F[πŸ” DetailView]
 D --> G[🧭 FinderView]
 D --> H[πŸ‘€ ProfileView]
 E --> E1[OSMMapView\nMapLibre]
 E --> E2[NearbySheet]
 E --> E3[TopBar Search + Filter]
 E --> E4[SubmitView]
 F --> F1[PhotoGallery]
 F --> G
 G --> G1[ArrowView\nCompass]
 G --> G2[FinderViewModel\nHeading + GPS]
 subgraph Core Services
 S1[LocationService\nGPS + Compass]
 S2[SwiftData\nLocal Cache]
 S3[Supabase\nBackend]
 end
 E1 -.->|washrooms| S2
 G2 -.->|location + heading| S1
 E4 -.->|submit| S3
 style A fill:#00A86B,color:#fff
 style Core Services fill:#f0f0f0
Loading

Data Flow

sequenceDiagram
 participant U as User
 participant MV as MapView
 participant LS as LocationService
 participant SD as SwiftData
 participant SB as Supabase
 U->>MV: App opens
 MV->>LS: requestPermission()
 LS-->>MV: location + heading stream
 MV->>SD: SeedData.injectIfNeeded()
 SD-->>MV: [Washroom] array
 MV->>MV: Sort by real GPS distance
 MV-->>U: Map + NearbySheet rendered
 U->>MV: Tap washroom marker
 MV->>U: Navigate β†’ DetailView
 U->>U: Tap "Find It"
 U->>MV: Navigate β†’ FinderView
 MV->>LS: poll heading @ 10Hz
 LS-->>MV: arrowRotation updated
 MV-->>U: Rotating compass arrow
Loading

Layer Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ SwiftUI Views β”‚
β”‚ MapView Β· DetailView Β· FinderView Β· SubmitView β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ViewModels / State β”‚
β”‚ MapViewModel Β· FinderViewModel Β· AppRouter β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Core Services β”‚ Repositories β”‚
β”‚ LocationService β”‚ WashroomRepository β”‚
β”‚ HeadingService β”‚ SubmissionRepository β”‚
β”‚ Geo Β· Formatting β”‚ AuthRepository β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ SwiftData (Local) β”‚ Supabase (Remote) β”‚
β”‚ Washroom @Model β”‚ PostgreSQL + Auth + CDN β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ MapLibre GL Native β”‚
β”‚ OpenFreeMap OSM Vector Tiles β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🧠 How the Compass Works

The Finder screen gives you a real-time pointing arrow β€” no map needed, just walk.

arrowRotation = bearing(userLocation β†’ target) [radians, true north]
 βˆ’ deviceHeading [radians, from CLHeading]
graph LR
 GPS[GPS Fix\nCLLocation] --> BRG[Haversine\nBearing]
 CMP[Compass\nCLHeading.trueHeading] --> LPF[Low-pass Filter\nΞ± = 0.15]
 LPF --> HDG[Smoothed\nHeading Β°β†’rad]
 BRG --> SUB[βˆ’]
 HDG --> SUB
 SUB --> ROT[rotationEffect\nArrowView]
 ROT --> HAP[Haptic\nevery 10m < 100m]
Loading
  • Single CLLocationManager handles both GPS and compass β€” trueHeading is accurate because the same manager has location context for magnetic declination
  • Low-pass filter smooths compass jitter without introducing noticeable lag
  • Haptic feedback fires every 10 m bucket when within 100 m of the target

πŸ—Ί Why MapLibre + OpenFreeMap?

Google Maps Apple Maps MapLibre + OpenFreeMap
Cost πŸ’° Pay per load Free (limited) βœ… Free forever
Bangladesh coverage Moderate Poor βœ… Excellent (HOT + OSM)
Offline support No Limited βœ… Yes
Open source No No βœ… Yes
Custom styling Paid No βœ… Yes
API key required Yes No βœ… No

πŸš€ Quick Start

Requirements

  • Xcode 26+
  • iOS 26+ device (Liquid Glass UI; map tiles + compass need real hardware)
  • Swift 6

Steps

# 1. Clone
git clone https://github.com/siraajul/Loo.git
cd Loo
# 2. Open in Xcode β€” MapLibre SPM resolves automatically
open loo.xcodeproj

3. Add location permission in the target's Build Settings:

INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = Used to show washrooms near your location.

4. (Optional) Supabase backend β€” add your credentials to:

// loo/Core/Network/SupabaseClient.swift
let supabaseURL = URL(string: "https://your-project.supabase.co")!
let supabaseKey = "your-anon-key"

5. Run on device β€” the app seeds 10 real Dhaka washrooms on first launch so it works immediately, even without a backend.


🌱 Seed Data (Offline-first)

The app ships with 12 Dhaka washrooms so it's usable from day one β€” each with realistic hours, freshness dates, and amenity flags:

Washroom Type Gender Fee Highlights
Bashundhara City Mall πŸͺ Mall Mixed Free πŸ‘Ά Baby Β· 🩸 Menstrual Β· ✨ 4.3
Gulshan-1 DCC Market 🚻 Public Mixed ৳5 Verification aging
Jamuna Future Park πŸͺ Mall Mixed Free πŸ‘Ά Baby Β· 🩸 Menstrual Β· ✨ 4.6
Baitul Mukarram Mosque πŸ•Œ Mosque Male Free πŸ•Œ Wudu area
Dhanmondi Lake Park 🚻 Public Mixed ৳2 Verification stale
Panthapath Petrol Pump β›½ Petrol Pump Mixed Free πŸ•’ 24/7
Square Hospital πŸ₯ Hospital Mixed Free πŸ•’ 24/7 Β· πŸ‘Ά Baby
Star Kabab Restaurant 🍴 Restaurant Mixed Free πŸ•’ Late night
Motijheel Shapla Chatter 🚻 Public Male ৳3 Verification stale
Uttara Sector-3 Park 🚻 Public Mixed Free β€”
Banani DCC Trans-Inclusive Stop 🚻 Public 🌈 Hijra Free Bandhu-affiliated
Lalbagh Fort Family Restroom 🚻 Public πŸ‘¨β€πŸ‘©β€πŸ‘§ Family ΰ§³10 πŸ‘Ά Baby changing

πŸ›  Tech Stack

Layer Technology
UI SwiftUI 5
Map MapLibre GL Native + OpenFreeMap (OSM vector tiles)
Local DB SwiftData
Backend Supabase (PostgreSQL + Auth + Storage)
Location CoreLocation β€” GPS + compass heading
State @Observable macro (iOS 17)
Navigation NavigationStack + typed route enum
Language Swift 5.9

πŸ—Ί Roadmap

βœ… v0.1 β€” Foundation (Done)

  • OSM map with MapLibre GL Native
  • GPS blue dot + auto-center on user
  • Locate-me FAB (Liquid Glass) for re-centering
  • Custom washroom markers (color-coded by gender/type)
  • Nearby sheet sorted by real GPS distance
  • Compass Finder with smooth arrow + haptics
  • Submit a washroom form with map preview
  • 12 seed washrooms (incl. hijra + family) for offline-first experience

βœ… v0.2 β€” Local Fit & Inclusivity (Done)

  • iOS 26 Liquid Glass top bar (search, filter, profile, locate-me)
  • Three-page onboarding with permission priming and inclusivity showcase
  • Women-friendly badge (pink/grey pill at-a-glance)
  • Hijra (third-gender) category with own marker color
  • Wudu area attribute on mosques
  • Baby changing + menstrual products amenities
  • Cleanliness sub-rating (separate from overall)
  • Freshness signal ("Verified recently / aging / stale / unverified")
  • Open-now status β€” parses 24/7 and HH:mm-HH:mm windows
  • Filter sheet wired to map + nearby list (was decorative before)
  • Search bar filters by name / Bangla name
  • Open in Maps deep-link from detail view

πŸ”¨ v0.3 β€” Community (In Progress)

  • Live Supabase sync β€” fetch real washroom data from backend
  • Submit washroom β†’ Supabase review queue (currently no-ops)
  • Star ratings + written reviews
  • Photo upload via Supabase Storage (gallery currently always empty)
  • Moderator approval flow
  • Real "Open in Maps" deep-link from DetailView (currently dead)
  • Phone OTP auth via Supabase (currently stubbed)

πŸ”­ v0.4 β€” Discovery

  • Full-text search across washroom names and areas (search bar currently decorative)
  • Search suggestions as you type
  • Sort by rating, distance, or price
  • Cluster markers at low zoom levels

🌍 v0.4 β€” Scale

  • Offline tile caching (MapLibre offline packs)
  • Push notifications for nearby new submissions
  • Expand to Chittagong and Sylhet
  • Android version (React Native or Kotlin Multiplatform)
  • Import from OpenStreetMap amenity=toilets tag

πŸ’Ž v1.0 β€” Polish

  • App icon + launch screen
  • Bangla language support (বাংলা UI)
  • Accessibility β€” VoiceOver labels on all map markers
  • TestFlight public beta

🀝 Contributing

Dhaka has thousands of washrooms not yet on the map. This is a community project β€” every contribution matters.

Ways to contribute

How What
πŸ—Ί Add washrooms Open an Issue with the name, location, and details of a real Dhaka washroom
πŸ› Report bugs Open an Issue with steps to reproduce
πŸ’‘ Suggest features Start a Discussion
πŸ”§ Write code Pick any open Issue and submit a PR
πŸ“Έ Add photos Once photo upload is live, document real washrooms
🌐 Translate Help with Bangla UI strings

Code contribution workflow

# 1. Fork the repo on GitHub
# 2. Clone your fork
git clone https://github.com/YOUR_USERNAME/Loo.git
# 3. Create a branch
git checkout -b feature/your-feature-name
# 4. Make your changes, then commit
git commit -m "feat: add your feature"
# 5. Push and open a PR against siraajul/Loo main
git push origin feature/your-feature-name

Coding conventions

  • SwiftUI views in Features/<FeatureName>/
  • New data fields go on the Washroom SwiftData model
  • Follow existing naming: PascalCase types, camelCase properties
  • No force unwraps β€” use guard let or if let
  • No comments explaining what code does β€” only why if non-obvious

Good first issues

Look for issues tagged good first issue β€” these are intentionally scoped and well-described.


πŸ“„ License

MIT Β© siraajul

You're free to use, modify, and distribute this code. If you build something with it, a shoutout or star ⭐ is always appreciated.


⭐ Star this repo if Loo helped you find a clean washroom in Dhaka

Report Bug Β· Request Feature Β· Submit a Washroom

Built with ❀️ for Dhaka · Powered by OpenStreetMap contributors

About

Community-powered iOS app to find clean public washrooms in Dhaka, Bangladesh. OSM map via MapLibre, live GPS compass navigator, distance-sorted nearby list, washroom details, and community submissions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /