Skip to content

Commit 1291308

Browse files
lexlerisidoreJayBazuzikuoman
committed
. d added architecture doc
Co-Authored-By: Llewellyn Falco <llewellyn.falco@gmail.com> Co-Authored-By: Jay Bazuzi <1259628+jaybazuzi@users.noreply.github.com> Co-Authored-By: Steve <4137007+kuoman@users.noreply.github.com>
1 parent 510bf0a commit 1291308

2 files changed

Lines changed: 80 additions & 1 deletion

File tree

docs/architecture.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,81 @@
11
# Architecture
22

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+
```

run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if lsof -i :8080 > /dev/null 2>&1; then
88
if [ ! -z "$PID" ]; then
99
kill $PID 2>/dev/null || true
1010
sleep 1
11-
11+
1212
if lsof -i :8080 > /dev/null 2>&1; then
1313
kill -9 $PID 2>/dev/null || true
1414
fi

0 commit comments

Comments
 (0)