1. phases
Itinera API
  • ✈ Itinera API Documentation
  • Docs
    • legacy
      • Itinera — System Overview
      • Technology Stack & Architecture
      • Getting Started Guide
      • Infrastructure
      • Frontend Application
      • Architecture Overview
      • API Reference
      • Backend Services
      • Development Guidelines
    • phases
      • 01. Architecture Overview & Checkout Idempotency
      • Phase 2: Commerce & Checkout Engine
      • Phase 3: Webhooks & Asynchronous Fulfillment
      • Phase 4: Security Perimeter & Authentication
      • Phase 5: Database Schema & Entity Relationships
      • Phase 6: AI Quota & Telemetry Subsystems
      • Phase 7: API Route Matrix & FormRequests
      • Phase 8: Global Exception & Error Handling
      • Phase 9: Frontend Ecosystem & State Management
      • Phase 10: Design System & Component Library
      • Phase 11: Interactive GSAP Animations
      • Phase 12: Deployment & CI/CD Pipeline
      • Phase 13: Testing Strategies
      • Phase 14: Performance & Optimization
      • Phase 15: Developer Onboarding & Runbooks
      • 15-Phase Comprehensive Wiki & Documentation Plan
  • APIs
    • Auth
      • Register a new user
      • Log in a user
      • Log out user
      • Refresh JWT token
      • Forgot password request
      • Reset password verification
      • Get current user profile
      • Update user profile
      • Redirect to Google OAuth
      • Google OAuth Callback
      • Verify email via signed URL
    • Catalog
      • List all countries
      • Get country details
      • List all cities
      • List all regions
      • List all destinations
      • Get destination details
      • Get hotels by destination
      • List all hotels
      • Get hotel details
      • Get reviews for a hotel
      • List all flights
      • Get flight details
      • List all restaurants
      • Get restaurant details
      • List all attractions
      • Get current weather
      • Submit review for an entity
      • Delete review
      • Toggle favourite status for entity
      • List my submitted reviews
    • Bookings
      • Book a tour destination
    • V1 Aliases
      • V1 List all countries
      • V1 Get country details
      • V1 List all cities
      • V1 List all destinations
      • V1 Get destination details
      • V1 Get hotels by destination
      • V1 List all hotels
      • V1 Get hotel details
      • V1 Get reviews for a hotel
      • V1 List all flights
      • V1 Get flight details
      • V1 List all restaurants
      • V1 Get restaurant details
      • V1 List all attractions
      • V1 Get attraction details
      • V1 List all regions
      • V1 Get weather details
    • Trips
      • List user trips
      • Create a new trip
      • Get trip details
      • Update trip details
      • Delete a trip
      • Get creation metadata
      • Attach items to a trip
      • Update trip item
      • Detach items from a trip
      • Fork a trip
    • Conversations
      • List user conversations
      • Start a new conversation
      • Get conversation details
      • List messages in conversation
      • Send message to conversation
      • Mark conversation as read
    • Commerce Plans
      • List public plans
      • Get public plan details
    • Commerce Subscriptions
      • Subscribe to a plan
      • Upgrade active plan
      • Get active subscription info
      • Cancel active subscription
    • Commerce Checkout
      • Initiate Paymob payment checkout
    • Integrations
      • Paymob status webhook callback
      • Paymob redirect return callback
    • System Settings & Support
      • Submit public contact message
      • Subscribe to system newsletter
      • Get list of my reports
      • List all notifications
      • Mark single notification as read
      • List available surveys
      • Submit answers for survey
      • Get survey details
      • Update survey details
      • Delete survey response
    • AI Tools
      • Enhance itinerary details using AI
      • Request AI review of itinerary
      • Plan route using AI assistance
      • Get AI quota remaining details
      • Chat with AI Concierge assistant
      • Get AI Review progress by ID
    • Agency Integration
      • Request agency assignment
      • List agency active tasks
      • List agency managed trips
      • Get agency total earnings
      • Get agency profile details
      • Update agency profile details
    • Admin User Management
      • List users inside admin dashboard
      • Get user profile
      • Set user active status
      • Block user profile
    • Admin Catalog Moderation
      • Create new catalog category
      • Create new catalog destination
      • Create new hotel catalog record
      • Create new flight catalog record
      • Create new restaurant catalog record
      • Create new attraction catalog record
  • Schemas
    • User
    • ErrorResponse
    • Trip
    • Destination
    • Hotel
    • Flight
    • Restaurant
    • Attraction
    • Booking
    • Review
    • Agency
    • Survey
  1. phases

