Last updated: Jul 25, 2025, 10:08 AM UTC

Convert to Markdown - Deployment Executive Summary

Generated: 2025-07-23
Status: Production Ready
Domain: https://convert-to-markdown.knowcode.tech

Quick Overview

Convert to Markdown is a production-ready document conversion service deployed on Google Cloud Platform with:

  • Region: us-east4 (Northern Virginia) - enables free domain mapping
  • Architecture: Serverless Cloud Functions Gen2 with zero-storage design
  • Pricing: $10/month flat rate with 50 free conversions
  • SSL: Auto-provisioned and managed by Google

Deployment in 15 Minutes

Automated Deployment

cd deploy-gcp
./00-setup-config.sh         # Create deployment.env
./01-setup-gcp-account.sh    # Authenticate
./02-create-project.sh       # Create GCP project
./03-enable-apis.sh          # Enable required APIs
./04-configure-project.sh    # Configure project
./05-setup-firestore.sh      # Set up database
./06-deploy-public-functions.sh  # Deploy converters
./08-setup-stripe.sh         # Configure payments

What Gets Deployed

Public Functions (Open Source)

  • xlsx-converter - Excel to JSON
  • xlsx-to-md - Excel to Markdown
  • pdf-to-md - PDF to Markdown
  • docx-to-html - Word to HTML
  • docx-to-md - Word to Markdown

Commercial Functions (Private Repo)

  • stripe-webhook - Payment processing
  • api-key-validator - Authentication
  • customer-api - User management
  • Commercial wrappers for authenticated access

Cost Structure

Infrastructure (Monthly)

  • Cloud Functions: ~$0 (scale to zero when idle)
  • Firestore: ~$5-20 (based on usage)
  • Domain/SSL: $0 (free with domain mapping)
  • Total: ~$5-20/month

Revenue Model

  • Free Tier: 50 conversions/month
  • Pro Tier: $10/month for 10,000 conversions
  • Stripe Fees: 2.9% + $0.30 per transaction

Key Configuration

Required Environment Variables

# GCP Configuration
PROJECT_ID=convert-to-markdown-us-east4
REGION=us-east4
BILLING_ACCOUNT_ID=YOUR-BILLING-ID

# Stripe Configuration
STRIPE_PUBLISHABLE_KEY=pk_live_xxx
STRIPE_SECRET_KEY=sk_live_xxx
STRIPE_PRODUCT_ID=prod_xxx
STRIPE_PRICE_ID=price_xxx

# Domain Configuration
API_DOMAIN=https://convert-to-markdown.knowcode.tech

Current Production Status

  • Domain: Active at https://convert-to-markdown.knowcode.tech
  • SSL: Auto-provisioned by Google Cloud
  • Functions: Deployed and accessible
  • Stripe: Configured with pricing table prctbl_1Ro4D6Aic9M7TwKdm0DJZhGF
  • Monitoring: Cloud Functions logs and metrics enabled

Maintenance Tasks

Daily

  • Monitor function error rates in Cloud Console
  • Check Stripe webhook success

Monthly

  • Review usage patterns and costs
  • Check for failed subscriptions
  • Audit API key usage

📞 Support & Troubleshooting

Common Issues

  1. Function errors: Check logs with gcloud functions logs read
  2. Stripe webhooks: Verify webhook secret in deployment.env
  3. Domain issues: Ensure DNS records point to Google's IPs

Quick Commands

# View function logs
gcloud functions logs read --region=us-east4

# Test endpoints
curl -I https://convert-to-markdown.knowcode.tech/xlsx-converter

# Check function status
gcloud functions list --region=us-east4

Migration to New Region

If migrating (e.g., from europe-west2 to us-east4):

  1. Use scripts in deploy-gcp/migration-us-east4/
  2. Run ./setup-new-project.sh
  3. Update deployment.env with new project details
  4. Redeploy all functions

For detailed instructions: See deployment-new-gcp-project-plan.md