A modern React Native/Expo mobile application for navigating public transit in AsunciΓ³n, Paraguay. Built with Expo, React Native Maps, and Supabase.
- Interactive Map: View all bus stops (~120 stops) across AsunciΓ³n
- Real-time Location: Blue dot shows your current location
- Route Planning: Find direct and transfer routes between any two stops
- Step-by-step Instructions: Clear Spanish instructions for each journey
- Walking Directions: Calculate walking distance and time to stops
- Transit Lines: 15 bus lines with color-coded routes
- Visual Routes: See routes highlighted on the map
- Smart Auto-fill: Origin automatically filled with nearest stop
- Loading States: Clear indicators while data loads
- Error Handling: Graceful error messages for failed requests
- Haptic Feedback: Tactile feedback on button presses (iOS)
- Smooth Animations: Fluid transitions and interactions
- Touch-Friendly: All buttons meet 48x48dp touch target requirements
- Error Boundaries: Prevents app crashes from unexpected errors
- Safe Area Support: Proper spacing for notches and status bars
- Interactive map centered on user location
- Red markers showing all bus stops
- Transit route lines displayed as dashed gray lines
- "Planificar Ruta" (Plan Route) floating action button
- Stop details bottom sheet when tapping markers
- Modal with origin/destination selection
- Origin auto-filled with nearest stop
- Search autocomplete for finding stops
- Route results showing direct and transfer options
- Duration, distance, and steps for each route
- Map with highlighted route path
- Route summary (duration, distance, type)
- Step-by-step instructions in Spanish
- Walking, bus, and transfer indicators
- "Entendido" (Understood) button to return
- React Native 0.73.2 - Mobile framework
- Expo 50.0.0 - Development platform and tooling
- TypeScript 5.1.3 - Type safety (strict mode enabled)
- React Navigation 6.1.9 - Screen navigation
- Stack Navigator - Hierarchical navigation
- React Native Maps 1.10.0 - Interactive map display
- Expo Location 16.1.0 - Device location services
- Expo Haptics - Tactile feedback support
- Supabase 2.38.5 - Database and API
- PostgreSQL - Transit data storage
- React Native Gesture Handler 2.14.0 - Gesture handling
- React Native Reanimated 3.6.0 - Smooth animations
- React Native Safe Area Context 4.8.2 - Safe area handling
- @gorhom/bottom-sheet 4.6.0 - Modal components
- Node.js 18+ and npm
- Expo CLI (
npm install -g expo-cli) - Supabase account (free tier works)
- iOS Simulator (Mac) or Android Emulator/Device
- Clone the repository
git clone <repository-url>
cd nanduti- Install dependencies
npm install- Set up environment variables
cp .env.example .envEdit .env with your Supabase credentials:
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key-here- Set up Supabase database
Follow the SEEDING.md guide to:
- Create a new Supabase project
- Set up the database tables (stops, lines, routes, line_polylines)
- Run the seed script to populate with AsunciΓ³n transit data
- Start the development server
npm start- Run on device/simulator
- iOS: Press
iin the terminal or use Expo Go app - Android: Press
ain the terminal or use Expo Go app - Web: Press
win the terminal
- Quick Start Guide - Get up and running in 5 minutes
- Setup Guide - Detailed step-by-step instructions
- Troubleshooting Guide - Common issues and solutions
- MVP Summary - Implementation details
- Seeding Guide - Database setup and data population
- Project Structure - Code organization
src/
βββ components/ # Reusable UI components
β βββ Map.tsx # Interactive map component
β βββ StopCard.tsx # Bus stop card
β βββ RouteCard.tsx # Route result card
β βββ BottomSheet.tsx # Modal bottom sheet
β βββ LoadingSpinner.tsx # Loading indicator
β βββ ErrorBoundary.tsx # Error boundary component
βββ screens/ # Screen components
β βββ HomeScreen.tsx # Main map screen
β βββ RouteDetailScreen.tsx # Route details screen
βββ services/ # API and external services
β βββ supabase.ts # Supabase client and queries
β βββ location.ts # Location services
β βββ routing.ts # Route finding algorithm
βββ hooks/ # Custom React hooks
β βββ useLocation.ts # Location tracking hook
β βββ useRoute.ts # Route finding hook
βββ types/ # TypeScript type definitions
β βββ index.ts # All type definitions
βββ utils/ # Utility functions
β βββ constants.ts # App constants (colors, defaults)
β βββ distance.ts # Distance calculations
βββ styles/ # Styling constants
# Start development server
npm start
# Run on Android
npm run android
# Run on iOS
npm run ios
# Run on web
npm run web
# Type checking
npm run type-checkThe project uses TypeScript in strict mode. Run type checking before committing:
npm run type-check- Use TypeScript strict mode
- Follow existing code conventions
- Add proper null checks
- Use React.memo for performance optimization
- Remove console statements before committing
-
stops: Geographic locations of bus stops (~120 stops)
id: Primary keyname: Stop namelatitude,longitude: Coordinatesneighborhood: Neighborhood name
-
lines: Transit line information (15 lines)
id: Primary keyname: Line name (e.g., "LΓnea 1")color: Hex color code for displaydescription: Line description
-
routes: Junction table linking lines to stops
id: Primary keyline_id: Foreign key to linesstop_id: Foreign key to stopsorder: Stop order in the route
-
line_polylines: GeoJSON route geometries
id: Primary keyline_id: Foreign key to linesgeojson: LineString geometry
See SEEDING.md for database seeding instructions.
The app finds routes using a multi-step approach:
- Direct Routes: Find bus lines that serve both origin and destination stops
- Transfer Routes: Find combinations of lines through intermediate stops
- Ranking: Sort routes by total time and distance
- Walking Speed: 5 km/h
- Bus Speed: 20 km/h
- Transfer Time: 5 minutes (estimated)
- Search Radius: 500 meters for nearby stops
See TROUBLESHOOTING.md for common issues and solutions:
- Map not showing stops
- Location permission not working
- Routes not found
- App crashes
- Connection errors
This is an MVP project. Future improvements could include:
- Real-time bus tracking
- Schedule information
- Fare calculator
- Favorites/saved routes
- Multiple language support
- Accessibility features
- User accounts
- Push notifications
- Dark mode
MIT License - feel free to use this project for learning or your own transit apps!
Built for the Γanduti public transit system in AsunciΓ³n, Paraguay.
Special thanks to:
- Expo team for the amazing development platform
- Supabase for the easy-to-use backend
- React Native community for great libraries