Skip to content

feat(infra): configure edge function deployment and monitoring (#276)#338

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Danielodingz:feature/edge-deployment-config
Apr 28, 2026
Merged

feat(infra): configure edge function deployment and monitoring (#276)#338
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
Danielodingz:feature/edge-deployment-config

Conversation

@Danielodingz
Copy link
Copy Markdown

Closes #276

Edge Function Deployment Configuration (#276)

Overview

This PR configures the edge function deployment pipeline and monitoring for the TeachLink API. All relevant API routes have been migrated to the Edge Runtime to ensure global delivery with minimal latency.

Changes

🛠 Infrastructure

  • Created infra/edge-config.ts: Centralized management for:
    • Edge-specific environment variables.
    • CDN caching strategies (public/private).
    • Cold-start optimization settings.
    • Lightweight edge logging utility.
  • Updated .env.example: Added new environment variables for edge deployment configuration.

⚡️ API Route Optimizations

  • Edge Runtime Migration: Opted 16 API routes into the Edge Runtime (export const runtime = 'edge').
  • CDN Caching: Applied Cache-Control strategies to public GET endpoints (Courses) to maximize performance.
  • Enhanced Logging: Integrated edgeLog into handlers to ensure visibility in Vercel/Cloudflare log drains.

🔍 Monitoring & Health

  • New Health Endpoint: Created /api/health as a lightweight ping target for platform health checkers and keep-alive optimization to reduce cold starts.

Impacted Areas

  • src/app/api/courses/*
  • src/app/api/auth/*
  • src/app/api/admin/feature-flags/*
  • src/app/api/lessons/*
  • src/app/api/performance/*
  • src/app/api/user/*
  • src/app/api/video-analytics/*
  • src/app/api/notes/*

Acceptance Criteria Verified

  • Edge functions configured with proper env vars.
  • CDN caching strategy implemented.
  • Edge

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 28, 2026

@Danielodingz Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Danielodingz
Copy link
Copy Markdown
Author

Danielodingz commented Apr 28, 2026

Hello @RUKAYAT-CODER please check PR and merge, Thanks.

@RUKAYAT-CODER RUKAYAT-CODER merged commit 174f77c into rinafcode:main Apr 28, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edge Function Deployment

2 participants