Initial commit: Static hotel website (CMS/backend excluded)
68
.gitignore
vendored
Normal file
@@ -0,0 +1,68 @@
|
||||
# Dependencies
|
||||
node_modules/
|
||||
client/node_modules/
|
||||
server/
|
||||
|
||||
# Build outputs (optional - uncomment if you want to exclude build)
|
||||
# client/build/
|
||||
|
||||
# Environment variables
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
client/.env*
|
||||
server/.env*
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
logs/
|
||||
client/logs/
|
||||
server/logs/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# OS files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# Deployment archives
|
||||
*.tar.gz
|
||||
*.tgz
|
||||
*.zip
|
||||
deploy.*
|
||||
backend-deploy.*
|
||||
|
||||
# Temporary files
|
||||
*.tmp
|
||||
*.temp
|
||||
.cache/
|
||||
|
||||
# Test files
|
||||
coverage/
|
||||
.nyc_output/
|
||||
|
||||
# CMS/Backend specific (exclude entire server)
|
||||
server/
|
||||
|
||||
# User input files (if sensitive)
|
||||
user_input_files/
|
||||
|
||||
# Build artifacts that might be regenerated
|
||||
client/build/static/js/*.map
|
||||
client/build/static/css/*.map
|
||||
|
||||
120
README.md
Normal file
@@ -0,0 +1,120 @@
|
||||
# The Old Vine Hotel - Website
|
||||
|
||||
A modern, responsive hotel website built with React.js, featuring multilingual support (English, Arabic, French) and a fully static deployment.
|
||||
|
||||
## 🌐 Live Website
|
||||
|
||||
**https://oldvinehotel.com**
|
||||
|
||||
## ✨ Features
|
||||
|
||||
- 🎨 Modern, responsive design
|
||||
- 🌐 Multilingual support (EN, AR, FR)
|
||||
- 🏨 Room gallery with categories
|
||||
- 📸 Photo galleries (Hotel & Restaurant)
|
||||
- 📍 Contact page with Google Maps
|
||||
- 📱 Mobile-optimized
|
||||
- ⚡ Fully static (no backend required)
|
||||
- 🎯 SEO-friendly
|
||||
|
||||
## 🛠️ Technology Stack
|
||||
|
||||
- **Frontend**: React.js with Material-UI
|
||||
- **Routing**: React Router DOM
|
||||
- **Internationalization**: i18next
|
||||
- **Styling**: Material-UI (MUI) components
|
||||
- **Build Tool**: Create React App
|
||||
- **Deployment**: Static hosting (cPanel/GoDaddy)
|
||||
|
||||
## 📁 Project Structure
|
||||
|
||||
```
|
||||
vine_hotel/
|
||||
├── client/ # React frontend
|
||||
│ ├── public/ # Static assets (images, JSON data)
|
||||
│ ├── src/ # Source code
|
||||
│ │ ├── components/ # Reusable components
|
||||
│ │ ├── pages/ # Page components
|
||||
│ │ ├── locales/ # Translation files
|
||||
│ │ └── utils/ # Utilities
|
||||
│ └── build/ # Production build (generated)
|
||||
├── docs/ # Documentation
|
||||
└── scripts/ # Build/deployment scripts
|
||||
```
|
||||
|
||||
## 🚀 Getting Started
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Node.js (v16 or higher)
|
||||
- npm or yarn
|
||||
|
||||
### Installation
|
||||
|
||||
1. **Clone the repository**
|
||||
```bash
|
||||
git clone <repository-url>
|
||||
cd vine_hotel
|
||||
```
|
||||
|
||||
2. **Install dependencies**
|
||||
```bash
|
||||
cd client
|
||||
npm install
|
||||
```
|
||||
|
||||
3. **Start development server**
|
||||
```bash
|
||||
npm start
|
||||
```
|
||||
The website will open at `http://localhost:3060`
|
||||
|
||||
### Building for Production
|
||||
|
||||
```bash
|
||||
cd client
|
||||
npm run build
|
||||
```
|
||||
|
||||
The production build will be in `client/build/` directory.
|
||||
|
||||
## 📝 Content Management
|
||||
|
||||
The website uses static JSON files for content, located in:
|
||||
- `client/public/static-data/` - Content data files
|
||||
- `client/src/locales/` - Translation files
|
||||
|
||||
To update content:
|
||||
1. Edit the JSON files in `client/public/static-data/`
|
||||
2. Edit translations in `client/src/locales/`
|
||||
3. Rebuild the site: `npm run build`
|
||||
|
||||
## 🌍 Languages
|
||||
|
||||
- **English (en)** - Default
|
||||
- **Arabic (ar)** - العربية
|
||||
- **French (fr)** - Français
|
||||
|
||||
Users can switch languages using the language selector in the header.
|
||||
|
||||
## 📦 Deployment
|
||||
|
||||
The website is deployed as a static site. To deploy:
|
||||
|
||||
1. Build the production bundle:
|
||||
```bash
|
||||
cd client
|
||||
npm run build
|
||||
```
|
||||
|
||||
2. Upload the contents of `client/build/` to your web server's `public_html` directory.
|
||||
|
||||
3. Ensure `.htaccess` is included for proper routing.
|
||||
|
||||
## 📄 License
|
||||
|
||||
MIT License
|
||||
|
||||
---
|
||||
|
||||
**Note**: This repository contains only the frontend/website code. The CMS/backend code is excluded from this repository.
|
||||
475
SETUP_GUIDE.md
Normal file
@@ -0,0 +1,475 @@
|
||||
# The Old Vine Hotel - Complete Website Solution
|
||||
|
||||

|
||||
|
||||
## 🏨 Project Overview
|
||||
|
||||
A comprehensive, production-ready hotel website built with modern technologies, featuring advanced booking capabilities, PMS integration, and multi-platform connectivity. This solution provides everything needed for a luxury hotel's digital presence.
|
||||
|
||||
## ✨ Key Features
|
||||
|
||||
### 🎯 Core Functionality
|
||||
- **Modern Responsive Design** - Elegant UI with mobile-first approach
|
||||
- **Real-time Booking Engine** - Complete reservation system with availability checking
|
||||
- **Secure Payment Processing** - Stripe integration for safe transactions
|
||||
- **Multi-language Support** - English, Arabic, French with easy expansion
|
||||
- **Guest Management System** - Comprehensive profile and loyalty program management
|
||||
- **Admin Dashboard** - Full control panel for hotel operations
|
||||
|
||||
### 🔗 Enterprise Integrations
|
||||
- **Opera PMS Integration** - Real-time synchronization with hotel management system
|
||||
- **Booking Platform APIs** - Ready connections to Booking.com, Trip.com, Expedia
|
||||
- **Channel Manager Ready** - Synchronized rates and availability across all platforms
|
||||
- **Revenue Management** - Advanced analytics and reporting capabilities
|
||||
|
||||
### 🛡️ Security & Performance
|
||||
- **JWT Authentication** - Secure user sessions and API access
|
||||
- **Rate Limiting** - Protection against abuse and attacks
|
||||
- **Input Validation** - Comprehensive data sanitization
|
||||
- **Error Handling** - Robust error management and logging
|
||||
- **Performance Optimization** - Caching, compression, and efficient queries
|
||||
|
||||
## 🚀 Technology Stack
|
||||
|
||||
### Frontend
|
||||
- **React.js 18** - Modern UI framework
|
||||
- **Material-UI (MUI)** - Professional component library
|
||||
- **Framer Motion** - Smooth animations and transitions
|
||||
- **React Query** - Efficient data fetching and caching
|
||||
- **React Router** - Client-side routing
|
||||
- **i18next** - Internationalization framework
|
||||
- **Axios** - HTTP client for API calls
|
||||
|
||||
### Backend
|
||||
- **Node.js** - Server runtime
|
||||
- **Express.js** - Web application framework
|
||||
- **MongoDB** - NoSQL database with Mongoose ODM
|
||||
- **JWT** - JSON Web Token authentication
|
||||
- **Stripe** - Payment processing
|
||||
- **Nodemailer** - Email service
|
||||
- **Winston** - Logging framework
|
||||
- **Helmet** - Security middleware
|
||||
|
||||
### Integrations
|
||||
- **Opera PMS** - Property Management System
|
||||
- **Booking.com API** - OTA integration
|
||||
- **Expedia EQC** - Channel connectivity
|
||||
- **Trip.com API** - Asian market integration
|
||||
- **Google Maps** - Location services
|
||||
- **WhatsApp Business** - Customer communication
|
||||
|
||||
## 📋 Prerequisites
|
||||
|
||||
Before installation, ensure you have:
|
||||
|
||||
- **Node.js** (v16 or higher)
|
||||
- **MongoDB** (v5 or higher)
|
||||
- **npm** or **yarn** package manager
|
||||
- **Stripe Account** (for payments)
|
||||
- **Email Service** (Gmail, SendGrid, etc.)
|
||||
- **Google Maps API Key**
|
||||
|
||||
## 🛠️ Installation Guide
|
||||
|
||||
### 1. Clone and Setup
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone <repository-url>
|
||||
cd old-vine-hotel-website
|
||||
|
||||
# Install all dependencies
|
||||
npm run install-all
|
||||
```
|
||||
|
||||
### 2. Environment Configuration
|
||||
|
||||
#### Server Environment (.env)
|
||||
```bash
|
||||
# Copy the example file
|
||||
cp server/.env.example server/.env
|
||||
|
||||
# Edit with your configuration
|
||||
nano server/.env
|
||||
```
|
||||
|
||||
#### Client Environment
|
||||
```bash
|
||||
# Create client environment file
|
||||
cp client/.env.example client/.env
|
||||
|
||||
# Add your configuration
|
||||
echo "REACT_APP_API_URL=http://localhost:5000" > client/.env
|
||||
echo "REACT_APP_STRIPE_PUBLISHABLE_KEY=pk_test_..." >> client/.env
|
||||
```
|
||||
|
||||
### 3. Database Setup
|
||||
|
||||
```bash
|
||||
# Start MongoDB service
|
||||
sudo systemctl start mongod
|
||||
|
||||
# Create database and seed initial data
|
||||
cd server
|
||||
npm run seed
|
||||
```
|
||||
|
||||
### 4. Start Development Servers
|
||||
|
||||
```bash
|
||||
# Start both frontend and backend
|
||||
npm run dev
|
||||
|
||||
# Or start individually:
|
||||
# Backend only
|
||||
npm run server
|
||||
|
||||
# Frontend only
|
||||
npm run client
|
||||
```
|
||||
|
||||
### 5. Access the Application
|
||||
|
||||
- **Frontend**: http://localhost:3000
|
||||
- **Backend API**: http://localhost:5000
|
||||
- **Health Check**: http://localhost:5000/health
|
||||
|
||||
## 🔧 Configuration Guide
|
||||
|
||||
### Payment Setup (Stripe)
|
||||
|
||||
1. Create a Stripe account at https://stripe.com
|
||||
2. Get your API keys from the dashboard
|
||||
3. Add to your environment files:
|
||||
```bash
|
||||
STRIPE_SECRET_KEY=sk_test_...
|
||||
REACT_APP_STRIPE_PUBLISHABLE_KEY=pk_test_...
|
||||
```
|
||||
|
||||
### Email Configuration
|
||||
|
||||
#### Using Gmail
|
||||
```bash
|
||||
EMAIL_HOST=smtp.gmail.com
|
||||
EMAIL_PORT=587
|
||||
EMAIL_USER=your-email@gmail.com
|
||||
EMAIL_PASS=your-app-password # Use App Password, not regular password
|
||||
```
|
||||
|
||||
#### Using SendGrid
|
||||
```bash
|
||||
EMAIL_HOST=smtp.sendgrid.net
|
||||
EMAIL_PORT=587
|
||||
EMAIL_USER=apikey
|
||||
EMAIL_PASS=your-sendgrid-api-key
|
||||
```
|
||||
|
||||
### Google Maps Integration
|
||||
|
||||
1. Get API key from Google Cloud Console
|
||||
2. Enable Maps JavaScript API
|
||||
3. Add to environment:
|
||||
```bash
|
||||
GOOGLE_MAPS_API_KEY=your-api-key
|
||||
```
|
||||
|
||||
### Opera PMS Integration
|
||||
|
||||
```bash
|
||||
OPERA_PMS_URL=https://your-opera-server.com/api
|
||||
OPERA_PMS_USERNAME=your-username
|
||||
OPERA_PMS_PASSWORD=your-password
|
||||
OPERA_PMS_PROPERTY_CODE=your-property-code
|
||||
```
|
||||
|
||||
### Booking Platform APIs
|
||||
|
||||
#### Booking.com
|
||||
```bash
|
||||
BOOKING_COM_API_URL=https://distribution-xml.booking.com
|
||||
BOOKING_COM_USERNAME=your-username
|
||||
BOOKING_COM_PASSWORD=your-password
|
||||
BOOKING_COM_HOTEL_ID=your-hotel-id
|
||||
```
|
||||
|
||||
#### Expedia
|
||||
```bash
|
||||
EXPEDIA_EQC_URL=https://services.expediapartnercentral.com
|
||||
EXPEDIA_USERNAME=your-username
|
||||
EXPEDIA_PASSWORD=your-password
|
||||
EXPEDIA_HOTEL_ID=your-hotel-id
|
||||
```
|
||||
|
||||
## 🗂️ Project Structure
|
||||
|
||||
```
|
||||
old-vine-hotel-website/
|
||||
├── client/ # React frontend
|
||||
│ ├── public/ # Static assets
|
||||
│ ├── src/
|
||||
│ │ ├── components/ # Reusable UI components
|
||||
│ │ │ ├── common/ # Shared components
|
||||
│ │ │ └── layout/ # Layout components
|
||||
│ │ ├── pages/ # Page components
|
||||
│ │ ├── services/ # API service functions
|
||||
│ │ ├── utils/ # Utility functions
|
||||
│ │ ├── locales/ # Translation files
|
||||
│ │ └── styles/ # CSS and theme files
|
||||
│ └── package.json
|
||||
├── server/ # Node.js backend
|
||||
│ ├── controllers/ # Route controllers
|
||||
│ ├── models/ # Database models
|
||||
│ ├── routes/ # API routes
|
||||
│ ├── middleware/ # Custom middleware
|
||||
│ ├── services/ # Business logic services
|
||||
│ ├── utils/ # Utility functions
|
||||
│ └── package.json
|
||||
├── docs/ # Documentation
|
||||
├── deployment/ # Deployment configurations
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## 📚 API Documentation
|
||||
|
||||
### Authentication Endpoints
|
||||
- `POST /api/auth/register` - Guest registration
|
||||
- `POST /api/auth/login` - Guest login
|
||||
- `GET /api/auth/me` - Get current user
|
||||
- `POST /api/auth/forgot-password` - Password reset
|
||||
|
||||
### Booking Endpoints
|
||||
- `GET /api/rooms` - List available rooms
|
||||
- `GET /api/rooms/:id` - Get room details
|
||||
- `POST /api/rooms/:id/availability` - Check availability
|
||||
- `POST /api/bookings` - Create booking
|
||||
- `GET /api/bookings/:bookingNumber` - Get booking details
|
||||
- `PUT /api/bookings/:bookingNumber/cancel` - Cancel booking
|
||||
|
||||
### Integration Endpoints
|
||||
- `GET /api/integrations/health` - Check integration status
|
||||
- `POST /api/integrations/opera/sync-rooms` - Sync with Opera PMS
|
||||
- `POST /api/integrations/sync-rates` - Update rates across platforms
|
||||
- `GET /api/integrations/analytics/revenue` - Revenue analytics
|
||||
|
||||
### Contact & Information
|
||||
- `POST /api/contact` - Send contact message
|
||||
- `POST /api/contact/newsletter` - Newsletter subscription
|
||||
- `GET /api/contact/info` - Hotel information
|
||||
|
||||
## 🔒 Security Features
|
||||
|
||||
### Authentication & Authorization
|
||||
- JWT-based authentication with secure token management
|
||||
- Role-based access control (Guest, Admin)
|
||||
- Password hashing with bcrypt
|
||||
- Email verification for new accounts
|
||||
|
||||
### API Security
|
||||
- Rate limiting to prevent abuse
|
||||
- CORS configuration for cross-origin requests
|
||||
- Input validation and sanitization
|
||||
- SQL injection prevention
|
||||
- XSS protection headers
|
||||
|
||||
### Data Protection
|
||||
- Encrypted sensitive data storage
|
||||
- Secure payment processing with Stripe
|
||||
- GDPR compliance features
|
||||
- Audit logging for admin actions
|
||||
|
||||
## 📊 Performance Optimization
|
||||
|
||||
### Frontend Optimization
|
||||
- Code splitting and lazy loading
|
||||
- Image optimization and caching
|
||||
- Gzip compression
|
||||
- Service worker for offline capability
|
||||
- React Query for efficient data fetching
|
||||
|
||||
### Backend Optimization
|
||||
- Database indexing for fast queries
|
||||
- Response caching with Redis
|
||||
- Connection pooling
|
||||
- Efficient aggregation pipelines
|
||||
- Background job processing
|
||||
|
||||
## 🌐 Deployment Options
|
||||
|
||||
### Docker Deployment
|
||||
|
||||
```bash
|
||||
# Build and run with Docker Compose
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### Manual Deployment
|
||||
|
||||
#### Frontend (Netlify/Vercel)
|
||||
```bash
|
||||
cd client
|
||||
npm run build
|
||||
# Deploy dist folder
|
||||
```
|
||||
|
||||
#### Backend (Heroku/DigitalOcean)
|
||||
```bash
|
||||
cd server
|
||||
npm start
|
||||
```
|
||||
|
||||
### Environment-Specific Configurations
|
||||
|
||||
#### Production Environment
|
||||
- Use production database
|
||||
- Enable SSL/HTTPS
|
||||
- Configure CDN for assets
|
||||
- Set up monitoring and alerts
|
||||
- Enable backup strategies
|
||||
|
||||
#### Staging Environment
|
||||
- Use staging database
|
||||
- Enable detailed logging
|
||||
- Test payment integrations
|
||||
- Validate third-party APIs
|
||||
|
||||
## 🎨 Customization Guide
|
||||
|
||||
### Theme Customization
|
||||
|
||||
The design uses a sophisticated color palette that can be easily customized:
|
||||
|
||||
```javascript
|
||||
// client/src/theme.js
|
||||
const theme = createTheme({
|
||||
palette: {
|
||||
primary: {
|
||||
main: '#8B4513', // Change to your brand color
|
||||
},
|
||||
secondary: {
|
||||
main: '#D4AF37', // Change accent color
|
||||
},
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
### Logo Integration
|
||||
|
||||
1. Replace logo files in `client/public/`
|
||||
2. Update logo references in Header component
|
||||
3. Adjust sizing and positioning as needed
|
||||
|
||||
### Content Management
|
||||
|
||||
- Room information: Update `server/models/Room.js`
|
||||
- Hotel details: Modify `server/routes/contact.js`
|
||||
- Translations: Edit files in `client/src/locales/`
|
||||
|
||||
### Email Templates
|
||||
|
||||
Customize email templates in `server/utils/sendEmail.js`:
|
||||
- Booking confirmations
|
||||
- Cancellation notifications
|
||||
- Newsletter templates
|
||||
- Contact form responses
|
||||
|
||||
## 🧪 Testing
|
||||
|
||||
### Running Tests
|
||||
|
||||
```bash
|
||||
# Backend tests
|
||||
cd server
|
||||
npm test
|
||||
|
||||
# Frontend tests
|
||||
cd client
|
||||
npm test
|
||||
```
|
||||
|
||||
### Test Coverage
|
||||
|
||||
- Unit tests for models and utilities
|
||||
- Integration tests for API endpoints
|
||||
- End-to-end tests for booking flow
|
||||
- Payment integration testing
|
||||
|
||||
## 📈 Monitoring & Analytics
|
||||
|
||||
### Application Monitoring
|
||||
|
||||
- Winston logging for error tracking
|
||||
- Performance metrics collection
|
||||
- Health check endpoints
|
||||
- Integration status monitoring
|
||||
|
||||
### Business Analytics
|
||||
|
||||
- Booking conversion tracking
|
||||
- Revenue analytics
|
||||
- Guest behavior insights
|
||||
- Platform performance comparison
|
||||
|
||||
## 🆘 Troubleshooting
|
||||
|
||||
### Common Issues
|
||||
|
||||
#### Database Connection Issues
|
||||
```bash
|
||||
# Check MongoDB status
|
||||
sudo systemctl status mongod
|
||||
|
||||
# Restart if needed
|
||||
sudo systemctl restart mongod
|
||||
```
|
||||
|
||||
#### Payment Processing Errors
|
||||
- Verify Stripe API keys
|
||||
- Check webhook configurations
|
||||
- Validate test card numbers
|
||||
|
||||
#### Integration Failures
|
||||
- Test API credentials
|
||||
- Check network connectivity
|
||||
- Verify webhook endpoints
|
||||
|
||||
### Getting Help
|
||||
|
||||
- Check logs in `server/logs/`
|
||||
- Review API responses
|
||||
- Test with curl commands
|
||||
- Contact support team
|
||||
|
||||
## 🔄 Maintenance
|
||||
|
||||
### Regular Updates
|
||||
|
||||
- Update dependencies monthly
|
||||
- Review security patches
|
||||
- Monitor API changes
|
||||
- Backup database regularly
|
||||
|
||||
### Performance Monitoring
|
||||
|
||||
- Database query optimization
|
||||
- API response times
|
||||
- Error rate tracking
|
||||
- User experience metrics
|
||||
|
||||
## 📞 Support
|
||||
|
||||
For technical support and questions:
|
||||
|
||||
- **Documentation**: Check this README and code comments
|
||||
- **Issues**: Create GitHub issues for bugs
|
||||
- **Features**: Submit feature requests
|
||||
- **General**: Contact the development team
|
||||
|
||||
## 📄 License
|
||||
|
||||
This project is licensed under the MIT License - see the LICENSE file for details.
|
||||
|
||||
---
|
||||
|
||||
**Developed by MiniMax Agent** - A comprehensive hotel management solution designed for modern hospitality businesses.
|
||||
|
||||
*Experience luxury and elegance with The Old Vine Hotel - where technology meets hospitality.*
|
||||
213
STATIC_WEBSITE_STRUCTURE.md
Normal file
@@ -0,0 +1,213 @@
|
||||
# 📁 Static Website Structure Analysis
|
||||
|
||||
## 🌐 Deployed Structure on Server
|
||||
|
||||
```
|
||||
/public_html/
|
||||
│
|
||||
├── 📄 index.html (4 KB)
|
||||
│ └── Single Page Application entry point
|
||||
│ └── Loads React app from /static/js/main.*.js
|
||||
│
|
||||
├── 📁 static/ (7 MB)
|
||||
│ ├── css/
|
||||
│ │ ├── main.b6834280.css (392 KB - All styles)
|
||||
│ │ └── main.b6834280.css.map
|
||||
│ └── js/
|
||||
│ ├── main.49960f27.js (392 KB - All React code)
|
||||
│ ├── main.49960f27.js.map
|
||||
│ └── main.49960f27.js.LICENSE.txt
|
||||
│
|
||||
├── 📁 images/ (1.8 GB - All static images)
|
||||
│ ├── logo.png
|
||||
│ ├── hero.jpg
|
||||
│ ├── about-hero.jpg
|
||||
│ ├── about.jpg
|
||||
│ ├── room-deluxe.jpg
|
||||
│ ├── room-executive.jpg
|
||||
│ ├── room-presidential.jpg
|
||||
│ ├── gallery/
|
||||
│ │ ├── 01.jpg through 12.jpg
|
||||
│ │ ├── hotel-gallery/ (31 images: 01.jpg - 31.jpg)
|
||||
│ │ └── restaurant-gallery/ (31 images: 01.jpg - 31.jpg)
|
||||
│ └── rooms/
|
||||
│ ├── single-room/ (13 images: 01.jpg - 13.jpg)
|
||||
│ ├── double-room/ (33 images: 01.jpg - 33.jpg)
|
||||
│ ├── suite-room/ (13 images: 01.jpg - 13.jpg)
|
||||
│ ├── twin-room/ (2 images: 01.jpg - 02.jpg)
|
||||
│ ├── deluxe/ (3 images)
|
||||
│ ├── executive/ (3 images)
|
||||
│ └── presidential/ (4 images)
|
||||
│
|
||||
├── 📄 manifest.json (PWA manifest)
|
||||
├── 📄 asset-manifest.json (Build manifest)
|
||||
├── 📄 .htaccess (SPA routing rules)
|
||||
└── 📁 uploads/ (empty - for CMS uploads)
|
||||
```
|
||||
|
||||
## 🔧 How It Works
|
||||
|
||||
### 1. Single Page Application (SPA)
|
||||
- **Entry Point**: `index.html` loads a single React application
|
||||
- **Routing**: All routes handled client-side by React Router
|
||||
- **No Server-Side Rendering**: Everything rendered in browser
|
||||
|
||||
### 2. Client-Side Routing
|
||||
- `.htaccess` redirects all requests to `index.html`
|
||||
- React Router handles navigation
|
||||
- Browser history API manages URLs
|
||||
|
||||
### 3. API Dependencies
|
||||
The frontend makes API calls to: `http://118.139.176.130:5080`
|
||||
|
||||
**API Endpoints Used:**
|
||||
- `/api/content/home` - Homepage content
|
||||
- `/api/content/about` - About page content
|
||||
- `/api/room-categories` - List of room categories
|
||||
- `/api/room-categories/:slug` - Specific category details
|
||||
- `/api/rooms` - Individual rooms
|
||||
- `/api/gallery-categories` - Gallery categories
|
||||
- `/api/gallery-categories/:slug` - Specific gallery
|
||||
- `/api/contact/info` - Contact information
|
||||
- `/api/contact` - Submit contact form
|
||||
- `/api/bookings` - Booking operations
|
||||
- `/api/admin/*` - CMS/admin endpoints
|
||||
|
||||
## 📋 Pages/Routes (Client-Side)
|
||||
|
||||
### Public Routes
|
||||
- `/` - Homepage
|
||||
- `/about` - About page
|
||||
- `/rooms` - Room categories listing
|
||||
- `/rooms/category/:slug` - Category gallery (e.g., `/rooms/category/single-room`)
|
||||
- `/rooms/:id` - Individual room details
|
||||
- `/gallery` - Gallery categories
|
||||
- `/gallery/:slug` - Gallery category view
|
||||
- `/facilities` - Facilities page
|
||||
- `/contact` - Contact page
|
||||
- `/booking` - Booking form
|
||||
- `/booking/confirmation` - Booking confirmation
|
||||
|
||||
### Admin Routes (Protected)
|
||||
- `/admin/login` - Admin login
|
||||
- `/admin/dashboard` - Admin dashboard
|
||||
- `/admin/content` - Content management
|
||||
- `/admin/rooms` - Room management
|
||||
- `/admin/bookings` - Booking management
|
||||
- `/admin/blog` - Blog management
|
||||
- `/admin/media` - Media management
|
||||
- `/admin/settings` - Settings management
|
||||
|
||||
## ⚠️ Current Dependencies
|
||||
|
||||
### ✅ Static (Works Without Backend)
|
||||
- HTML structure and layout
|
||||
- CSS styling and animations
|
||||
- Image display (all images are static files)
|
||||
- Basic navigation and routing
|
||||
- UI components rendering
|
||||
|
||||
### ❌ Dynamic (Requires Backend API)
|
||||
- **Homepage**: Hero content, welcome section, room categories
|
||||
- **About Page**: Heritage section, mission, vision, values
|
||||
- **Rooms Page**: Category cards, room details
|
||||
- **Gallery**: Category listings and images
|
||||
- **Contact**: Contact form submission
|
||||
- **Booking**: Booking functionality
|
||||
- **CMS**: All admin panel features
|
||||
|
||||
## 📊 File Sizes
|
||||
|
||||
- **Total Build Size**: ~1.8 GB
|
||||
- `index.html`: 4 KB
|
||||
- `static/`: 7 MB (CSS + JS)
|
||||
- `images/`: 1.8 GB (all images)
|
||||
- Other files: < 10 KB
|
||||
|
||||
## 🔄 Build Process
|
||||
|
||||
1. **Source Code** (`client/src/`) → React components
|
||||
2. **Build** (`npm run build`) → Bundled and minified
|
||||
3. **Output** (`client/build/`) → Static files ready for deployment
|
||||
4. **Deploy** → Upload to `public_html/` on server
|
||||
|
||||
## 💡 Options for Deployment
|
||||
|
||||
### Option 1: Fully Static (No Backend)
|
||||
**Pros:**
|
||||
- No server required
|
||||
- Fast loading
|
||||
- Simple hosting
|
||||
|
||||
**Cons:**
|
||||
- No dynamic content
|
||||
- No CMS
|
||||
- No booking functionality
|
||||
- Requires rebuild to update content
|
||||
|
||||
**How:**
|
||||
- Pre-render all pages at build time
|
||||
- Generate static HTML files
|
||||
- Embed data in JavaScript bundle
|
||||
|
||||
### Option 2: Hybrid (Current Setup)
|
||||
**Pros:**
|
||||
- Full functionality
|
||||
- Dynamic content
|
||||
- CMS available
|
||||
- Easy content updates
|
||||
|
||||
**Cons:**
|
||||
- Requires backend server
|
||||
- More complex setup
|
||||
- Higher hosting costs
|
||||
|
||||
**How:**
|
||||
- Static frontend + Dynamic backend API
|
||||
- API handles all data operations
|
||||
|
||||
### Option 3: Static with Pre-rendered Data
|
||||
**Pros:**
|
||||
- No API needed
|
||||
- Fast performance
|
||||
- Works on static hosting
|
||||
|
||||
**Cons:**
|
||||
- Content updates require rebuild
|
||||
- No real-time updates
|
||||
- Limited interactivity
|
||||
|
||||
**How:**
|
||||
- Fetch data at build time
|
||||
- Embed in JavaScript bundle
|
||||
- Rebuild when content changes
|
||||
|
||||
## 🎯 Current Status
|
||||
|
||||
**Deployed:**
|
||||
- ✅ Frontend static files on server
|
||||
- ✅ All images uploaded
|
||||
- ✅ Routing configured (.htaccess)
|
||||
|
||||
**Missing:**
|
||||
- ❌ Backend API not accessible (MongoDB issue)
|
||||
- ❌ Port 5080 may be blocked
|
||||
- ❌ Dynamic content not loading
|
||||
|
||||
## 📝 Recommendations
|
||||
|
||||
1. **For Static-Only Deployment:**
|
||||
- Pre-render pages with static data
|
||||
- Remove API dependencies
|
||||
- Simplify to brochure site
|
||||
|
||||
2. **For Full Functionality:**
|
||||
- Fix MongoDB connection (Atlas recommended)
|
||||
- Configure firewall for port 5080
|
||||
- Set up reverse proxy if needed
|
||||
|
||||
3. **For Hybrid Approach:**
|
||||
- Keep static frontend
|
||||
- Use serverless functions for API
|
||||
- Reduce backend complexity
|
||||
|
||||
9
client/build/.htaccess
Normal file
@@ -0,0 +1,9 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.html$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.html [L]
|
||||
</IfModule>
|
||||
|
||||
13
client/build/asset-manifest.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.d82e9c4b.css",
|
||||
"main.js": "/static/js/main.38102cbe.js",
|
||||
"index.html": "/index.html",
|
||||
"main.d82e9c4b.css.map": "/static/css/main.d82e9c4b.css.map",
|
||||
"main.38102cbe.js.map": "/static/js/main.38102cbe.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.d82e9c4b.css",
|
||||
"static/js/main.38102cbe.js"
|
||||
]
|
||||
}
|
||||
BIN
client/build/images/0A3A8962_Easy-Resize.com.jpg
Normal file
|
After Width: | Height: | Size: 243 KiB |
BIN
client/build/images/0A3A9475_Easy-Resize.com.jpg
Normal file
|
After Width: | Height: | Size: 244 KiB |
BIN
client/build/images/about-hero.jpg
Normal file
|
After Width: | Height: | Size: 238 KiB |
BIN
client/build/images/about.jpg
Normal file
|
After Width: | Height: | Size: 234 KiB |
BIN
client/build/images/gallery/01.jpg
Normal file
|
After Width: | Height: | Size: 238 KiB |
BIN
client/build/images/gallery/02.jpg
Normal file
|
After Width: | Height: | Size: 240 KiB |
BIN
client/build/images/gallery/03.jpg
Normal file
|
After Width: | Height: | Size: 235 KiB |
BIN
client/build/images/gallery/04.jpg
Normal file
|
After Width: | Height: | Size: 243 KiB |
BIN
client/build/images/gallery/05.jpg
Normal file
|
After Width: | Height: | Size: 240 KiB |
BIN
client/build/images/gallery/06.jpg
Normal file
|
After Width: | Height: | Size: 243 KiB |
BIN
client/build/images/gallery/07.jpg
Normal file
|
After Width: | Height: | Size: 240 KiB |
BIN
client/build/images/gallery/08.jpg
Normal file
|
After Width: | Height: | Size: 244 KiB |
BIN
client/build/images/gallery/09.jpg
Normal file
|
After Width: | Height: | Size: 242 KiB |
BIN
client/build/images/gallery/10.jpg
Normal file
|
After Width: | Height: | Size: 237 KiB |
BIN
client/build/images/gallery/11.jpg
Normal file
|
After Width: | Height: | Size: 230 KiB |
BIN
client/build/images/gallery/12.jpg
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
client/build/images/gallery/hotel-gallery/01.jpg
Normal file
|
After Width: | Height: | Size: 17 MiB |
BIN
client/build/images/gallery/hotel-gallery/02.jpg
Normal file
|
After Width: | Height: | Size: 10 MiB |
BIN
client/build/images/gallery/hotel-gallery/03.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/hotel-gallery/04.jpg
Normal file
|
After Width: | Height: | Size: 13 MiB |
BIN
client/build/images/gallery/hotel-gallery/05.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/gallery/hotel-gallery/06.jpg
Normal file
|
After Width: | Height: | Size: 9.4 MiB |
BIN
client/build/images/gallery/hotel-gallery/07.jpg
Normal file
|
After Width: | Height: | Size: 10 MiB |
BIN
client/build/images/gallery/hotel-gallery/08.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/hotel-gallery/09.jpg
Normal file
|
After Width: | Height: | Size: 11 MiB |
BIN
client/build/images/gallery/hotel-gallery/10.jpg
Normal file
|
After Width: | Height: | Size: 16 MiB |
BIN
client/build/images/gallery/hotel-gallery/11.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/hotel-gallery/12.jpg
Normal file
|
After Width: | Height: | Size: 17 MiB |
BIN
client/build/images/gallery/hotel-gallery/13.jpg
Normal file
|
After Width: | Height: | Size: 17 MiB |
BIN
client/build/images/gallery/hotel-gallery/14.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/gallery/hotel-gallery/15.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/hotel-gallery/16.jpg
Normal file
|
After Width: | Height: | Size: 17 MiB |
BIN
client/build/images/gallery/hotel-gallery/17.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/hotel-gallery/18.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/gallery/hotel-gallery/19.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/hotel-gallery/20.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/hotel-gallery/21.jpg
Normal file
|
After Width: | Height: | Size: 11 MiB |
BIN
client/build/images/gallery/hotel-gallery/22.jpg
Normal file
|
After Width: | Height: | Size: 13 MiB |
BIN
client/build/images/gallery/hotel-gallery/23.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/hotel-gallery/24.jpg
Normal file
|
After Width: | Height: | Size: 13 MiB |
BIN
client/build/images/gallery/hotel-gallery/25.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/hotel-gallery/26.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/hotel-gallery/27.jpg
Normal file
|
After Width: | Height: | Size: 20 MiB |
BIN
client/build/images/gallery/hotel-gallery/28.jpg
Normal file
|
After Width: | Height: | Size: 16 MiB |
BIN
client/build/images/gallery/hotel-gallery/29.jpg
Normal file
|
After Width: | Height: | Size: 22 MiB |
BIN
client/build/images/gallery/hotel-gallery/30.jpg
Normal file
|
After Width: | Height: | Size: 16 MiB |
BIN
client/build/images/gallery/hotel-gallery/31.jpg
Normal file
|
After Width: | Height: | Size: 20 MiB |
BIN
client/build/images/gallery/restaurant-gallery/01.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/02.jpg
Normal file
|
After Width: | Height: | Size: 13 MiB |
BIN
client/build/images/gallery/restaurant-gallery/03.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/04.jpg
Normal file
|
After Width: | Height: | Size: 11 MiB |
BIN
client/build/images/gallery/restaurant-gallery/05.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/gallery/restaurant-gallery/06.jpg
Normal file
|
After Width: | Height: | Size: 13 MiB |
BIN
client/build/images/gallery/restaurant-gallery/07.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/gallery/restaurant-gallery/08.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/gallery/restaurant-gallery/09.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/10.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/gallery/restaurant-gallery/11.jpg
Normal file
|
After Width: | Height: | Size: 13 MiB |
BIN
client/build/images/gallery/restaurant-gallery/12.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/restaurant-gallery/13.jpg
Normal file
|
After Width: | Height: | Size: 19 MiB |
BIN
client/build/images/gallery/restaurant-gallery/14.jpg
Normal file
|
After Width: | Height: | Size: 16 MiB |
BIN
client/build/images/gallery/restaurant-gallery/15.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/gallery/restaurant-gallery/16.jpg
Normal file
|
After Width: | Height: | Size: 17 MiB |
BIN
client/build/images/gallery/restaurant-gallery/17.jpg
Normal file
|
After Width: | Height: | Size: 11 MiB |
BIN
client/build/images/gallery/restaurant-gallery/18.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/19.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/20.jpg
Normal file
|
After Width: | Height: | Size: 11 MiB |
BIN
client/build/images/gallery/restaurant-gallery/21.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/22.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/23.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/24.jpg
Normal file
|
After Width: | Height: | Size: 12 MiB |
BIN
client/build/images/gallery/restaurant-gallery/25.jpg
Normal file
|
After Width: | Height: | Size: 13 MiB |
BIN
client/build/images/gallery/restaurant-gallery/26.jpg
Normal file
|
After Width: | Height: | Size: 16 MiB |
BIN
client/build/images/gallery/restaurant-gallery/27.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/restaurant-gallery/28.jpg
Normal file
|
After Width: | Height: | Size: 18 MiB |
BIN
client/build/images/gallery/restaurant-gallery/29.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/gallery/restaurant-gallery/30.jpg
Normal file
|
After Width: | Height: | Size: 16 MiB |
BIN
client/build/images/gallery/restaurant-gallery/31.jpg
Normal file
|
After Width: | Height: | Size: 15 MiB |
BIN
client/build/images/hero.jpg
Normal file
|
After Width: | Height: | Size: 244 KiB |
BIN
client/build/images/logo.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
client/build/images/room-deluxe.jpg
Normal file
|
After Width: | Height: | Size: 224 KiB |
BIN
client/build/images/room-executive.jpg
Normal file
|
After Width: | Height: | Size: 240 KiB |
BIN
client/build/images/room-presidential.jpg
Normal file
|
After Width: | Height: | Size: 219 KiB |
BIN
client/build/images/rooms/deluxe/01.jpg
Normal file
|
After Width: | Height: | Size: 234 KiB |
BIN
client/build/images/rooms/deluxe/02.jpg
Normal file
|
After Width: | Height: | Size: 213 KiB |
BIN
client/build/images/rooms/deluxe/03.jpg
Normal file
|
After Width: | Height: | Size: 229 KiB |
BIN
client/build/images/rooms/double-room/01.jpg
Normal file
|
After Width: | Height: | Size: 14 MiB |
BIN
client/build/images/rooms/double-room/02.jpg
Normal file
|
After Width: | Height: | Size: 21 MiB |
BIN
client/build/images/rooms/double-room/03.jpg
Normal file
|
After Width: | Height: | Size: 19 MiB |
BIN
client/build/images/rooms/double-room/04.jpg
Normal file
|
After Width: | Height: | Size: 21 MiB |
BIN
client/build/images/rooms/double-room/05.jpg
Normal file
|
After Width: | Height: | Size: 13 MiB |
BIN
client/build/images/rooms/double-room/06.jpg
Normal file
|
After Width: | Height: | Size: 25 MiB |
BIN
client/build/images/rooms/double-room/07.jpg
Normal file
|
After Width: | Height: | Size: 24 MiB |
BIN
client/build/images/rooms/double-room/08.jpg
Normal file
|
After Width: | Height: | Size: 20 MiB |