|
1 | 1 | # Architecture |
2 | 2 |
|
| 3 | +## Overview |
| 4 | +Split architecture separating counting phase from evaluation phase. Data passes via URL parameters enabling flexible endpoint configuration. |
| 5 | + |
| 6 | +## Flow Diagram |
| 7 | +``` |
| 8 | +┌─────────────────┐ |
| 9 | +│ index.html │ |
| 10 | +│ │ |
| 11 | +│ ┌───────────┐ │ |
| 12 | +│ │ Counting │ │──────┐ |
| 13 | +│ │ Phase │ │ │ |
| 14 | +│ └───────────┘ │ │ Timer Expires / Manual Finish / Skip |
| 15 | +│ │ │ |
| 16 | +└─────────────────┘ │ |
| 17 | + ▼ |
| 18 | + ┌──────────────────┐ |
| 19 | + │ URL Parameters: │ |
| 20 | + │ - Counts (c1-c9) │ |
| 21 | + │ - Skip flag │ |
| 22 | + │ - Test mode │ |
| 23 | + └────────┬─────────┘ |
| 24 | + ▼ |
| 25 | + ┌────────────────────────┐ |
| 26 | + │ finish_evaluation.html │ |
| 27 | + │ │ |
| 28 | + │ ┌────────────────┐ │ |
| 29 | + │ │ Questions │ │ |
| 30 | + │ │ & Results │ │ |
| 31 | + │ └────────────────┘ │ |
| 32 | + │ │ |
| 33 | + └────────────────────────┘ |
| 34 | +``` |
| 35 | + |
| 36 | +## File Structure |
| 37 | +``` |
| 38 | +/ |
| 39 | +├── index.html # Counter UI |
| 40 | +├── script.js # Counter logic + timer |
| 41 | +├── finish_evaluation.html # Results UI |
| 42 | +├── finish_evaluation.js # Results logic + email |
| 43 | +├── styles.css # Shared styles |
| 44 | +└── tests/ # Automated test suite |
| 45 | + ├── common.js # Shared test utilities |
| 46 | + └── test*.js # Individual test files |
| 47 | +``` |
| 48 | + |
| 49 | +## Key Components |
| 50 | + |
| 51 | +### Counter Phase (index.html + script.js) |
| 52 | +- 8 behavior counters with keyboard shortcuts |
| 53 | +- Configurable timer (10s dev / 5min prod / 30s test) |
| 54 | +- Undo functionality with action history |
| 55 | +- Settings modal for navigation options |
| 56 | + |
| 57 | +### Evaluation Phase (finish_evaluation.html + finish_evaluation.js) |
| 58 | +- Receives counts via URL parameters |
| 59 | +- Teaching session modal (skip coding flow) |
| 60 | +- Question validation with checkboxes |
| 61 | +- Email generation with test mode seam |
| 62 | + |
| 63 | +### Data Flow |
| 64 | +``` |
| 65 | +Counts → URL Params → Finish Page → Email/Clipboard |
| 66 | + c1=2&c2=3 |
| 67 | + &skip=false |
| 68 | +``` |
| 69 | + |
| 70 | +### Test Architecture |
| 71 | +- Puppeteer-based automation |
| 72 | +- Test mode prevents email sending |
| 73 | +- Individual test files for modularity |
| 74 | +- Master runner with selective execution |
| 75 | + |
| 76 | +## Navigation Paths |
| 77 | +``` |
| 78 | +Start → Count → Timer/Finish → Questions → Email → Exit |
| 79 | + ↓ |
| 80 | + Skip Coding → Teaching? → Questions → Email |
| 81 | +``` |
0 commit comments