MyZubster: AI 기술 퀵 레퍼런스 가이드
요약
MyZubster 프로젝트의 시스템 아키텍처와 기술 스택을 설명하는 레퍼런스 가이드입니다. Monero 결제 시스템, Node.js 기반 게이트웨이, 보안 봇 등 전체 생태계의 구성 요소를 다룹니다.
핵심 포인트
- Monero(XMR)를 활용한 탈중앙화 결제 시스템 구축
- Node.js, Express, MongoDB를 이용한 게이트웨이 및 마켓플레이스 구성
- Python 기반 보안 봇을 통한 자동화된 취약점 스캔 수행
- React와 Nginx를 활용한 프론트엔드 및 프록시 설정
🤖 MyZubster: AI 기술 퀵 레퍼런스 가이드
프로젝트를 빠르게 이해해야 하는 AI 어시스턴트 및 개발자를 위한 완전한 생태계 개요.
🎯 프로젝트 요약
| 항목 | 세부 사항 |
|---|---|
| 프로젝트 MyZubster | Monero 결제를 사용하는 탈중앙화 마켓플레이스 |
| 주요 통화 | Monero (XMR) – 프라이버시 중심 암호화폐 |
| 블록체인 | 결제를 위한 Monero (mainnet), NFT를 위한 Tari (sidechain) |
| 인프라 | 단일 VPS (Ubuntu 24.04 LTS, Aruba) |
| 배포 | Node.js (port 3002) + Nginx (ports 80/443) |
| 보안 | JWT 인증, Rate limiting (속도 제한), UFW 방화벽, Security Bot |
🏗️ 시스템 아키텍처 (System Architecture)
text
┌─────────────────────────────────────────────────────────────────────────────┐
│ MYZUBSTER ECOSYSTEM │
├─────────────────────────────────────────────────────────────────────────────┤
│ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ FRONTEND (React + Vite) │ │
│ │ - Nginx (Port 443 HTTPS) │ │
│ │ - /var/www/myzubster-frontend/ 에서 정적 파일 제공 │ │
│ │ - /api/* 를 Gateway로 프록시 (Proxy) │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ GATEWAY (Node.js + Express + MongoDB) │ │
│ │ - Port: 3002 │ │
│ │ - Monero 결제 처리 (subaddress 생성, 모니터링) │ │
│ │ - API 엔드포인트를 위한 JWT 인증 │ │
│ │ - REST API: /api/health, /api/auth/register, /api/auth/login │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ │
│ ▼ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ MARKETPLACE (Node.js + Express + SQLite) │ │
│ │ - Port: 4000 │ │
│ │ - REST API: /api/health, /api/users, /api/gateway/status │ │
│ │ - REST API를 통해 Gateway와 통신 │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ SECURITY BOT (Python) │ │
│ │ - 크론을 통해 시간당 실행됨 │ │
│ │ - nmap, nikto, sqlmap, gobuster로 스캔 수행 │ │
│ │ - JSON 보고서를 /var/log/security_report_*.json에 저장함 │ │
│ └────────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌────────────────────────────────────────────────────────────────────┐ │
│ │ MONERO NODE (Public) │ │
│ │ - RPC URL: http://node.moneroworld.com:18081 │ │
│ │ - 네트워크: mainnet │ │
│ └────────────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────────────────┘
📂 Repository 구조
Repository 목적 Branch URL
MyZubsterGateway 모네로 결제 엔진 dev link
MyZubster-Marketplace 백엔드 API main link
myzubster-frontend React 프론트엔드 main link
MyZubster-App React Native 모바일 앱 main link
tari-nft-template Rust NFT 템플릿 main link
my-monero-bounty 마이크로 바운티 시스템 main link
🔑 주요 API 엔드포인트
Gateway (Port 3002)
Endpoint Method 설명 인증 여부
/api/health GET 상태 확인 ❌
/api/auth/register POST 사용자 등록 ❌
/api/auth/login POST 사용자 로그인 ❌
/api/auth/verify GET JWT 토큰 검증 ❌
/api/users GET 사용자 목록 가져오기 ✅
/api/orders GET/POST 주문 관리 ✅
/api/payments GET/POST 결제 관리 ✅
/api/admin/stats GET 시스템 통계 ✅
/api/dao/proposals GET/POST 거버넌스 제안 ✅
Marketplace (Port 4000)
Endpoint Method 설명
/api/health GET 상태 확인
/api/gateway/status GET 게이트웨이 연결 상태
/api/users GET/POST 사용자 관리
🛡️ 보안 구현
1️⃣ JWT 인증
javascript
// 미들웨어
const authenticate = (req, res, next) => {
const publicRoutes = ['/api/health', '/api/auth/login', '/api/auth/register'];
if (publicRoutes.includes(req.path)) return next();
const token = req.headers.authorization?.split(' ')[ᵬ];
if (!token) return res.status(401).json({ error: 'Token required' });
try {
const decoded = jwt.verify(token, process.env.JWT_SECRET);
req.user = decoded;
next();
} catch {
res.status(401).json({ error: 'Invalid or expired token' });
}
};
2️⃣ Rate Limiting
javascript
const rateLimit = require('express-rate-limit');
const globalLimiter = rateLimit({
windowMs: 15 * 60 * 1000,
max: 100,
message: 'Too many requests, please try again later'
});
const authLimiter = rateLimit({
windowMs: 15 * 60 * 1000,
max: 5,
message: 'Too many login attempts, please try again later'
});
3️⃣ UFW Firewall
bash
ufw default deny incoming
ufw allow from YOUR_IP to any port 22
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow from YOUR_IP to any port 3001
ufw allow from YOUR_IP to any port 4000
4️⃣ Nginx Security Headers
nginx
add_header X-Frame-Options "DENY" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline';" always;
add_header Permissions-Policy "geolocation=(), microphone=(), camera=(), payment=(), usb=()" always;
🤖 Security Bot
Location
text
~/MyZubsterGateway/security/security_bot.py
Tools Used
Tool Purpose Command
nmap Port scanning nmap -sV --script=default localhost
nikto Web vulnerability nikto -h https://myzubster.com -ssl
sqlmap SQL injection sqlmap -u localhost --batch --level=1 --risk=1
gobuster Directory enumeration gobuster dir -u localhost -w /usr/share/wordlists/dirb/common.txt
Report Location
text
/var/log/security_report_*.json
Cron Job
bash
0 * * * * /usr/bin/python3 /root/MyZubsterGateway/security/security_bot.py >> /var/log/security_bot.log 2>&1
🔧 Quick Commands Reference
Deploy Frontend
bash
cd ~/myzubster-frontend
npm run build
sudo cp -r dist/* /var/www/myzubster-frontend/
sudo chown -R www-data:www-data /var/www/myzubster-frontend/
sudo systemctl reload nginx
Start Gateway
bash
cd ~/MyZubsterGateway
export PORT=3002
nohup node server.js > /var/log/gateway.log 2>&1 &
Start Marketplace
bash
cd ~/MyZubster-Marketplace
node server.js &
Run Security Bot
bash
cd ~/MyZubsterGateway/security
python3 security_bot.py
View Security Report
bash
ls -la /var/log/security_report__.json | tail -1
cat $(ls -t /var/log/security_report__.json | head -1) | python3 -m json.tool
Check All Services
bash
curl https://myzubster.com/api/health
curl http://localhost:4000/api/health
curl http://localhost:4000/api/gateway/status
🧠 AI Understanding Checklist
✅ Core Concepts
□
MyZubster = 분산형 마켓플레이스 + Monero 결제
...
✅ Authentication Flow
사용자 등록 → 비밀번호 해시 처리 (bcrypt) → MongoDB에 사용자 저장
사용자 로그인 → 비밀번호 검증 → JWT 토큰 생성
...
✅ Integration Points
□
프론트엔드 → 게이트웨이 API (Nginx를 통한 HTTPS 프록시)
...
✅ Security Layers
JWT 인증 – API 보호
속도 제한 (Rate Limiting) – DoS 보호
...
🐳 Docker Services
Running Services
bash
sudo docker ps
Service Container Name Port (Host) Port (Container) Status
MongoDB myzubster-mongodb 27018 27017 ✅ Running
Docker Compose Location
text
~/MyZubsterGateway/docker-compose.yml
📊 Status Check Script
bash
echo
echo "=== 마켓플레이스 ==="
curl -s http://localhost:4000/api/health | python3 -m json.tool
echo "=== 통합(INTEGRATION) ==="
curl -s http://localhost:4000/api/gateway/status | python3 -m json.tool
echo "=== 최신 보안 보고서 ==="
ls -la /var/log/security_report_*.json | tail -1
📚 GitHub 링크
리포지토리 빠른 URL
게이트웨이 (Gateway) https://github.com/DanielIoni-creator/MyZubsterGateway
마켓플레이스 (Marketplace) https://github.com/DanielIoni-creator/MyZubster-Marketplace
프론트엔드 (Frontend) https://github.com/DanielIoni-creator/myzubster-frontend
앱 (App) https://github.com/DanielIoni-creator/MyZubster-App
NFT https://github.com/DanielIoni-creator/tari-nft-template
바운티 (Bounty) https://github.com/DanielIoni-creator/my-monero-bounty
🌐 연결
블로그: DEV.to - Daniel Ioni
X (Twitter): @myzubster
...
AI 자동 생성 콘텐츠
본 콘텐츠는 Dev.to AI tag의 원문을 AI가 자동으로 요약·번역·분석한 것입니다. 원 저작권은 원저작자에게 있으며, 정확한 내용은 반드시 원문을 확인해 주세요.
원문 바로가기