Skip to content

GCP Infrastructure

Garot Conklin edited this page Dec 17, 2024 · 1 revision

Google Cloud Infrastructure

Overview

RunOn! uses Google Cloud Platform's serverless architecture with native Google API integrations.

Core Services

Cloud Functions

Functions:
  event-discovery:
    runtime: Python 3.11
    memory: 256MB
    timeout: 30s
    triggers:
      - HTTP
    environment:
      - GOOGLE_CLOUD_PROJECT
      - MONGODB_URI
      - REDIS_URL

  user-management:
    runtime: Python 3.11
    memory: 128MB
    timeout: 10s
    triggers:
      - HTTP
    environment:
      - FIREBASE_CONFIG
      - MONGODB_URI

Cloud Endpoints

API:
  name: api.runon.app
  version: v1
  endpoints:
    - /events:
        get: event-discovery
        post: event-save
    - /preferences:
        get: user-preferences
        put: user-preferences-update
  security:
    - Firebase Auth
    - API key validation

Infrastructure Diagram

graph TB
    Client[Mobile App] --> Endpoints[Cloud Endpoints]
    Endpoints --> Auth[Firebase Auth]
    Endpoints --> Functions[Cloud Functions]
    Functions --> Firestore[Firestore/MongoDB]
    Functions --> Cache[Memorystore]
    Functions --> Search[Google Search API]
    Functions --> Places[Google Places API]
    Functions --> Calendar[Google Calendar API]
    
    subgraph Google Cloud Platform
        Endpoints
        Auth
        Functions
        Firestore
        Cache
    end
    
    subgraph Google APIs
        Search
        Places
        Calendar
    end
    
    classDef gcp fill:#4285F4,stroke:#333,stroke-width:2px,color:white;
    classDef api fill:#34A853,stroke:#333,stroke-width:2px,color:white;
    
    class Endpoints,Auth,Functions,Firestore,Cache gcp;
    class Search,Places,Calendar api;
Loading

Security

Firebase Auth

Configuration:
  providers:
    - Google
    - Email/Password
    - Phone Number
  features:
    - Custom claims
    - Role-based access
    - JWT tokens

Monitoring

Cloud Monitoring

Metrics:
  - Function execution times
  - API latency
  - Error rates
  - Cache hit rates
  - API quota usage

Dashboards:
  - Service health
  - API performance
  - User activity
  - Error tracking

Cloud Logging

Log Types:
  - Function logs
  - API requests
  - Auth events
  - Error reports
  
Retention:
  - 30 days default
  - Custom export for long-term

Deployment

Cloud Build

Steps:
  - name: 'python'
    args: ['pip', 'install', '-r', 'requirements.txt']
  
  - name: 'python'
    args: ['pytest']
    
  - name: 'gcr.io/cloud-builders/gcloud'
    args: ['functions', 'deploy']

Triggers:
  - Branch: main
  - Pull requests
  - Tags

Cost Optimization

  • Automatic scaling
  • Function concurrency
  • Cache strategies
  • API quota management
  • Resource monitoring

Disaster Recovery

  • Multi-region deployment
  • Automated backups
  • Version management
  • Rollback procedures

RunOn Documentation

MVP Documentation

Core Documentation

Archived (Full-Featured)

Full-Featured Documentation

Clone this wiki locally