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

Project Settings and Constants

Generated: 2025-07-25 08:55 UTC
Status: Complete
Verified:

Overview

This document consolidates all project constants, domains, email addresses, and configuration settings for the Convert to Markdown service. This serves as the single source of truth for all project settings.

Product Information

  • Product Name: Convert to Markdown
  • Company Name: KnowCode Technologies
  • Support Email: lindsay@knowcode.tech

Domains and URLs

Production Domains

Service URL Purpose
API Endpoint https://convert-to-markdown.knowcode.tech Main API for all conversion endpoints
Documentation Site https://convert-to-markdown.vercel.app Product documentation, pricing, and marketing
Direct Cloud Function https://convert-api-qpg64cvnga-uk.a.run.app Direct Google Cloud Run URL

API Endpoints

  • Base URL: https://convert-to-markdown.knowcode.tech
  • Version prefix: /v1
  • Full example: https://convert-to-markdown.knowcode.tech/v1/convert/excel-to-json

Documentation URLs

  • Main site: https://convert-to-markdown.vercel.app
  • API docs: https://convert-to-markdown.vercel.app/api
  • Pricing: https://convert-to-markdown.vercel.app/pricing
  • Usage API guide: https://convert-to-markdown.vercel.app/api#usage-api

Google Cloud Configuration

Project Settings

  • Project ID: convert-to-markdown-us-east4
  • Region: us-east4
  • Function Name: convert-api
  • Runtime: Node.js 20.x

Service Accounts

  • Default Service Account: 458119813071-compute@developer.gserviceaccount.com
  • Gmail Service Account: gmail-sender@convert-to-markdown-us-east4.iam.gserviceaccount.com
  • Gmail Client ID: 116940581280353324169

Secret Manager

  • Gmail Secret Name: gmail-service-account-key
  • Secret Path: projects/convert-to-markdown-us-east4/secrets/gmail-service-account-key/versions/latest

Email Configuration

Sender Information

  • From Email: lindsay@knowcode.tech
  • From Name: Convert To Markdown
  • Reply-To: lindsay@knowcode.tech

Email Templates

  • Free Tier Welcome Subject: Welcome to Convert To Markdown - Your API Key Inside!
  • Pro Tier Welcome Subject: Welcome to Convert To Markdown Pro!

Pricing and Limits

Free Tier

  • Monthly Conversions: 50
  • Max File Size: 5MB (5,242,880 bytes)
  • Output Limit: ~50,000 characters
  • Price: $0/month

Pro Tier

  • Monthly Conversions: 10,000
  • Max File Size: 50MB (52,428,800 bytes)
  • Output Limit: ~50,000 characters
  • Price: $10/month
  • Stripe Price ID: price_1QgPYzGdQU11KoXXO0MWBOdA

API Configuration

Rate Limiting

  • Window: 1 minute
  • Free Tier: 10 requests/minute
  • Pro Tier: 100 requests/minute

File Processing

  • Max Output Characters: ~50,000 (enforced via token estimation)
  • Token Estimation: 1 token ≈ 4 characters
  • Max Tokens: 12,500

Supported File Types

Format Extensions Output Types
Excel .xlsx, .xls JSON, Markdown
Word .docx, .doc HTML, Markdown
PDF .pdf Markdown
PowerPoint .pptx, .ppt Markdown

Function Configuration

Memory and Timeout

  • Memory: 1GB
  • Timeout: 60 seconds
  • Max Instances: 100
  • CPU: 0.5833

Environment Variables

GCP_PROJECT_ID=convert-to-markdown-us-east4
GMAIL_SENDER_EMAIL=lindsay@knowcode.tech
LOG_EXECUTION_ID=true

Firestore Collections

Database Structure

  • Collection: subscriptions

    • Document ID: User ID (generated)
    • Fields: email, apiKey, tier, usage, limits
  • Collection: api_keys

    • Document ID: Hashed API key
    • Fields: userId, created, lastUsed

Stripe Configuration

Product Information

  • Product Name: Convert to Markdown Pro
  • Price: $10.00/month
  • Currency: USD
  • Billing Period: Monthly

Webhook Configuration

  • Endpoint: /v1/stripe-webhook
  • Events: customer.subscription.created, customer.subscription.deleted

Customer Portal

  • URL: https://billing.stripe.com/p/login/eVqfZgelCfd3cmQd4vbfO00

NPM Package Configuration

Package Details

  • Name: @knowcode/convert-to-markdown
  • Registry: NPM public registry
  • Distribution: Client-side SDK wrapper

Security Settings

Authentication

  • Method: API Key (Bearer token)
  • Header: X-API-Key or x-api-key
  • Key Format: 32-character alphanumeric string

CORS Configuration

  • Allowed Origins: * (all origins)
  • Allowed Methods: GET, POST, OPTIONS
  • Allowed Headers: Content-Type, X-API-Key, x-api-key

Monitoring and Analytics

Logging

  • Provider: Google Cloud Logging
  • Log Prefix: [EMAIL], [AUTH], [CONVERT]
  • Execution ID Logging: Enabled

Error Tracking

  • HTTP Error Codes: 400, 401, 403, 413, 429, 500
  • Error Response Format: { "error": "Error message" }

Development Settings

Local Development

  • Port: 8080
  • Environment File: .env.prod
  • Service Account Key: deploy-gcp/keys/gmail-service-account.json

Deployment

  • Script: ./deploy.sh
  • Build Command: gcloud functions deploy
  • Test Command: npm test

Contact and Support

Technical Support

Business Inquiries

Important Notes

  1. Domain Mapping: The API domain convert-to-markdown.knowcode.tech maps to the Google Cloud Run service
  2. Documentation Site: Hosted on Vercel at convert-to-markdown.vercel.app
  3. Email Delivery: Uses Gmail API with domain-wide delegation
  4. Secret Management: Production secrets stored in Google Secret Manager
  5. API Versioning: All endpoints prefixed with /v1 for future compatibility

This document should be updated whenever any of these settings change.