Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
895e786
refactor: milestone 1 — DRY foundations, script consolidation, unifie…
madjin Feb 27, 2026
3bb83ba
refactor: milestone 2 — split app.py into router modules
madjin Feb 28, 2026
9d6001a
refactor: milestone 3 — performance fixes + DB convergence
madjin Feb 28, 2026
67d841d
fix: ruff formatting in routes/voting.py
madjin Feb 28, 2026
ae904bc
chore: rename CLI prog from hackathon to clanktank
madjin Feb 28, 2026
0c9fd24
fix: ruff UP045 compat + dev frontend proxy
madjin Feb 28, 2026
a0d49d2
fix: show help when clanktank db is called without subcommand
madjin Feb 28, 2026
325f6da
chore: reorder CLI by pipeline step + rewrite README
madjin Feb 28, 2026
1bf6746
feat: add config command + color-coded CLI help
madjin Feb 28, 2026
1c8f5cc
fix: config command — interactive setup instead of generate/overwrite
madjin Feb 28, 2026
5113346
fix: config command reads .env file directly
madjin Feb 28, 2026
d19f93a
feat: add stats, submissions, submission read commands
madjin Feb 28, 2026
3783793
feat: merge submission/submissions into one smart command + fixes
madjin Feb 28, 2026
f6daa99
fix: images, deps, leaderboard crash + CLI test suite
madjin Feb 28, 2026
de9207e
docs: consolidate READMEs — remove stale subdirectory docs
madjin Feb 28, 2026
87560b7
fix: address code quality bot comments on PR #80
madjin Feb 28, 2026
d462920
fix: remove opinionated model default, tighten dep floors
madjin Feb 28, 2026
68e3922
chore: update uv.lock to reflect tightened dep floors
madjin Feb 28, 2026
ffb9f67
harden cli/webhooks and scrub audit data
madjin Feb 28, 2026
4938ea9
fix: add missing `import sys` in generate_episode.py
madjin Feb 28, 2026
34ba486
fix: restore reference DB with submission data, scrub audit logs
madjin Feb 28, 2026
8b31f2e
feat: merge R1/R2 into single leaderboard table, default sort by R2
madjin Feb 28, 2026
704c2a4
feat: deduplicate scores, markdown output, fix image paths
madjin Feb 28, 2026
2a5cb39
feat: CLI UX quick wins — banner, safe db create, tips, research view
madjin Feb 28, 2026
fa8c8b4
chore: regenerate static data after score deduplication fix
madjin Feb 28, 2026
f878116
feat: add `clanktank record` command for Puppeteer episode recording
madjin Feb 28, 2026
1ae61fe
fix: `clanktank record` with no args shows help instead of error
madjin Feb 28, 2026
dedc524
feat: `clanktank config <VAR>` pretty-prints JSON configs, help on ba…
madjin Feb 28, 2026
bc35757
feat: rich rendering for `clanktank config JUDGE_CONFIG` and `RESEARC…
madjin Feb 28, 2026
1e3fe0a
refactor: move frontend from hackathon/dashboard/frontend/ to hackath…
madjin Feb 28, 2026
3e58924
chore: remove dead recovery tool, stage pending branch work
madjin Feb 28, 2026
9bbe4f8
chore: clean up stale directories and relocate recorder.js
madjin Mar 1, 2026
f36a66e
refactor: consolidate recordings/ into episodes/
madjin Mar 1, 2026
f8b9e6c
fix: resolve code quality bot flags from PR #80
madjin Mar 1, 2026
ba1f259
fix: upgrade deprecated GH Actions and remove unused getSlugFromUrl
madjin Mar 1, 2026
d217e3c
deprecate docs
madjin Mar 1, 2026
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
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ RESEARCH_CONFIG=
# =============================================================================

# Directory for hackathon recordings
HACKATHON_RECORDINGS_DIR=recordings/hackathon
HACKATHON_RECORDINGS_DIR=episodes/recordings/hackathon

# YouTube API credentials path
YOUTUBE_CREDENTIALS_PATH=
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy-dashboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main]
paths:
- 'hackathon/dashboard/frontend/**'
- 'hackathon/frontend/**'
workflow_dispatch:

permissions:
Expand All @@ -26,15 +26,15 @@ jobs:
with:
node-version: 22
cache: npm
cache-dependency-path: hackathon/dashboard/frontend/package-lock.json
cache-dependency-path: hackathon/frontend/package-lock.json

- name: Install dependencies
run: npm install
working-directory: hackathon/dashboard/frontend
working-directory: hackathon/frontend

- name: Build
run: npm run build
working-directory: hackathon/dashboard/frontend
working-directory: hackathon/frontend
env:
VITE_USE_STATIC: 'true'
VITE_BASE_PATH: /
Expand All @@ -44,11 +44,11 @@ jobs:

- name: Copy index.html to 404.html for SPA routing
run: cp dist/index.html dist/404.html
working-directory: hackathon/dashboard/frontend
working-directory: hackathon/frontend

- uses: actions/upload-pages-artifact@v3
with:
path: hackathon/dashboard/frontend/dist
path: hackathon/frontend/dist

deploy:
environment:
Expand Down
86 changes: 86 additions & 0 deletions .github/workflows/security-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Security Dependency Scan

on:
push:
branches: [ main, organize ]
pull_request:
branches: [ main ]
schedule:
# Run weekly on Sundays at 2 AM UTC
- cron: '0 2 * * 0'

jobs:
security-scan:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install security tools
run: |
python -m pip install --upgrade pip
pip install safety pip-audit

- name: Run Safety scan
run: |
echo "Running Safety scan for known vulnerabilities..."
cd hackathon
safety check --requirement requirements.txt --json --output safety-report.json || true
safety check --requirement requirements.txt || echo "Safety found vulnerabilities - check report"

- name: Run pip-audit scan
run: |
echo "Running pip-audit scan..."
cd hackathon
pip-audit --requirement requirements.txt --format=json --output=pip-audit-report.json || true
pip-audit --requirement requirements.txt || echo "pip-audit found vulnerabilities - check report"

- name: Run npm audit
run: |
echo "Running npm audit..."
cd hackathon/frontend
npm audit --audit-level=moderate --json > npm-security-report.json || true
npm audit --audit-level=moderate || echo "npm audit found vulnerabilities - check report"

- name: Upload Security Reports
uses: actions/upload-artifact@v4
if: always()
with:
name: security-reports
path: |
hackathon/safety-report.json
hackathon/pip-audit-report.json
hackathon/frontend/npm-security-report.json
retention-days: 30

- name: Security Summary
if: always()
run: |
echo "## Security Scan Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

if [ -f hackathon/safety-report.json ]; then
SAFETY_VULNS=$(jq '.vulnerabilities | length' hackathon/safety-report.json 2>/dev/null || echo "0")
echo "- **Safety scan**: $SAFETY_VULNS Python vulnerabilities found" >> $GITHUB_STEP_SUMMARY
fi

if [ -f hackathon/pip-audit-report.json ]; then
PIP_AUDIT_VULNS=$(jq '.vulnerabilities | length' hackathon/pip-audit-report.json 2>/dev/null || echo "0")
echo "- **pip-audit scan**: $PIP_AUDIT_VULNS Python vulnerabilities found" >> $GITHUB_STEP_SUMMARY
fi

if [ -f hackathon/frontend/npm-security-report.json ]; then
NPM_VULNS=$(jq '.vulnerabilities | length' hackathon/frontend/npm-security-report.json 2>/dev/null || echo "0")
echo "- **npm audit**: $NPM_VULNS Node.js vulnerabilities found" >> $GITHUB_STEP_SUMMARY
fi

echo "" >> $GITHUB_STEP_SUMMARY
echo "📋 **Action Items:**" >> $GITHUB_STEP_SUMMARY
echo "- Review security reports in artifacts" >> $GITHUB_STEP_SUMMARY
echo "- Update vulnerable dependencies" >> $GITHUB_STEP_SUMMARY
echo "- Re-run scan after updates" >> $GITHUB_STEP_SUMMARY
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,22 @@ Thumbs.db
logs/

# Hackathon System Generated Files
data/judge_config.json
data/research_config.json
data/submission_backups/
data/temp.txt
data/*.db
!data/hackathon.db
hackathon/episodes/
hackathon/dashboard/frontend/dist/
hackathon/frontend/dist/

# Large/Archive Files
*.tar
*.zip

# Video recordings (keep JSON metadata, ignore large videos)
recordings/*.mp4
recordings/*.webm
episodes/recordings/*.mp4
episodes/recordings/*.webm

# Temporary/staging files
tmp/
Expand Down
34 changes: 14 additions & 20 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ uvicorn hackathon.backend.app:app --host 0.0.0.0 --port 8000
python app.py --generate-static-data # from hackathon/backend/
```

