Files
hackerthon-vote/README.md
th-kim0823 56c273779e docs: README — 새 흐름 + URL + topics 설명
Stage 1-6 흐름 갱신 (팀편성 → 안내 → 해킹 → 발표 → 투표 → 시상)
모바일 투표 QR URL 명시 (/?mode=vote)
topics.categories + settings.current_stage 데이터 구조 설명 추가

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 20:20:19 +09:00

100 lines
3.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 해커톤 투표
35명 (34명 참가 + 1명 진행요원) / 7팀 / 3분야 (재미·완성도·실용성) 투표 앱.
**DB 없이 단일 JSON 파일** (`hackathon.json`)에 모든 데이터.
## 흐름 (행사 진행)
1. **Stage 1 — 팀 편성 + 안내** (큰 화면 `/`)
2. **Stage 2 — 예시 주제** (큰 화면 `/`, 어드민이 "다음 stage →")
3. **해킹** (앱 외부, 2시간)
4. **발표**
5. **Stage 3 — 투표** (큰 화면에 QR, 모바일 → `/?mode=vote`)
6. **시상** (`/?mode=ceremony&token=mlops2026`)
## 실행 — Docker (한 줄)
```bash
docker compose up -d --build
```
첫 부팅 시 `entrypoint.sh``assign_teams.py`를 자동 실행해서 `./data/hackathon.json` 시드 생성. 이후 부팅은 기존 데이터 보존.
```bash
docker compose down # 종료 (데이터 보존)
```
**ADMIN_TOKEN**: `mlops2026` (외우기 쉬운 고정값). 변경하려면 `docker-compose.yml``ADMIN_TOKEN:` 값 직접 수정 후 `docker compose up -d --build`.
## URL
```bash
./show-urls.sh # localhost + LAN IP 포함 모든 URL 출력
```
- 큰 화면: `http://<서버>:8501/`
- 모바일 투표 (QR target): `http://<서버>:8501/?mode=vote`
- 어드민: `http://<서버>:8501/?mode=admin&token=mlops2026`
- 시상식: `http://<서버>:8501/?mode=ceremony&token=mlops2026`
- JSON 원본: `http://<서버>:8501/?mode=raw&token=mlops2026`
macOS 빠른 열기:
```bash
open "http://localhost:8501/?mode=admin&token=mlops2026"
```
## 데이터 파일 — `./data/hackathon.json`
```json
{
"people": [
{"name": "홍길동", "team": "팀1", "dept": "MLOps Data", "senior": true, "notes": ""},
...
],
"settings": {"voting_open": true},
"titles": {"팀1": "Slack 자동 분류기"},
"tie_breaks": {
"utility_team": {"winner_team": "팀1", "method": "random", "decided_at": "..."}
},
"votes": [
{"voter_name": "...", "employee_id": "...", "voter_team": "...", "fun_team": "...",
"polish_team": "...", "utility_team": "...", "created_at": "..."}
]
}
```
- 호스트에서 직접 편집 가능 (jq, vi 등). 앱이 매 요청 reload — 핫리로드.
- `./data/` 디렉터리 read-write mount. atomic write (tmp + rename).
- 행사 전 명단 변경: `people[*].team` 값만 바꾸면 즉시 반영.
- 어드민 페이지 또는 `?mode=raw&token=...`에서 JSON 다운로드 가능.
- 시드 재생성: `rm data/hackathon.json && docker compose up -d` (entrypoint 자동 실행).
- `topics.categories` 4 카테고리 × 10 items. 어드민에서 form / JSON 둘 다 편집.
- `settings.current_stage` ∈ {"intro","topics","vote"} — 어드민에서 stage 컨트롤.
## 운영 흐름
1. 투표 시작 (기본 open)
2. 모두 투표 → 어드민 "🛑 투표 마감"
3. 동률 있으면 어드민에서 추첨/선택
4. "팀별 결과물 제목" 입력 (또는 발표 직후)
5. ceremony URL 띄움 → 시상 진행
## 테스트
```bash
docker cp tests/e2e.py hackathon-vote:/tmp/e2e.py
docker exec hackathon-vote python3 /tmp/e2e.py
```
12개 시나리오 검증 (로드, 마감 토글, winner, priority, 동률, 추첨, UNIQUE, 제목, archive, atomic, clear).
## 시상 매핑
| 상 | 상품 | 평가 |
|---|---|---|
| 🛠 실용성상 | 팜레스트 5개 (최고가) | 실제 쓸 만함 |
| 🏆 완성도상 | 양우산 5개 | 동작 / 시연 안정성 |
| 🎉 재미상 | 손선풍기 5개 | 발표장 임팩트 |
수상 우선순위: 실용성 > 완성도 > 재미. 발표 순서: 재미 → 완성도 → 실용성 (긴장감).