Tap2Eat is a food delivery Android application that provides a seamless ordering experience with integrated payment processing, location services, and AI-powered assistance.
- Email/Password authentication with email verification
- Google Sign-In integration using Credentials API
- Password reset functionality
- User profile management with photo upload
- Browse food items and restaurants
- Add items to cart with quantity management
- Real-time cart updates
- Order placement
- Order history and details
- Stripe payment processing
- Secure payment handling
- Payment intent management
- Google Maps integration
- Location-based restaurant discovery
- Delivery address selection
- Real-time location tracking
- Gemini-powered AI assistant
- Food recommendations
- Order assistance
- Natural language conversation interface
- Special offers and promotions
- Discount code application
- Deal notifications
- Order history tracking
- Order status updates
- Order details and receipts
- Language: Kotlin
- Minimum SDK: 28 (Android 9.0)
- Target SDK: 35 (Android 15)
- Build System: Gradle with Kotlin DSL
- UI Framework: Jetpack Compose + ViewBinding
- Architecture Components: ViewModel, LiveData
- Navigation: Activity-based navigation with Intent extras
- Firebase Authentication: User authentication
- Firebase Realtime Database: Real-time data synchronization
- Firebase Functions: Serverless functions for email services
- Node.js Backend: Express.js REST API
- Cloudinary: Media storage and management
- Stripe: Payment processing
- Google Maps SDK: Maps and location services
- Google Play Services Location: Location tracking
- Google Generative AI: Gemini model for chatbot
- Retrofit: REST API client
- OkHttp: HTTP client
- Gson: JSON serialization
- Glide: Image loading and caching
- Material Design Components: UI components
- Splash Screen API: App launch experience
- Credentials API: Google Sign-In integration
- Coroutines: Asynchronous programming
app/src/main/java/com/example/tap2eat/
βββ adapter/ # RecyclerView adapters (Cart, Orders)
βββ API/ # API interfaces and utilities
βββ models/ # Data models (Customer, Payment, Media)
βββ CartFragment.kt # Shopping cart fragment
βββ CheckoutPage.kt # Checkout activity
βββ Details_Page.kt # User details page
βββ FoodPage.kt # Main food browsing page
βββ Gemini.kt # AI chatbot activity
βββ History.kt # Order history
βββ MainActivity.kt # Authentication and main entry
βββ Maps.kt # Maps and location services
βββ Payment.kt # Payment processing
βββ Profile.kt # User profile
βββ SplashScreen.kt # Splash screen
βββ YourOrders.kt # Order details
βββ Utils.kt # Utility functions
Backend/
βββ src/
β βββ controllers/ # Route handlers
β β βββ user.conrollers.js
β βββ middlewares/ # Express middlewares
β β βββ multer.middleware.js
β βββ routes/ # API routes
β β βββ user.routes.js
β βββ utils/ # Utility functions
β β βββ ApiError.js
β β βββ ApiRespose.js
β β βββ asyncHandler.js
β β βββ cloudinary.js
β βββ app.js # Express app configuration
β βββ constants.js # Constants
β βββ index.js # Server entry point
βββ public/ # Static files
βββ package.json # Dependencies
- Android Studio Hedgehog or later
- JDK 8 or higher
- Android SDK with API level 28+
- Node.js (v14 or higher) and npm
- Firebase project with the following services enabled:
- Authentication
- Firestore
- Realtime Database
- Functions
- Cloudinary account (for media uploads)
- Stripe account (for payments)
- Google Cloud Console project (for Maps and Sign-In)
-
Clone the repository
git clone <repository-url> cd Tap2Eat
-
Configure Firebase
- Create a Firebase project at Firebase Console
- Download
google-services.jsonand place it in:app/google-services.json
- Enable the required Firebase services mentioned above
-
Add SHA Keys:
- In the Firebase Console, go to
Project settings>General>Your apps. - Click on
Add fingerprintand add your SHA-1 and SHA-256 keys. You can find these keys in Android Studio:- Go to the terminal in Android Studio and run:
./gradlew signingReport
- Go to the terminal in Android Studio and run:
- If it shows any error, it means that your JDK is not properly set up.
- Copy the SHA-1 and SHA-256 keys from the report and add them to Firebase.
- After adding SHA-1 and SHA-256 keys, download the
google-services.jsonfile provided and place it in theappdirectory of your project.
- In the Firebase Console, go to
-
Configure API Keys
- Create a
local.propertiesfile in the root directory with:API_KEY_LOCATION=<your-google-maps-api-key> API_KEY_GEMINI=<your-gemini-api-key> - Add your Google Sign-In Web Client ID in
app/src/main/res/values/strings.xmlasdefault_web_client_id - Add your Google Maps API key in
app/src/main/res/values/strings.xmlasgoogle_maps_key
- Create a
-
Build the project
./gradlew build -
Run the app
- Connect an Android device or start an emulator
- Run the app from Android Studio or use:
./gradlew installDebug
-
Navigate to Backend directory
cd Backend -
Install dependencies
npm install
-
Configure environment variables Create a
.envfile in the root directory (not in Backend folder) with:CORS_ORIGIN=<your-client-url> CLOUDNINARY_CLOUD_NAME=<your-cloudinary-name> CLOUDNINARY_API_KEY=<your-cloudinary-key> CLOUDNINARY_API_SECRET=<your-cloudinary-secret> PORT=<port-number> -
Run the backend server
# Development mode (with hot reload) npm run dev # Production mode npm start
- Enable Email/Password authentication in Firebase Console
- Configure OAuth consent screen for Google Sign-In
- Set up Firestore database with appropriate security rules
- Configure Realtime Database rules
- Deploy Firebase Functions for email services
- Create a Stripe account at Stripe Dashboard
- Get your publishable and secret keys
- Configure Stripe in your app (keys should be stored securely)
- Enable Google Maps SDK for Android in Google Cloud Console
- Create API key and restrict it to your app's package name and SHA-1 fingerprint
- Add the API key to
strings.xml
- Create a Cloudinary account at Cloudinary
- Get your cloud name, API key, and API secret
- Add them to your
.envfile
The app requires the following permissions:
INTERNET: Network accessACCESS_NETWORK_STATE: Check network connectivityPOST_NOTIFICATIONS: Push notifications (Android 13+)WRITE_EXTERNAL_STORAGE: File operationsACCESS_FINE_LOCATION: Location servicesACCESS_COARSE_LOCATION: Location services
./gradlew assembleDebug
./gradlew assembleRelease
The APK will be generated in app/build/outputs/apk/
Key dependencies are managed in gradle/libs.versions.toml. Major dependencies include:
- AndroidX Core KTX
- Material Design Components
- Firebase BOM (32.2.2)
- Jetpack Compose
- Stripe Android SDK (21.28.1)
- Google Play Services (Maps, Location, Wallet, Auth)
- Retrofit & OkHttp
- Glide
- Google Generative AI (0.8.0)
- Kotlin Coroutines
- POST
/api/v1/uploadMedia- Description: Upload a media file (image/video)
- Request: Form data with
mediafile - Response: Success/error message with uploaded media details
- GET
/checks- Description: Server health check
- Response:
{ message: "ok" }
- Version Code: 1
- Version Name: 1.0
- Naman Gulati