Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
f1a47c8
feat: 추가 스텟
ceh1502 Aug 20, 2025
0eb777c
feat:controller
ceh1502 Aug 20, 2025
0fe4c20
Merge branch 'main' of https://github.com/ceh1502/stench_1.0 into dev1
ceh1502 Aug 20, 2025
4780bf5
이식수술
pppbin Aug 20, 2025
6be811b
이식수술 2
pppbin Aug 20, 2025
3b33dd1
Merge pull request #2 from ceh1502/dev1
ceh1502 Aug 20, 2025
b4c29ee
순위
pppbin Aug 20, 2025
8f79603
2부 색변경 추가
pppbin Aug 20, 2025
453be71
statTeam초기세팅
pppbin Aug 20, 2025
19ed2f5
로고 svg->png
pppbin Aug 20, 2025
f08b379
프로필...
Jenicoon Aug 20, 2025
d73a64c
비디오모달
pppbin Aug 20, 2025
ac4be91
스탯 팀
pppbin Aug 20, 2025
f904962
team css 수정
pppbin Aug 20, 2025
ccd81e1
faq모달
pppbin Aug 20, 2025
a849429
Merge pull request #3 from ceh1502/dev1
ceh1502 Aug 21, 2025
31f6181
Merge pull request #4 from ceh1502/dev2
pppbin Aug 21, 2025
37b0fdb
json파일 업로드
pppbin Aug 21, 2025
8ec457b
프로필 각 탭 상단
Jenicoon Aug 21, 2025
fb126fd
json실험
pppbin Aug 21, 2025
f0422a2
Merge pull request #5 from ceh1502/dev2
pppbin Aug 21, 2025
2284c98
feat: stat update
ceh1502 Aug 21, 2025
d4b6792
Merge pull request #6 from ceh1502/dev1
ceh1502 Aug 21, 2025
a3ec621
api player
pppbin Aug 22, 2025
b11f52f
fix: json upload
ceh1502 Aug 22, 2025
af86026
클립페이지 필터
pppbin Aug 22, 2025
1c7ce87
포지션 스탯 디비전 표시
pppbin Aug 22, 2025
7443635
game->clip
pppbin Aug 22, 2025
04f70b1
게임배치
pppbin Aug 22, 2025
0eb03b7
게임페이지 디자인
pppbin Aug 22, 2025
d13f8d1
이름변경
pppbin Aug 22, 2025
3ca1b3e
filter
pppbin Aug 22, 2025
30bd9f7
Revert "filter"
pppbin Aug 22, 2025
8b626d8
클립 기초설정
pppbin Aug 22, 2025
21ddcf2
팀용 mockdata추가 및 정렬
pppbin Aug 22, 2025
80760a2
guest페이지로
pppbin Aug 22, 2025
1c49213
Merge pull request #7 from ceh1502/dev2
ceh1502 Aug 23, 2025
e56feb6
fix: 팀순위, 포지션 데이터
ceh1502 Aug 23, 2025
9c38c3f
fix:conflict
ceh1502 Aug 23, 2025
01ad61f
Merge pull request #8 from ceh1502/dev1
ceh1502 Aug 23, 2025
81fbf19
fix: team stat 구현 완료, position stat 구현중
ceh1502 Aug 23, 2025
bfacabe
Merge pull request #9 from ceh1502/dev1
ceh1502 Aug 23, 2025
524696e
fix:vercel
ceh1502 Aug 23, 2025
f2cb5d5
Merge pull request #10 from ceh1502/dev1
ceh1502 Aug 23, 2025
f9f58d4
프로필 레이더 차트 빼고 다
Jenicoon Aug 23, 2025
f53e059
fix: vercel back
ceh1502 Aug 23, 2025
b9bbea0
Merge pull request #12 from ceh1502/dev1
ceh1502 Aug 23, 2025
7dbf22d
사이드바
pppbin Aug 23, 2025
e7c68f8
Merge pull request #13 from ceh1502/dev2
pppbin Aug 23, 2025
ea71b3e
사이드바 멤버용
pppbin Aug 23, 2025
fff14d1
Merge pull request #14 from ceh1502/dev2
pppbin Aug 23, 2025
72f4fa1
fix:vercel2
ceh1502 Aug 23, 2025
8206fa1
Merge pull request #15 from ceh1502/dev1
ceh1502 Aug 23, 2025
352d49d
fix:vercel3
ceh1502 Aug 23, 2025
c977cec
Merge pull request #16 from ceh1502/dev1
ceh1502 Aug 23, 2025
d28e413
fix:cercel4
ceh1502 Aug 23, 2025
3cbc2e0
Merge pull request #17 from ceh1502/dev1
ceh1502 Aug 23, 2025
00ac517
fix:5
ceh1502 Aug 23, 2025
9510ea7
Merge pull request #18 from ceh1502/dev1
ceh1502 Aug 23, 2025
df9301c
fix6
ceh1502 Aug 23, 2025
b8285e2
Merge pull request #19 from ceh1502/dev1
ceh1502 Aug 23, 2025
190ee1c
fix7
ceh1502 Aug 23, 2025
a9f7776
Merge pull request #20 from ceh1502/dev1
ceh1502 Aug 23, 2025
9a556c5
fix:8
ceh1502 Aug 23, 2025
77910f5
Merge pull request #21 from ceh1502/dev1
ceh1502 Aug 23, 2025
86f3685
fix:cors
ceh1502 Aug 23, 2025
0599286
Merge pull request #22 from ceh1502/dev1
ceh1502 Aug 23, 2025
8132751
stat Position css
pppbin Aug 23, 2025
cb5e007
team css
pppbin Aug 23, 2025
24b0275
Merge pull request #23 from ceh1502/dev2
pppbin Aug 23, 2025
e5bf540
팀 css재수정
pppbin Aug 23, 2025
22f618a
tfl 추가
pppbin Aug 23, 2025
3679934
팀 누락 수정
pppbin Aug 23, 2025
f87e603
Merge pull request #24 from ceh1502/dev2
pppbin Aug 23, 2025
79c6cc1
Merge pull request #11 from ceh1502/dev4
pppbin Aug 23, 2025
f573c75
setting화면 이미지 박기
pppbin Aug 23, 2025
fee04b1
clip Page Content
pppbin Aug 23, 2025
8297ba9
Merge pull request #25 from ceh1502/dev2
pppbin Aug 23, 2025
45a647e
팀 데이터
pppbin Aug 24, 2025
13e56ae
1차수정
pppbin Aug 24, 2025
d016b8e
stat Team 끝
pppbin Aug 24, 2025
f9c0c56
Merge pull request #26 from ceh1502/dev2
pppbin Aug 24, 2025
af8aa15
2부
pppbin Aug 24, 2025
b9e563b
Merge pull request #27 from ceh1502/dev2
pppbin Aug 24, 2025
8eef22d
포지션 순위 2경기 추가
pppbin Aug 24, 2025
ca0c5d0
Merge pull request #28 from ceh1502/dev2
pppbin Aug 24, 2025
b6f5d54
1
pppbin Aug 28, 2025
3fe2cb9
Merge pull request #29 from ceh1502/dev2
pppbin Aug 28, 2025
82c0bac
fix:백엔드 상 쿼터DB 분석완료
ceh1502 Aug 28, 2025
7496a99
videoPlayer 기본세팅
pppbin Aug 28, 2025
3628aa1
Merge pull request #30 from ceh1502/dev1
ceh1502 Aug 28, 2025
2ebb79b
feat: 프론트 연결 성공 (쿼터백/패스)
ceh1502 Aug 28, 2025
6497107
Merge pull request #31 from ceh1502/dev1
ceh1502 Aug 28, 2025
ef84af7
Merge pull request #32 from ceh1502/dev2
pppbin Aug 28, 2025
338d2a5
stat position table -> div
pppbin Aug 28, 2025
89f565c
비디오 플레이어 연결 성공
pppbin Aug 28, 2025
1181fb2
Merge pull request #33 from ceh1502/dev2
pppbin Aug 28, 2025
df103af
feat: 포지션 스탯 (QB,RB,WR,TE 구현 완료, K 중복데이터 작업중)
ceh1502 Aug 29, 2025
094774c
Merge pull request #36 from ceh1502/dev1.1
ceh1502 Aug 29, 2025
38fcf25
feat: 포지션 분석기, 스탯 구현 완료 (미구현한것도 몇개있는데 검증해가며 할 예정)
ceh1502 Aug 30, 2025
8704620
Merge pull request #37 from ceh1502/dev1.1
ceh1502 Aug 30, 2025
fe7a31c
clip 버튼 수정
pppbin Aug 30, 2025
49f9ec9
statTeam 더미데이터 삭제
pppbin Aug 30, 2025
33fe710
Merge pull request #38 from ceh1502/dev2
pppbin Aug 30, 2025
f140a4c
fix: team stat1
ceh1502 Aug 30, 2025
7edf2a5
fix: teamstat2
ceh1502 Aug 30, 2025
208dcd8
playType버튼
pppbin Aug 30, 2025
02b2b9f
Merge pull request #39 from ceh1502/dev1.1
ceh1502 Aug 30, 2025
fdbfe56
feat: 팀 스탯 구현 완료 (미구현인 부분은 999로 통일)
ceh1502 Aug 30, 2025
e923b1a
Merge pull request #40 from ceh1502/dev1.1
ceh1502 Aug 30, 2025
67cc3cf
Merge pull request #41 from ceh1502/dev2
pppbin Aug 31, 2025
e8e101e
feat: 협회 데이터 다 완료
ceh1502 Aug 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "all"
}
25 changes: 25 additions & 0 deletions Back/.env 2.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 데이터베이스 설정
# Local MongoDB (개발용)
MONGODB_URI=mongodb://localhost:27017/stech

