mcpField
🌴
🌴 Travel Itinerary - FastAPI Project

🌴 Travel Itinerary - FastAPI Project

Local
github.com/ThasnimaShereefMedia & Design0Updated 78w ago

About 🌴 Travel Itinerary - FastAPI Project

A FastAPI and SQLAlchemy backend for creating and browsing day-by-day travel itineraries. It also provides duration-based recommendations, with sample itineraries for Phuket and Krabi.

Key features

  1. 01Create day-by-day itineraries
  2. 02Browse and retrieve stored itineraries
  3. 03Recommend itineraries by trip duration
  4. 04Preloaded Phuket and Krabi data
  5. 05Swagger and ReDoc API documentation

Use cases

  1. 01Build a travel itinerary API
  2. 02Find itinerary options for a trip length
  3. 03Test endpoints through interactive API docs

MCP support

The MCP server recommends itineraries based on trip duration.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

🌴 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

MethodEndpointDescription
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

Swagger UI

πŸ” Itinerary JSON Response for GET /itenararies - All Itenararies

Sample Response

πŸ” Itinerary JSON Response for GET /itenararies/{id} - Itenarary based on id

Sample Response

πŸ” Itinerary JSON Response for POST /itenararies - Creating a new itenarary

Sample Response

πŸ” Itinerary JSON Response for GET /recommendations{duration} - Recommendation of itenararies based on the duration

Sample Response


🌍 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!

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.