github-build-service
GitHub README for xaid-vfx/build-service. Description: "Build service for next.js deployment." Pinned.
Key extractions
- Purpose: Serverless Next.js deployment system on AWS Lambda. Handles both static file serving and SSR.
- Core mechanism: Lambda function extracts deployment bundle from S3 (keyed by
JOB_ID), caches the extracted server (5-min TTL), configures Next.js env vars (NEXT_RUNTIME,NEXT_DIST_DIR, etc.), shims Node req/res objects to look like standard HTTP server I/O, then hands off to the Next.js server. - Request shimming: hand-rolled event emitter + stream interface + socket simulation in the request object. Required because Lambda events don't look like Node HTTP requests out of the box.
- Response collection: intercepts
write/endon the response object, accumulates chunks in a Buffer, then returns in Lambda response format. Handles timeouts with partial-response fallback. - Image optimization: intercepts
/_next/imagepaths, uses Sharp for runtime resize + JPEG re-encode based onw/qquery params. - Static file detection: path prefix check (
/_next/,/public/,/static/) + full MIME type table.
Relationship to Neploy
This is almost certainly the runtime engine for Neploy — Neploy's portfolio says "AWS (ECS for containers, ALB for routing)" but this Lambda-based build service suggests the SSR path used Lambda. Created May 2025; Neploy-frontend created June 2025; portfolio marks Neploy archived. Build service is pinned, implying Zaid still considers it a showcase artifact.
Cross-reference
neploy for product context.