# MongoDB Atlas (프로덕션용 - 실제 값으로 교체하세요)
# MONGODB_URI=mongodb+srv://your-username:your-password@cluster0.xxxxxx.mongodb.net/stech?retryWrites=true&w=majority&appName=Cluster0

# JWT 설정 (보안을 위해 강력한 랜덤 문자열로 교체하세요)
JWT_SECRET=your-super-secret-jwt-key-here

# 이메일 설정 (SMTP 서비스 사용시)
EMAIL_USER=your-email@example.com
EMAIL_PASS=your-email-password

# AWS S3 설정 (파일 업로드용)
AWS_ACCESS_KEY_ID=your-aws-access-key
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
AWS_REGION=ap-northeast-2
AWS_BUCKET_NAME=your-bucket-name

# 프론트엔드 URL
FRONTEND_URL=http://localhost:3000

# 서버 포트
PORT=3001
39 changes: 39 additions & 0 deletions Back/README_ENV 2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 환경 변수 설정 가이드

## 🔐 보안 주의사항

**중요**: `.env` 파일은 절대 Git 저장소에 커밋하지 마세요!

## 📝 설정 방법

1. `.env.example` 파일을 `.env`로 복사:
```bash
cp .env.example .env
```

2. `.env` 파일에서 실제 값으로 교체:

