- 🌴 Travel Itinerary - FastAPI Project
🌴 Travel Itinerary - FastAPI Project
This is a backend system for managing travel itineraries using FastAPI and SQLAlchemy, featuring RESTful APIs to create and view itineraries and an MCP server to recommend itineraries based on trip duration.
Content
🌴 Travel Itinerary - FastAPI Project
This is a backend system for managing travel itineraries using FastAPI and SQLAlchemy, featuring RESTful APIs to create and view itineraries and an MCP server to recommend itineraries based on trip duration.
🚀 Live Demo
🌐 Live URL: https://travel-itinerary-fdwd.onrender.com/docs
🧰 Tech Stack
- Python 3.11+
- FastAPI
- SQLAlchemy
- SQLite (for development; switchable to PostgreSQL)
- Uvicorn
- Render (for deployment)
- Pydantic (for input validation)
📦 Features
- Create new itineraries with full day-wise breakdown
- View all stored itineraries
- MCP (Minimum Cost Path) server for recommending itineraries based on nights
- Pre-seeded data for Phuket and Krabi, Thailand
- Interactive Swagger UI for testing endpoints
📁 Folder Structure
travel-itinerary-backend/
│
├── app/ # Main application package
│ ├── __init__.py # Makes the app a Python package
│ ├── main.py # Entry point of FastAPI app
│ ├── models.py # SQLAlchemy models
│ ├── database.py # DB connection setup
│ ├── schemas.py # Pydantic schemas for validation
│ ├── seed_data.py # Predefined itinerary data
│ └── routes/ # API route definitions
│ ├── itineraries.py # CRUD routes for itineraries
│
├── requirements.txt # Project dependencies
├── README.md # Project documentation
├── .gitignore # Files to ignore in Git
└── start.sh # (Optional) Start script for deployment
⚙️ Features
- ✅ Create travel itineraries with hotel, transfer, and excursion data
- ✅ Get recommended itineraries for 2 to 8-night durations
- ✅ Modular code with FastAPI, SQLAlchemy, and SQLite
- ✅ Auto-generated Swagger and ReDoc API docs
- ✅ Deployed live using Render
🚀 Getting Started
📦 1. Clone the Repository
git clone https://github.com/ThasnimaShereef/Travel-Itinerary.git
cd Travel-Itinerary
🧪 2. Create a Virtual Environment
python -m venv venv
# For Windows:
venv\Scripts\activate
# For macOS/Linux:
source venv/bin/activate
📥 3. Install Dependencies
pip install -r requirements.txt
▶️ 4. Run the Development Server
uvicorn app.main:app --reload
Now visit: http://127.0.0.1:8000/docs for the Swagger UI.
🧪 API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /itineraries/ | Create a new itinerary |
| GET | /itineraries/ | Get all itineraries |
| GET | /itineraries/{id} | Get itinerary by id |
| GET | /recommendations/{duration} | Get recommended itinerary by duration |
📸 Screenshots
📘 Swagger UI
🔍 Itinerary JSON Response for GET /itenararies - All Itenararies
🔍 Itinerary JSON Response for GET /itenararies/{id} - Itenarary based on id
🔍 Itinerary JSON Response for POST /itenararies - Creating a new itenarary
🔍 Itinerary JSON Response for GET /recommendations{duration} - Recommendation of itenararies based on the duration
🌍 Deployment on Render
🔁 1. Push to GitHub
git init
git remote add origin https://github.com/ThasnimaShereef/Travel-Itinerary.git
git add .
git commit -m "Initial backend commit"
git push -u origin main --force
🚀 2. Deploy via Render
- Go to https://render.com
- Create a New Web Service
- Connect your GitHub repo
- Set the Build Command to:
pip install -r requirements.txt - Set the Start Command to:
uvicorn app.main:app --host 0.0.0.0 --port 10000 - Set Port to
10000 - ✅ Deploy and wait for the live link!
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
WindsurfThe new purpose-built IDE to harness magic
Tavily Mcp
CursorThe AI Code Editor
Serper MCP ServerA Serper MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Playwright McpPlaywright MCP server
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
DeepChatYour AI Partner on Desktop
ChatWiseThe second fastest AI chatbot™
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Amap Maps高德地图官方 MCP Server