A Proof-of-Concept Android application for displaying a restaurant menu using Firebase backend.
- Language: Java
- Framework: Android SDK (compatible with Android Studio Jellyfish or later)
- Database/Backend: Firebase (Cloud Firestore for menu data, Firebase Auth for guest login)
- UI Style: Material Design 3
- Minimum SDK: 24 (Android 7.0)
- Target SDK: 34 (Android 14)
aquila-restaurant/
├── app/
│ ├── src/main/
│ │ ├── java/com/aquila/restaurant/
│ │ │ ├── activities/
│ │ │ │ ├── MainActivity.java # Login screen with Firebase Anonymous Auth
│ │ │ │ ├── MenuActivity.java # Menu display with categories
│ │ │ │ └── DetailActivity.java # Food item details
│ │ │ ├── adapters/
│ │ │ │ ├── CategoryAdapter.java # RecyclerView adapter for categories
│ │ │ │ └── FoodItemAdapter.java # RecyclerView adapter for food items
│ │ │ └── models/
│ │ │ ├── FoodItem.java # Food item data model
│ │ │ └── Category.java # Category data model
│ │ ├── res/
│ │ │ ├── layout/ # XML layouts
│ │ │ ├── values/ # Strings, colors, themes
│ │ │ ├── drawable/ # Vector icons and drawables
│ │ │ └── menu/ # Menu resources
│ │ └── AndroidManifest.xml
│ ├── build.gradle # App-level Gradle config
│ └── google-services.json # ⚠️ ADD YOUR OWN from Firebase Console!
├── build.gradle # Project-level Gradle config
├── settings.gradle
├── gradle.properties
├── SampleData.json # Sample data for Firebase import
└── README.md
- Authentication: Firebase Anonymous Authentication for guest access
- Menu Display: RecyclerView with horizontal category chips and vertical food item list
- Category Filtering: Filter food items by category (Appetizers, Mains, Desserts)
- Detail View: Full details of selected food items with images
- Material Design 3: Modern UI with Material You theming
- Go to Firebase Console
- Create a new project or select an existing one
- Add an Android app with package name:
com.example.restaurantmenu - Download the
google-services.jsonfile
app/google-services.json
Download your google-services.json from Firebase Console and place it in the app/ directory.
In Firebase Console:
-
Authentication:
- Go to Authentication > Sign-in method
- Enable "Anonymous" sign-in provider
-
Cloud Firestore:
- Go to Firestore Database
- Create database (start in test mode for development)
- Set up security rules as needed
To import the sample menu data into Firestore:
- Go to Firebase Console > Firestore Database
- Create a collection named
foodItems - Import the data from
SampleData.json:- You can manually add documents, or
- Use the Firebase CLI:
firebase firestore:import SampleData.json - Or use the Firebase Admin SDK
Manual Import Steps:
- In Firestore, click "Start collection"
- Name it
foodItems - Add documents with the following fields:
name(string)price(number)description(string)imageUrl(string)category(string): "Appetizers", "Mains", or "Desserts"
- Open the project in Android Studio Jellyfish or later
- Sync Gradle files
- Connect an Android device or start an emulator
- Run the app
For development, you can use these permissive rules:
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /foodItems/{document=**} {
allow read: if request.auth != null;
allow write: if false;
}
}
}The SampleData.json file includes:
- 3 Pizzas: Margherita, Pepperoni, Quattro Formaggi
- 3 Pastas: Carbonara, Bolognese, Alfredo
- 4 Appetizers: Caesar Salad, Caprese Salad, Garden Salad, Bruschetta, Garlic Bread
- 3 Desserts: Tiramisu, Panna Cotta, Gelato Trio
- AndroidX Core & AppCompat
- Material Components (Material Design 3)
- Firebase BOM 32.7.0
- Firebase Auth
- Firebase Firestore
- Glide 4.16.0 (Image loading)
This is a proof-of-concept application for demonstration purposes.