How nitayelzur/10play works
Main Components
A. Client-Side (Frontend):
• React + Vite application
• Key components:
• AddEntry component
• ViewEntries component
• Utils layer for data handling
B. Server-Side (Backend):
• Node.js/TypeScript server
• Controllers layer
• Routes layer
• AWS S3 integration
C. AWS Infrastructure:
• EC2 instance hosting both frontend and backend
• S3 bucket for data storage
• CloudFormation stack
[Client Layer]
• ↕️
[Application Layer]
• ↕️
[Storage Layer]
Component Relationships
• Frontend (port 5173) → Backend (port 3000) via HTTP/REST
• Backend → AWS S3 for data storage
• EC2 instance boundary containing both frontend and backend
Specific Elements
A. Frontend Container (EC2):
┌─ Frontend (React + Vite) ─────┐
• AddEntry Component │
• ViewEntries Component │
• Data Utils │
• ┘
B. Backend Container (EC2):
┌─ Backend (Node.js/TS) ───────┐
• Data Controllers │
• API Routes │
• AWS SDK Integration │
• ┘
C. AWS Services:
┌─ AWS Infrastructure ─────────┐
• EC2 Instance │
• S3 Bucket │
• CloudFormation Stack │
• ┘
Important Details to Highlight
• Environment Variables:
• VITE_SERVER for frontend
• AWS_BUCKET and AWS_REGION for backend
• Port mappings (3000 for backend, default Vite port for frontend)
• SSH access point to EC2
• Public IPv4 address access point