How fabyrizky/ai-smart-ecotourism-app works
Project type and purpose
• This is a single‐page, Python‐based “full-stack” application built on Streamlit.
• Purpose: An AI-driven platform for sustainable tourism management, deployed to Streamlit Cloud.
File structure
• .github/workflows/deploy.yml – CI/CD pipeline that builds and deploys to Streamlit Cloud on push.
• .streamlit/config.toml + .streamlit/secrets.toml – Streamlit configuration and API keys (e.g., OpenAI, map services).
• main-app.py – The single entry point combining UI definitions, interaction logic, and AI calls.
• requirements.txt + runtime.txt – Python dependencies and runtime version for the cloud environment.
• README.md – High-level description, deployment instructions.
README for additional insights
• Confirms Streamlit as the hosting framework.
• Shows two deployment methods: Streamlit Cloud and manual clone & deploy.
• Implies reliance on external AI services (via secrets) and no on-prem database.
Main components
a. Client (Web Browser)
b. Streamlit Cloud Hosting
– Streamlit Server executing main-app.py
– Dependency environment (Python runtime + libs from requirements.txt)
c. Configuration Store
– Secrets and config loaded by Streamlit (.streamlit/secrets.toml)
d. External AI Service(s)
– OpenAI or custom ML endpoints called from main-app.py
e. CI/CD Pipeline
– GitHub repository + GitHub Actions workflow → Automated deploy to Streamlit Cloud
Interactions and data flows
• Client ↔ Streamlit Server: HTTP requests (render UI, submit prompts, receive results)
• Streamlit Server → AI Service: HTTPS API calls (pass user inputs, retrieve AI responses)
• GitHub → GitHub Actions → Streamlit Cloud: Git push triggers build & deploy
Architectural patterns & design principles
• Thin-client architecture: all business logic (UI + data orchestration) lives in main-app.py.
• Serverless deployment on Streamlit Cloud: no managed servers or databases.
• Externalize secrets for credentials/config (12-factor app principle).
• CI/CD for zero-downtime, automated delivery.