System Design
Architecture
Overview
AWS ap-southeast-1 deployment — Cloudflare CDN terminates TLS, traffic flows through dual ALBs into ECS Fargate containers backed by ElastiCache Redis.
Infrastructure · AWS ap-southeast-1
njinet · infrastructure · ap-southeast-1
🔶
Cloudflare
api.njinet.site
▸ AWS Region — ap-southeast-1
VPC 10.0.0.0/16
Public AZ-1 · 10.0.0.0/24
Public AZ-2 · 10.0.1.0/24
Private AZ-1 · 10.0.10.0/24
🐳
ECS Fargate
NJinet :3000
Private AZ-2 · 10.0.11.0/24
🐳
ECS Fargate
NJinet :3000
Private Subnet Group
⚡
ElastiCache Redis
cache.t3.micro
Private Subnet · ECS / Redis
System Context · Frontend & Backend
njinet · system context · c1 diagram
Client Layer
🌐
Next.js App
React 19 · SSR
CI / CD — Backend
⚙️
GitHub Actions
build · push · deploy
Backend Runtime — njinet-service · NestJS
📡
HTTP API
REST endpoints
🔀
CQRS Bus
Command · Query · Event
🔌
WS Gateway
Socket.IO /chat
🧩
Domain Modules
chat · user · space
Infrastructure
⚡
Redis / Valkey
Pub/Sub · BullMQ
🗂️
AWS S3
media · archives
Tech Stack
Design Principles