Skip to content

andreslomelig/ParkPulse

Repository files navigation

ParkPulse

Community-powered parking discovery for Aguascalientes (pilot).

ParkPulse is a map-first mobile app for finding and validating parking with community input. Users can sign in, explore parking places, report real-time availability, save favorite places, rate and review parking lots, and maintain their own profile with theme and avatar customization.

Why It Matters

Finding parking is usually fragmented, stale, and frustrating. ParkPulse turns that into a lightweight community feedback loop: drivers can discover parking spots, check recent status signals, and contribute live updates that help the next user make a faster decision.

Highlights

  • React Native + Expo mobile app with Supabase backend
  • Community reporting flow for available, full, and closed
  • Map-first UX with search, saved places, reviews, and profile customization
  • Pilot-ready data model with seeded places, TTL-based status updates, and authenticated user activity

Screenshots

ParkPulse map ParkPulse search ParkPulse profile

Demo Notes

  • The current demo assumes Supabase is configured and seeded.
  • The project already includes seeded pilot places in Supabase for Aguascalientes.
  • Place status updates currently rely on manual refresh plus periodic in-app refresh.
  • Realtime subscriptions are not part of the current demo build.

What The App Does Now

  • Email/password authentication with Supabase Auth
  • Map-first parking exploration for Aguascalientes
  • Rich place detail sheet with:
    • live status
    • last update
    • report activity summary
    • rating summary
    • hours, pricing, capacity, and access details
  • Search overlay with local filtering
  • Parking place creation flow backed by Supabase RPCs
  • Report submission flow with proximity information and TTL-based status expiry
  • Review composer with star rating and optional comment
  • Review list modal per parking place
  • Saved places list per signed-in user
  • Personal report history screen
  • Editable profile/settings screen with:
    • preferred name
    • full name
    • phone
    • avatar URL
    • profile photo upload from device to Supabase Storage
    • local theme preference

Current Product Status

Implemented:

  • Authenticated app shell
  • Persistent places, place_reports, place_ratings, and user_profiles
  • Storage bucket for user avatars
  • Frontend flows for create place, report, save, review, and profile editing
  • Data-layer test coverage across src/lib
  • UI tests for key app flows

Still pending or intentionally incomplete:

  • OTP / phone auth
  • Admin moderation tools
  • Stricter server-side reputation and anti-abuse controls
  • Bot resistance and contributor reliability scoring
  • Realtime subscriptions
  • Reservations / payments

For the current demo build:

  • authentication is email/password with Supabase Auth
  • map data is expected to come from Supabase seed data and user-generated reports
  • manual refresh is part of the intended live-data story during the pilot

Core Domain Model

The current Supabase bootstrap creates and uses:

  • user_profiles
    • profile data tied to auth.users
    • fields include email, phone, full_name, preferred_name, avatar_url
  • places
    • persistent parking lot catalog
    • coordinates, description, pricing, hours, capacity, access type, and status
  • place_reports
    • availability reports from users or session actors
    • TTL-based expiration per status
  • place_ratings
    • one rating/comment identity per place
  • place_live_status
    • frontend-friendly live place read model
  • place_report_feed
    • frontend-friendly report history read model
  • place_review_feed
    • frontend-friendly review feed
  • avatars storage bucket
    • profile images uploaded from the app

RPCs:

  • create_place(...)
  • create_place_report(...)
  • upsert_place_rating(...)
  • optional helper: get_place_report_history(...)

Pilot Rules In The Current App

  • Pilot city: Aguascalientes
  • Parking status options:
    • available
    • full
    • closed
  • TTL defaults:
    • available: 15 minutes
    • full: 30 minutes
    • closed: 12 hours
  • Report proximity target:
    • 200 meters in the current frontend flow

Tech Stack

  • Expo
  • React Native
  • TypeScript
  • react-native-maps
  • @gorhom/bottom-sheet
  • react-native-gesture-handler
  • react-native-reanimated
  • Supabase
    • Auth
    • Postgres
    • Storage
  • Jest
  • React Native Testing Library

Project Structure

src/
  components/
  i18n/
  lib/
  navigation/
  screens/
docs/
supabase/
assets/

Important areas:

Getting Started

Prerequisites

  • Node.js 22 recommended
  • npm
  • Expo CLI through npx
  • Optional:
    • Android Studio
    • Xcode

If you use nvm:

nvm use

Install

npm install

Environment Variables

Create a .env file from .env.example and set:

EXPO_PUBLIC_SUPABASE_URL=
EXPO_PUBLIC_SUPABASE_ANON_KEY=

Do not commit .env.

Run The App

npm run start

If native packages changed, use a clean Expo cache:

npx expo start -c

If Expo fails on startup with TypeError: fetch failed, the CLI is usually trying to reach Expo's package metadata service before Metro starts. In that case, use:

npm run start:offline

This keeps local development working when your network, proxy, firewall, or DNS blocks Expo's dependency check.

Supabase Setup

Run the SQL in supabase/bootstrap.sql inside Supabase SQL Editor.

Full setup guide:

The bootstrap sets up:

  • profile sync from auth.users
  • places schema and seed data
  • report and rating tables
  • frontend-oriented views
  • avatar storage bucket
  • RLS policies for profile data and avatar uploads

The current seeded demo data includes three pilot parking places in Aguascalientes.

Avatar Upload Setup

The app now supports picking a profile picture from the device and uploading it to Supabase Storage.

Requirements in Supabase:

  • bucket name must be exactly avatars
  • bucket can be public for simple profile images
  • storage policies must allow authenticated uploads

Current app upload path format:

<auth.uid()>/avatar.<ext>

The uploaded public URL is saved into:

public.user_profiles.avatar_url

If you migrated or rebuilt your Supabase project, rerun the latest supabase/bootstrap.sql so Storage policies and the bucket match the current app code.

Available Scripts

  • npm run start: start Expo / Metro
  • npm run start:offline: start Expo / Metro without Expo network checks
  • npm run android: open Android target
  • npm run ios: open iOS target
  • npm run web: open web target
  • npm run lint: run ESLint
  • npm run typecheck: run TypeScript checks
  • npm test: run Jest

Testing

Current automated testing covers:

  • normalized data and API behavior in src/lib
  • navigation behavior
  • key screen flows such as:
    • map loading
    • search
    • save place
    • create place
    • submit report
    • open reviews
    • profile settings
    • avatar upload helper

Important test files include:

  • src/lib/*.test.ts
  • src/navigation/AppNavigator.test.tsx
  • src/screens/MapScreen.test.tsx
  • src/screens/ProfileSettingsScreen.test.tsx

Known Product Gaps

These are the main areas still needing work:

  • stronger server-side rate limiting
  • anti-troll review/report moderation
  • reliability scoring for contributors
  • bot detection / abuse prevention
  • admin review tools
  • better conflict resolution for place edits
  • true realtime updates without manual refresh

Troubleshooting

Uploads Fail With RLS Errors

If profile picture upload fails with:

new row violates row-level security policy

then the problem is usually in Supabase Storage setup, not the app UI.

Check:

  • the avatars bucket exists
  • old conflicting storage policies are removed
  • the latest bootstrap SQL has been applied

Native / Node Setup Problems

If npm or node fails before install, repair your Node environment or use the version declared by .nvmrc.

Contributing

  • Create one branch per ticket
  • Use conventional commits

Example:

feat(profile): add avatar upload flow

License

Proprietary for now.

About

Community-powered parking app for Aguascalientes: real-time parking place discovery, validation, and map-first UX built with Expo, React Native, and Supabase.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors