Shyamnath commited on
Commit
960b03d
Β·
1 Parent(s): 10c03be

Remove binary images for Hugging Face Spaces compatibility1

Browse files
Files changed (1) hide show
  1. README.md +400 -180
README.md CHANGED
@@ -260,7 +260,6 @@ The `hotels.csv` file serves as the central registry for all hotel databases:
260
  ```csv
261
  hotel_database,password
262
  tabble_new.db,myhotel
263
-
264
  ```
265
 
266
  ### Creating a New Hotel Database
@@ -463,14 +462,14 @@ python init_db.py --force-reset
463
 
464
  1. **Create Empty Database:**
465
  ```bash
466
- python create_empty_db.py
467
- ```
468
 
469
  2. **Add to Registry:**
470
  Edit `hotels.csv` and add your database entry:
471
  ```csv
472
- yourhotel.db,yourpassword123
473
- ```
474
 
475
  3. **Configure Hotel Settings:**
476
  - Access admin panel: `http://localhost:3000/admin`
@@ -499,219 +498,440 @@ NODE_ENV=production
499
  - Ensure proper directory permissions for image uploads
500
  - Consider using cloud storage for production deployments
501
 
502
- ## πŸ€— Hugging Face Spaces Deployment Guide
503
 
504
- ### πŸš€ Quick Deployment Steps
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
505
 
