How abhinavsivanandhan/cloud works
Project type and purpose
• This “cloud” repo is essentially a full‐stack, Flask‐based web application template and sample deployment for Google Cloud Run.
• It also contains:
• A “cloud-main” experimental Flask prototype (cloud-main/flask).
• A “run” directory with a working Flask service, Dockerfile, GCP configuration, notebooks, front-end assets and utility modules.
• A “team/2025” folder for static site / Firebase demos per contributor.
File structure
Top level
• README.md – project overview and links
• index.html – static landing page
• cloud-main/ – previous Flask experiment
• run/ – primary Cloud Run Flask service
– Dockerfile, deploy.sh, config.yaml, .env example, .gcloudignore
– app.py variants (local, minimal, unified)
– routes/ (core_routes.py, notebook_runner.py)
– utils/ (compat, config, GitHub, notebook utilities)
– js/ (parameter-input front-end logic)
– notebooks and archived ipynb demos
• team/2025/ – per‐user folders for GitHub Page demos and Firebase + Flask Auth sample
Key README insights
• Contributors fork this repo, add a folder under team/2025, deploy to GitHub Pages (static) or Firebase (dynamic via Flask).
• The stack uses Python/Flask, Docker, Google Cloud Run, optional Firebase Auth, static pages on GitHub Pages.
Main components
A. Front-end browsers / clients
– Static pages (index.html, page.html) and JS (param-input.js) served by Flask or GitHub Pages
B. Flask Application (Google Cloud Run)
– HTTP Server / WSGI entrypoint (app.py)
– Routing layer (core_routes.py, notebook_runner.py)
– Notebook execution engine (invokes notebook_utils)
– Business logic & external integrations (github_utils, config_utils)
C. Build & Deployment pipeline
– Docker build (Dockerfile) → Container Registry → Cloud Run service
– Deploy scripts (deploy.sh, gcloudignore, config.yaml)
D. Configuration & Secrets
– .env file / environment variables
– config.yaml / settings.local.json for Claude or GCP
E. Data & External Services
– GitHub API (via github_utils)
– Google Cloud services (Cloud Run, optionally Cloud Storage or Firestore if added later)
– Firebase Auth (in team/2025/revanth example)
F. Team / GitHub Pages
– Separate static sites under team/2025/[handle]
– Optional Firebase-backed Flask Auth example
Relationships & interactions
1. User’s Browser → HTTP(S) → Cloud Run (Flask service)
• GET/POST to /, /run-notebook, /api/*
2. Flask Controllers → Utility modules → execute Jupyter notebooks or call GitHub API
3. Flask Service ↔ Google Cloud Run Exec Environment (container)
4. CI/CD / deploy.sh → Docker → Cloud Build → Cloud Run
5. Contributors’ GitHub Pages → Static assets served directly
Architectural patterns & design principles
• MVC-style separation:
• “routes/” = Controllers
• “utils/” = Services
• “app.py” = Application entrypoint/config
• Containerization: single Docker image running Flask
• Infrastructure as code: config.yaml, deploy.sh
• Extensibility: per-user subfolders under team/2025 can be mounted on the same domain or served separately