How samarth8765/reactify works
Project Type and Purpose
• Reactify is a container-driven build-and-deploy service.
• It exposes a REST API (api-server) that accepts GitHub URLs, spins up isolated build containers on AWS ECS, stores artifacts in EFS, uploads to S3, and serves static sites via a reverse-proxy.
Main Components
a. Client (Browser/CLI)
b. API Server (api-server)
c. AWS ECS Cluster
• Build Task (build-server Dockerfile.builder)
• Deploy/Upload Task (build-server Dockerfile.deploy)
d. Shared Storage (Amazon EFS)
e. Artifact Store (Amazon S3)
f. Reverse-Proxy Service (s3-reverse-proxy)
g. DNS/Route 53 (maps unique subdomains to reverse proxy)
Relationships and Interactions
1. Client → API Server: REST call with GitHub repo URL.
2. API Server → ECS: Uses AWS SDK/Task ARN to launch a “builder” container.
3. Builder Container:
• Clones repo, installs dependencies, runs build → writes output to EFS volume.
4. API Server → ECS: Launches a separate “deploy” container.
5. Deploy Container:
• Reads from EFS volume, uploads build artifacts to S3 under a unique prefix (e.g., a1/).
6. DNS/Route 53: Assigns a1.domain.com pointing to the reverse-proxy service.
7. Client → a1.domain.com: Hits reverse-proxy → fetches static files from S3 → serves them.
Architectural Patterns & Principles
• Microservices: Three Node.js services (api-server, build-server, reverse-proxy).
• Containerization & Isolation: Build and deploy steps run in distinct Docker containers on ECS.
• Shared File System for artifacts (EFS) to decouple build and upload phases.
• Security by Isolation: Build container has no direct AWS credentials for S3.
• Event-driven Orchestration: API server orchestrates ECS tasks via AWS SDK.
Technologies, Frameworks, Libraries
• Node.js / Express (api-server & reverse-proxy)
• Docker (build-server images)
• AWS ECS (Task ARNs, Cluster ARNs)
• Amazon EFS (volume mounts)
• Amazon S3 (static hosting)
• DNS / Route 53 for subdomains