506
- #### 1. Prepare Your Repository
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  ```bash
508
- # Clone or fork this repository
509
- git clone https://github.com/your-username/tabble-v3.git
510
- cd tabble-v3
511
-
512
- # Ensure all required files are present:
513
- # βœ“ Dockerfile
514
- # βœ“ app.py
515
- # βœ“ requirements.txt
516
- # βœ“ templates/
517
- # βœ“ app/
518
- ```
519
-
520
- #### 2. Create Hugging Face Space
521
-
522
- 1. **Go to**: [https://huggingface.co/new-space](https://huggingface.co/new-space)
523
- 2. **Fill in details**:
524
- - **Space name**: `tabble-v3-restaurant` (or your preferred name)
525
- - **License**: MIT
526
- - **SDK**: Docker
527
- - **Visibility**: Public (or Private)
528
- 3. **Connect Repository**: Link your GitHub repository
529
- 4. **Create Space**
530
-
531
- #### 3. Configure Space Settings
532
-
533
- Add this to your Space's `README.md` header:
534
- ```yaml
535
- ---
536
- title: Tabble-v3 Restaurant Management
537
- emoji: 🍽️
538
- colorFrom: blue
539
- colorTo: purple
540
- sdk: docker
541
- app_port: 7860
542
- pinned: false
543
- license: mit
544
- short_description: Modern restaurant management system with QR ordering
545
- tags:
546
- - restaurant
547
- - management
548
- - fastapi
549
- - qr-code
550
- - ordering
551
- ---
552
- ```
553
-
554
- #### 4. Automatic Build Process
555
-
556
- Hugging Face Spaces will automatically:
557
- 1. βœ… Pull your repository
558
- 2. βœ… Build Docker image using your Dockerfile
559
- 3. βœ… Initialize database with sample data
560
- 4. βœ… Start the application on port 7860
561
- 5. βœ… Provide public URL for access
562
-
563
- ### πŸ“± Using Your Deployed App
564
-
565
- #### πŸ“‹ Access Points
566
-
567
- | Interface | URL | Description |
568
- |-----------|-----|-------------|
569
- | **Home** | `/` | Main landing page with interface selection |
570
- | **Customer** | `/customer` | QR code ordering interface |
571
- | **Chef** | `/chef` | Kitchen order management |
572
- | **Admin** | `/admin` | Complete restaurant management |
573
- | **API Docs** | `/docs` | Interactive API documentation |
574
- | **Health** | `/health` | System health check |
575
-
576
- #### πŸ”‘ Demo Credentials
577
-
578
- - **Hotel Access Code**: `myhotel`
579
- - **Demo Database**: `tabble_new.db`
580
- - **Sample Tables**: 1-20
581
- - **Phone OTP**: Any 6 digits (demo mode)
582
-
583
- ### πŸ”§ Customization for Production
584
-
585
- #### 1. Hotel Configuration
586
-
587
- Edit `hotels.csv`:
588
  ```csv
589
  hotel_database,password
590
- your_restaurant.db,secure_password_123
591
- another_hotel.db,different_password_456
592
  ```
593
 
594
- #### 2. Environment Variables
595
 
596
- Create `.env` file:
597
- ```env
598
- SECRET_KEY=your_production_secret_key
599
- HUGGINGFACE_SPACES=1
600
- PORT=7860
601
- LOG_LEVEL=INFO
 
 
 
602
  ```
603
 
604
- #### 3. Database Initialization
 
 
 
605
 
606
- Create custom database:
607
- ```python
608
- # Run this script to create your hotel database
609
  python create_empty_db.py
610
  ```
611
 
612
- #### 4. Menu Setup
 
 
 
 
613
 
614
- 1. Access admin panel: `your-space-url/admin`
615
- 2. Enter your hotel access code
616
- 3. Navigate to "Manage Dishes"
617
- 4. Add your menu items with images
618
- 5. Configure pricing and categories
619
 
620
- ### πŸ“Š Monitoring and Analytics
 
621
 
622
- #### Built-in Features
623
- - βœ… Real-time order tracking
624
- - βœ… Customer analytics dashboard
625
- - βœ… Sales performance metrics
626
- - βœ… Kitchen efficiency reports
627
- - βœ… Revenue analytics
628
 
629
- #### Health Monitoring
630
- - **Health Check**: `your-space-url/health`
631
- - **API Status**: Monitor via `/docs` endpoint
632
- - **Database Status**: Check via admin panel
633
 
634
- ### πŸš‘ Troubleshooting
 
 
 
 
635
 
636
- #### Common Issues
 
 
 
 
637
 
638
- 1. **Build Failures**:
639
- ```bash
640
- # Check Dockerfile syntax
641
- # Verify requirements.txt dependencies
642
- # Ensure all required files are present
643
- ```
644
 
645
- 2. **Database Issues**:
646
- ```bash
647
- # Check hotels.csv format
648
- # Verify database permissions
649
- # Run database initialization
650
- ```
651
 
652
- 3. **Template Loading**:
653
- ```bash
654
- # Ensure templates/ directory exists
655
- # Check template file paths
656
- # Verify Jinja2 syntax
657
- ```
658
 
659
- #### Getting Help
 
 
 
 
 
660
 
661
- - **API Documentation**: `your-space-url/docs`
662
- - **System Status**: `your-space-url/health`
663
- - **Logs**: Check Hugging Face Spaces logs tab
664
- - **Issues**: Create issue in GitHub repository
 
 
 
 
 
 
 
 
 
 
665
 
666
- ### πŸ”„ Updates and Maintenance
 
 
667
 
668
- #### Updating Your Space
 
 
 
669
 
670
- 1. **Push changes** to your GitHub repository
671
- 2. **Hugging Face Spaces** will auto-rebuild
672
- 3. **Monitor build logs** in Spaces interface
673
- 4. **Test functionality** after deployment
674
 
675
- #### Backup Strategies
676
 
677
- 1. **Database Backup**:
678
- ```python
679
- # Use admin panel backup feature
680
- # Or manually copy .db files
681
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
682
 
683
- 2. **Configuration Backup**:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
684
  ```bash
685
- # Backup hotels.csv
686
- # Backup custom templates
687
- # Backup uploaded images
688
  ```
689
 
690
- ### πŸŽ† Advanced Features
 
 
 
 
691
 
692
- #### Multi-Language Support
693
- - Modify templates for your language
694
- - Update form labels and messages
695
- - Configure number and currency formats
696
 
697
- #### Custom Branding
698
- - Upload your logo to static files
699
- - Modify CSS in templates
700
- - Update color schemes and fonts
701
 
702
- #### Integration Options
703
- - **Payment Gateways**: Add payment processing
704
- - **SMS Services**: Integrate real OTP services
705
- - **Analytics**: Connect to external analytics tools
706
- - **POS Systems**: API integration capabilities
707
 
708
- ---
 
 
 
 
 
 
 
 
 
709
 
710
- ## πŸ“ž Support and Community
 
 
 
711
 
712
- - **Documentation**: Complete API docs at `/docs`
713
- - **GitHub Issues**: Report bugs and request features
714
- - **Community**: Join discussions in GitHub Discussions
715
- - **Updates**: Follow repository for latest features
716
 
717
- **Ready to revolutionize your restaurant management? Deploy on Hugging Face Spaces now!** πŸš€πŸ½οΈ
 
260
  ```csv
261
  hotel_database,password
262
  tabble_new.db,myhotel
 
263
  ```
264
 
265
  ### Creating a New Hotel Database
 
462
 
463
  1. **Create Empty Database:**
464
  ```bash
465
+ python create_empty_db.py
466
+ ```
467
 
468
  2. **Add to Registry:**
469
  Edit `hotels.csv` and add your database entry:
470
  ```csv
471
+ yourhotel.db,yourpassword123
472
+ ```
473
 
474
  3. **Configure Hotel Settings:**
475
  - Access admin panel: `http://localhost:3000/admin`
 
498
  - Ensure proper directory permissions for image uploads
499
  - Consider using cloud storage for production deployments
500
 
 
501
 
502
+ A comprehensive restaurant management system built with FastAPI (backend) and React (frontend), featuring QR code-based table ordering, phone OTP authentication, real-time order management, and multi-database support for independent hotel operations.
503
+
504
+ ## 🌟 Key Features
505
+
506
+ ### 🍽️ Customer Interface
507
+ - **Phone OTP Authentication**: Secure Firebase-based authentication
508
+ - **Real-time Cart Management**: Live cart updates with special offers
509
+ - **Today's Specials**: Dynamic special dish recommendations
510
+ - **Payment Processing**: Integrated payment with loyalty discounts
511
+ - **Order History**: Track past orders and preferences
512
+
513
+ ### πŸ‘¨β€πŸ³ Chef Dashboard
514
+ - **Real-time Order Management**: Live order notifications and updates
515
+ - **Kitchen Operations**: Streamlined order acceptance and completion
516
+ - **Order Status Updates**: Instant status changes reflected across all interfaces
517
+
518
+ ### 🏨 Admin Panel
519
+ - **Complete Restaurant Management**: Full control over restaurant operations
520
+ - **Dish Management**: Add, edit, and manage menu items with images
521
+ - **Offers & Specials**: Create and manage promotional offers
522
+ - **Table Management**: Monitor table occupancy and status
523
+ - **Order Tracking**: Complete order lifecycle management
524
+ - **Loyalty Program**: Configurable visit-based discount system
525
+ - **Selection Offers**: Amount-based discount configuration
526
+ - **Settings**: Hotel information and configuration management
527
+
528
+ ### πŸ“Š Analytics Dashboard
529
+ - **Customer Analysis**: Detailed customer behavior insights
530
+ - **Dish Performance**: Menu item popularity and sales metrics
531
+ - **Chef Performance**: Kitchen efficiency tracking
532
+ - **Sales & Revenue**: Comprehensive financial reporting
533
+
534
+ ### πŸ—„οΈ Multi-Database Support
535
+ - **Independent Hotel Operations**: Each hotel operates with its own database
536
+ - **Database Authentication**: Secure database access with password protection
537
+ - **Session-based Management**: Consistent database context across all interfaces
538
+ - **Data Isolation**: Complete separation of hotel data for security and privacy
539
+
540
+ ## πŸ“ Project Structure
541
+
542
+ ```
543
+ tabble/
544
+ β”œβ”€β”€ app/ # Backend FastAPI application
545
+ β”‚ β”œβ”€β”€ database.py # Database configuration and models
546
+ β”‚ β”œβ”€β”€ main.py # FastAPI application entry point
547
+ β”‚ β”œβ”€β”€ middleware/ # Custom middleware (CORS, session handling)
548
+ β”‚ β”œβ”€β”€ models/ # SQLAlchemy database models
549
+ β”‚ β”œβ”€β”€ routers/ # API route definitions
550
+ β”‚ β”‚ β”œβ”€β”€ admin.py # Admin panel endpoints
551
+ β”‚ β”‚ β”œβ”€β”€ chef.py # Chef dashboard endpoints
552
+ β”‚ β”‚ β”œβ”€β”€ customer.py # Customer interface endpoints
553
+ β”‚ β”‚ └── analytics.py # Analytics and reporting endpoints
554
+ β”‚ β”œβ”€β”€ services/ # Business logic and external services
555
+ β”‚ β”‚ β”œβ”€β”€ firebase_service.py # Firebase authentication
556
+ β”‚ β”‚ └── database_service.py # Database operations
557
+ β”‚ β”œβ”€β”€ static/ # Static file serving
558
+ β”‚ β”‚ └── images/ # Dish and hotel logo images
559
+ β”‚ β”‚ └── dishes/ # Organized by database name
560
+ β”‚ └── utils/ # Utility functions and helpers
561
+ β”œβ”€β”€ frontend/ # React frontend application
562
+ β”‚ β”œβ”€β”€ src/
563
+ β”‚ β”‚ β”œβ”€β”€ components/ # Reusable React components
564
+ β”‚ β”‚ β”‚ β”œβ”€β”€ Layout.js # Main layout wrapper
565
+ β”‚ β”‚ β”‚ β”œβ”€β”€ AdminLayout.js # Admin panel layout
566
+ β”‚ β”‚ β”‚ └── ChefLayout.js # Chef dashboard layout
567
+ β”‚ β”‚ β”œβ”€β”€ pages/ # Page components
568
+ β”‚ β”‚ β”‚ β”œβ”€β”€ admin/ # Admin interface pages
569
+ β”‚ β”‚ β”‚ β”œβ”€β”€ chef/ # Chef dashboard pages
570
+ β”‚ β”‚ β”‚ β”œβ”€β”€ customer/ # Customer interface pages
571
+ β”‚ β”‚ β”‚ └── analysis/ # Analytics dashboard
572
+ β”‚ β”‚ β”œβ”€β”€ services/ # API communication services
573
+ β”‚ β”‚ β”‚ └── api.js # Axios configuration and API calls
574
+ β”‚ β”‚ β”œβ”€β”€ App.js # Main React application
575
+ β”‚ β”‚ β”œβ”€β”€ index.js # React DOM entry point
576
+ β”‚ β”‚ └── global.css # Global styling
577
+ β”‚ β”œβ”€β”€ public/ # Static assets
578
+ β”‚ β”‚ β”œβ”€β”€ index.html # HTML template
579
+ β”‚ β”‚ └── favicon.ico # Application icon
580
+ β”‚ β”œβ”€β”€ package.json # Node.js dependencies
581
+ β”‚ β”œβ”€β”€ .env.example # Environment variables template
582
+ β”‚ └── .env # Environment configuration
583
+ β”œβ”€β”€ templates/ # Report generation templates
584
+ β”‚ └── analysis/ # Analytics report templates
585
+ β”œβ”€β”€ hotels.csv # Database registry and passwords
586
+ β”œβ”€β”€ init_db.py # Database initialization with sample data
587
+ β”œβ”€β”€ create_empty_db.py # Empty database creation utility
588
+ β”œβ”€β”€ requirements.txt # Python dependencies
589
+ β”œβ”€β”€ run.py # Backend server launcher
590
+ └── README.md # Project documentation
591
+ ```
592
+
593
+ ## πŸš€ Quick Start Guide
594
+
595
+ ### Prerequisites
596
 
597
+ #### For Windows:
598
+ - **Python 3.8+**: Download from [python.org](https://www.python.org/downloads/)
599
+ - **Node.js 16+**: Download from [nodejs.org](https://nodejs.org/downloads/)
600
+ - **Git**: Download from [git-scm.com](https://git-scm.com/downloads)
601
+
602
+ #### For macOS:
603
+ - **Python 3.8+**: Install via Homebrew: `brew install python3`
604
+ - **Node.js 16+**: Install via Homebrew: `brew install node`
605
+ - **Git**: Install via Homebrew: `brew install git`
606
+
607
+ ### πŸ”§ Installation & Setup
608
+
609
+ #### 1. Clone the Repository
610
+ ```bash
611
+ git clone <repository-url>
612
+ cd tabble
613
+ ```
614
+
615
+ #### 2. Backend Setup
616
+
617
+ ##### Windows:
618
+ ```cmd
619
+ # Create virtual environment
620
+ python -m venv venv
621
+
622
+ # Activate virtual environment
623
+ venv\Scripts\activate
624
+
625
+ # Install dependencies
626
+ pip install -r requirements.txt
627
+ ```
628
+
629
+ ##### macOS/Linux:
630
+ ```bash
631
+ # Create virtual environment
632
+ python3 -m venv venv
633
+
634
+ # Activate virtual environment
635
+ source venv/bin/activate
636
+
637
+ # Install dependencies
638
+ pip install -r requirements.txt
639
+ ```
640
+
641
+ #### 3. Frontend Setup
642
+
643
+ ##### Both Windows and macOS:
644
  ```bash
645
+ # Navigate to frontend directory
646
+ cd frontend
647
+
648
+ # Copy environment template
649
+ cp .env.example .env
650
+
651
+ # Install Node.js dependencies
652
+ npm install
653
+ ```
654
+
655
+ #### 4. Configure Environment Variables
656
+
657
+ ##### Backend (.env in root directory):
658
+ ```env
659
+ SECRET_KEY=your_secret_key_here
660
+ ```
661
+
662
+ ##### Frontend (frontend/.env):
663
+ ```env
664
+ # Backend API Configuration
665
+ REACT_APP_API_BASE_URL=http://localhost:8000
666
+
667
+ # Development settings
668
+ NODE_ENV=development
669
+
670
+ # Firebase Configuration (optional)
671
+ # REACT_APP_FIREBASE_API_KEY=your_firebase_api_key
672
+ # REACT_APP_FIREBASE_AUTH_DOMAIN=your_project.firebaseapp.com
673
+ # REACT_APP_FIREBASE_PROJECT_ID=your_project_id
674
+ ```
675
+
676
+ ## πŸ—„οΈ Database Management
677
+
678
+ ### Understanding the Multi-Database System
679
+
680
+ Tabble supports multiple independent hotel databases, allowing each hotel to operate with complete data isolation. Each database contains:
681
+
682
+ - **Dishes**: Menu items with pricing, categories, and images
683
+ - **Orders**: Customer orders and order items
684
+ - **Persons**: Customer information and visit history
685
+ - **Tables**: Table management and occupancy status
686
+ - **Loyalty Program**: Visit-based discount tiers
687
+ - **Selection Offers**: Amount-based promotional offers
688
+ - **Settings**: Hotel-specific configuration
689
+ - **Feedback**: Customer reviews and ratings
690
+
691
+ ### Database Registry (hotels.csv)
692
+
693
+ The `hotels.csv` file serves as the central registry for all hotel databases:
694
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
695
  ```csv
696
  hotel_database,password
697
+ tabble_new.db,myhotel
698
+
699
  ```
700
 
701
+ ### Creating a New Hotel Database
702
 
703
+ #### Method 1: Using the create_empty_db.py Script
704
+
705
+ ##### Windows:
706
+ ```cmd
707
+ # Activate virtual environment
708
+ venv\Scripts\activate
709
+
710
+ # Run the database creation script
711
+ python create_empty_db.py
712
  ```
713
 
714
+ ##### macOS/Linux:
715
+ ```bash
716
+ # Activate virtual environment
717
+ source venv/bin/activate
718
 
719
+ # Run the database creation script
 
 
720
  python create_empty_db.py
721
  ```
722
 
723
+ **Interactive Process:**
724
+ 1. The script will prompt you for a database name
725
+ 2. Enter the hotel name (without .db extension)
726
+ 3. The script creates an empty database with proper schema
727
+ 4. Manually add the database entry to `hotels.csv`
728
 
729
+ **Example:**
730
+ ```
731
+ Creating a new empty database with the proper schema
732
+ Enter name for the new database (without .db extension): newhotel
 
733
 
734
+ Success! Created empty database 'newhotel.db' with the proper schema
735
+ ```
736
 
737
+ Then add to `hotels.csv`:
738
+ ```csv
739
+ newhotel.db,newhotel123
740
+ ```
 
 
741
 
742
+ #### Method 2: Initialize with Sample Data
 
 
 
743
 
744
+ ##### Windows:
745
+ ```cmd
746
+ # Create database with sample data
747
+ python init_db.py
748
+ ```
749
 
750
+ ##### macOS/Linux:
751
+ ```bash
752
+ # Create database with sample data
753
+ python init_db.py
754
+ ```
755
 
756
+ **Note:** This creates `tabble_new.db` with sample dishes, users, and configuration.
 
 
 
 
 
757
 
758
+ ### Database Schema Details
 
 
 
 
 
759
 
760
+ The `create_empty_db.py` script creates the following tables:
 
 
 
 
 
761
 
762
+ #### Core Tables:
763
+ - **dishes**: Menu items with pricing, categories, offers, and visibility
764
+ - **persons**: Customer profiles with visit tracking
765
+ - **orders**: Order management with status tracking
766
+ - **order_items**: Individual items within orders
767
+ - **tables**: Table management and occupancy status
768
 
769
+ #### Configuration Tables:
770
+ - **loyalty_program**: Visit-based discount configuration
771
+ - **selection_offers**: Amount-based promotional offers
772
+ - **settings**: Hotel information and branding
773
+ - **feedback**: Customer reviews and ratings
774
+
775
+ ### Running the Application
776
+
777
+ #### Start Backend Server
778
+
779
+ ##### Windows:
780
+ ```cmd
781
+ # Activate virtual environment
782
+ venv\Scripts\activate
783
 
784
+ # Start the FastAPI server
785
+ python run.py
786
+ ```
787
 
788
+ ##### macOS/Linux:
789
+ ```bash
790
+ # Activate virtual environment
791
+ source venv/bin/activate
792
 
793
+ # Start the FastAPI server
794
+ python run.py
795
+ ```
 
796
 
797
+ The backend will be available at `http://localhost:8000`
798
 
799
+ #### Start Frontend Development Server
800
+
801
+ ##### Both Windows and macOS:
802
+ ```bash
803
+ # Navigate to frontend directory
804
+ cd frontend
805
+
806
+ # Start React development server
807
+ npm start
808
+ ```
809
+
810
+ The frontend will be available at `http://localhost:3000`
811
+
812
+ ### πŸ”— API Documentation
813
+
814
+ Once the backend is running, access the interactive API documentation:
815
+ - **Swagger UI**: `http://localhost:8000/docs`
816
+ - **ReDoc**: `http://localhost:8000/redoc`
817
+
818
+ ## 🎯 Key Features Implementation
819
+
820
+ ### 🍽️ Table Management
821
+ - **QR Code Generation**: Automatic QR code creation for each table
822
+ - **Real-time Status Monitoring**: Live table occupancy tracking
823
+ - **Session-based Occupancy**: Table status changes based on customer interaction
824
+ - **Multi-database Support**: Table management per hotel database
825
+
826
+ ### πŸ“± Order Processing
827
+ - **Real-time Order Tracking**: Live order status updates across all interfaces
828
+ - **Kitchen Notifications**: Instant order notifications to chef dashboard
829
+ - **Status Synchronization**: Order status changes reflect immediately
830
+ - **Payment Integration**: Secure payment processing with loyalty discounts
831
+
832
+ ### πŸ“Š Analytics and Reporting
833
+ - **Custom Report Templates**: Configurable analytics reports
834
+ - **PDF Generation**: Automated report exports
835
+ - **Performance Metrics**: Comprehensive business intelligence
836
+ - **Multi-dimensional Analysis**: Customer, dish, and chef performance tracking
837
+
838
+ ### πŸ” Authentication & Security
839
+ - **Firebase Phone OTP**: Secure customer authentication
840
+ - **Database Password Protection**: Hotel database access control
841
+ - **Session Management**: Secure session handling across interfaces
842
+ - **Data Isolation**: Complete separation of hotel data
843
+
844
+ ## 🚨 Troubleshooting
845
+
846
+ ### Common Issues
847
+
848
+ #### Backend Issues:
849
+ ```bash
850
+ # If you get "Module not found" errors
851
+ pip install -r requirements.txt
852
+
853
+ # If database connection fails
854
+ python create_empty_db.py
855
+
856
+ # If port 8000 is already in use
857
+ # Edit run.py and change the port number
858
+ ```
859
+
860
+ #### Frontend Issues:
861
+ ```bash
862
+ # If npm install fails
863
+ npm cache clean --force
864
+ npm install
865
 
866
+ # If environment variables aren't loading
867
+ # Check that .env file exists in frontend directory
868
+ cp .env.example .env
869
+
870
+ # If API calls fail
871
+ # Verify REACT_APP_API_BASE_URL in frontend/.env
872
+ ```
873
+
874
+ #### Database Issues:
875
+ ```bash
876
+ # If database schema is outdated
877
+ python init_db.py --force-reset
878
+
879
+ # If hotels.csv is missing entries
880
+ # Manually add your database to hotels.csv
881
+ ```
882
+
883
+ ### Platform-Specific Notes
884
+
885
+ #### Windows:
886
+ - Use `venv\Scripts\activate` to activate virtual environment
887
+ - Use `python` command (not `python3`)
888
+ - Ensure Python is added to PATH during installation
889
+
890
+ #### macOS:
891
+ - Use `source venv/bin/activate` to activate virtual environment
892
+ - Use `python3` command for Python 3.x
893
+ - Install Xcode Command Line Tools if needed: `xcode-select --install`
894
+
895
+ ## πŸ”„ Development Workflow
896
+
897
+ ### Adding a New Hotel Database
898
+
899
+ 1. **Create Empty Database:**
900
  ```bash
901
+ python create_empty_db.py
 
 
902
  ```
903
 
904
+ 2. **Add to Registry:**
905
+ Edit `hotels.csv` and add your database entry:
906
+ ```csv
907
+ yourhotel.db,yourpassword123
908
+ ```
909
 
910
+ 3. **Configure Hotel Settings:**
911
+ - Access admin panel: `http://localhost:3000/admin`
912
+ - Navigate to Settings
913
+ - Configure hotel information
914
 
915
+ 4. **Add Menu Items:**
916
+ - Use admin panel to add dishes
917
+ - Upload dish images to `app/static/images/dishes/yourhotel/`
 
918
 
919
+ ### Deployment Considerations
 
 
 
 
920
 
921
+ #### Production Environment Variables:
922
+ ```env
923
+ # Backend
924
+ SECRET_KEY=your_production_secret_key
925
+ DATABASE_URL=your_production_database_url
926
+
927
+ # Frontend
928
+ REACT_APP_API_BASE_URL=https://your-domain.com/api
929
+ NODE_ENV=production
930
+ ```
931
 
932
+ #### Image Storage:
933
+ - Images are stored in `app/static/images/dishes/{database_name}/`
934
+ - Ensure proper directory permissions for image uploads
935
+ - Consider using cloud storage for production deployments
936
 
 
 
 
 
937