### Frontend (hackathon/dashboard/frontend/)
### Frontend (hackathon/frontend/)
```bash
npm install
npm run dev # Start dev server
Expand Down Expand Up @@ -48,25 +48,20 @@ python -m hackathon.backend.migrate_schema [--dry-run] # Migrate schema
python -m hackathon.backend.sync_schema_to_frontend # Sync schema → frontend types
```

### Hackathon Pipeline
### Hackathon Pipeline (unified CLI)
```bash
python -m hackathon.backend.research --submission-id <id> --version v2 # GitHub + AI research
python -m hackathon.backend.hackathon_manager --score --submission-id <id> --version v2 # Round 1: AI judge scoring
python -m hackathon.backend.hackathon_manager --score --all --version v2 # Score all researched
python -m hackathon.backend.hackathon_manager --synthesize --submission-id <id> --version v2 # Round 2: AI + community
python -m hackathon.backend.hackathon_manager --leaderboard --version v2 # View leaderboard
python -m hackathon.scripts.generate_episode --submission-id <id> --version v2 # Generate episode
clanktank research --submission-id <id> --version v2 # GitHub + AI research
clanktank score --submission-id <id> --version v2 # Round 1: AI judge scoring
clanktank score --all --version v2 # Score all researched
clanktank synthesize --submission-id <id> --version v2 # Round 2: AI + community
clanktank leaderboard --version v2 # View leaderboard
clanktank episode --submission-id <id> --version v2 # Generate episode
clanktank serve --host 0.0.0.0 --port 8000 # Start API server
clanktank db create # Initialize database
clanktank db migrate --dry-run # Migrate schema
```

