Commit dfa9ef0
authored
* docs: add demo script with 6-minute talk track and screenshot guide
* docs: move DEMO.md into docs/ directory
* docs: move demo script and screenshots into docs/demo/ subdirectory
* chore: untrack large presentation files, add *.pptx and docs PDFs to .gitignore
* feat: student roster page with drill-down, filtering, sorting, and CSV export (#65)
* feat: student roster with info popovers; fix gateway models using 'Y' not 'C' for completion target
* fix: credential model — add sought-credential fallback and class_weight=balanced; add sorting for enrollment and credential type columns
* fix: update credential type popover to reflect sought-credential fallback logic
* feat: dashboard filtering by cohort, enrollment type, and credential type (#66) (#72)
- Add filter bar above KPI tiles with Cohort, Enrollment Type, and Credential Type
dropdowns (shadcn Select) and a Clear button with filtered-student count
- All 4 dashboard API routes now accept cohort, enrollmentType, credentialType
query params and apply parameterized WHERE clauses
- Risk alerts and retention-risk routes use a CTE so percentage denominators
are relative to the filtered set (not the full table)
- Readiness route conditionally JOINs student_level_with_predictions when
enrollment or credential filters are active; existing institution/cohort/level
params unchanged
- All fetch calls on the page are re-triggered when filter state changes
* feat: audit log export endpoint with CSV download button (#67) (#73)
- Add GET /api/query-history/export that reads logs/query-history.jsonl and
streams a CSV with headers: timestamp, institution, prompt, vizType, rowCount
- Accepts optional ?from=ISO_DATE&to=ISO_DATE query params for date-range
filtering; returns 404 with clear message if the log file does not exist yet
- Sets Content-Disposition: attachment; filename="query-audit-log.csv"
- Add "Export" button with download icon in the QueryHistoryPanel header that
triggers a direct browser download via <a href download>
* feat: student detail view with personalized recommendations (#77) (#79)
- Add GET /api/students/[guid] joining student_level_with_predictions +
llm_recommendations; returns 404 for unknown GUIDs
- Add /students/[guid] page with:
- Student header: GUID, cohort, enrollment, credential, at-risk + readiness badges
- FERPA disclaimer (de-identified GUID only, no PII stored)
- Six prediction score cards (retention, readiness, gateway math/English,
GPA risk, time-to-credential) color-coded green/yellow/red
- AI Readiness Assessment card: rationale, risk factors (orange dot list),
and recommended actions (checkbox-style checklist)
- Graceful fallback when no assessment has been generated yet
- Back button uses router.back() to preserve roster filter state
- Student roster rows are now fully clickable (onClick → router.push)
with the GUID cell retaining its Link for ctrl/cmd+click support
* feat: Supabase Auth + role-based access control (FR6, #75) (#80)
* feat: Supabase Auth + role-based access control (FR6, #75)
Auth layer
- Install @supabase/supabase-js + @supabase/ssr
- lib/supabase/client.ts — browser client (createBrowserClient)
- lib/supabase/server.ts — server client (createServerClient + cookies)
- lib/supabase/middleware-client.ts — session refresh helper for middleware
Roles
- lib/roles.ts — Role type, ROUTE_PERMISSIONS map, canAccess() helper,
ROLE_LABELS and ROLE_COLORS per role
- Five roles: admin | advisor | ir | faculty | leadership
/students/** → admin, advisor, ir
/query → admin, advisor, ir, faculty
/api/students/** → admin, advisor, ir
/api/query-history/export → admin, ir
/ and /methodology → all roles (public within auth)
Middleware
- middleware.ts — unauthenticated → redirect /login; role resolved from
user_roles table; canAccess() enforced; role + user-id + email forwarded
as request headers (x-user-role, x-user-id, x-user-email) for API routes
Login page
- app/login/page.tsx — email/password form using createBrowserClient
- app/auth/callback/route.ts — PKCE code exchange handler
Navigation
- components/nav-header.tsx — sticky top bar: role badge, email, sign-out
- app/layout.tsx — server component reads session + role, renders NavHeader
when authenticated
API guards
- /api/students: 403 for faculty + leadership
- /api/students/[guid]: 403 for faculty + leadership
- /api/query-history/export: 403 for non-admin/ir
Database & seed
- migrations/001_user_roles.sql — user_roles table + RLS policy
- scripts/seed-demo-users.ts — creates 5 demo users via service role key
(admin/advisor/ir/faculty/leadership @bscc.edu, pw: BishopState2025!)
* fix: seed script accepts NEXT_PUBLIC_ env var names; install tsx dev dep
* feat: add cohort and enrollment intensity filters to student roster (#81)
* fix: use correct DB enrollment intensity values (Full-Time/Part-Time with hyphens)
1 parent 47253f6 commit dfa9ef0
File tree
34 files changed
+5057
-117
lines changed- ai_model
- codebenders-dashboard
- app
- actions
- api
- dashboard
- kpis
- readiness
- retention-risk
- risk-alerts
- query-history/export
- students
- [guid]
- auth/callback
- login
- students
- [guid]
- components
- lib
- supabase
- docs
- demo
- screenshots
- plans
- migrations
- scripts
34 files changed
+5057
-117
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
177 | 187 | | |
178 | 188 | | |
179 | 189 | | |
| |||
646 | 656 | | |
647 | 657 | | |
648 | 658 | | |
| 659 | + | |
649 | 660 | | |
650 | 661 | | |
651 | 662 | | |
| |||
734 | 745 | | |
735 | 746 | | |
736 | 747 | | |
737 | | - | |
| 748 | + | |
738 | 749 | | |
739 | 750 | | |
740 | 751 | | |
| |||
845 | 856 | | |
846 | 857 | | |
847 | 858 | | |
848 | | - | |
| 859 | + | |
849 | 860 | | |
850 | 861 | | |
851 | 862 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
8 | 31 | | |
9 | 32 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
15 | 38 | | |
| 39 | + | |
16 | 40 | | |
17 | 41 | | |
18 | 42 | | |
19 | | - | |
| 43 | + | |
20 | 44 | | |
21 | 45 | | |
22 | 46 | | |
23 | 47 | | |
24 | 48 | | |
25 | 49 | | |
26 | 50 | | |
27 | | - | |
28 | | - | |
29 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
30 | 54 | | |
31 | | - | |
| 55 | + | |
32 | 56 | | |
33 | 57 | | |
34 | 58 | | |
35 | 59 | | |
36 | 60 | | |
37 | | - | |
| 61 | + | |
38 | 62 | | |
39 | 63 | | |
40 | 64 | | |
| |||
Lines changed: 77 additions & 53 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | | - | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | | - | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | | - | |
| 28 | + | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | | - | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
32 | 50 | | |
33 | 51 | | |
34 | 52 | | |
35 | 53 | | |
36 | 54 | | |
37 | 55 | | |
38 | 56 | | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
46 | 65 | | |
47 | 66 | | |
48 | 67 | | |
| |||
58 | 77 | | |
59 | 78 | | |
60 | 79 | | |
61 | | - | |
| 80 | + | |
62 | 81 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
67 | 87 | | |
68 | | - | |
| 88 | + | |
69 | 89 | | |
70 | | - | |
71 | | - | |
| 90 | + | |
| 91 | + | |
72 | 92 | | |
73 | | - | |
| 93 | + | |
74 | 94 | | |
75 | 95 | | |
76 | 96 | | |
| |||
81 | 101 | | |
82 | 102 | | |
83 | 103 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
88 | 108 | | |
89 | 109 | | |
90 | 110 | | |
91 | | - | |
| 111 | + | |
| 112 | + | |
92 | 113 | | |
93 | 114 | | |
94 | 115 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
99 | 120 | | |
100 | 121 | | |
101 | 122 | | |
| |||
120 | 141 | | |
121 | 142 | | |
122 | 143 | | |
| 144 | + | |
123 | 145 | | |
124 | 146 | | |
125 | 147 | | |
| |||
130 | 152 | | |
131 | 153 | | |
132 | 154 | | |
133 | | - | |
| 155 | + | |
134 | 156 | | |
135 | 157 | | |
136 | 158 | | |
137 | 159 | | |
138 | 160 | | |
139 | 161 | | |
140 | | - | |
141 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
142 | 165 | | |
143 | 166 | | |
144 | 167 | | |
| |||
172 | 195 | | |
173 | 196 | | |
174 | 197 | | |
175 | | - | |
| 198 | + | |
176 | 199 | | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
182 | 206 | | |
183 | | - | |
184 | | - | |
| 207 | + | |
| 208 | + | |
185 | 209 | | |
186 | 210 | | |
187 | 211 | | |
| |||
191 | 215 | | |
192 | 216 | | |
193 | 217 | | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
200 | 224 | | |
201 | | - | |
| 225 | + | |
202 | 226 | | |
203 | | - | |
| 227 | + | |
204 | 228 | | |
205 | 229 | | |
206 | 230 | | |
| |||
211 | 235 | | |
212 | 236 | | |
213 | 237 | | |
214 | | - | |
| 238 | + | |
215 | 239 | | |
216 | 240 | | |
217 | 241 | | |
| |||
0 commit comments