# Who Did It? A Clue-themed character preference collector for game parties. Players enter their name, rank their top 3 character choices, and an admin view assigns players to characters (with team overflow when needed). ## Tech Stack - **Frontend:** React (Vite) - **Backend:** Node.js / Express - **Persistence:** JSON file (no database) ## Prerequisites - Node.js 18+ ## Setup ### 1. Install dependencies ```bash cd client npm install cd ../server npm install ``` ### 2. Environment Create `server/.env` (or copy from `server/.env.example`): ``` PORT=3001 ADMIN_PASSWORD=clue2024 ALLOWED_NAMES=Jim,Colleen,Rory,Gigi,Meghan,Christine,Bob,Rachel,Chuck ``` ### 3. Run development servers **Terminal 1 – server:** ```bash cd server npm run dev ``` **Terminal 2 – client:** ```bash cd client npm run dev ``` Open http://localhost:5173 (or the URL Vite prints). The client proxies `/api` to the server on port 3001. ## Routes | Route | Purpose | |---------|------------------------------------------| | `/` | Name entry (must be in allowed list) | | `/rank` | Rank top 3 character choices | | `/thanks` | Confirmation after submitting picks | | `/admin` | Results dashboard, Assign Teams, Clear | ## Configuration - **ALLOWED_NAMES:** Comma-separated list of player names. Only these names can submit picks. Case-insensitive. - **ADMIN_PASSWORD:** Required to clear all submissions (admin panel). ## Docker See [DOCKER.md](DOCKER.md) for build, push, and run instructions. ```bash .\docker-build.ps1 .\docker-push.ps1 ```