Skip to content

weenablesystems/innflow-production

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InnFlow™ - Hospitality Management System

Production-ready hospitality booking platform with WhatsApp integration.

Built with simplicity and speed in mind - Python Flask backend, vanilla HTML/CSS/JS frontend, SQLite database, and Docker deployment.


🚀 Quick Start (5 Minutes)

Prerequisites

Installation

  1. Extract the project folder to your desired location

  2. Configure WhatsApp (see detailed guide below):

    cp .env.example .env
    # Edit .env file with your WhatsApp credentials
  3. Start the application:

    docker-compose up -d
  4. Access the application:

  5. Login to Admin:

    • Username: Admin
    • Password: A.dmin@2026

📱 WhatsApp Setup Guide

Step 1: Create WhatsApp Business App

  1. Go to Meta Developer Portal
  2. Click "Create App" → Select "Business" type
  3. Fill in app details and create

Step 2: Add WhatsApp Product

  1. In your app dashboard, click "Add Product"
  2. Find "WhatsApp" and click "Set Up"

Step 3: Get API Credentials

  1. Go to "API Setup" in WhatsApp section
  2. Copy "Phone Number ID" → Paste into .env as WHATSAPP_PHONE_NUMBER_ID
  3. Copy "Temporary Access Token" → Paste into .env as WHATSAPP_ACCESS_TOKEN
  4. Add your staff WhatsApp number → Paste into .env as STAFF_WHATSAPP_NUMBER

Step 4: Test the Integration

  1. In Meta Developer Portal, send a test message
  2. Create a test booking in the guest portal
  3. Verify WhatsApp notification is received

Step 5: Production Setup (After Testing)

For production use, generate a permanent access token:

  1. Go to "Business Settings""System Users"
  2. Create a system user
  3. Generate a permanent token with whatsapp_business_messaging permission
  4. Replace temporary token in .env with permanent token

🏗️ Project Structure

innflow-production/
├── backend/              # Python Flask backend
│   ├── app.py           # Main Flask application
│   ├── database.py      # SQLite database & schemas
│   ├── whatsapp.py      # WhatsApp Business API integration
│   ├── pdf_generator.py # PDF receipt generation
│   ├── requirements.txt # Python dependencies
│   └── Dockerfile       # Backend container config
├── frontend/            # Static frontend files
│   ├── index.html       # Guest portal
│   ├── admin.html       # Admin dashboard
│   └── assets/
│       ├── style.css    # Guest portal styles
│       ├── app.js       # Guest portal logic
│       └── admin.js     # Admin dashboard logic
├── docker-compose.yml   # Docker orchestration
├── nginx.conf           # Nginx web server config
├── .env.example         # Environment variables template
└── README.md            # This file

✨ Features

