Flyway India ### โœˆ๏ธ Enterprise Aviation, Travel Operations & Intelligent Workflow Management Platform

Production-grade Django 6.0 + Tailwind CSS web platform engineered for luxury travel bookings, private jet charters, air cargo logistics, and automated internal duty allocation โ€” featuring an intelligent 12-step multi-attribute assignment engine, self-service customer tracking portal, supervisory work transfer approval system, granular 6-tier RBAC, full CRUD administrative workspaces, operational business intelligence reports with Chart.js analytics, and immutable security audit logging.


Python Django Tailwind CSS Chart.js Tests Database Resend License Status

29
Data Models
4
Django Apps
6
Workspace Roles
194
Automated Tests
MIT
Licensed

**[ ๐ŸŒŸ Overview ](#-overview)** ยท **[ โšก Key Features ](#-key-features)** ยท **[ ๐Ÿ“ธ UI Showcase ](#-application-screenshots--visual-ui-showcase)** ยท **[ ๐Ÿ—๏ธ Architecture ](#-project-architecture)** ยท **[ ๐Ÿงฌ Data Structure & ERD ](#-data-structure--database-architecture)** ยท **[ ๐Ÿข Workspace & RBAC ](#-workspace-architecture--rbac)** ยท **[ ๐Ÿ—„๏ธ Data Models ](#-data-models--schema)** ยท **[ ๐Ÿ”— URL Routing ](#-url-endpoints--routing-reference)** ยท **[ ๐Ÿš€ Quick Start ](#-getting-started)** ยท **[ ๐Ÿ‘จโ€๐Ÿ’ป Author ](#-author--contact)**

--- ## ๐Ÿ“– Table of Contents
Click to expand / collapse
- [๐ŸŒŸ Overview](#-overview) - [โšก Key Features](#-key-features) - [1. Public Travel & Aviation Portals](#1-public-travel--aviation-portals) - [2. Customer Self-Service Portal & Real-Time Tracking](#2-customer-self-service-portal--real-time-tracking) - [3. Intelligent 12-Step Work Assignment Engine](#3-intelligent-12-step-work-assignment-engine) - [4. Full-Spectrum Operations Workspace & CRUD Management](#4-full-spectrum-operations-workspace--crud-management) - [5. Work Transfer & Supervisory Approval Hierarchy](#5-work-transfer--supervisory-approval-hierarchy) - [6. Operational Analytics & Business Intelligence (Chart.js)](#6-operational-analytics--business-intelligence-chartjs) - [7. Security, Role-Based Access Control & Audit Trails](#7-security-role-based-access-control--audit-trails) - [8. Unified Multi-Provider Email Architecture](#8-unified-multi-provider-email-architecture) - [๐Ÿ“ธ Application Screenshots & Visual UI Showcase](#-application-screenshots--visual-ui-showcase) - [Platform Preview](#platform-preview) - [1. Homepage & Public Touchpoints](#1-homepage--public-touchpoints-screenshots-home) - [2. Services Hub & Vertical Portals](#2-services-hub--vertical-portals-screenshots-services) - [Services Hub Overview](#services-hub-overview-screenshots-services) - [Flight Bookings & GDS Portal](#flight-bookings--gds-portal-screenshots-servicesflight-booking) - [Curated Holiday Packages](#curated-holiday-packages-screenshots-servicesholiday-packages) - [Luxury Hotel Reservations](#luxury-hotel-reservations-screenshots-serviceshotel-reservations) - [Visa Assistance & Concierge](#visa-assistance--concierge-screenshots-servicesvisa-assistance) - [Private Jet & VIP Helicopter Charters](#private-jet--vip-helicopter-charters-screenshots-servicescharter-services) - [Air Cargo & Cold-Chain Logistics](#air-cargo--cold-chain-logistics-screenshots-servicescargo-logistics) - [Destinations Catalog & Explorer](#destinations-catalog--explorer-screenshots-servicesdestinations) - [3. Customer Self-Service Tracking Portal](#3-customer-self-service-tracking-portal-screenshots-portal) - [4. About Us, Team, Careers & Partnerships](#4-about-us-team-careers--partnerships-screenshots-about) - [About Company Story & Mission](#about-company-story--mission-screenshots-about) - [Leadership & Operations Personnel Roster](#leadership--operations-personnel-roster-screenshots-aboutteam) - [Career Opportunities & Job Applications](#career-opportunities--job-applications-screenshots-aboutcareers) - [B2B Airline & Travel Partnership Program](#b2b-airline--travel-partnership-program-screenshots-aboutpartner) - [5. Contact & Support Desk](#5-contact--support-desk-screenshots-contact) - [6. Legal & Regulatory Compliance Hub](#6-legal--regulatory-compliance-hub-screenshots-legal) - [7. Internal Operations Workspace & 6-Role Dashboard](#7-internal-operations-workspace--6-role-dashboard-screenshots-dashboard) - [Staff Authentication](#staff-authentication-screenshots-dashboardloginpng) - [Super Admin Command Center (23 Views)](#-super-admin-command-center-23-views--screenshotdashboardsuperadmin) - [Admin Workspace (21 Views)](#-admin-workspace-21-views--screenshotdashboardadmin) - [Department Manager Workspace (21 Views)](#-department-manager-workspace-21-views--screenshotdashboardmanager) - [Team Leader Workspace (17 Views)](#-team-leader-workspace-17-views--screenshotdashboardteam-leader) - [Employee Agent Workspace (14 Views)](#-employee-agent-workspace-14-views--screenshotdashboardemployee) - [Intern / Trainee Workspace (15 Views)](#-intern--trainee-workspace-15-views--screenshotdashboardintern) - [8. Dynamic XML Sitemap & Discovery](#8-dynamic-xml-sitemap--discovery-screenshots-sitemapxmlpng) - [โšก Advanced Feature Intelligence & Roadmap Deliverables (Delivered)](#-advanced-feature-intelligence--roadmap-deliverables) - [๐Ÿ”ฎ Next Phase Roadmap & Planned Expansions](#-next-phase-roadmap--planned-expansions) - [๐Ÿ—๏ธ Project Architecture](#-project-architecture) - [Layered System Architecture](#layered-system-architecture) - [End-to-End Workflow & Service Pipeline](#end-to-end-workflow--service-pipeline) - [๐Ÿงฌ Data Structure & Database Architecture](#-data-structure--database-architecture) - [Complete Database Schema & Entity-Relationship Diagram (ERD)](#complete-database-schema--entity-relationship-diagram-erd) - [Relational Integrity & Architectural Highlights](#relational-integrity--architectural-highlights) - [๐Ÿข Workspace Architecture & RBAC](#-workspace-architecture--rbac) - [The 6 System Roles](#the-6-system-roles) - [Permission Matrix](#permission-matrix) - [๐Ÿ—„๏ธ Data Models & Schema](#-data-models--schema) - [1. `system` โ€” Internal Workspace, CRM & Workflow Engine (13 Models)](#1-system--internal-workspace-crm--workflow-engine-13-models) - [2. `services` โ€” Travel, Flights, Charters & Cargo (9 Models)](#2-services--travel-flights-charters--cargo-9-models) - [3. `about` โ€” Company, Team & Careers (4 Models)](#3-about--company-team--careers-4-models) - [4. `app` โ€” Core Leads & Compliance (2 Models)](#4-app--core-leads--compliance-2-models) - [๐Ÿ”— URL Endpoints & Routing Reference](#-url-endpoints--routing-reference) - [Unified Internal Dashboard (`/dashboard/*`)](#unified-internal-dashboard-dashboard) - [Customer Self-Service Portal (`/portal/*`)](#customer-self-service-portal-portal) - [Public Travel, Aviation & Booking Pages](#public-travel-aviation--booking-pages) - [Public Form Submissions](#public-form-submissions) - [SEO & Legal Shortcuts](#seo--legal-shortcuts) - [๐Ÿ› ๏ธ Tech Stack & UI Framework](#-tech-stack--ui-framework) - [๐Ÿ“ Project Structure](#-project-structure) - [๐Ÿš€ Getting Started](#-getting-started) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Database Setup & Automated Seeding](#database-setup--automated-seeding) - [Running Automated Tests (187 Tests)](#running-automated-tests-187-tests) - [Running the Development Server](#running-the-development-server) - [๐Ÿ”‘ Default Seed Credentials & Safety Guards](#-default-seed-credentials--safety-guards) - [๐Ÿ“ง Unified Email Architecture (Resend & SMTP)](#-unified-email-architecture-resend--smtp) - [๐ŸŒ Production Deployment & Security](#-production-deployment--security) - [๐Ÿ“œ License](#-license) - [๐Ÿ‘จโ€๐Ÿ’ป Author & Contact](#-author--contact)

--- ## ๐ŸŒŸ Overview > **Flyway India** is an enterprise-grade Django web platform delivering full-spectrum consumer travel catalogs and private aviation services, backed by a **self-service customer portal (`/portal/`)** and an **intelligent internal operations workspace (`/dashboard/`)**. All internal organization personnel enter through a single unified route (`/dashboard/`), where the platform renders role-tailored queues, tasks, workload gauges, interactive Chart.js analytics, and comprehensive modal-driven CRUD administrative controls without role-prefixed URLs. Customers access real-time case tracking, timeline communication notes, and quote reviews seamlessly via passwordless token-authenticated portals. The core operations engine automates the entire inquiry lifecycle: from public submission and automated skills-based agent allocation to supervisory work reassignments, multi-tier approvals, SLA monitoring, operational BI reports, and immutable audit trails.
--- ## โšก Key Features ### 1. Public Travel & Aviation Portals - **Flight Bookings & GDS Inquiries**: Commercial flight reservation desk for domestic and international itineraries. - **Curated Holiday Packages & Destination Catalogs**: Category-filtered tours (Popular, Domestic, International, Adventure, Luxury) with day-wise itineraries, inclusions/exclusions, pricing in INR, and cover images. - **Luxury Hotel Reservations**: Tiered accommodation categories (Budget, Business, 5-Star Luxury Resorts, Boutique Stays) with amenity badges. - **Visa Concierge & Document Advisory**: Country-specific e-Visa and standard sticker visa guidance (UAE, UK, Schengen Europe, Singapore) with requirement checklists. - **Private Jet & Helicopter Charters**: Aircraft fleet specifications (Heavy Jets, Super Midsize, Helicopters) with passenger capacity, range, cruising speed, and VIP requests. - **Air Cargo & Cold-Chain Logistics**: Certified air freight handling for temperature-controlled pharma (+2ยฐC to +8ยฐC) and IATA dangerous goods. - **Career Openings & Secure Application**: Live job board with resume uploads whitelisted for `.pdf`, `.doc`, `.docx` with 5MB max payload limits. - **Spam-Protected Contact & Lead Capture**: Django ModelForms with honeypot fields (`website_hp`) and IP/session sliding-window rate limiting. ### 2. Customer Self-Service Portal & Real-Time Tracking - **Passwordless Tracking Lookup (`/portal/track/`)**: Clients look up enquiry status instantly using Reference Number (e.g. `FLY-2026-1001`) and email, or direct secure tokens (`/portal/dashboard//?token=...`). - **Live Status Stepper**: Visual 5-stage progress indicator (`Received` $\to$ `Assigned` $\to$ `In Progress` $\to$ `Quotation / Review` $\to$ `Completed`). - **Handling Specialist Details**: Live visibility into the assigned consultant, designation, and operations desk. - **Interactive Follow-Up Notes (`/portal/note//`)**: Customers can post questions or additional requirements directly from their portal dashboard, creating `EnquiryNote` records, alerting assigned agents via in-app `Notification`, and logging `AuditLog` entries. - **Automated Customer Status Emails**: Dispatches status change notices (`send_customer_status_update_email`) and receipt confirmations (`send_customer_enquiry_receipt_email`) with direct tracking links. ### 3. Intelligent 12-Step Work Assignment Engine Unlike basic round-robin mechanisms, Flyway evaluates incoming customer inquiries across a **12-step decision pipeline**: ```text New Customer Enquiry (Public / Dashboard Intake) โ†“ Auto-Resolve or Create Customer CRM Profile โ†“ Identify Service Category (Flights, Holidays, Visas, Charters, Cargo) โ†“ Match Target Department & Sub-Department โ†“ Identify Operational Team & Target Job Function โ†“ Match Required Skills Matrix (e.g. Amadeus, Schengen, Cold Chain) โ†“ Filter Out Unavailable Staff (On Leave, Busy, Offline, Inactive) โ†“ Filter Out Employees At Maximum Capacity Ceilings โ†“ Calculate Real-Time Workload Scores (Active Cases vs Capacity) โ†“ Apply Priority Weighting (Urgent / VIP Escalation) โ†“ Select Optimal Best-Available Employee โ†“ Assign & Recalculate Live Workload Headroom โ†“ Dispatch In-App Notification & Customer/Staff Transactional Emails โ†“ Record Immutable Assignment Audit Log ``` ### 4. Full-Spectrum Operations Workspace & CRUD Management - **Unified Role-Tailored Command Center**: `/dashboard/` provides live KPI summary widgets, urgent action queues, recent activity streams, and dynamic workload alerts. - **End-to-End CRUD Workflows**: - **Departments**: Create new organizational units, edit metadata, assign department managers, and safely delete empty departments. - **Sub-Departments**: Create specialized divisions, edit codes, and manage parent department relations. - **Teams**: Create operational execution squads, appoint team leads, and manage member rosters. - **Employees**: Complete onboarding modal (creating `auth.User` + `EmployeeProfile`), role assignment, skill matrix definition, capacity thresholds, and status toggles. - **Customers & CRM**: Add customers with VIP tier categorization (`STANDARD`, `SILVER`, `GOLD`, `PLATINUM`), view 360ยฐ booking histories, and spawn direct cases. - **Tasks**: Create operational duty items, assign due dates, update progress (`TODO`, `IN_PROGRESS`, `REVIEW`, `COMPLETED`), and attach them to cases. - **Enquiries**: Lifecycle state machine updates, internal agent notes, follow-up scheduling, and reassignment desk. - **Dark Luxury Aviation Aesthetic**: Refined Tailwind CSS palette with deep navy accents (`#0A2540`, `#0F172A`), warm gold highlights (`#D4AF37`, `#F3CA59`), modern typography (`Plus Jakarta Sans`, `Outfit`), and accessible modal dialogs. ### 5. Work Transfer & Supervisory Approval Hierarchy When employees need to escalate or reassign cases (due to domain expertise, overload, or leave): - Employees submit formal transfer requests specifying target staff/department, priority, and justification. - **Team Leaders** review and approve/reject intra-team transfers. - **Department Managers** review and approve cross-team and inter-departmental transfers. - Rejections enforce **mandatory feedback notes** back to the requesting agent. - Approvals automatically reassign the case, update both staff members' workload scores, notify affected parties, and log state deltas. ### 6. Operational Analytics & Business Intelligence (Chart.js) - **Interactive Chart.js Visualizations**: Real-time doughnut charts for case status distributions and bar charts for department workload utilization. - **Workload Meters & Headroom Gauges**: Department-wide and team-wide capacity utilization progress bars with health badges (`Optimal`, `Moderate`, `Heavy`, `Overloaded`). - **Active Duty Staff Roster**: Live visibility of case loads, capacity limits, and available headroom slots. - **Case Volume & Automation Efficiency**: Breakdown of automated vs manual vs supervisor-overridden allocations. - **Transfer & Reallocation Metrics**: Transfer volume, pending approval counts, and approval/rejection rates. - **One-Click CSV Data Export**: Streamed CSV reports for operational metrics and audit trails. ### 7. Security, Role-Based Access Control & Audit Trails - **Immutable Audit Trail**: Captures `user`, `action`, `target_model`, `target_id`, `previous_value`, `new_value`, `reason`, `ip_address`, and timestamp. - **Fine-Grained 6-Role RBAC**: Enforced via custom view decorators (`@require_roles`, `@require_admin_access`, `@require_manager_access`). - **Hardened Production Security**: Strict-origin referrer policy, HSTS headers, secure session/CSRF cookie toggles, and X-Frame-Options protection. ### 8. Unified Multi-Provider Email Architecture - **Unified Email Service (`system/email_service.py`)**: Abstracted transactional mail provider supporting **Resend API**, **SMTP**, and development **Console** backends. - **HTML + Plain-Text Templates**: Formatted customer booking confirmations, passwordless tracking links, internal assignment alerts, task dispatch notices, and transfer approvals. - **In-App Notification Center (`/dashboard/notifications/`)**: Real-time unread badge counts, mark-as-read toggles, and bulk cleanup tools.
--- --- ## ๐Ÿ“ธ Application Screenshots & Visual UI Showcase
> Explore the visual journey of **Flyway India** across all public travel portals, customer self-service tracking interfaces, multi-vertical booking engines, and internal 6-tier role-based operational workspaces.
### Platform Preview

Flyway India Platform Overview


### ๐Ÿ  1. Homepage & Public Touchpoints (`screenshot/home/`) The public-facing portal combines luxury aviation branding with dynamic flight search widgets, package discovery cards, trust metrics, and newsletter subscriptions.
#### Hero Banner & Live Booking Ingress

Homepage - Hero Section & Search Desk

#### Multi-Service Catalog & Featured Offerings

Homepage - Service Showcase & Flight Deals

#### Operational Excellence & Experience Statistics

Homepage - Why Choose Flyway & Performance Stats

#### Curated Destinations & Private Jet Highlights

Homepage - Curated Destinations & Fleet Showcase

#### Verified Client Testimonials & Trust Badges

Homepage - Client Testimonials & Reviews

#### Aviation Industry Insights & Travel News

Homepage - Latest Aviation Articles & News

#### Enterprise Footer & Navigation Hub

Homepage - Footer & Regulatory Links

#### Newsletter Subscription Desk

Homepage - Newsletter Lead Capture


--- ### โœˆ๏ธ 2. Services Hub & Vertical Portals (`screenshot/services/`) Flyway provides dedicated verticals for flights, holiday packages, luxury hotels, visas, private jet charters, cargo freight, and destination guides. #### Services Hub Overview (`screenshot/services/`)

Services Hub - Hero & Service Matrix

Services Hub - Commercial & Private Aviation

Services Hub - Cargo & Concierge Solutions

Services Hub - Booking Support & SLA Guarantee


#### Flight Bookings & GDS Portal (`screenshot/services/flight-booking/`)

Flight Booking - Search Engine & Route Selection

Flight Booking - Fare Classes & Cabin Selection

Flight Booking - Passenger Details & Special Requests

Flight Booking - Add-on Services & Baggage Options

Flight Booking - Instant Inquiry Confirmation


#### Curated Holiday Packages (`screenshot/services/holiday-packages/`)

Holiday Packages - Category Filter Tabs & Highlights

Holiday Packages - Package Grid & Pricing in INR

Holiday Packages - Day-wise Itinerary & Inclusions

Holiday Packages - Detailed Package Inclusions & Exclusions

Holiday Packages - Tour Customization Desk

Holiday Packages - Booking & Traveler Details

Holiday Packages - Package Reservation Summary


#### Luxury Hotel Reservations (`screenshot/services/hotel-reservations/`)

Hotel Reservations - Tiered Stays & Resort Catalog

Hotel Reservations - 5-Star Luxury & Boutique Features

Hotel Reservations - Amenities & Room Category Filters

Hotel Reservations - VIP Guest Perks & Inclusions

Hotel Reservations - Reservation Intake Form

Hotel Reservations - Booking Desk & Contact Concierge


#### Visa Assistance & Concierge (`screenshot/services/visa-assistance/`)

Visa Assistance - Global Country Directory

Visa Assistance - Country Visa Guidelines & Processing Times

Visa Assistance - Document Checklists & Requirements

Visa Assistance - Fee Structure & Embassy Protocols

Visa Assistance - Online Application & Document Upload

Visa Assistance - Case Review & Submission Desk

Visa Assistance - Dedicated Visa Specialist Assignment


#### Private Jet & VIP Helicopter Charters (`screenshot/services/charter-services/`)

Charter Services - Aircraft Fleet & Specs

Charter Services - Heavy Jets, Midsize & Helicopters

Charter Services - Range, Capacity & Cruising Speed

Charter Services - VIP Itinerary & Custom Flight Planner

Charter Services - On-Demand Charter Quote Request


#### Air Cargo & Cold-Chain Logistics (`screenshot/services/cargo-logistics/`)

Cargo Logistics - Temperature-Controlled Freight

Cargo Logistics - Cold-Chain Pharma & Dangerous Goods

Cargo Logistics - IATA Certified Handling & Fleet

Cargo Logistics - Customs Clearance & Express Cargo

Cargo Logistics - Freight Inquiry & Weight Calculator


#### Destinations Catalog & Explorer (`screenshot/services/destinations/`)

Destinations - Destination Directory & Categories

Destinations - International & Domestic Highlights

Destinations - Rating, Pricing & Duration Badges

Destinations - Destination Inquiry & Travel Guide


--- ### ๐Ÿ” 3. Customer Self-Service Tracking Portal (`screenshot/portal/`) The customer portal (`/portal/`) allows clients to track inquiry progress in real time with passwordless token lookups, 5-stage progression steppers, handling specialist details, and interactive follow-up notes.
#### Passwordless Tracking Lookup (`/portal/track/`)

Customer Portal - Tracker Lookup & Reference Entry

#### Live Customer Dashboard & 5-Stage Status Stepper

Customer Portal - Live Status Progression Stepper

#### Assigned Travel Specialist & Operational Desk

Customer Portal - Specialist Details & Direct Communication

#### Itinerary Details & Service Specifications

Customer Portal - Booking Specifications & Traveler Information

#### Interactive Customer Timeline & Follow-Up Notes

Customer Portal - Customer Notes & Communication Feed

#### Submitting Customer Follow-Up Inquiries

Customer Portal - Post Follow-up Message Modal

#### Quotation & Itinerary Review View

Customer Portal - Quote Review & Approval Stage

#### Completed Case Summary & Travel Confirmation

Customer Portal - Completed Booking Summary

#### Responsive Mobile & Tablet Tracking Experience

Customer Portal - Mobile Responsive View


--- ### ๐Ÿ‘ฅ 4. About Us, Team, Careers & Partnerships (`screenshot/about/`) #### About Company Story & Mission (`screenshot/about/`)

About - Hero Section & Company Vision

About - Aviation Heritage & Milestones

About - Core Values & Safety Standards

About - Global Network & Hubs

About - Fleet & Operations Infrastructure

About - Client Trust & Certifications

About - Leadership Overview & Contact Desk


#### Leadership & Operations Personnel Roster (`screenshot/about/team/`)

Team - Executive Leadership & Management Roster

Team - Aviation Operations & Fleet Specialists

Team - VIP Concierge & Luxury Travel Planners

Team - Air Cargo Logistics & Cold-Chain Officers

Team - Visa & Regulatory Advisory Experts

Team - Technology & Workflow Engineering Team

Team - Customer Experience & Support Leads

Team - Contact & Direct Advisory Connect


#### Career Opportunities & Job Applications (`screenshot/about/careers/`)

Careers - Life at Flyway & Culture

Careers - Open Positions & Department Filters

Careers - Job Details & Role Responsibilities

Careers - Candidate Requirements & Skill Matrix

Careers - Online Resume Application Form

Careers - Resume Upload & Validation Security

Careers - Application Receipt Confirmation


#### B2B Airline & Travel Partnership Program (`screenshot/about/partner/`)

Partnership - B2B Airline & Travel Agency Program

Partnership - Mutual Growth & Revenue Sharing Models

Partnership - Corporate Fleet & Logistics Alliance

Partnership - Partner Proposal Submission Form


--- ### ๐Ÿ“ž 5. Contact & Support Desk (`screenshot/contact/`)

Contact - Head Office & Global Locations

Contact - 24/7 Operations Desk & Emergency Hotline

Contact - Rate-Limited & Honeypot-Protected Inquiry Form

Contact - Submission Confirmation & Auto-CRM Ticket


--- ### โš–๏ธ 6. Legal & Regulatory Compliance Hub (`screenshot/legal/`)

Legal - Privacy Policy & Data Protection

Legal - Terms of Service & Aviation Regulations

Legal - Cancellation & Refund Policy

Legal - Cookie Policy & GDPR Compliance

Legal - Regulatory Disclaimers & Airline Liabilities

Legal - Intellectual Property & Copyright Notice

Legal - Compliance Contact & Grievance Officer


--- ### ๐Ÿข 7. Internal Operations Workspace & 6-Role Dashboard (`screenshot/dashboard/`) A single unified URL (`/dashboard/`) dynamically tailors queues, KPI gauges, Chart.js analytics, work transfers, and modal CRUD operations based on the authenticated employee's role. #### Staff Authentication (`screenshot/dashboard/login.png`)

Unified Dashboard - Staff Login Portal


#### ๐Ÿ‘‘ Super Admin Command Center (23 Views โ€” `screenshot/dashboard/superadmin/`)
Click to expand / collapse all 23 Super Admin views
| View # | Description | Preview | | :---: | :--- | :--- | | **01** | Super Admin Executive Command Center & KPI Overview | Superadmin - 01 | | **02** | Live Operational Queue & Urgent Action Desk | Superadmin - 02 | | **03** | Workload Allocation Meters & Organization Capacity | Superadmin - 03 | | **04** | Customer CRM Directory & VIP Tier Management | Superadmin - 04 | | **05** | Customer 360ยฐ Profile & Booking History | Superadmin - 05 | | **06** | Case Intake Management & Unified Enquiry Queue | Superadmin - 06 | | **07** | Enquiry Lifecycle Detail & Reassignment Desk | Superadmin - 07 | | **08** | Task Management, Due Dates & Milestone Tracker | Superadmin - 08 | | **09** | Task Modal Creation & Assignment Controls | Superadmin - 09 | | **10** | Work Transfer & Supervisory Reallocation Approval Desk | Superadmin - 10 | | **11** | Staff Directory & Global Employee Roster | Superadmin - 11 | | **12** | Employee Onboarding Modal & Role Assignment | Superadmin - 12 | | **13** | Employee Profile, Capacity Sliders & Skill Matrix | Superadmin - 13 | | **14** | Department Hierarchy & Unit Overview | Superadmin - 14 | | **15** | Department Creation Modal & Manager Appointment | Superadmin - 15 | | **16** | Sub-Department Management & Divisional Hierarchy | Superadmin - 16 | | **17** | Team Roster & Operational Squad Creation | Superadmin - 17 | | **18** | Assignment Roster & Live Load Headroom Analytics | Superadmin - 18 | | **19** | Chart.js Operational Analytics & BI Reports | Superadmin - 19 | | **20** | Immutable Security & Compliance Audit Log Hub | Superadmin - 20 | | **21** | System Settings, SLA Thresholds & Email Engine Controls | Superadmin - 21 | | **22** | Staff Notification Center & Real-Time Alerts | Superadmin - 22 | | **23** | User Account Profile & Security Settings | Superadmin - 23 |

#### ๐Ÿ›ก๏ธ Admin Workspace (21 Views โ€” `screenshot/dashboard/admin/`)
Click to expand / collapse all 21 Admin views
| View # | Description | Preview | | :---: | :--- | :--- | | **01** | Admin Operations Dashboard & Key Metrics | Admin - 01 | | **02** | Active Enquiries Queue & Triage Filters | Admin - 02 | | **03** | Enquiry Detail & Case Timeline Management | Admin - 03 | | **04** | Manual Work Assignment & Allocation Desk | Admin - 04 | | **05** | Customer CRM Hub & Account Ledger | Admin - 05 | | **06** | Customer Detail & Case Initiation | Admin - 06 | | **07** | Task Planning & Operational Deliverables | Admin - 07 | | **08** | Task Detail & Progress Update Modal | Admin - 08 | | **09** | Transfer Request Review & Decision Desk | Admin - 09 | | **10** | Staff Directory & Role Configuration | Admin - 10 | | **11** | Staff Onboarding & Skill Definition | Admin - 11 | | **12** | Department Directory & Hierarchy Tree | Admin - 12 | | **13** | Department Detail & Sub-Department Mapping | Admin - 13 | | **14** | Sub-Department Management & Teams | Admin - 14 | | **15** | Operational Team Management & Leads | Admin - 15 | | **16** | Team Detail & Member Roster | Admin - 16 | | **17** | Workload Allocation Matrix & Headroom | Admin - 17 | | **18** | Analytics & Business Intelligence Dashboard | Admin - 18 | | **19** | Compliance Audit Trail & Export Utility | Admin - 19 | | **20** | Notification Center & Inbox | Admin - 20 | | **21** | Profile & Credentials Management | Admin - 21 |

#### ๐Ÿ‘” Department Manager Workspace (21 Views โ€” `screenshot/dashboard/manager/`)
Click to expand / collapse all 21 Department Manager views
| View # | Description | Preview | | :---: | :--- | :--- | | **01** | Department-Scoped Command Center & KPIs | Manager - 01 | | **02** | Department Case Queue & Triage Desk | Manager - 02 | | **03** | Case Detail & Departmental Note Feed | Manager - 03 | | **04** | Case Reallocation & Staff Assignment | Manager - 04 | | **05** | Customer CRM Profiles (Department Scope) | Manager - 05 | | **06** | Customer Detailed Case History | Manager - 06 | | **07** | Department Tasks & Operational Milestones | Manager - 07 | | **08** | Task Assignment & Deadline Management | Manager - 08 | | **09** | Inter-Department & Cross-Team Transfer Approvals | Manager - 09 | | **10** | Department Staff Roster & Availability | Manager - 10 | | **11** | Department Staff Capacity & Status Controls | Manager - 11 | | **12** | Department Structure & Sub-Divisions | Manager - 12 | | **13** | Sub-Department Management & Squads | Manager - 13 | | **14** | Operational Teams in Department | Manager - 14 | | **15** | Team Roster & Team Leader Assignment | Manager - 15 | | **16** | Department Workload & Headroom Meter | Manager - 16 | | **17** | Workload Allocation Matrix & Sliders | Manager - 17 | | **18** | Department Analytics & SLA Performance | Manager - 18 | | **19** | Department CSV Report Generation | Manager - 19 | | **20** | Manager Notifications & Assignment Alerts | Manager - 20 | | **21** | Personal Account Profile & Preferences | Manager - 21 |

#### ๐ŸŽฏ Team Leader Workspace (17 Views โ€” `screenshot/dashboard/team leader/`)
Click to expand / collapse all 17 Team Leader views
| View # | Description | Preview | | :---: | :--- | :--- | | **01** | Team Leader Dashboard & Active Squad Queue | Team Leader - 01 | | **02** | Team Enquiries Queue & Priority Triage | Team Leader - 02 | | **03** | Team Case Detail & Timeline Notes | Team Leader - 03 | | **04** | Intra-Team Work Assignment & Override | Team Leader - 04 | | **05** | Customer CRM Directory (Team Scope) | Team Leader - 05 | | **06** | Customer Profile & Booking History | Team Leader - 06 | | **07** | Team Task List & Duty Deliverables | Team Leader - 07 | | **08** | Task Detail & Status Progression | Team Leader - 08 | | **09** | Intra-Team Transfer Approval Desk | Team Leader - 09 | | **10** | Team Member Directory & Status Overview | Team Leader - 10 | | **11** | Team Member Details & Capacity Stats | Team Leader - 11 | | **12** | Team Hierarchy & Sub-Department Context | Team Leader - 12 | | **13** | Team Member Roster & Performance Overview | Team Leader - 13 | | **14** | Team Workload Roster & Available Slots | Team Leader - 14 | | **15** | Workload Detail & Headroom Distribution | Team Leader - 15 | | **16** | Team Notification Inbox & Activity Feed | Team Leader - 16 | | **17** | Personal Account Profile & Security | Team Leader - 17 |

#### ๐Ÿง‘โ€๐Ÿ’ผ Employee Agent Workspace (14 Views โ€” `screenshot/dashboard/employee/`)
Click to expand / collapse all 14 Employee Agent views
| View # | Description | Preview | | :---: | :--- | :--- | | **01** | Employee Agent Personal Workspace & KPIs | Employee - 01 | | **02** | Assigned Customer Cases Queue | Employee - 02 | | **03** | Case Detail, Status Stepper & Quote Builder | Employee - 03 | | **04** | Case Follow-Up Notes & Customer Communication | Employee - 04 | | **05** | Case Reassignment & Transfer Request Form | Employee - 05 | | **06** | Customer Directory & VIP Profile Views | Employee - 06 | | **07** | Customer 360ยฐ Profile & Booking Summary | Employee - 07 | | **08** | Assigned Tasks & Actionable To-Do Items | Employee - 08 | | **09** | Task Status Updates & Progress Notes | Employee - 09 | | **10** | My Work Transfer Requests & Approval Status | Employee - 10 | | **11** | Department & Team Directory Overview | Employee - 11 | | **12** | Personal Workload Meter & Capacity Status | Employee - 12 | | **13** | Personal Notifications & Dispatch Alerts | Employee - 13 | | **14** | Personal Profile, Password & Settings | Employee - 14 |

#### ๐ŸŽ“ Intern / Trainee Workspace (15 Views โ€” `screenshot/dashboard/intern/`)
Click to expand / collapse all 15 Intern views
| View # | Description | Preview | | :---: | :--- | :--- | | **01** | Intern Trainee Workspace & Assigned Queue | Intern - 01 | | **02** | Intern Case Queue & Supervised Assignments | Intern - 02 | | **03** | Case Detail & Timeline Learning View | Intern - 03 | | **04** | Case Internal Notes Feed | Intern - 04 | | **05** | Case Status Update Modal | Intern - 05 | | **06** | Customer CRM Profiles (Read Access) | Intern - 06 | | **07** | Customer Booking Profile View | Intern - 07 | | **08** | Assigned Training Tasks & To-Do List | Intern - 08 | | **09** | Task Progress & Completion Notes | Intern - 09 | | **10** | Trainee Work Transfer Log (Supervised) | Intern - 10 | | **11** | Department & Team Colleagues Directory | Intern - 11 | | **12** | Colleague Profile & Role View | Intern - 12 | | **13** | Personal Capacity & Active Case Meter | Intern - 13 | | **14** | Real-Time Notification Center | Intern - 14 | | **15** | Personal Account Profile & Security | Intern - 15 |

--- ### ๐Ÿ—บ๏ธ 8. Dynamic XML Sitemap & Discovery (`screenshot/sitemap.xml.png`)

Dynamic XML Sitemap


--- ## โšก Advanced Feature Intelligence & Roadmap Deliverables The platform has been enhanced with **7 advanced enterprise operational capabilities** delivered across analytics, document generation, agent performance tracking, multi-entity search, bulk CSV processing, visual duty planning, and client document compliance:
| Feature # | Capability | Architectural Implementation | Workspace Role Preview | | :---: | :--- | :--- | :--- | | **01** | **Dashboard SLA Breach Forecasting & CSAT Intelligence** | Predictive time-decay engine in `system/analytics.py` tracking cases against priority SLAs (4h/12h/24h/48h) with real-time compliance gauges and Customer Satisfaction rating. | SLA Analytics Overview | | **02** | **Tax Invoice & Day-wise Travel Itinerary Generator** | Luxury printable invoice generator at `/dashboard/enquiries//invoice/` with 18% GST (9% CGST + 9% SGST), day-by-day travel schedule, and `@media print` support. | Tax Invoice & Itinerary View | | **03** | **Monthly Agent Performance & KPI Leaderboard** | Multi-attribute scoring matrix in `system/analytics.py` evaluating conversion rates (45%), resolution turnaround (35%), and case volume (20%) with ๐Ÿฅ‡, ๐Ÿฅˆ, ๐Ÿฅ‰ medals. | Reports & KPI Leaderboard | | **04** | **Visual Kanban Board for Action Tasks** | Interactive 4-column workflow (`To Do`, `In Progress`, `Under Review`, `Completed`) with 1-click status progression and priority triage at `/dashboard/tasks/?layout=kanban`. | Action Tasks Visual Kanban | | **05** | **Dual Milestone Calendar Schedule Planning** | Side-by-side scheduled task deadline tracker and passenger flight departure calendar at `/dashboard/tasks/?layout=calendar`. | Tasks & Flight Departures Calendar | | **06** | **Unified Multi-Entity Global Search Engine** | Global search engine (`Ctrl+K` / `/` shortcut) at `/dashboard/search/?q=...` searching across Enquiries, CRM Clients, Staff Directory, Tasks, and Audit Logs. | Admin Command Bar Search | | **07** | **Bulk CSV Client & Staff Onboarding Service** | Transactional bulk onboarding service in `system/bulk_service.py` with downloadable sample CSV templates and error auditing. | Customer CRM Bulk Ingestion | | **08** | **Client Travel Document & Passports Vault** | Document repository model `CustomerDocument` supporting passports, visas, vouchers, and tickets with upload modals and delete controls. | Customer Travel Document Repository |

--- ## ๐Ÿ”ฎ Next Phase Roadmap & Planned Expansions The platform roadmap is structured into 3 prioritized engineering and operational phases: ### Phase 1: Near-Term Engineering Sprints (Core Transactional & Security) 1. **Real-Time WebSockets & WhatsApp/SMS Gateway** - WebSocket / Server-Sent Events (SSE) for instant push notifications to active agent terminals. - WhatsApp Business API and SMS gateways (Twilio / AWS SNS / Gupshup) for instant passenger booking receipts, status alerts, and ticket delivery. 2. **Integrated Payment Gateway & Automated Escrow (Stripe / Razorpay / UPI)** - Direct digital payment links embedded in invoices and self-service portal (`/portal/invoice//pay/`). - Split & milestone deposits (e.g., 20% advance booking deposit + 80% pre-departure balance). - Automated webhook reconciliation triggering instant `CONFIRMED` case progression and digital tax receipts. 3. **Two-Factor Authentication (2FA/MFA)** - TOTP / Authenticator app support (Google Authenticator, Microsoft Authenticator) for privileged Super Admin, Admin, and Department Manager security governance. 4. **AI Automation & Smart Reply Assistant** - Natural language inquiry classification & sentiment analysis (OpenAI / Gemini integration). - Automated intelligent response draft suggestions and itinerary recommendation engine for frontline travel specialists. ### Phase 2: Commercial & Operational Scaling (Supply Chain & Global Reach) 5. **Multi-Currency Engine & Real-Time FX Conversion** - Dynamic currency selector (USD `$`, EUR `โ‚ฌ`, GBP `ยฃ`, AED `AED`, INR `โ‚น`) across public packages, charter quotes, and tax invoices. - Daily automated FX exchange rate synchronization via live currency feeds. 6. **B2B Supplier & Vendor Partner Ledger** - Dedicated vendor directory for private jet charter operators, luxury hotel chains, DMCs, and cargo freight handlers. - Contracted net rates, gross margin calculators, supplier payment status tracking, and vendor SLA scorecards. 7. **Automated Post-Trip Review & Drip Retention Engine** - Time-triggered post-travel feedback triggers (1โ€“2 days post-departure) capturing CSAT/NPS scores directly into agent KPI leaderboards. - Automated Google Review / TripAdvisor review prompts and 60-day personalized destination re-engagement vouchers. ### Phase 3: Aviation Intelligence & Traveler Ecosystem 8. **Live Flight & PNR Tracking Integration** - Direct integration with aviation data providers (Amadeus, Sabre, AviationStack, FlightAware) for live PNR lookup and gate/delay notifications. - Interactive live flight radar map embedded within the Customer Self-Service Portal. 9. **"Flyway Miles" Loyalty & Corporate Rewards Ledger** - Points/miles ledger integrated into existing CRM VIP Tiers (`STANDARD`, `SILVER`, `GOLD`, `PLATINUM`). - Earned points per booking value, corporate referral tracking, and 1-click redemption on future packages or charter flight hours. 10. **Progressive Web App (PWA) & Offline Travel Companion** - PWA service workers enabling offline access to day-wise itineraries, downloaded flight e-tickets, hotel vouchers, and emergency concierge hotlines. 11. **Data Privacy, Document Expiry & DPDP/GDPR Compliance Vault** - Automated passport and visa expiry alerts flagging documents expiring within 6 months of scheduled travel dates. - Configurable data retention policies, automated document purge schedules, and at-rest document encryption for DPDP/GDPR compliance.
| Priority Phase | Focus Area | Key Technologies / Integrations | Business Impact | | :---: | :--- | :--- | :--- | | **Phase 1** | **Core Transactional & Security** | Stripe / Razorpay, WebSockets, Twilio WhatsApp, TOTP 2FA, Gemini AI | Closes the full digital payment loop & tightens enterprise security | | **Phase 2** | **Supply Chain & Global Scale** | Exchange Rate APIs, Vendor Ledger, Automated Drip Lifecycle | Unlocks multi-currency global sales & controls net profit margins | | **Phase 3** | **Aviation Intelligence & Mobile** | Amadeus / FlightAware APIs, PWA Service Workers, Loyalty Engine | Delivers premier traveler experience during active transit |
--- ## ๐Ÿ—๏ธ Project Architecture ### Layered System Architecture ```mermaid flowchart TB subgraph ClientLayer["1. Client & Presentation Layer"] PublicWeb["Public Web Consumers
(Flights, Tours, Visas, Charters, Cargo)"] CustomerPortal["Customer Self-Service Portal
(/portal/track/, Live Stepper, Notes)"] InternalWorkspace["Unified Operations Workspace
(/dashboard/*, 6 RBAC Roles, Modals)"] end subgraph IngressSecurity["2. Ingress, Security & Gateway Layer"] WSGI["Gunicorn WSGI / WhiteNoise Assets"] RateLimiter["Sliding-Window Rate Limiter
(system/rate_limit.py)"] AntiSpam["Honeypot Anti-Spam Guard
(website_hp + Regex Validators)"] SecurityHeaders["HSTS, CSRF & Secure Cookies
Strict-Origin Referrer Policy"] end subgraph PresentationEngine["3. Presentation & Controller Layer"] PublicViews["Public Views & Controllers
(app, services, about)"] PortalViews["Customer Portal Controllers
(system.views portal methods)"] DashboardViews["Unified Workspace Views
(@require_roles, CRUD Handlers)"] TailwindTemplates["Pure Django Templates (DTL)
Tailwind CSS + Chart.js System"] end subgraph AutomationEngines["4. Core Business & Automation Engines"] AssignmentEngine["โšก 12-Step Assignment Engine
(Skills, Capacity & Load Balancing)"] TransferService["๐Ÿ”„ Work Transfer Workflow
(TL Intra-Team & DM Inter-Dept)"] CRMService["๐Ÿ“ฌ Auto-CRM & Intake Engine
(Auto Customer Resolution)"] NotificationBus["๐Ÿ“ง Transactional Email & Alerts
(Resend, SMTP & In-App Alerts)"] AuditService["๐Ÿ›ก๏ธ Compliance Audit Engine
(State Deltas & Rationale Logs)"] ReportingService["๐Ÿ“Š Operational BI & Reports
(Chart.js Visuals & CSV Export)"] end subgraph PersistenceLayer["5. Data & Persistence Layer"] ORM["Django ORM (28 Relational Models)"] Database[("PostgreSQL / SQLite3
B-Tree Indexes & Foreign Keys")] end ClientLayer --> IngressSecurity IngressSecurity --> PresentationEngine PresentationEngine --> TailwindTemplates PresentationEngine --> AutomationEngines AutomationEngines --> ORM ORM --> Database ```
### End-to-End Workflow & Service Pipeline ```mermaid sequenceDiagram autonumber actor Customer as ๐Ÿ‘ค Customer participant PublicForm as ๐ŸŒ Public / Booking Form participant Guard as ๐Ÿ›ก๏ธ Rate Limiter & Honeypot participant Intake as ๐Ÿ“ฌ CRM & Intake Engine participant Engine as โšก 12-Step Assignment Engine participant DB as ๐Ÿ—„๏ธ Database participant Email as ๐Ÿ“ง Email & Notification actor Agent as ๐Ÿง‘โ€๐Ÿ’ผ Staff Agent actor Manager as ๐Ÿ‘” Manager / Lead Customer->>PublicForm: Submit Booking / Travel Enquiry (/enquiry/) PublicForm->>Guard: Validate honeypot, phone regex, rate limit Guard-->>Intake: Sanitized form payload Intake->>DB: Resolve/Create Customer profile (CUST-...) Intake->>DB: Create CustomerEnquiry (FLY-...) with secure token Intake->>Engine: Trigger 12-Step Intelligent Assignment Engine->>DB: Match Department, Team, Skills & Workload Headroom Engine->>DB: Assign optimal Specialist & log AssignmentLog Engine->>Email: Dispatch Customer Receipt & Staff In-App Notification Email-->>Customer: Email with tracking reference & direct portal link Email-->>Agent: In-app & email assignment notification loop Active Case Lifecycle Customer->>PublicForm: Access Portal (/portal/dashboard/FLY-...) Customer->>PublicForm: Submit Follow-Up Note (/portal/note/) PublicForm->>DB: Save EnquiryNote (author=None) PublicForm->>Email: Notify assigned Agent Agent->>DB: Update Case Status & Add Internal Notes DB->>Email: Trigger send_customer_status_update_email Email-->>Customer: Status update email alert end opt Reassignment / Escalation Agent->>DB: Submit TransferRequest (domain/overload) Manager->>DB: Review & Approve Transfer (/dashboard/approvals/) DB->>DB: Reassign case, recalculate workloads & log AuditLog end ```
--- ## ๐Ÿงฌ Data Structure & Database Architecture ### Complete Database Schema & Entity-Relationship Diagram (ERD) ```mermaid erDiagram USER ||--|| EMPLOYEE_PROFILE : "extends (1:1)" USER ||--o{ DEPARTMENT : "manages" USER ||--o{ TEAM : "leads" USER ||--o{ NOTIFICATION : "receives" USER ||--o{ AUDIT_LOG : "executes" USER ||--o{ TASK : "assigned_by" DEPARTMENT ||--o{ SUB_DEPARTMENT : "contains (1:N)" SUB_DEPARTMENT ||--o{ TEAM : "contains (1:N)" DEPARTMENT ||--o{ EMPLOYEE_PROFILE : "employs (1:N)" TEAM ||--o{ EMPLOYEE_PROFILE : "assigns (1:N)" CUSTOMER ||--o{ CUSTOMER_ENQUIRY : "places (1:N)" DEPARTMENT ||--o{ CUSTOMER_ENQUIRY : "routes_to" SUB_DEPARTMENT ||--o{ CUSTOMER_ENQUIRY : "routes_to" TEAM ||--o{ CUSTOMER_ENQUIRY : "assigned_to" EMPLOYEE_PROFILE ||--o{ CUSTOMER_ENQUIRY : "handled_by" CUSTOMER_ENQUIRY ||--o{ ENQUIRY_NOTE : "has (1:N)" CUSTOMER_ENQUIRY ||--o{ TASK : "spawns (1:N)" CUSTOMER_ENQUIRY ||--o{ ASSIGNMENT_LOG : "records (1:N)" CUSTOMER_ENQUIRY ||--o{ TRANSFER_REQUEST : "triggers (1:N)" EMPLOYEE_PROFILE ||--o{ TASK : "executes (1:N)" EMPLOYEE_PROFILE ||--o{ TRANSFER_REQUEST : "initiates" EMPLOYEE_PROFILE ||--o{ TRANSFER_REQUEST : "target_of" DESTINATION_CATEGORY ||--o{ DESTINATION : "categorizes (1:N)" DESTINATION ||--o{ HOLIDAY_PACKAGE : "features (1:N)" CAREER ||--o{ JOB_APPLICATION : "receives (1:N)" CUSTOMER { int id PK string customer_number UK "CUST-YYYYMM-XXXX" int user_id FK "Optional linked auth.User" string full_name string email "Indexed" string phone string company_name string city_country string vip_tier "STANDARD, SILVER, GOLD, PLATINUM" text notes boolean is_active datetime created_at } CUSTOMER_ENQUIRY { int id PK string enquiry_number UK "FLY-YYYYMM-XXXX" string tracking_token UK "Secure urlsafe token" int customer_id FK "Linked Customer account" string enquiry_type "FLIGHT, HOLIDAY, VISA, CHARTER, CARGO..." string full_name string email "Indexed" string phone string destination date travel_date string num_travelers text message text internal_notes string priority "LOW, MEDIUM, HIGH, URGENT" string status "NEW, ASSIGNED, IN_PROGRESS, COMPLETED..." int target_department_id FK int sub_department_id FK int assigned_team_id FK int assigned_employee_id FK boolean auto_assigned date follow_up_date datetime created_at } EMPLOYEE_PROFILE { int id PK int user_id FK "1:1 auth.User" string role "SUPER_ADMIN, ADMIN, DEPT_MANAGER, TEAM_LEADER, EMPLOYEE, INTERN" int department_id FK int sub_department_id FK int team_id FK string job_title string job_function text skills "Comma-delimited skills matrix" int capacity "Default 10 concurrent cases" string availability_status "AVAILABLE, BUSY, ON_LEAVE, OFFLINE" datetime joined_at } DEPARTMENT { int id PK string name string code UK "OPS, CR, CARGO, TECH, SALES" text description int manager_id FK "Department Manager user" boolean is_active } SUB_DEPARTMENT { int id PK int department_id FK string name string code "FLT, TOURS, JET, EXP..." text description boolean is_active } TEAM { int id PK int department_id FK int sub_department_id FK string name int leader_id FK "Team Leader user" boolean is_active } ENQUIRY_NOTE { int id PK int enquiry_id FK int author_id FK "Staff auth.User or NULL for Customer" text note string status_at_time datetime created_at } TASK { int id PK string title text description int assigned_to_id FK "EmployeeProfile" int assigned_by_id FK "auth.User" int department_id FK int team_id FK int related_enquiry_id FK "CustomerEnquiry" string priority "LOW, MEDIUM, HIGH, URGENT" string status "TODO, IN_PROGRESS, REVIEW, COMPLETED" date due_date datetime created_at } ASSIGNMENT_LOG { int id PK int enquiry_id FK int employee_id FK int assigned_by_id FK "NULL for auto engine" datetime assigned_at string assignment_method "automatic, manual, override, transfer" int matched_department_id FK int matched_sub_department_id FK int matched_team_id FK text matched_skills int employee_capacity_at_time int employee_active_load_at_time int employee_workload_score_at_time string status "assigned, active, completed, reassigned" text notes } TRANSFER_REQUEST { int id PK int enquiry_id FK int current_employee_id FK int target_employee_id FK int target_department_id FK text reason string status "pending, approved, rejected, cancelled" int approver_id FK "Team Leader or Dept Manager" text rejection_reason datetime actioned_at datetime created_at } NOTIFICATION { int id PK int recipient_id FK "auth.User" int sender_id FK "auth.User optional" string title text message string notification_type "ENQUIRY_ASSIGNED, TRANSFER_REQUEST, SLA_ALERT..." string link_url boolean is_read datetime created_at } AUDIT_LOG { int id PK int user_id FK string action "LOGIN, ROLE_CHANGE, TRANSFER_APPROVAL, STATUS_UPDATE..." string target_model "Indexed" string target_id "Indexed" text description text previous_value text new_value text reason string ip_address datetime created_at } SYSTEM_SETTING { int id PK string platform_name string support_email int default_capacity int sla_high_hours int sla_urgent_hours boolean auto_assignment_enabled boolean email_notifications_enabled } DESTINATION { int id PK int category_id FK "DestinationCategory" string name string slug UK string location string duration decimal price_from decimal rating string badge text highlights text inclusions string image } HOLIDAY_PACKAGE { int id PK int destination_id FK "Destination" string title string slug UK string duration decimal price decimal discount_price text highlights text inclusions text itinerary "JSON or structured day-wise text" string image } CAREER { int id PK string title string slug UK string department string location string experience string employment_type "FULL_TIME, PART_TIME, CONTRACT, INTERNSHIP" text description text requirements text skills boolean is_active } JOB_APPLICATION { int id PK int career_id FK "Optional linked Career" string job_title string full_name string email string phone string current_role string experience string resume "Whitelisted PDF/DOC upload" text cover_note string status "NEW, SCREENING, INTERVIEW, OFFER, REJECTED" datetime created_at } ```
### Relational Integrity & Architectural Highlights 1. **Dual-Channel Customer Lifecycle**: - `Customer` maintains persistent CRM history across multiple cases (`CustomerEnquiry`). - `CustomerEnquiry.tracking_token` provides cryptographically secure passwordless URLs for the customer self-service portal (`/portal/dashboard//?token=...`). 2. **Dynamic 3-Tier Organizational Hierarchy**: - `Department` $\to$ `SubDepartment` $\to$ `Team` models the operational structure. - Staff roles (`EmployeeProfile`) are dynamically assigned capacity ratings, skill tags, and availability flags used by the 12-step assignment engine. 3. **Operational Decision & Transfer Hub**: - `AssignmentLog` persists exact algorithm decision states at the time of allocation (capacity, active load, workload score). - `TransferRequest` manages the supervisory approval state machine with historical foreign key links to `current_employee`, `target_employee`, and `approver`. 4. **Audit & Traceability Hub**: - `AuditLog` captures state deltas with previous and new serialized values across sensitive actions (user creation, role changes, transfers, and status updates). 5. **Travel Document & Passports Repository**: - `CustomerDocument` securely anchors passport scans, visas, airline tickets, and hotel vouchers to both persistent CRM customer dossiers and individual case files with size and MIME-type enforcement.
--- ## ๐Ÿข Workspace Architecture & RBAC ### The 6 System Roles ```text โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Super Admin โ”‚ (Full system authority & security controls) โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Admin โ”‚ (Workspace-wide operations & user onboarding) โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Department Manager โ”‚ (Departmental scoping, approvals & reports) โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Team Leader โ”‚ (Team workload dispatch & intra-team approvals) โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Employee โ”‚ (Case execution, notes & transfer requests) โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ”‚ โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚ Intern โ”‚ (Trainee access with restricted transfer power) โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ ``` ### Permission Matrix | Workspace Capability | Super Admin | Admin | Dept Manager | Team Leader | Employee | Intern | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | | **Unified Dashboard (`/dashboard/`)** | Full Org | Full Org | Department Scope | Team Scope | Assigned Scope | Assigned Scope | | **Customer CRM (`/dashboard/customers/`)** | Full CRUD | Full CRUD | Full CRUD | View / Edit | View / Edit | View Only | | **Manage Departments & Hierarchy** | Full CRUD | Full CRUD | Sub-Depts / Teams | View Only | View Only | View Only | | **User & Staff Onboarding** | Full CRUD | Full CRUD | Dept Personnel | View Team | Self Only | Self Only | | **Change System Roles** | โœ… Yes | โœ… Yes | โŒ No | โŒ No | โŒ No | โŒ No | | **Manual / Override Assignment** | โœ… Any | โœ… Any | Department Only | Team Only | โŒ No | โŒ No | | **Transfer Approval Authority** | โœ… Any | โœ… Any | Department Scope | Team Scope | โŒ No | โŒ No | | **Initiate Work Transfer Request** | โœ… Yes | โœ… Yes | โœ… Yes | โœ… Yes | โœ… Yes | โš ๏ธ Restricted | | **Task Management (`/dashboard/tasks/`)** | Full CRUD | Full CRUD | Dept Tasks | Team Tasks | Assigned Tasks | Assigned Tasks | | **View Audit Logs (`/dashboard/audit-logs/`)** | โœ… Full | โœ… Full | โŒ No | โŒ No | โŒ No | โŒ No | | **View Analytics & BI (`/dashboard/reports/`)** | โœ… Org-Wide | โœ… Org-Wide | Department Scope | โŒ No | โŒ No | โŒ No | | **Export Reports to CSV** | โœ… Yes | โœ… Yes | โœ… Dept Only | โŒ No | โŒ No | โŒ No | | **System Settings (`/dashboard/settings/`)** | โœ… Full | โœ… Full | โŒ No | โŒ No | โŒ No | โŒ No |
--- ## ๐Ÿ—„๏ธ Data Models & Schema Flyway is architected across **4 modular Django applications**: ```text flyway.in/ โ”œโ”€โ”€ system/ โ†’ Internal Workspace, Customer CRM, Assignment Engine, Approvals & Audits (13 Models) โ”œโ”€โ”€ services/ โ†’ Destinations, Holiday Packages, Hotels, Visas, Charters, Cargo (9 Models) โ”œโ”€โ”€ about/ โ†’ Team Members, Careers, Job Applications, Partner Proposals (4 Models) โ””โ”€โ”€ app/ โ†’ Contact Enquiries, Newsletter Subscribers (2 Models) ``` ### 1. `system` โ€” Internal Workspace, CRM & Workflow Engine (13 Models) | Model | Description | Key Fields | | :--- | :--- | :--- | | **`Customer`** | Central customer account, CRM ledger & VIP tier | `customer_number`, `user`, `full_name`, `email`, `phone`, `company_name`, `city_country`, `passport_number`, `vip_tier`, `notes`, `is_active` | | **`CustomerEnquiry`** | Unified case intake across all public & internal touchpoints | `enquiry_number`, `tracking_token`, `customer`, `enquiry_type`, `full_name`, `email`, `phone`, `destination`, `message`, `priority`, `status`, `target_department`, `assigned_team`, `assigned_employee` | | **`Department`** | Organizational units (Operations, Client Relations, Cargo, Tech, Sales) | `name`, `code`, `description`, `manager`, `is_active` | | **`SubDepartment`** | Focused divisions within a department | `department`, `name`, `code`, `description`, `is_active` | | **`Team`** | Operational execution teams | `department`, `sub_department`, `name`, `leader`, `is_active` | | **`EmployeeProfile`** | Extended personnel profile across all 6 roles | `user`, `role`, `department`, `team`, `job_title`, `job_function`, `skills`, `capacity`, `availability_status` | | **`EnquiryNote`** | Chronological staff & customer timeline notes | `enquiry`, `author`, `note`, `status_at_time`, `created_at` | | **`Task`** | Operational duties, scheduled deliverables, and checklists | `title`, `description`, `assigned_to`, `assigned_by`, `department`, `team`, `related_enquiry`, `priority`, `status`, `due_date` | | **`AssignmentLog`** | Complete decision log for automated or manual allocations | `enquiry`, `employee`, `assigned_by`, `assignment_method`, `matched_skills`, `employee_capacity_at_time`, `status` | | **`TransferRequest`** | Multi-tier work reallocation requests and approvals | `enquiry`, `current_employee`, `target_employee`, `target_department`, `reason`, `status`, `approver`, `rejection_reason` | | **`Notification`** | In-app user notifications with read tracking | `recipient`, `sender`, `title`, `message`, `notification_type`, `link_url`, `is_read` | | **`AuditLog`** | System-wide compliance & state delta audit records | `user`, `action`, `target_model`, `target_id`, `description`, `previous_value`, `new_value`, `reason`, `ip_address` | | **`SystemSetting`** | Organization-wide operational thresholds, SLA limits & email controls | `platform_name`, `support_email`, `default_capacity`, `sla_high_hours`, `sla_urgent_hours`, `auto_assignment_enabled`, `email_notifications_enabled` | ### 2. `services` โ€” Travel, Flights, Charters & Cargo (9 Models) | Model | Description | Key Fields | | :--- | :--- | :--- | | **`Destination`** | Destination catalog items | `name`, `slug`, `location`, `category`, `duration`, `price_from`, `rating`, `badge`, `highlights`, `inclusions`, `image` | | **`DestinationCategory`** | Filter tabs (Popular, Domestic, International, Adventure, Luxury) | `name`, `slug`, `sort_order`, `is_active` | | **`DestinationSectionHeader`** | Dynamic header content | `title`, `subtitle`, `is_active` | | **`HolidayPackage`** | Curated vacation packages linked to destinations | `title`, `slug`, `destination`, `duration`, `price`, `discount_price`, `highlights`, `inclusions`, `itinerary`, `image` | | **`HotelCategory`** | Hotel tiers & accommodation offerings | `name`, `slug`, `discount_badge`, `description`, `features`, `image` | | **`VisaCountry`** | Country visa advisories and document requirements | `country_name`, `slug`, `visa_type`, `processing_time`, `validity`, `fee_from`, `requirements`, `image` | | **`CharterAircraft`** | Private jet and VIP helicopter fleet specifications | `name`, `slug`, `aircraft_type`, `passenger_capacity`, `speed`, `range_km`, `price_per_hour`, `features`, `image` | | **`CargoServiceOption`** | Air cargo freight & cold-chain services | `title`, `slug`, `delivery_speed`, `capacity`, `badge`, `features`, `image` | | **`ServiceEnquiry`** | Detailed public service inquiries | `service_category`, `full_name`, `email`, `phone`, `service`, `destination`, `travel_date`, `num_travelers`, `message` | ### 3. `about` โ€” Company, Team & Careers (4 Models) | Model | Description | Key Fields | | :--- | :--- | :--- | | **`TeamMember`** | Leadership & staff public profiles | `name`, `role`, `department`, `bio`, `image`, `linkedin_url`, `email`, `is_leadership` | | **`Career`** | Job openings and role descriptions | `title`, `department`, `location`, `experience`, `employment_type`, `description`, `requirements`, `skills` | | **`JobApplication`** | Candidate resume submissions | `job_title`, `full_name`, `email`, `phone`, `current_role`, `experience`, `resume`, `cover_note`, `status` | | **`PartnerEnquiry`** | B2B & airline partnership proposals | `company_name`, `contact_name`, `email`, `phone`, `partnership_type`, `message` | ### 4. `app` โ€” Core Leads & Compliance (2 Models) | Model | Description | Key Fields | | :--- | :--- | :--- | | **`ContactEnquiry`** | General contact inquiries | `full_name`, `email`, `phone`, `subject`, `department`, `message`, `is_resolved` | | **`NewsletterSubscriber`** | Newsletter audience subscriptions | `full_name`, `country`, `email`, `phone`, `is_active` |
--- ## ๐Ÿ”— URL Endpoints & Routing Reference ### Unified Internal Dashboard (`/dashboard/*`) All 6 internal roles access the system through a unified prefix without role-prefixed URLs: | Path | View Function | Method | Description | | :--- | :--- | :---: | :--- | | `/dashboard/login/` | `dashboard_login` | `GET, POST` | Internal staff authentication portal | | `/dashboard/logout/` | `dashboard_logout` | `GET` | Secure session termination & audit log | | `/dashboard/` | `dashboard_home` | `GET` | Role-tailored command center & KPI dashboard | | `/dashboard/tasks/` | `tasks_view` | `GET, POST` | Task management, modal creation, and filtering | | `/dashboard/tasks//` | `task_detail_view` | `GET, POST` | Task status updates, notes, and deletion | | `/dashboard/enquiries/` | `enquiries_view` | `GET, POST` | Unified customer enquiry queue & filtering | | `/dashboard/enquiries//` | `enquiry_detail_view` | `GET, POST` | Enquiry detail, timeline notes, status & assignment actions | | `/dashboard/assignments/` | `assignments_view` | `GET, POST` | Workload roster, capacity sliders & availability toggles | | `/dashboard/assignments//`| `assignment_detail_view` | `GET, POST` | Workload profile & supervisory manual override | | `/dashboard/approvals/` | `approvals_view` | `GET, POST` | Work transfer approval/rejection desk | | `/dashboard/employees/` | `employees_view` | `GET, POST` | Employee directory & staff onboarding modal | | `/dashboard/employees//` | `employee_detail_view` | `GET, POST` | Employee profile, skill editing, capacity & status toggle | | `/dashboard/departments/` | `departments_view` | `GET, POST` | Department hierarchy & new department modal | | `/dashboard/departments//`| `department_detail_view` | `GET, POST` | Department details, sub-departments, teams & deletion | | `/dashboard/sub-departments/` | `sub_departments_view` | `GET, POST` | Sub-department management & creation modal | | `/dashboard/sub-departments//`| `sub_department_detail_view` | `GET, POST` | Sub-department details & assigned personnel | | `/dashboard/teams/` | `teams_view` | `GET, POST` | Team roster & new team creation modal | | `/dashboard/teams//` | `team_detail_view` | `GET, POST` | Team members, active workloads & leader selection | | `/dashboard/customers/` | `customers_view` | `GET, POST` | Customer CRM directory & onboarding modal | | `/dashboard/customers//` | `customer_detail_view` | `GET, POST` | Customer 360ยฐ profile, VIP tier, bookings & quick case creation | | `/dashboard/reports/` | `reports_view` | `GET` | Operational analytics, capacity meters & Chart.js BI | | `/dashboard/reports/?export=csv` | `reports_view` | `GET` | Streamed CSV operational report export | | `/dashboard/audit-logs/` | `audit_logs_view` | `GET` | Immutable compliance and security audit logs | | `/dashboard/audit-logs/?export=csv` | `audit_logs_view` | `GET` | Streamed CSV audit log export | | `/dashboard/notifications/` | `notifications_view` | `GET, POST` | Inbox notification center & bulk read actions | | `/dashboard/profile/` | `profile_view` | `GET, POST` | Personal account profile & password settings | | `/dashboard/settings/` | `settings_view` | `GET, POST` | Organization-level SLA thresholds & email diagnostic tools | ### Customer Self-Service Portal (`/portal/*`) | Path | View Function | Method | Description | | :--- | :--- | :---: | :--- | | `/portal/` | `customer_portal_track` | `GET, POST` | Self-service tracker entrypoint | | `/portal/dashboard//` | `customer_portal_dashboard` | `GET` | Live 5-stage status progression dashboard | | `/portal/note//` | `customer_portal_add_note` | `POST` | Customer follow-up note submission endpoint | ### Public Travel, Aviation & Booking Pages | Path | View Function | Description | | :--- | :--- | :--- | | `/` | `app.views.home` | Main Homepage & Interactive Service Portal | | `/enquiry/` & `/book/` | `system.views.public_enquiry_view` | Comprehensive Multi-Service Booking Form | | `/services/` | `services.views.services` | Services Overview Hub | | `/services/destinations/` | `services.views.destinations` | Destination Catalog & Category Filters | | `/services/holiday-packages/` | `services.views.holiday_packages` | Curated Vacation Packages | | `/services/hotel-reservations/` | `services.views.hotel_reservations` | Luxury Hotel & Resort Categories | | `/services/flight-booking/` | `services.views.flight_booking` | Commercial Flight Inquiries Desk | | `/services/visa-assistance/` | `services.views.visa_assistance` | Visa Assistance & Country Guides | | `/services/charter-services/` | `services.views.charter_services` | Private Jet & VIP Helicopter Fleet | | `/services/cargo-logistics/` | `services.views.cargo_logistics` | Air Freight, Cold-Chain & Heavy Cargo | | `/destinations/` | `services.views.destinations` | Root Shortcut to Destination Catalog | | `/about/` | `about.views.about` | Company Story, Mission & Values | | `/about/team/` | `about.views.teams` | Leadership & Operations Personnel Roster | | `/about/careers/` | `about.views.careers` | Career Opportunities & Open Positions | | `/about/partner/` & `/about/partners/` | `about.views.partner` | B2B & Airline Partnership Program | | `/careers/` | `about.views.careers` | Root Shortcut to Career Openings | | `/partner/` & `/partners/` | `about.views.partner` | Root Shortcut to Partnership Program | | `/contact/` | `app.views.contact` | Contact Helpdesk & Office Locations | | `/legal/` | `app.views.legal` | Legal & Regulatory Compliance Hub | ### Public Form Submissions | Endpoint | Method | Handling Form | Automated Workflow | | :--- | :---: | :--- | :--- | | `/enquiry/` | `POST` | `public_enquiry_view` | Auto CRM profile + 12-Step Assignment Engine | | `/submit-enquiry/` | `POST` | `ContactEnquiryForm` | Email notifications + `CustomerEnquiry` entry | | `/services/submit-enquiry/` | `POST` | `ServiceEnquiryForm` | Automated Assignment Engine triggered | | `/about/apply/` | `POST` | `JobApplicationForm` | Safe file validation + HR alert email | | `/about/partner/enquiry/` | `POST` | `PartnerEnquiryForm` | Unified partnership inquiry created | | `/subscribe-newsletter/` | `POST` | `NewsletterSubscriberForm` | Idempotent subscription + Welcome email | ### SEO & Legal Shortcuts | Path | Target View / Purpose | | :--- | :--- | | `/sitemap.xml` | Dynamic XML Sitemap covering all public pages, destinations, packages, charters, cargo, and careers | | `/robots.txt` | Crawler policy allowing public pages while disallowing `/dashboard/`, `/portal/`, and `/admin/` | | `/privacy/` | Direct shortcut to Privacy Policy | | `/terms/` | Direct shortcut to Terms & Conditions | | `/cancellation/` & `/refund-policy/` | Direct shortcut to Cancellation & Refund Policy | | `/cookie-policy/` | Direct shortcut to Cookie Policy | | `/disclaimer/` | Direct shortcut to Disclaimer & Regulatory Notice |
--- ## ๐Ÿ› ๏ธ Tech Stack & UI Framework
| Layer | Technology | | :--- | :--- | | **Backend Framework** | Python 3.10+ & Django 6.0+ | | **Frontend Styling** | Tailwind CSS (Dark theme palette, responsive navigation, glassmorphism) | | **Typography & Icons** | Google Fonts (`Plus Jakarta Sans`, `Outfit`, `Inter`), Font Awesome 6.4 | | **Visual Analytics** | Chart.js 4.4+ (Dynamic status doughnut charts, department workload bars) | | **Template Engine** | Pure Django Templates (`DTL`) with custom context processors | | **Business Logic** | Python / Django ORM (Multi-attribute matching, dynamic scoring, audit hooks) | | **Form & Input Validation** | Django Forms & ModelForms, Regex phone checks, MIME type security | | **Rate Limiting & Security** | In-memory sliding-window IP/session rate limiter, honeypot traps | | **Transactional Emails** | Unified Resend API + SMTP + Console fallback service | | **Database** | SQLite (Development) / PostgreSQL (Production ready) | | **Static Asset Engine** | WhiteNoise (`CompressedStaticFilesStorage`) | | **WSGI Server** | Gunicorn | | **Discovery & SEO** | Schema.org `TravelAgency` JSON-LD, OpenGraph tags, Django Sitemaps, robots.txt |

--- ## ๐Ÿ“ Project Structure ```text flyway.in/ โ”œโ”€โ”€ about/ # About app (Leadership, Careers, Applications, Partnerships) โ”‚ โ”œโ”€โ”€ forms.py # JobApplicationForm, PartnerEnquiryForm โ”‚ โ”œโ”€โ”€ models.py # TeamMember, Career, JobApplication, PartnerEnquiry โ”‚ โ”œโ”€โ”€ tests.py # Unit & integration tests โ”‚ โ”œโ”€โ”€ urls.py # Public about routes โ”‚ โ””โ”€โ”€ views.py โ”œโ”€โ”€ app/ # Core web app module (Homepage, Contact, Legal, Newsletter) โ”‚ โ”œโ”€โ”€ forms.py # ContactEnquiryForm, NewsletterSubscriberForm โ”‚ โ”œโ”€โ”€ models.py # ContactEnquiry, NewsletterSubscriber โ”‚ โ”œโ”€โ”€ tests.py # Public routing, SEO metadata, 404/500 handler tests โ”‚ โ”œโ”€โ”€ urls.py # Public URL patterns & robots.txt โ”‚ โ””โ”€โ”€ views.py โ”œโ”€โ”€ services/ # Services app (Destinations, Packages, Hotels, Visas, Charters, Cargo) โ”‚ โ”œโ”€โ”€ forms.py # ServiceEnquiryForm with date & honeypot validation โ”‚ โ”œโ”€โ”€ models.py # Destination, HolidayPackage, CharterAircraft, Cargo, etc. โ”‚ โ”œโ”€โ”€ tests.py # Services tests & booking validations โ”‚ โ”œโ”€โ”€ urls.py # Services routing โ”‚ โ””โ”€โ”€ views.py โ”œโ”€โ”€ system/ # Internal Workspace, CRM & Operations Engine โ”‚ โ”œโ”€โ”€ assignment_engine.py # 12-step intelligent multi-attribute assignment engine โ”‚ โ”œโ”€โ”€ audit_service.py # Centralized audit logging utility (state deltas, reasons) โ”‚ โ”œโ”€โ”€ context_processors.py # Notification badges context processor โ”‚ โ”œโ”€โ”€ email_service.py # Unified Resend & SMTP transactional email provider โ”‚ โ”œโ”€โ”€ enquiry_service.py # Unified CustomerEnquiry creation & auto CRM resolution โ”‚ โ”œโ”€โ”€ forms.py # Internal task, employee onboarding, and transfer forms โ”‚ โ”œโ”€โ”€ models.py # Customer, Department, Team, EmployeeProfile, CustomerEnquiry, Task, AuditLog, etc. โ”‚ โ”œโ”€โ”€ notifications.py # Notification dispatch & transactional email handlers โ”‚ โ”œโ”€โ”€ permissions.py # 6-Role granular RBAC helpers & view decorators โ”‚ โ”œโ”€โ”€ rate_limit.py # Sliding-window IP and session rate limiter โ”‚ โ”œโ”€โ”€ tests.py # Full RBAC, assignment, transfer, reports, audit & customer portal test suite โ”‚ โ”œโ”€โ”€ transfer_service.py # Work transfer, supervisory approval, and reassignment workflow โ”‚ โ”œโ”€โ”€ urls.py # Target /dashboard/* internal routes โ”‚ โ””โ”€โ”€ views.py # Dashboard, tasks, enquiries, assignments, reports, logs, customers & portal views โ”œโ”€โ”€ flyway/ # Django configuration root โ”‚ โ”œโ”€โ”€ emails.py # Transactional email dispatcher (receipts, status updates) โ”‚ โ”œโ”€โ”€ settings.py # Hardened Django settings with env var controls โ”‚ โ”œโ”€โ”€ sitemaps.py # Dynamic XML Sitemap configuration โ”‚ โ”œโ”€โ”€ urls.py # Root URLconf with public booking & portal routes โ”‚ โ”œโ”€โ”€ wsgi.py โ”‚ โ””โ”€โ”€ asgi.py โ”œโ”€โ”€ templates/ # Django Templates styled with Tailwind CSS โ”‚ โ”œโ”€โ”€ 404.html # Brand-tailored 404 page โ”‚ โ”œโ”€โ”€ 500.html # Brand-tailored 500 page โ”‚ โ”œโ”€โ”€ base.html # Public layout with Schema.org & OpenGraph โ”‚ โ”œโ”€โ”€ index.html # Homepage โ”‚ โ”œโ”€โ”€ contact.html # Contact page โ”‚ โ”œโ”€โ”€ public_enquiry.html # Multi-service booking & enquiry submission โ”‚ โ”œโ”€โ”€ about/ # about.html, careers.html, partner.html, teams.html, etc. โ”‚ โ”œโ”€โ”€ services/ # destinations, flight-booking, charter, cargo, visas, etc. โ”‚ โ”œโ”€โ”€ legal/ # privacy, terms, cancellation, cookie, disclaimer โ”‚ โ”œโ”€โ”€ portal/ # Customer self-service portal (track.html, dashboard.html) โ”‚ โ””โ”€โ”€ dashboard/ # Complete unified dashboard templates (index, tasks, enquiries, โ”‚ # assignments, approvals, employees, departments, teams, โ”‚ # customers, customer_detail, reports, audit_logs, notifications, profile, settings, login) โ”œโ”€โ”€ media/ # Uploaded user media & seeded images โ”œโ”€โ”€ static/ # Static CSS, JS, and brand vectors โ”œโ”€โ”€ staticfiles/ # Collected static files for WhiteNoise โ”œโ”€โ”€ db.sqlite3 # SQLite database โ”œโ”€โ”€ manage.py # Django CLI management script โ”œโ”€โ”€ seed.py # Complete automated database seeder โ”œโ”€โ”€ requirements.txt # Python dependencies โ”œโ”€โ”€ LICENSE # MIT License โ””โ”€โ”€ README.md # Comprehensive Documentation ```
--- ## ๐Ÿš€ Getting Started ### Prerequisites - โœ… **Python 3.10+** (Verify with `python --version`) - โœ… **pip** (Python package manager) - โœ… **Git**
### Installation ```bash # 1. Clone the repository git clone https://github.com/spyberpolymath/flyway.in.git cd flyway.in # 2. Create and activate a virtual environment python -m venv venv # Windows (PowerShell) .\venv\Scripts\activate # macOS / Linux source venv/bin/activate # 3. Install project dependencies pip install -r requirements.txt ```
### Database Setup & Automated Seeding ```bash # 1. Run all database migrations python manage.py migrate # 2. Execute the automated seed script to populate catalog items, hierarchy, staff roles, and CRM accounts python seed.py ```
### Running Automated Tests (187 Tests) Run the comprehensive end-to-end test suite covering public routes, customer self-service portals, secure tracking tokens, form validations, the 12-step automated assignment engine, work transfers, 6-role RBAC security, audit trails, system settings, email providers (Console, Resend, SMTP), and reporting: ```bash python manage.py test ```
### Running the Development Server ```bash python manage.py runserver ``` Open your browser: - ๐ŸŒ **Public Website**: [http://127.0.0.1:8000/](http://127.0.0.1:8000/) - ๐ŸŽซ **Public Booking & Enquiry**: [http://127.0.0.1:8000/enquiry/](http://127.0.0.1:8000/enquiry/) - ๐Ÿ” **Customer Self-Service Portal**: [http://127.0.0.1:8000/portal/](http://127.0.0.1:8000/portal/) - ๐Ÿข **Internal Operations Workspace**: [http://127.0.0.1:8000/dashboard/](http://127.0.0.1:8000/dashboard/) - โš™๏ธ **Platform Settings & Email Diagnostics**: [http://127.0.0.1:8000/dashboard/settings/](http://127.0.0.1:8000/dashboard/settings/) - ๐Ÿ—บ๏ธ **XML Sitemap**: [http://127.0.0.1:8000/sitemap.xml](http://127.0.0.1:8000/sitemap.xml) - ๐Ÿค– **Robots.txt**: [http://127.0.0.1:8000/robots.txt](http://127.0.0.1:8000/robots.txt) - ๐Ÿ”’ **Django Admin**: [http://127.0.0.1:8000/admin/](http://127.0.0.1:8000/admin/)
--- ## ๐Ÿ”‘ Default Seed Credentials & Safety Guards When seeded via `python seed.py`, the following accounts are available for testing all 6 organizational tiers: | Role | Username | Dev Password | Email | Scope & Permissions | | :--- | :--- | :--- | :--- | :--- | | **Super Admin** | `superadmin` | `FlywayDevDemo#2026` | `superadmin@flyway.in` | Org-wide full authority, role modification, settings, audit logs | | **Admin** | `admin_user` | `FlywayDevDemo#2026` | `admin@flyway.in` | Operations admin, user onboarding, manual assignment, audit logs | | **Department Manager** | `dept_manager` | `FlywayDevDemo#2026` | `manager@flyway.in` | Department-scoped staff, cross-team approvals, department reports | | **Team Leader** | `team_leader` | `FlywayDevDemo#2026` | `leader@flyway.in` | Team-scoped queue, intra-team transfer approvals, workload dispatch | | **Employee** | `employee_agent` | `FlywayDevDemo#2026` | `employee@flyway.in` | Case processing, timeline notes, transfer requests | | **Intern** | `intern_user` | `FlywayDevDemo#2026` | `intern@flyway.in` | Trainee queue, note taking, restricted transfer permissions | > [!SECURITY] > **Production Guard**: `seed.py` halts automatically if `DEBUG=False` unless `FLYWAY_ALLOW_PROD_SEED=1` is explicitly set. Custom passwords can be passed via `FLYWAY_SEED_PASSWORD`.
--- ## ๐Ÿ“ง Unified Email Architecture (Resend & SMTP) Flyway features a unified email abstraction layer (`system/email_service.py`) supporting both **Resend** and **SMTP** providers seamlessly configured via environment variables. ### Provider Configuration ```env # Choose provider: 'resend', 'smtp', or 'console' (default in dev) EMAIL_PROVIDER=resend # 1. Resend Configuration RESEND_API_KEY=re_your_api_key_here # 2. SMTP Configuration (Alternative) EMAIL_HOST=smtp.resend.com EMAIL_PORT=587 EMAIL_USE_TLS=True EMAIL_HOST_USER=resend EMAIL_HOST_PASSWORD=re_your_smtp_key_here # Sender & Recipient Addresses DEFAULT_FROM_EMAIL=Flyway India CONTACT_NOTIFICATION_EMAIL=info@flyway.in CAREERS_NOTIFICATION_EMAIL=careers@flyway.in PARTNER_NOTIFICATION_EMAIL=partners@flyway.in ```
--- ## ๐ŸŒ Production Deployment & Security ```bash # 1. Collect static assets with WhiteNoise compression python manage.py collectstatic --noinput # 2. Run system deployment check python manage.py check --deploy # 3. Start production WSGI server gunicorn flyway.wsgi:application --bind 0.0.0.0:8000 --workers 4 ``` ### Production Environment Variables ```env DEBUG=False SECRET_KEY=generate-a-strong-random-50-char-secret-key ALLOWED_HOSTS=flyway.in,www.flyway.in CSRF_TRUSTED_ORIGINS=https://flyway.in,https://www.flyway.in # SSL / HSTS Hardening SECURE_SSL_REDIRECT=True SECURE_HSTS_SECONDS=31536000 SECURE_HSTS_INCLUDE_SUBDOMAINS=True SECURE_HSTS_PRELOAD=True CSRF_COOKIE_SECURE=True SESSION_COOKIE_SECURE=True X_FRAME_OPTIONS=DENY ```
--- ## ๐Ÿ“œ License This project is open-source software licensed under the [MIT License](LICENSE).
--- ## ๐Ÿ‘จโ€๐Ÿ’ป Author & Contact
Aman Anil **aka SpyberPolymath** *Crafting digital experiences with passion and precision* โœจ
GitHub Kaggle LinkedIn Telegram

๐Ÿ“ง **[aman@spyberpolymath.com](mailto:aman@spyberpolymath.com)**  |  ๐ŸŒ **[spyberpolymath.com](https://spyberpolymath.com)**
--- *Made with โค๏ธ by **Aman Anil** (SpyberPolymath)* โœจ