# APEX Portfolio — Claude Code Context

This folder is **Russ Goerend's** working directory for the Waukee APEX Portfolio system. Russ teaches Designing Communication Solutions (DCS) and Business Startup (BSU) at the Waukee Innovation & Learning Center (WILC).

The active project is **v2** — a SSO-ready, Google Sheets–backed portfolio and instructor dashboard for all 17 APEX courses. Target launch: August 2026, start of the 2026–27 school year.

To-do list for v2 completion: **`v2-todo.md`** (this folder, synced across machines).

---

## Required APEX Terminology

Never use generic school language. Always use APEX professional terms:

| Instead of… | Use… |
|---|---|
| Student | Student-associate |
| Teacher | Instructor |
| Classroom | Studio / Lab / Workshop |
| Class (group) | Team |
| Class (course) | Course |
| Field trip | Tour |

This applies to all UI copy, artifact card briefs, playbook steps, callouts, and any content student-associates or instructors will read.

---

## Design System

```
Primary:    #500778  (APEX purple)
Secondary:  #c4d600  (APEX lime)
Accent:     #4b4f54  (dark gray)
Background: #F3F4F6
Cards:      #FFFFFF
Font:       Inter (Google Fonts — 400, 600, 700, 800)
Nav height: 70px (fixed top, purple with lime bottom border)
```

Standard colors (for progress bars and standard badges):
```
S1 Servant Leadership:  #10B981  (green)
S2 Beyond GPA:          #3B82F6  (blue)
S3 Career Exploration:  #8B5CF6  (violet)
S4 Technical Skills:    #F59E0B  (amber)
S5 Professional Skills: #EF4444  (red)
```

---

## File Map

```
Portfolio HTMLs/
├── CLAUDE.md                        ← this file
├── v2-todo.md                       ← active to-do list
├── APEX_Course_Builder_Kit.html     ← instructor tool for configuring Standards 1, 2, 4, 5
├── APEX_Playbook_Builder_Kit.html   ← older, mostly superseded by Course Builder Kit
├── APEX-v2-Purpose.html             ← purpose/rationale doc
├── APEX-v2-Reference.html           ← reference doc
├── v1/                              ← old system (keep untouched until v2 launches)
│   ├── Standard1–5.html             ← v1 standard pages
│   ├── Standard4BSU.html            ← Skill Collection pattern (reference for Course Builder Kit)
│   ├── Standard4DCS.html            ← Guided Process pattern (reference for Course Builder Kit)
│   └── *.html (playbooks, etc.)
└── v2/                              ← active development
    ├── index.html                   ← sign-in + first-time course onboarding
    ├── Dashboard.html               ← student-associate home
    ├── Standard1.html               ← Servant Leadership (kanban, key: apex_std1_state_v6)
    ├── Standard2.html               ← Beyond GPA (kanban, key: apex_s2_v2)
    ├── Standard3.html               ← Career Exploration (phase, 4 phases, key: apex_s3_v2)
    ├── Standard4.html               ← Technical Skills — DCS (phase, 5 phases, key: apex_s4_v2)
    ├── Standard5.html               ← Professional Skills (kanban, key: apex_s5_v2)
    ├── Checkin.html                 ← daily standup log
    ├── auth-callback.html           ← Google OAuth token handler
    ├── instructor/index.html        ← instructor dashboard (roster + heatmap)
    ├── js/
    │   ├── config.js                ← SCRIPT_URL, CURRENT_YEAR ('2026-27'), OAUTH_CLIENT_ID
    │   ├── auth.js                  ← getCurrentUser(), signOut(), requireRole()
    │   └── api.js                   ← ApexAPI (all Sheets communication)
    └── [DCS playbooks copied here]  ← Video, Social Media, Marketing Analytics, etc.
```

---

## v2 Architecture

**Auth:** Real Google OAuth via implicit flow. `getCurrentUser()` in `auth.js` returns the cached user or redirects to Google. Dev override: `localStorage.setItem('apex_dev_user', JSON.stringify({...}))` — see comments at top of `auth.js` for exact shape.

**User object shape:**
```js
{
  id, name, email, picture,
  role: 'student-associate' | 'instructor',
  courseIds: ['dcs'],   // array; dual-enrolled can have 2
  courseId: 'dcs',      // primary course
  courseName: 'DCS',    // display string
  instructorId: ''
}
```

**Backend:** Google Apps Script web app → Google Spreadsheet (`1_pDD2Bc0EjeKpyeg6cjPhdDI0um3rZ0lrYIRbMuIFGg`). All reads/writes go through `ApexAPI` in `api.js`. Apps Script source: `v2/APPS_SCRIPT.js`. Current deployment URL in `v2/js/config.js → SCRIPT_URL`.

**localStorage keys (v2):**
```
apex_auth_v2          — cached OAuth session
apex_dev_user         — dev override (checked first by getCurrentUser)
apex_instructor_preview — flag for instructor viewing as student-associate
apex_std1_state_v6    — Standard 1 kanban state
apex_s2_v2            — Standard 2 kanban state
apex_s3_v2            — Standard 3 phase state
apex_s4_v2            — Standard 4 phase state (DCS: 5 phases)
apex_s5_v2            — Standard 5 kanban state
```

**New page checklist:** Every new v2 page needs:
1. `<script src="js/config.js"></script>` + `auth.js` + `api.js`
2. `const user = getCurrentUser();` at top of script
3. Course guard if student-facing: `if (!user.courseIds?.length) window.location.replace('index.html');`
4. `document.getElementById('nav-user-name').textContent = user.name;`
5. S4 nav entry: `<a href="Standard4.html">S4 · Technical Skills</a>` (page now exists)

---

## Current State (as of 2026-05-23)

**Done this session:**
- Sign-out bug fixed (was looping back to OAuth)
- Standard4.html built for DCS and wired up in Dashboard
- All DCS playbooks copied into v2/ with correct paths
- Dashboard phase-total bug fixed (`std.phases` instead of hardcoded `4`)
- Course Builder Kit dead code removed

**Still on the to-do list** (see `v2-todo.md`):
- Manual testing of the Course Builder Kit before colleague meeting
- Full student-associate and instructor flow testing
- Verify Apps Script backend is live and responding
- Build Standard 4 pages for other courses after colleagues submit their configs

---

## Key People & Context

- **Russ Goerend** — instructor, DCS + BSU, Studio The Hue #111, `rgoerend@waukeeschools.org`
- **Kathleen Sender** — WILC Program Director (Russ's boss)
- **Russ's oldest son** — enrolling in APEX 2026–27; available as a real test user for OAuth + onboarding flows over the summer
- **Colleagues using Course Builder Kit** — will email their Standard 4 configs to Russ; he passes them here to build the Standard 4 HTML pages
- **Live URL:** `dashboard.dwtapex.com/v2/`
