A modern and user-friendly food ordering app built with React Native and Firebase. The app allows users to browse a menu, add items to their cart, place orders, and view past orders. It supports both light and dark themes for a seamless user experience.
- Dynamic Menu: Fetch menu items from Firebase.
- Cart Management: Add, update, and delete items in the cart.
- Order Summary: View order details before confirming.
- Order History: Track past orders with timestamps.
- Cross-Platform Support: Works on Android, iOS, and Web.
| Home Screen | Cart Screen | Orders Screen |
|---|---|---|
- Frontend: React Native, React Navigation, React Native Paper
- Backend: Firebase (Firestore, Authentication)
- State Management: Context API
- Environment Management:
react-native-dotenv
Follow these steps to set up the project locally:
- Node.js (v16 or higher)
- Expo CLI (
npm install -g expo-cli)
-
Clone the repository:
git clone https://github.com/your-username/mini-food-app.git cd mini-food-app -
Install dependencies:
npm install
-
Create a
.envfile in the root directory and add your Firebase credentials:FIREBASE_API_KEY=your-api-key FIREBASE_AUTH_DOMAIN=your-auth-domain FIREBASE_PROJECT_ID=your-project-id FIREBASE_STORAGE_BUCKET=your-storage-bucket FIREBASE_MESSAGING_SENDER_ID=your-messaging-sender-id FIREBASE_APP_ID=your-app-id FIREBASE_MEASUREMENT_ID=your-measurement-id
-
Start the development server:
npm start
-
Run the app on your preferred platform:
- Android:
npm run android - iOS:
npm run ios - Web:
npm run web
- Android:
mini-food-app/
├── assets/ # Static assets (images, icons, etc.)
├── context/ # Context API for state management
│ └── CartContext.tsx # Cart and orders context
├── screens/ # App screens
│ ├── HomeScreen.tsx # Menu and food items
│ ├── CartScreen.tsx # Cart management
│ ├── OrderSummaryScreen.tsx # Order summary
│ └── OrdersScreen.tsx # Past orders
├── services/ # Firebase configuration
│ ├── firebase.ts # Firebase initialization
│ └── firebaseServer.ts # Server-side Firebase logic
├── .env # Environment variables
├── App.tsx # Main app entry point
├── package.json # Project dependencies and scripts
└── README.md # Project documentation
- Go to the Firebase Console.
- Create a new project and add a web app.
- Copy the Firebase configuration and paste it into the
.envfile. - Enable Firestore and Authentication in the Firebase Console.
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your message here" - Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
This project is licensed under the MIT License.
For any inquiries or feedback, feel free to reach out:
- Email: [email protected]
- GitHub: akash2061
Enjoy using the Mini Food App! 🍕