This is a Next.js application that provides a voice-first ordering assistant for the Shree Rathnam hotel. It features a full menu dashboard, real-time item availability management, and a GenAI-powered voice assistant for taking orders.
- Menu Dashboard: View the entire restaurant menu, filter by category, and toggle item availability in real-time.
- Unavailable Items Management: A dedicated page to review and permanently remove unavailable items from the menu.
- AI Voice Assistant: A voice-activated assistant to take customer orders conversationally. It supports multiple languages (English, Hindi, Kannada).
- Settings: Configure the voice assistant's language.
- Real-time Sync: Menu data is synchronized in real-time with a Firestore database.
- Framework: Next.js (App Router)
- UI: React, TypeScript, Tailwind CSS, Shadcn/UI
- AI: Google Genkit
- Database: Google Firestore
- Platform: Firebase
- Node.js (v18 or later)
- npm or yarn
- A Firebase project with Firestore enabled.
git clone <repository-url>
cd <repository-name>npm installCreate a .env.local file in the root of the project by copying the example file:
cp .env.local.example .env.localNow, fill in the values in .env.local:
- NEXT_PUBLIC_FIREBASE_API_KEY: Your Firebase project's API key.
- NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: Your Firebase project's auth domain.
- NEXT_PUBLIC_FIREBASE_PROJECT_ID: Your Firebase project's ID.
- NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: Your Firebase project's storage bucket.
- NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: Your Firebase project's messaging sender ID.
- NEXT_PUBLIC_FIREBASE_APP_ID: Your Firebase project's app ID.
- GOOGLE_API_KEY: Your Google AI API key for Genkit.
- In your Firebase project console, go to Project settings > Service accounts.
- Click Generate new private key and save the downloaded JSON file.
- IMPORTANT: Rename the file to serviceAccountKey.jsonand place it in the root of your project.
- DO NOT COMMIT THIS FILE TO GIT. The .gitignorefile is already configured to ignore it.
The application requires menu data to be present in Firestore. A script is provided to seed the database from src/lib/menu_sample.json.
Run the following command:
npm run seed:firestoreThis will create a menu collection in your Firestore database and populate it with the sample menu items.
For optimal query performance, create a composite index in your Firestore database for the menu collection with the following fields:
- category(Ascending)
- name_lower(Ascending)
- available(Ascending)
You can now start the Next.js development server:
npm run devThe application will be available at http://localhost:9002.
This application is configured for deployment on Firebase App Hosting.
- Ensure the Firebase CLI is installed and you are logged in.
- Initialize Firebase App Hosting in your project.
- Set the required environment variables (from .env.local) as secrets in your App Hosting backend. Refer to the Firebase documentation for instructions on how to do this.
- Deploy the application:
firebase deploy --only apphosting