VocoDine is a full-stack MERN application that allows users to book a restaurant table using their voice. The app guides the user through a natural step-by-step conversation, collecting all necessary booking details like number of guests, date, time, cuisine preference, and any special requests.
It also checks the real-time weather for the chosen date and suggests indoor or outdoor seating accordingly. Once the user confirms the booking, the details are saved in the database and a confirmation email is sent automatically.
For admins, VocoDine provides a simple Admin Dashboard where they can view all bookings, track analytics such as total bookings, popular cuisines, and peak booking hours, and export the booking data to CSV for offline use.
This project demonstrates voice interaction, backend integration, real-world API usage, and clean data handling, making it fully functional and assessment-ready.
- Speech-to-Text (Input): Uses the Web Speech API to transcribe user voice into real-time text data.
- Text-to-Speech (Output): Uses the browserโs SpeechSynthesis interface to generate the Agentโs verbal responses.
- Natural Language Input: Users can speak naturally (e.g., "Table for two tomorrow evening") instead of using rigid commands.
- Converts spoken dates like โtomorrowโ or โnext Mondayโ into real dates using chrono-node.
- Converts spoken numbers like โtwo guestsโ into numeric values before saving.
- Fetches real weather data from OpenWeatherMap.
- If rain is expected, the assistant suggests indoor seating.
- If the weather is clear, it suggests outdoor seating.
- Weather suggestions are spoken to the user as part of the conversation.
- Bookings are stored in MongoDB.
- REST APIs support:
- Create booking
- Get all bookings
- Get booking by ID
- Cancel booking
- Email confirmation sent using Nodemailer (test SMTP)
- View all bookings in one place.
- Analytics for:
- Total Bookings
- Popular cuisines
- Peak booking hours
- Export booking data to CSV.
- React.js
- Web Speech API
- react-speech-recognition
- Axios
- Chart.js
- CSS (for styling components and layout)
- Node.js
- Express.js
- MongoDB Atlas
- Mongoose
- OpenWeatherMap API
- Git + GitHub
- Postman (API testing)
- npm
To get started with VocoDine, follow these steps:
git clone https://github.com/sandeepmukku12/vocodine.git
cd vocodineNavigate to the backend directory and install dependencies:
cd backend
npm installCreate a .env file in the backend directory:
PORT=5000
MONGODB_URI=your_mongodb_connection_string
OPEN_WEATHER_API_KEY=your_openweathermap_keyRun the server:
npm run devNavigate to the frontend directory and install dependencies:
cd frontend
npm installStart the React development server:
npm start- After running the frontend, open your browser at http://localhost:3000 (React default) to access the app.
- Make sure the backend server is running before using the frontend.
- Click Start Booking
- Allow microphone access
- Speak naturally and follow the voice prompts
- Confirm the booking at the end
vocodine/
โ
โโโ backend/ # Server-side code
โ โโโ server.js # Main Express server file, sets up routes and middleware
โ โโโ config/ # Configuration files
โ โ โโโ db.js # MongoDB connection setup
โ โ โโโ weather.js # Fetches weather data from OpenWeatherMap API
โ โโโ models/ # Database schemas
โ โ โโโ booking.model.js # Booking schema for MongoDB
โ โโโ controllers/ # Functions handling API logic
โ โ โโโ booking.controller.js # Create, read, delete bookings. Send confirmation mails using nodemailer
โ โโโ routes/ # API route definitions
โ โ โโโ weather.route.js # Route for weather data (used by frontend)
โ โ โโโ index.js # Aggregates all routes
โ โ โโโ booking.route.js # Routes for bookings (CRUD)
โ โโโ .env # Environment variables (API keys, DB URI)
โ โโโ package.json # Backend dependencies and scripts
โ
โโโ frontend/ # Client-side React app
โ โโโ public/ # Static files (HTML, images, favicon)
โ โโโ src/
โ โโโ components/ # Reusable UI components
โ โ โโโ AgentBubble.js # Displays assistant's messages
โ โ โโโ BookingSummary.js # Shows booking summary before confirmation
โ โ โโโ LoadingIndicator.js # Small Loading dynamic text while processing
โ โ โโโ VoiceAssistant.js # Handles speech recognition and microphone input
โ โโโ services/ # API calls to backend
โ โ โโโ api.js # Axios functions for bookings and weather
โ โโโ pages/ # Main pages of the app
โ โ โโโ AdminDashboard.js # View all bookings and analytics
โ โ โโโ Home.js # Main voice booking page
โ โโโ App.js # Main React app
โ โโโ index.js # ReactDOM render entry point
โ
โโโ README.md # Approach, Project description, setup instructions, overview
โโโ .gitignore # Files/folders to ignore in Git- Check for Booking Intent
- Ask number of guests
- Ask booking date
- Fetch weather for that date
- Suggest indoor / outdoor seating
- Ask booking time
- Ask cuisine preference
- Ask EmailId (not mandatory)
- Ask special requests
- Confirm and save booking
- Send confirmation mail with booking details to EmailID (if provided)
The assistant never skips steps and handles both positive and negative responses.
When building VocoDine, I wanted the app to be easy to use and the code easy to read and maintain. Hereโs how I handled the main parts of the project:
- Implemented a step-by-step system (state machine) for the voice interaction.
- The conversation starts at Step 1 and only moves forward when the app receives the required input.
- This ensures the assistant doesnโt skip important details, like the number of guests, and keeps the flow logical and predictable.
- People donโt always say exact dates like โJanuary 26th.โ
- Used
chrono-nodeto interpret phrases like โtomorrowโ or โnext Friday.โ - This allows the app to store dates in a proper format that the database understands.
- The backend fetches real-time weather data using OpenWeather API instead of using static labels.
- The agent uses this information to give spoken suggestions for indoor or outdoor seating.
- Different sentences are chosen based on the forecast, giving users a more natural and helpful conversation.
- Voice inputs are normalized before saving: numbers, dates, and times are stored in consistent formats.
- Ensures accurate records and avoids errors in the database.
- Backend logic is in Controllers and frontend API calls are in a single Service file.
- This separation makes the code easier to maintain, debug, and extend in the future.
- Custom CSS was written instead of using libraries/frameworks like Tailwind CSS or Material-UI.
- Keeps the app lightweight and demonstrates my ability to create clean, modern layouts from scratch (e.g., soft UI cards, balanced spacing).
- Web Speech API: free, browser-native, simple for voice input/output.
- chrono-node: interprets natural date phrases for consistent database storage.
- MongoDB + Mongoose: flexible and easy to work with for storing bookings.
- Voice recognition depends on browser support and microphone permissions.
- Weather forecasts are limited to the next 5 days due to API restrictions.
- Speech accuracy may vary with background noise or accents.
Building VocoDine was a great way to connect different parts of the MERN stack while integrating modern voice and API technologies. I focused on making the voice assistant feel helpful and intuitive, using real weather data to guide the userโs booking choices.
This project demonstrates my ability to:
- Build a full-stack MERN application from scratch.
- Work with real-time voice input/output and external APIs.
- Write clear and maintainable code for a practical use case, such as a voice-based restaurant booking system.
-
๐ค Advanced NLP Integration
Moving beyond basic state management to use the OpenAI GPT API for more intelligent, free-flowing conversations. -
๐ฃ๏ธ Smart Intent Handling
Improving the system's ability to handle complex variations in user input (e.g., "Book a table" vs. "Table for 2 tomorrow"). -
๐ฎ๐ณ Multi-language Support
Adding support for Hindi + English voice commands. -
๐ Code-Switching Capability
Allowing the AI to understand "Hinglish" (mixing Hindi and English) seamlessly during a single conversation. -
๐ฌ SMS & WhatsApp Confirmations
Integrating Twilio or WhatsApp APIs to send real-time booking receipts and location pins. -
๐ฑ Live Menu Integration
Connecting to the restaurant's POS system to check dish availability during the voice call.
This project is licensed under the MIT License. See the LICENSE file for more info.
VocoDine was built with โค๏ธ by Sandeep Mukku
Thank you for checking out the project! ๐