### 필수 설정
- `JWT_SECRET`: 강력한 랜덤 문자열 (최소 32자)
- `MONGODB_URI`: MongoDB 연결 문자열

### 선택적 설정
- `EMAIL_USER`, `EMAIL_PASS`: 이메일 기능 사용시
- `AWS_*`: S3 파일 업로드 사용시

## 🛡️ 보안 팁

1. JWT_SECRET은 다음과 같이 생성하세요:
```bash
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
```

2. 프로덕션에서는 MongoDB Atlas나 AWS DocumentDB 사용 권장

3. AWS 키는 최소 권한 원칙에 따라 S3 버킷에만 접근 가능하도록 설정

## 🚨 .env 파일이 GitHub에 업로드된 경우

1. 즉시 모든 민감한 정보(JWT secret, DB 비밀번호 등) 변경
2. Git 히스토리에서 완전 제거 필요
3. GitHub repository 설정에서 secrets으로 관리 권장
129 changes: 129 additions & 0 deletions Back/add-hanyang-team.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
const mongoose = require('mongoose');

// MongoDB 연결 설정
const MONGODB_URI = process.env.MONGODB_URI || 'mongodb://localhost:27017/stech';

// Player Schema 정의
const playerSchema = new mongoose.Schema({}, {strict: false});
const Player = mongoose.model('Player', playerSchema);

