feat: team org panel, admin CRUD, local deploy tools, bidirectional data sync

Add TeamMember model and APIs, team status UI, /admin page, local server bats,
and scripts to sync data between local PostgreSQL and Render.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
EENE Dashboard
2026-06-06 01:41:00 +09:00
parent d14ff1997c
commit fb2956b0ac
45 changed files with 4104 additions and 376 deletions

View File

@@ -1,64 +1,8 @@
@echo off
chcp 65001 > nul
cd /d "%~dp0"
echo ================================
echo EENE Dashboard - Server Start
echo ================================
echo.
:: 0. 기존 서버 종료 (title 설정 전에 실행 — 자기 자신 종료 방지)
echo [1/4] Stopping old servers...
taskkill /fi "WindowTitle eq EENE Dashboard - Running*" /f > nul 2>&1
powershell -NoProfile -ExecutionPolicy Bypass -Command "Get-NetTCPConnection -State Listen -ErrorAction SilentlyContinue | Where-Object { @(4000,3000,3001) -contains $_.LocalPort } | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force -ErrorAction SilentlyContinue }" > nul 2>&1
timeout /t 2 /nobreak > nul
echo Done.
echo.
title EENE Dashboard - Running
:: 1. PostgreSQL 서비스 확인
echo [2/4] Checking Database...
sc query postgresql-x64-16 | find "RUNNING" > nul 2>&1
if %errorlevel% neq 0 (
echo Starting PostgreSQL service...
net start postgresql-x64-16
if not exist "%~dp0start-server.bat" (
echo [ERROR] start-server.bat not found.
pause
exit /b 1
)
echo Database is ready.
echo.
:: 2. DB 마이그레이션 + Prisma 클라이언트 갱신
echo [3/4] DB migrate + Prisma generate...
cd /d "%~dp0backend"
call npx prisma migrate deploy
if errorlevel 1 (
echo Migration failed. backend\.env DATABASE_URL 확인
pause
exit /b 1
)
call npx prisma generate
if errorlevel 1 (
echo Prisma generate failed. 다른 터미널/서버가 켜져 있으면 종료 후 다시 시도하세요.
pause
exit /b 1
)
cd /d "%~dp0"
echo Done.
echo.
:: 3. 백엔드 + 프론트엔드
echo [4/4] Starting Backend + Frontend...
echo.
echo Dashboard : http://localhost:3000
echo Detail : http://localhost:3000/detail
echo Team : http://172.16.8.248:3000
echo.
echo 종료: Ctrl+C
echo ================================
echo.
npx --yes concurrently -k -n "API,WEB" -c "cyan,green" "cd /d %~dp0backend && npm run dev" "cd /d %~dp0frontend && npm run dev"
echo.
echo Server stopped.
pause
call "%~dp0start-server.bat"