This is a serverless architecture full-stack travel planning application. It integrates AWS cloud services, relational databases, and large language models (LLM) to help users generate multi-day travel itineraries based on preferences, weather information, and uploaded ticket information.
It demonstrates practical implementation of serverless architecture principles and cloud-native application development using AWS services.
- Personalized travel recommendations based on user preferences
- Dynamic itinerary adjustments using real-time weather data
- Flight status monitoring with delay/cancellation notifications
- PDF/image ticket processing to extract departure locations, times, and other key information
- Secure authentication using AWS Cognito
- User and trip data storage in AWS Aurora MySQL database
- Google Maps integration for route planning and visualization
- Image storage and retrieval via AWS S3 for trip destinations
- Mobile-responsive frontend with dark mode support
The frontend (HTML/JS/CSS) is deployed on S3 and communicates with the backend via API Gateway. The Gateway routes requests to various Lambda functions, which connect to the Aurora MySQL database and/or external APIs (OpenAI, weather API, flight API). For asynchronous tasks like email notifications, SQS is used as a message queue.
- Authentication Flow: Users register and login through a custom UI that interfaces with AWS Cognito
- Trip Planning Pipeline:
- User inputs preferences and destination
- Lambda functions query external APIs for location data
- Results are processed and stored in Aurora MySQL
- Frontend retrieves and displays trip itinerary
- Notification System:
- Lambda functions monitor flight statuses and weather changes
- Updates are sent to SQS queue
- Consumer Lambda processes the queue and sends emails via SES
- Registration/Login: Users create an account or login with existing credentials
- Preference Setting: Users set travel preferences (weather, environment, activities)
- Destination Selection: Users select their travel destination and dates

- Itinerary Generation: System generates recommended itinerary based on preferences
- Itinerary Customization: Users can add/remove/modify activities
- Trip Saving: Users save their trip for future reference
- Trip Management: Users can view, edit, clone, or delete saved trips

- Flight Monitoring: System monitors flight status and sends alerts if changes occur
- Clone the code repository
- Configure environment variables (database credentials, API keys, etc.)
- Deploy Lambda functions using AWS SAM or CloudFormation
- Build the frontend and upload to S3 with website hosting enabled
- Configure CloudWatch triggers for scheduled Lambda functions (weather updates, flight checks)
- Set up API Gateway with proper CORS and authentication settings
- Configure SQS queues and SES for email notifications
To set up a local development environment:
-
Prerequisites:
- Python (v3.9+)
- AWS CLI configured with appropriate permissions
- MySQL client
-
Backend Setup:
cd Lambda/lambda_layer unzip pymysql_layer.zip # Configure local environment variables
-
Frontend Setup:
cd Frontend # Open HTML files directly in browser or use a local server
-
Testing Lambda Functions Locally:
- Use AWS SAM CLI for local Lambda testing
- Or test Python functions directly with mock event data
The application uses a RESTful API structure with the following endpoints:
GET /users- Get user dataPOST /users- Create a new userOPTIONS /users- Preflight request support for CORS- User Preferences:
PUT /users/preferences- Update user preferencesOPTIONS /users/preferences- Preflight request support for CORS
- User Profile:
PUT /users/profile- Update user profile informationOPTIONS /users/profile- Preflight request support for CORS
GET /recommendation- Get personalized location recommendations based on preferencesOPTIONS /recommendation- Preflight request support for CORS
GET /routing- Get optimized routes for a tripPOST /routing- Create a new routeOPTIONS /routing- Preflight request support for CORS
GET /tickets- List all ticketsPUT /tickets- Update ticket informationOPTIONS /tickets- Preflight request support for CORS- Ticket Operations:
DELETE /tickets/{ticket_id}- Delete a specific ticketOPTIONS /tickets/{ticket_id}- Preflight request support for CORS
GET /trips- List all user tripsPOST /trips- Create a new tripOPTIONS /trips- Preflight request support for CORS- Trip Operations:
GET /trips/{trip_id}- Get details for a specific tripPUT /trips/{trip_id}- Update a specific tripDELETE /trips/{trip_id}- Delete a specific tripOPTIONS /trips/{trip_id}- Preflight request support for CORS- Trip Cloning:
POST /trips/{trip_id}/clone- Create a copy of an existing tripOPTIONS /trips/{trip_id}/clone- Preflight request support for CORS
- Trip Itinerary:
GET /trips/{trip_id}/itinerary- Get the itinerary for a specific tripOPTIONS /trips/{trip_id}/itinerary- Preflight request support for CORS
- Lambda/: AWS Lambda functions organized by functionality
- User management (registration, preferences, profiles)
- Trip management (creation, editing, cloning, deletion)
- Data processing (weather reports, flight status)
- Notification services (email sending)
- Frontend/: Web client interface
- utils/: Shared JS, CSS, and theme files
- pages/: Main application pages and views
- dashboard/: User dashboard components
- trip_card/: Trip visualization and management
- Database/: SQL schema definitions and migrations

- CloudFormation for infrastructure automation
- S3 bucket versioning for frontend rollback capability
This application implements several security best practices:
- Authentication: User authentication via AWS Cognito
- Authorization: API Gateway and Lambda authorization checks
- Data Protection: Sensitive data encrypted at rest and in transit
- Input Validation: All user inputs are validated before processing
- Secure Dependencies: Regular updates to dependencies to patch vulnerabilities
- Least Privilege: IAM roles following least privilege principle
Thank you for Reading.

