Skip to content

Conversation

miguelmarcondesf
Copy link
Contributor

@miguelmarcondesf miguelmarcondesf commented Jul 26, 2025

Blog Post Context

This PR implements the sequential upload strategy discussed in the REPLACEME. This serves as the baseline
implementation for comparing different concurrency approaches.

What This PR Implements

Sequential Upload Algorithm (O(3n) complexity)

For 1000 files upload:

  • Phase 1: MD5 hash generation (1,000 files × 1 operation each)
  • Phase 2: Pre-signed URL generation (1,000 files × 1 API call each)
  • Phase 3: File upload to S3 (1,000 files × 1 upload each)
  • Total: 3,000 sequential blocking operations

Key Files Added/Modified

- src/infra/S3Client.ts // LocalStack S3 configuration
- src/infra/S3UploadService.ts // Deals with signed URLs and fetch upload request
- src/useCases/useSequentialUpload.ts // Sequential algorithm implementation
- docker-compose.yml // LocalStack + Nginx setup
- nginx.conf // CORS proxy configuration
- README.md // Complete setup documentation

@miguelmarcondesf miguelmarcondesf requested a review from Copilot July 26, 2025 22:55
@miguelmarcondesf miguelmarcondesf self-assigned this Jul 26, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds sequential S3 upload functionality to a new React + TypeScript project, implementing a complete file upload system using LocalStack for local development.

  • Establishes the initial project structure with Vite, React 19, and TypeScript
  • Implements sequential file upload functionality with S3 integration
  • Sets up LocalStack development environment with Docker and CORS proxy

Reviewed Changes

Copilot reviewed 17 out of 23 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Defines project dependencies including AWS SDK v3, React 19, and development tools
src/useCases/useSequentialUpload.ts Core upload logic hook implementing sequential file processing
src/infra/S3UploadService.ts Service layer for S3 operations with pre-signed URLs
src/infra/S3Client.ts LocalStack S3 client configuration and bucket management
src/infra/crypto.ts MD5 hash generation for file integrity checking
src/App.tsx Main UI component with file selection and upload controls
docker-compose.yml LocalStack infrastructure setup with CORS configuration
nginx.conf CORS proxy configuration for LocalStack integration
README.md Comprehensive project documentation and setup instructions
Comments suppressed due to low confidence (4)

package.json:13

  • The AWS SDK version 3.850.0 appears to be invalid. AWS SDK v3 follows semantic versioning and typically uses versions like 3.x.y where x is much lower (e.g., 3.450.0). Please verify this version exists.
    "@aws-sdk/client-s3": "^3.850.0",

package.json:14

  • The AWS SDK presigner version 3.850.0 appears to be invalid. This should match the @aws-sdk/client-s3 version and follow the same versioning pattern.
    "@aws-sdk/s3-request-presigner": "^3.850.0",

package.json:31

  • Vite version 7.0.4 does not exist. As of January 2025, Vite's latest major version was 5.x. Please use a valid Vite version.
    "vite": "^7.0.4"

package.json:29

  • TypeScript version 5.8.3 does not exist. As of January 2025, TypeScript was at version 5.3.x. Please use a valid TypeScript version.
    "typescript": "~5.8.3",

@miguelmarcondesf miguelmarcondesf merged commit ed156a3 into main Jul 27, 2025
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.

1 participant