Guest Portal (http://localhost)

  • ✅ Browse available rooms with images and pricing
  • ✅ Real-time availability checking
  • ✅ Multi-step booking flow with validation
  • ✅ Guest details capture (name, email, phone, ID)
  • ✅ Payment method selection (Cash, EFT, Card, iKhokha)
  • ✅ Instant WhatsApp confirmation to guest and staff
  • ✅ PDF receipt download with QR code

Admin Dashboard (http://localhost/admin.html)

  • ✅ Secure login authentication
  • ✅ Dashboard with stats (today's bookings, monthly revenue, etc.)
  • ✅ Bookings management (view all bookings with filters)
  • ✅ Rooms management (add/edit rooms, prices, descriptions)
  • ✅ Daily cash-up recording (Cash, EFT, Card, iKhokha totals)
  • ✅ Reports:
    • Daily report (bookings, revenue, payment breakdown)
    • Monthly report (revenue, room performance stats)

WhatsApp Integration

  • Staff notifications on new bookings (guest details, room, dates, amount)
  • Guest confirmations with booking reference and details
  • ✅ Uses official WhatsApp Business API

🔧 Configuration

Default Admin Credentials

  • Username: Admin
  • Password: A.dmin@2026

⚠️ IMPORTANT: Change these in production by editing the database directly or creating a new admin user.

Environment Variables

Edit .env file (copy from .env.example):

Variable Description Example
WHATSAPP_PHONE_NUMBER_ID Phone Number ID from Meta 123456789012345
WHATSAPP_ACCESS_TOKEN Access token from Meta EAAbc123...
STAFF_WHATSAPP_NUMBER Staff number (receives alerts) 27821234567
JWT_SECRET Secret key for admin auth your-secret-key

📊 Database Schema

SQLite database located at backend/innflow.db

Tables:

  • admin_users - Admin authentication
  • rooms - Room inventory (number, type, capacity, price, description, image)
  • bookings - All bookings (guest details, dates, payment, status)
  • cash_ups - Daily cash-up records (cash, EFT, card, iKhokha totals)

Seeded Data:

  • 10 sample rooms (IDs 101-302) with realistic descriptions and images
  • 1 admin user (credentials above)

🐳 Docker Commands

Start the application

docker-compose up -d

View logs

docker-compose logs -f

Stop the application

docker-compose down

Restart services

docker-compose restart

Rebuild after code changes

docker-compose up -d --build

🧪 Testing Checklist

Guest Portal Test

  1. ✅ Open http://localhost
  2. ✅ Select a room from the grid
  3. ✅ Choose check-in and check-out dates
  4. ✅ Verify availability checking works
  5. ✅ Fill in guest details (use real WhatsApp number for testing)
  6. ✅ Submit booking
  7. ✅ Verify confirmation screen appears
  8. ✅ Download PDF receipt
  9. CHECK WHATSAPP: Staff should receive notification

Admin Dashboard Test

  1. ✅ Open http://localhost/admin.html
  2. ✅ Login with Admin / A.dmin@2026
  3. ✅ Verify dashboard shows booking stats
  4. ✅ Go to Bookings → verify new booking appears
  5. ✅ Go to Rooms → edit a room's price
  6. ✅ Go to Cash-Up → record today's cash-up
  7. ✅ Go to Reports → generate daily report
  8. ✅ Go to Reports → generate monthly report

🚨 Troubleshooting

WhatsApp notifications not sending

  • ✅ Verify credentials in .env file
  • ✅ Check that staff number is added to test recipients in Meta Developer Portal
  • ✅ Check backend logs: docker-compose logs backend
  • ✅ Ensure number format is correct (no + or spaces): 27821234567

Can't access the application

Database errors

  • ✅ Delete backend/innflow.db and restart: docker-compose restart backend
  • ✅ Database will be recreated automatically

PDF receipts not generating

  • ✅ Check backend logs for errors
  • ✅ Ensure reportlab and qrcode are installed (should be in requirements.txt)

🔒 Security Notes

For Production Deployment:

  1. ✅ Change default admin password
  2. ✅ Use permanent WhatsApp access token (not temporary)
  3. ✅ Set strong JWT_SECRET in .env
  4. ✅ Enable HTTPS (use reverse proxy like Cloudflare or Let's Encrypt)
  5. ✅ Restrict admin dashboard access to specific IPs if possible
  6. ✅ Regular database backups of backend/innflow.db

📈 Scaling to PostgreSQL (Optional)

If you need multi-property support or high volume:

  1. Update docker-compose.yml to add PostgreSQL service
  2. Update DATABASE_URL in .env
  3. Modify database.py to use PostgreSQL connection string
  4. Install psycopg2 in requirements.txt

💡 Customization

Change Property Details

Edit these in backend/pdf_generator.py and frontend/index.html:

  • Property name: "Ocean Whisper Lodge"
  • Address, contact email, phone

Add More Rooms

  • Login to admin dashboard
  • Go to "Rooms" page
  • Click "+ Add Room"
  • Fill in details and save

Customize Styling

  • Guest portal CSS: frontend/assets/style.css
  • Colors are defined in CSS variables at the top

📞 Support

Built by InnFlow™ - Professional Hospitality Management Solutions

For technical issues:

  1. Check logs: docker-compose logs
  2. Review this README
  3. Check WhatsApp API documentation: https://developers.facebook.com/docs/whatsapp

📝 License

Proprietary - All rights reserved © 2026 InnFlow™


✅ Production Checklist

Before going live:

  • WhatsApp configured with permanent token
  • Admin password changed
  • SSL/HTTPS enabled
  • Database backup strategy in place
  • Test all booking flows
  • Staff trained on admin dashboard
  • Monitor logs for first 24 hours

🎉 You're ready to take bookings!

Guest Portal: http://localhost
Admin Dashboard: http://localhost/admin.html

About

Complete hospitality management system with WhatsApp integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors