How deepanshi-gupta/ai-powered-itinerary-generator works
Project type and purpose
• This is a lightweight, full‑stack “single‑page” web application built in Python using Streamlit.
• Purpose: let users specify travel preferences, then call Google’s Gemini (PaLM 2.2) AI to generate a personalized itinerary, and finally produce a downloadable iCalendar (ICS) file.
File structure
• Top‑level files:
• app.py → main Streamlit app (UI + business logic)
• requirements.txt→ Python dependencies
• Dockerfile, .dockerignore → containerization
• .gitignore, README.md → project metadata
• No separate “frontend” or “backend” directories: everything is bundled into app.py, indicating a monolithic service pattern.
• Presence of Dockerfile shows it’s intended to run inside a container in production or testing.
Read the README for additional insights
• Confirms the use of Streamlit for UI, Google Generative AI for text, and ICS library for calendar export.
• No database or persistent storage—data flows purely in memory per user session.
a. Main components:
• User’s Browser (Streamlit UI in the browser)
• Streamlit Server (app.py running in Docker)
• Google Gemini AI Service (external API)
• ICS Generator Module (part of app.py)
• Docker Container (deployment unit)
b. Relationships & data flow:
1. User opens the Streamlit page → selects destination & preferences.
2. Streamlit Server receives input → formats a request for Gemini.
3. Streamlit Server calls Google Gemini API → receives generated itinerary data.
4. Server processes the JSON response → builds on‑page display and invokes the ICS library to render a .ics file.
5. Streamlit sends the final itinerary and a download link for the ICS file back to the browser.
c. Architectural patterns & principles:
• Monolithic service: UI and business logic co‑located in one Python process.
• External API integration: clear separation of core logic vs. AI service.
• Stateless per session: no database, no persistence beyond session scope.
• Containerized deployment: isolates dependencies and runtime.
d. Relevant technologies
• Streamlit: UI framework, hosted by app.py
• Python libraries: google-generativeai (Gemini), ics, json, datetime, base64
• Docker: for packaging the Streamlit service
Detail without over‑splitting
• Major process step and third‑party interaction is represented.
• Call out the Docker container boundary to show the runtime environment.