### Main Platform Pipeline
```bash
python scripts/sheet_processor.py -s "Block Tank Pitch Submission" -o ./data -j --db-file pitches.db # Import sheets
python scripts/pitch_manager.py --db-file data/pitches.db --list --filter-status submitted # List pitches
python scripts/pitch_manager.py --db-file data/pitches.db --research <id> # Research pitch
python scripts/pitch_manager.py --db-file data/pitches.db --create-character all # Create characters
node scripts/shmotime-recorder.js <episode-url> # Record episode
python scripts/upload_to_youtube.py --from-json metadata.json # Upload to YouTube
```
`uv run clanktank` or `python -m hackathon` both work. Old `hackathon_manager --score ...` paths still work for backward compatibility.

### Python Style
```bash
Expand All @@ -87,7 +82,7 @@ ruff format <file> # Format
The hackathon system is schema-driven. `hackathon/backend/submission_schema.json` is the **single source of truth** for all field definitions. Changes flow:
1. Edit `submission_schema.json`
2. Run `python -m hackathon.backend.migrate_schema` to update database
3. Run `python -m hackathon.backend.sync_schema_to_frontend` to regenerate TypeScript types at `hackathon/dashboard/frontend/src/types/submission.ts`
3. Run `python -m hackathon.backend.sync_schema_to_frontend` to regenerate TypeScript types at `hackathon/frontend/src/types/submission.ts`

Never hardcode field lists in Python or TypeScript — always load from schema.

Expand All @@ -108,7 +103,7 @@ Four personality-based judges with weighted scoring criteria (Innovation, Techni
Judge personas defined in `hackathon/prompts/judge_personas.py`. Scoring pipeline: GitHub Analysis → AI Research (with GitIngest) → Round 1 AI Scoring → Community Voting (Discord) → Round 2 Synthesis.

### Frontend Caching
The frontend has aggressive 5-minute caching (HTTP `Cache-Control: max-age=300` + in-memory cache in `hackathon/dashboard/frontend/src/lib/api.ts`). If backend data isn't appearing, hard refresh or wait 5 minutes.
The frontend has aggressive 5-minute caching (HTTP `Cache-Control: max-age=300` + in-memory cache in `hackathon/frontend/src/lib/api.ts`). If backend data isn't appearing, hard refresh or wait 5 minutes.

### Status Progressions
- **Main Platform**: submitted → researched → in_progress → done
Expand Down Expand Up @@ -143,7 +138,6 @@ Used in the research pipeline (`hackathon/backend/github_analyzer.py`) to genera
Both SQLite: `data/pitches.db` (main platform), `data/hackathon.db` (hackathon). Override hackathon DB path with `HACKATHON_DB_PATH` env var.

### GitHub Actions
- Daily episode recording at 04:15 UTC (`.github/workflows/daily-episode-recording.yml`)
- Security scanning (`.github/workflows/security-scan.yml`)

## Workflow Preferences
Expand Down
Loading
Loading