You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
외부 서비스가 자체적으로 복잡한 메시징 인프라를 구축하지 않고도, ProjectSignal에 서버 엔드포인트(IP:PORT)와 이벤트 규칙만 등록하면 알림, 채팅, 웹훅 배달을 자동으로 처리합니다.
┌──────────────┐ "이 메시지를, 이 시간에, 이 대상에게 보내줘"
│ 쇼핑몰 서버 │ ─────────────────────────────────────────────►┌────────────────┐
└──────────────┘ │ │
┌──────────────┐ "이 알림을, 지금 바로, 전체 채널에 보내줘" │ ProjectSignal │ ──► WebSocket
│ 채팅 서버 │ ─────────────────────────────────────────────►│ │ ──► Webhook
└──────────────┘ │ (배달 대행) │ ──► Push
┌──────────────┐ "이 이메일을, 1시간 뒤에, 이 그룹에 보내줘" │ │ ──► Email
│ 마케팅 서버 │ ─────────────────────────────────────────────►│ │
└──────────────┘ └────────────────┘
Core Concepts
개념
설명
Project
멀티테넌트 격리 단위. 각 프로젝트는 독립된 이벤트 스트림과 설정을 가짐
Consumer (Endpoint)
이벤트를 수신하는 대상. 사용자가 자신의 서버 IP:PORT를 등록
Subscription
Consumer가 특정 이벤트 패턴(chat.message.*)을 구독하는 규칙
EventEnvelope
이벤트 메타데이터 + 페이로드를 담는 표준 포맷
Delivery Log
모든 배달 이력을 추적하는 감사 로그
How It Works
1. 회원가입 + 프로젝트 생성
2. API Key 발급
3. Consumer(엔드포인트) 등록 — "내 서버는 http://my-server:8080/webhook 이야"
4. Subscription 생성 — "chat.message.* 이벤트를 Webhook으로 받고 싶어"
5. 이벤트 발행 — POST /v1/projects/:id/events
6. ProjectSignal이 자동으로 매칭 + 배달 + 로그 기록
ProjectSignal은 메시지 내용을 해석하지 않습니다. 언제/누구에게/어떤 채널로 전달할지만 처리하는 배달 인프라입니다.
Why ProjectSignal?
기존 도구들은 각각의 영역에서 뛰어나지만, 이벤트 수집 → 라우팅 → 멀티채널 배달 → 모니터링을 하나의 시스템에서 제공하는 도구는 거의 없습니다.
src/
├── core/ ① 시스템 계약 (.d.ts) + 추상 클래스
│ ├── entities.d.ts 모든 Entity 인터페이스
│ ├── transport.d.ts TransportAdapter, Request, Response
│ ├── event-bus.d.ts EventBus, PresenceStore, JobQueue
│ ├── repository.d.ts 모든 Repository 인터페이스
│ ├── enums.ts ConsumerType, TransportProtocol (런타임)
│ ├── base.repository.ts BaseRepository<T> 추상 클래스
│ └── injection-tokens.ts DI 토큰
│
├── modules/ ② 자기완결형 기능 모듈
│ ├── auth/ controller + service + repo + dto
│ ├── projects/ controller + service + repo + dto
│ ├── consumers/ controller + service + repo + dto
│ ├── events/ Ingest → Route → Dispatch → Outbox
│ └── delivery/ Orchestrator + Registry + Processors
│
├── infrastructure/ ③ 외부 시스템 어댑터 (슬림)
│ ├── persistence/ Drizzle provider + schema 정의만
│ ├── messaging/ NATS EventBus 어댑터
│ ├── cache/ Redis Presence 어댑터
│ ├── queue/ BullMQ JobQueue 어댑터
│ └── transport/ 배달 프로토콜 (2개만)
│ ├── http/ HTTP POST (webhook, push, email 통합)
│ └── socketio/ WebSocket (Gateway + Session)
│
├── api/ ④ HTTP 진입점 보호
│ ├── guards/ JWT, API Key, WS Auth
│ ├── decorators/ CurrentUser, ProjectId
│ ├── interceptors/ Logging, Tracing
│ └── zod-validation.pipe.ts 요청 검증
│
├── common/ ⑤ 순수 유틸
│ ├── utils/ 패턴매칭, 룸네임, 채널매퍼
│ └── exceptions/ 도메인 예외, 글로벌 필터
│
└── config/ ⑥ 환경 설정
dashboard/ Next.js 16 관리 대시보드
├── src/app/ App Router 페이지
├── src/components/ UI 컴포넌트 (shadcn/ui)
├── src/contexts/ Auth Context
└── src/lib/ API 클라이언트
새 모듈 추가하기
# 1. 모듈 디렉토리 생성
mkdir -p src/modules/notifications/dto
# 2. 필요한 파일 작성# - notifications.module.ts# - notifications.controller.ts# - notifications-command.service.ts# - notification.repository.ts ← extends BaseRepository<T># - dto/create-notification.dto.ts# 3. app.module.ts에 import 한 줄 추가
Scripts
# Backend
npm run start:dev # 개발 서버 (hot reload)
npm run start:debug # 디버그 모드
npm run build # 프로덕션 빌드
npm run db:generate # 마이그레이션 생성
npm run db:migrate # 마이그레이션 실행# Dashboardcd dashboard
npm run dev # 개발 서버 (port 3001)
npm run build # 프로덕션 빌드# Infrastructure
docker compose up -d # PostgreSQL, Redis, NATS
docker compose down -v # 중지 + 데이터 초기화