feat: ESP32 DIY platform Phase 1 — marketplace with mock payment & flash token flow

- React+Vite frontend (dark theme, role-based routing: admin/seller/buyer)
- Express+Prisma+PostgreSQL backend with JWT auth and audit logging
- MinIO object storage with backend proxy for CORS-free firmware delivery
- Mock payment flow (order → mock-pay → FlashToken) for pre-business testing
- FlashToken lifecycle: issue → validate → esp-web-tools manifest → consume
- Admin approval workflow for project/product submissions
- Toss Payments integration guide (TOSS_PAYMENT_GUIDE.md) for live keys

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-05-20 06:43:08 +09:00
commit 182782f271
51 changed files with 4564 additions and 0 deletions

29
.env.example Normal file
View File

@@ -0,0 +1,29 @@
# ──────────────────────────────────────────────────────
# ESP32 DIY 플랫폼 환경 변수
# cp .env.example .env 후 각 값을 채워주세요
# ──────────────────────────────────────────────────────
# PostgreSQL
DB_PASSWORD=change_this_strong_password
# MinIO (로컬 S3 스토리지)
MINIO_USER=minioadmin
MINIO_PASSWORD=change_this_strong_password
# JWT (openssl rand -hex 64 로 생성 권장)
JWT_SECRET=change_this_very_long_random_secret_string
# 서비스 외부 접근 URL (DNS 설정 후 변경, 파일 URL에 사용됨)
# 로컬 테스트: http://localhost:3200
# 실 서비스: https://your-domain.com
BASE_URL=http://localhost:3200
# ──────────────────────────────────────────────────────
# 토스페이먼츠 (현재 테스트 모드 — 값 없어도 동작함)
# 실결제 전환 시 TOSS_PAYMENT_GUIDE.md 참고
# ──────────────────────────────────────────────────────
TOSS_CLIENT_KEY=test_ck_placeholder
TOSS_SECRET_KEY=test_sk_placeholder
# webflash 연동 내부 토큰 (임의 UUID)
WEBFLASH_INTERNAL_TOKEN=change_this_token