15-Phase Comprehensive Wiki & Documentation Plan

This plan outlines the creation of a high-fidelity, diagram-rich documentation site that acts as the "Source of Truth" for the Itinera platform. It is designed to be far more detailed than standard README files, utilizing Mermaid.js to provide visual architectures, sequence flows, and system maps.

Phase 1: Architecture & Data Flow (The Big Picture)#

Goal: Establish the high-level relationship between the React frontend, Laravel backend, MySQL database, and third-party APIs (Paymob, AI providers).
Deliverables: High-level System Context Diagram, network boundaries, and technology stack breakdown.

Phase 2: Commerce & Checkout Engine#

Goal: Document the exact step-by-step flow of a user initiating a checkout.
Deliverables: Sequence diagrams mapping CheckoutController -> CheckoutService -> OrderRepository -> PaymobGateway. Deep dive into the idempotency_key logic and reusable payment intents.

Phase 3: Webhooks & Asynchronous Fulfillment#

Goal: Explain the non-blocking architecture for payment confirmation.
Deliverables: Flowcharts showing Paymob callbacks hitting WebhookController, HMAC SHA-512 validation, and the FulfillOrderListener idempotency guards preventing duplicate subscriptions.

Phase 4: Security Perimeter & Authentication#

Goal: Map the defense layers (as shown in the showcase).
Deliverables: Diagrams of the JWT lifecycle (issuance, rotation, blacklisting), Spatie RBAC permission matrices, and Email Verification gates.

Phase 5: Database Schema & Entity Relationships#

Goal: Visualize the data model.
Deliverables: Comprehensive Mermaid ERD (Entity-Relationship Diagram) linking Users, Orders, Payments, Subscriptions, and AI logs.

Phase 6: AI Quota & Telemetry Subsystems#

Goal: Document the economics of AI consumption.
Deliverables: State machine diagrams for AiUsageService, detailing Cache::lock() concurrency guards, MD5 hashing, and the fallback mechanisms.

Phase 7: API Route Matrix & FormRequests#

Goal: Detail the API surface area.
Deliverables: A visual tree of the 106 reconciled operations, mapping routes to their respective FormRequest validation envelopes and controllers.

Phase 8: Global Exception & Error Handling#

Goal: Standardize the contract for failure.
Deliverables: Flow diagrams showing how bootstrap/app.php intercepts errors and forces them into the { success, message, data } format, including 422 field bags.

Phase 9: Frontend Ecosystem & State Management#

Goal: Map the React SPA architecture.
Deliverables: Component trees, React Router v6 layouts, context providers, and data fetching lifecycles.

Phase 10: Design System & Component Library#

Goal: Document the visual language.
Deliverables: Token definitions (--bp-wrap, --color-panel), typography scales, and responsive breakpoint strategies.

Phase 11: Interactive GSAP Animations#

Goal: Deconstruct the showcase magic.
Deliverables: Logic maps of the scroll-scrubbed lifecycle engine, pinning mechanics, 3D CSS flip-cards, and headless/reduced-motion fallbacks.

Phase 12: Deployment & CI/CD Pipeline#

Goal: Detail the path to production.
Deliverables: CI/CD pipeline diagrams showing GitHub Actions, static analysis, test runs, and Railway deployment steps.

Phase 13: Testing Strategies#

Goal: Prove the platform's reliability.
Deliverables: Documentation of PHPUnit/Pest coverage, Vitest environments, mock structures for Paymob, and CI rate-limit tests.

Phase 14: Performance & Optimization#

Goal: Highlight the speed characteristics.
Deliverables: Caching strategies (Redis), lazy loading techniques, SVG optimization, and DB indexing plans.

Phase 15: Developer Onboarding & Runbooks#

Goal: Provide actionable guides for new contributors.
Deliverables: Local setup scripts, Laravel Tinker snippets, queue worker management, and standard troubleshooting logs.
Modified at 2026-08-25 22:41:45
Previous
Phase 15: Developer Onboarding & Runbooks
Next
Register a new user
Built with