Travel Itinerary Management System

by maneeshmkp

323 downloads
Not rated
GitHub

About

A full-stack backend application system built with FastAPI and SQLAlchemy to manage travel itineraries. Supports creating/viewing itineraries with day-wise hotels, transfers, and activities. Includes an MCP server that recommends itineraries (2–8 nights) for Phuket and Krabi. Fea

Details

Author
maneeshmkp
Downloads
323
Categories
Media

- Browse all travel itineraries on the Itineraries page.
- View detailed information for a specific itinerary.
- Get recommended itineraries based on preferred trip duration.
- Create custom itineraries using a multi-step form.
- API endpoints for itineraries and recommendations.
- Database models for Itinerary, Accommodation, Transfer, Activity.

Install the backend (Python 3.8+, run python run.py to seed the database and start two servers on ports 8000 and 8001). Install the frontend (Node.js 16+, npm install then npm run dev) and navigate to http://localhost:3000. Use the Itineraries page to browse, the Recommendations page to get suggestions by duration, and the multi-step form to create custom itineraries.

Travel Itinerary Management System

A full-stack application for managing travel itineraries for Thailand destinations, featuring a FastAPI backend and Next.js frontend.

Project Structure

\\\
travel-itinerary-system/
├── backend/ # Python FastAPI backend
├── frontend/ # Next.js frontend
└── README.md # Project documentation
\
\\

Backend Setup

The backend is built with FastAPI, SQLAlchemy, and SQLite.

Prerequisites

- Python 3.8+
- pip

Installation

1. Navigate to the backend directory:
\\\bash
cd backend
\
\\

2. Create a virtual environment:
\\\bash
python -m venv venv
\
\\

3. Activate the virtual environment:
- Windows: venv\Scripts\activate
- macOS/Linux: source venv/bin/activate

4. Install dependencies:
\\\bash
pip install fastapi uvicorn sqlalchemy pydantic
\
\\

Running the Backend

1. Run the application using the run script:
\\\bash
python run.py
\
\\

This will:
- Seed the database with sample data
- Start the main API server on http://localhost:8000
- Start the recommendation server on http://localhost:8001

The API documentation will be available at http://localhost:8000/docs

Frontend Setup

The frontend is built with Next.js, React, and Tailwind CSS.

Prerequisites

- Node.js 16+
- npm or yarn

Installation

1. Navigate to the frontend directory:
\\\bash
cd frontend
\
\\

2. Install dependencies:
\\\bash
npm install
# or
yarn install
\
\\

Running the Frontend

1. Start the development server:
\\\bash
npm run dev
# or
yarn dev
\
\\

2. Open your browser and navigate to http://localhost:3000

Using the Application

1. Browse Itineraries: View all available travel itineraries on the Itineraries page
2. View Details: Click on an itinerary to see its detailed information
3. Get Recommendations: Use the Recommendations page to get itineraries based on your preferred duration
4. Create Itinerary: Create your own custom itinerary using the multi-step form

API Endpoints

- GET /api/itineraries - Get all itineraries
- GET /api/itineraries/{id} - Get a specific itinerary
- POST /api/itineraries - Create a new itinerary
- GET /api/recommendations/{nights} - Get recommended itineraries for a specific duration

Database Schema

The application uses the following database models:
- Itinerary
- Accommodation
- Transfer
- Activity

See the Schema page in the frontend for detailed information.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.