A modern ride-hailing mobile application built with React Native and Expo. Sarathi connects riders with drivers for convenient, on-demand transportation.
- 🔐 Authentication - Secure user authentication with Clerk
- 🗺️ Real-time Maps - Interactive maps with Google Maps (Android) and Apple Maps (iOS)
- 📍 Location Services - GPS-based location tracking and route planning
- 🚗 Ride Booking - Browse available drivers and book rides
- 📱 Cross-platform - Works on both Android and iOS
- 🎨 Modern UI - Beautiful, responsive design with NativeWind (Tailwind CSS)
- Framework: Expo (SDK 54)
- Language: TypeScript
- Navigation: Expo Router (file-based routing)
- Authentication: Clerk
- Database: Neon (PostgreSQL)
- Maps: expo-maps (Google Maps / Apple Maps)
- Styling: NativeWind (Tailwind CSS)
- State Management: Zustand
- Location: expo-location
- Build: EAS Build
Before you begin, ensure you have:
- Node.js (v18 or higher)
- npm or yarn
- Expo CLI
- EAS CLI (for builds)
- Android Studio (for Android development)
- Xcode (for iOS development, macOS only)
git clone https://github.com/yourusername/sarathi.git
cd sarathinpm installCopy the example environment file and fill in your credentials:
cp .env.example .envRequired environment variables:
| Variable | Description |
|---|---|
EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY |
Clerk publishable key for authentication |
DATABASE_URL |
Neon PostgreSQL connection string |
EXPO_PUBLIC_GEOAPIFY_API_KEY |
Geoapify API key for geocoding |
EXPO_PUBLIC_GOOGLE_API_KEY |
Google Maps API key |
EXPO_PUBLIC_SERVER_URL |
Backend server URL (for production builds) |
- Go to Google Cloud Console
- Enable Maps SDK for Android
- Create an API key and add it to
app.json:
{
"expo": {
"android": {
"config": {
"googleMaps": {
"apiKey": "YOUR_GOOGLE_MAPS_API_KEY"
}
}
}
}
}npm run dev
# or
npx expo start# Android
npm run android
# or
npx expo run:android
# iOS (macOS only)
npm run ios
# or
npx expo run:iossarathi/
├── app/ # App screens (file-based routing)
│ ├── (api)/ # API routes
│ │ ├── driver+api.ts # Driver endpoints
│ │ ├── user+api.ts # User endpoints
│ │ └── ride/ # Ride endpoints
│ ├── (auth)/ # Authentication screens
│ │ ├── signin.tsx
│ │ ├── signup.tsx
│ │ └── welcome.tsx
│ ├── (root)/ # Main app screens
│ │ ├── (tabs)/ # Tab navigation
│ │ │ ├── home.tsx
│ │ │ ├── rides.tsx
│ │ │ ├── chat.tsx
│ │ │ └── profile.tsx
│ │ ├── book_ride.tsx
│ │ ├── find_ride.tsx
│ │ └── active_ride.tsx
│ └── _layout.tsx # Root layout
├── components/ # Reusable components
│ ├── Maps.tsx # Map component
│ ├── RideCard.tsx # Ride card component
│ ├── DriverCard.tsx # Driver card component
│ └── ...
├── constants/ # App constants and assets
├── lib/ # Utility functions
├── store/ # Zustand state management
├── types/ # TypeScript type definitions
└── assets/ # Images, fonts, icons
# Install EAS CLI
npm install -g eas-cli
# Login to Expo
eas login
# Configure EAS (first time only)
eas build:configure
# Build for Android (APK for testing)
eas build --platform android --profile preview
# Build for Android (AAB for Play Store)
eas build --platform android --profile production
# Build for iOS
eas build --platform ios --profile productionSet your environment variables in the Expo dashboard:
- Go to your project settings
- Navigate to "Environment variables"
- Add all required variables from
.env.example
| Endpoint | Method | Description |
|---|---|---|
/(api)/driver |
GET | Get all available drivers |
/(api)/user |
POST | Create new user |
/(api)/ride/create |
POST | Create a new ride |
/(api)/ride/[id] |
GET | Get rides for a user |
/(api)/ride/complete-ride |
POST | Complete an active ride |
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Expo for the amazing framework
- Clerk for authentication
- Neon for serverless PostgreSQL
- NativeWind for Tailwind CSS support
Made with ❤️ using Expo