// 한양대학교 팀 선수 데이터 생성
function generateHanyangPlayers() {
const positions = {
'QB': 3,
'RB': 8,
'WR': 23,
'TE': 9,
'K': 2,
'P': 2,
'OL': 18,
'DL': 17,
'LB': 16,
'DB': 2
};

const names = [
'김민수', '이철수', '박영희', '정다한', '최웅진', '한상민', '조현우', '윤태현',
'장승우', '권도현', '서민준', '류정호', '오승민', '전우진', '황시우', '강건우',
'임주원', '신예준', '조태현', '정현우', '한지훈', '박서준', '김도윤', '이준서',
'최하준', '장우진', '권시우', '서예준', '류도현', '오현우', '전민준', '황준서',
'강태현', '임건우', '신도현', '조우진', '정시우', '한예준', '박준서', '김현우',
'이태현', '최민준', '장시우', '권예준', '서도현', '류우진', '오민준', '전준서',
'황현우', '강태현', '임시우', '신예준', '조도현', '정우진', '한민준', '박준서',
'김태현', '이현우', '최시우', '장예준', '권도현', '서우진', '류민준', '오준서',
'전현우', '황태현', '강시우', '임예준', '신도현', '조우진', '정민준', '한준서',
'박현우', '김시우', '이예준', '최도현', '장우진', '권민준', '서준서', '류현우',
'오태현', '전시우', '황예준', '강도현', '임우진', '신민준', '조준서', '정현우',
'한태현', '박시우', '김예준', '이도현', '최우진', '장민준', '권준서', '서현우',
'류태현', '오시우', '전예준', '황도현'
];

const players = [];
let playerIndex = 0;
let jerseyNumber = 0;

for (const [position, count] of Object.entries(positions)) {
for (let i = 0; i < count; i++) {
const player = {
playerId: `HY${jerseyNumber.toString().padStart(2, '0')}`,
name: names[playerIndex % names.length],
jerseyNumber: jerseyNumber,
position: position,
teamName: 'HYLions', // JSON에서 사용하는 팀명
league: '1부',
season: '2024',
height: `${Math.floor(Math.random() * 20) + 170}cm`,
weight: `${Math.floor(Math.random() * 30) + 65}kg`,
grade: `${Math.floor(Math.random() * 4) + 1}학년`,
stats: {
gamesPlayed: 0,
// 다른 스탯들은 더미 생성기에서 추가될 예정
},
processedGames: []
};

players.push(player);
playerIndex++;
jerseyNumber++;
}
}

return players;
}

async function addHanyangTeam() {
try {
console.log('🔗 MongoDB에 연결 중...');
await mongoose.connect(MONGODB_URI);
console.log('✅ MongoDB 연결 성공');

// 기존 한양대 선수가 있는지 확인
const existingHanyangPlayers = await Player.countDocuments({ teamName: 'HYLions' });
console.log(`📊 기존 한양대 선수 수: ${existingHanyangPlayers}명`);

if (existingHanyangPlayers > 0) {
console.log('⚠️ 한양대 선수가 이미 존재합니다. 기존 데이터를 삭제하고 새로 생성하시겠습니까?');
console.log('🧹 기존 한양대 선수 데이터를 삭제합니다...');

const deleteResult = await Player.deleteMany({ teamName: 'HYLions' });
console.log(`✅ 삭제된 선수: ${deleteResult.deletedCount}명`);
}

// 한양대 선수 데이터 생성
const hanyangPlayers = generateHanyangPlayers();
console.log(`📝 생성할 한양대 선수: ${hanyangPlayers.length}명`);

// 선수 데이터 삽입
await Player.insertMany(hanyangPlayers);
console.log('✅ 한양대 선수 데이터 삽입 완료');

console.log('📊 한양대 선수들에게 더미 스탯 생성은 별도 스크립트로 실행예정...');

// 최종 확인
const finalCount = await Player.countDocuments({ teamName: 'HYLions' });
console.log(`🎯 최종 한양대 선수 수: ${finalCount}명`);

// 포지션별 분포 확인
console.log('\n🏈 한양대 포지션별 선수 수:');
const positions = ['QB', 'RB', 'WR', 'TE', 'K', 'P', 'OL', 'DL', 'LB', 'DB'];
for (const position of positions) {
const count = await Player.countDocuments({ teamName: 'HYLions', position });
console.log(`${position}: ${count}명`);
}

console.log('\n🚀 한양대학교 라이온스 팀 데이터 추가 완료!');

} catch (error) {
console.error('💥 한양대 팀 추가 중 오류 발생:', error);
} finally {
await mongoose.disconnect();
console.log('🔌 MongoDB 연결 종료');
}
}

// 스크립트 실행
if (require.main === module) {
addHanyangTeam();
}

module.exports = { addHanyangTeam };
Loading