Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
63efbd4
Add google anlytics support to legacy frontend
knazir Oct 30, 2025
95773c1
docs(v2): promote phased plan to docs/v2/plan.md
knazir Apr 22, 2026
78acedf
P0: foundation & conventions
knazir Apr 23, 2026
b285b91
docs(v2): skip P1 spikes (ADR-0002); phasing becomes P0 -> P2 -> P3 ...
knazir Apr 23, 2026
7d10330
docs(v2): replace phased plan with README + backlog; ADR-0003 scope cut
knazir Apr 23, 2026
a21251f
scaffold frontend: Vite + React 18 + TS + Tailwind v4 + Zustand
knazir Apr 23, 2026
a61ecae
theme: port design tokens from mock; self-host Geist + JetBrains Mono
knazir Apr 23, 2026
6cf9778
shell + editor + run: layout, CodeMirror, POST /api/run wired end-to-end
knazir Apr 23, 2026
497b035
chore: gitignore playwright MCP session artifacts
knazir Apr 23, 2026
9aa5b33
docs: ADR-0004 — editor is CM6 now; revisit at multi-file
knazir Apr 23, 2026
0842eef
stack frames: typed trace schema + step navigation + active-frame view
knazir Apr 23, 2026
77b4382
heap graph: cards + SVG edge overlay for stack-to-heap and heap-to-he…
knazir Apr 23, 2026
8a4a7d6
fix(editor): CodeMirror fills the pane vertically when program is short
knazir Apr 23, 2026
dca170f
fix(layout): responsive stacking + smaller console + real editor scroll
knazir Apr 23, 2026
cdfec2d
chore: broaden gitignore to any root-level .png / .jpg / .jpeg
knazir Apr 23, 2026
5ca19e3
flip: heap-node relayout animation + edges follow mid-animation
knazir Apr 23, 2026
1603bc7
exec bar: play/pause, scrubbar, step buttons, keyboard shortcuts
knazir Apr 23, 2026
36d1d0e
recognition: singly-linked list detector + raw/recognized toggle
knazir Apr 23, 2026
912a3f8
stale: subtle non-blocking indicator; viz stays interactive while edi…
knazir Apr 23, 2026
f7e782e
chrome: collapsible console + tutor breadcrumb + Examples/Sign-in modals
knazir Apr 23, 2026
5994f6b
visual parity: targeted mock-alignment pass
knazir Apr 23, 2026
ac7cd23
mock parity: comprehensive gap-analysis pass against design screenshots
knazir Apr 23, 2026
fb58636
light theme: first-class, design-token-driven, system-aware, FOUC-free
knazir Apr 23, 2026
6dfcd9f
fix(editor): remove CodeMirror dark-theme prop that hardcoded gutter bg
knazir Apr 23, 2026
8f648eb
frontend: full docker-compose integration
knazir Apr 23, 2026
7caeb6b
compose: restore frontend-legacy; drop spp-main prefix on main clone
knazir Apr 23, 2026
02beb2d
fix(parity): example programs need stdlib priming for SPP-Valgrind
knazir Apr 23, 2026
4bac0cf
editor + heap: exit anim, trace-line highlight, gutter-click jump
knazir Apr 23, 2026
45de050
backend: synthesize main() frame when Valgrind's stack walker hasn't …
knazir Apr 23, 2026
6925071
frontend: small UX wins — favicon, '?' placeholder, jump-to-end, step…
knazir Apr 23, 2026
1c9ed1f
viz: louder stale banner with inline re-run action
knazir Apr 23, 2026
05f1361
viz: orphan heap, ref edge dashing, settings popover, bidirectional h…
knazir Apr 23, 2026
8248ce7
workspaces: backend persistence (pg + RDS addon + POST/GET)
knazir Apr 23, 2026
60654b3
workspaces: frontend Share button + /w/:slug load
knazir Apr 23, 2026
e5b3712
frontend: production Dockerfile with nginx SPA fallback
knazir Apr 23, 2026
369e69d
fix(copilot): rename addon output to camelCase (CFN rejects underscores)
knazir Apr 23, 2026
c9f7028
fix(copilot): strip apostrophe from SG rule description (EC2 rejects)
knazir Apr 23, 2026
518aa58
fix(copilot): pin Postgres engine to 16.13 (16.4 not available in us-…
knazir Apr 23, 2026
9ea79a1
fix(copilot): inject DB credentials via secrets block, not addon-outp…
knazir Apr 23, 2026
82839ab
fix(backend): read Copilot-injected WORKSPACES_DB_SECRET env var
knazir Apr 23, 2026
9e20820
fix(frontend): nginx proxy /api to backend via Copilot Service Connect
knazir Apr 23, 2026
9ddf235
fix(frontend): drop nginx DNS resolver so Service Connect /etc/hosts …
knazir Apr 23, 2026
b861fd2
docs(adr-0005): capture deployed-env learnings (Copilot secret wiring…
knazir Apr 23, 2026
6c9399c
viz polish: dampen FLIP twitch, normalize nullptr/uninit, pointer cur…
knazir Apr 23, 2026
c3acde6
docs: Google OAuth setup runbook
knazir Apr 23, 2026
120a4ff
auth: provider-agnostic OAuth scaffolding + users/sessions/my-workspaces
knazir Apr 23, 2026
ed8a340
gitignore: ignore Claude Code scheduled-task state files (committed b…
knazir Apr 23, 2026
0c943f3
auth: wire Google Client ID for test env + fix runbook secret syntax
knazir Apr 23, 2026
a8a0ba0
fix(nginx): preserve X-Forwarded-Proto from the ALB
knazir Apr 23, 2026
8169850
workspaces: Save/Share rewrite, rename+delete, named workspaces, stac…
knazir Apr 23, 2026
2260878
auth: DevAuthProvider for one-click local sign-in
knazir Apr 23, 2026
d772446
dx: unify .env.local into .env; harden worktree-ports.sh against over…
knazir Apr 23, 2026
691b960
feature flags + admin role + /admin panel
knazir Apr 24, 2026
9b95d55
flags: gate tutor UI + centralize flag names via FLAGS const
knazir Apr 24, 2026
69c69f4
viz + editor polish: uninit pointers, stationary-card jitter, 4-space…
knazir Apr 24, 2026
54b851b
fix(flip): settleAnimations only cancels FLIP translate, not enter/exit
knazir Apr 24, 2026
9f63033
heap: simplify — keep enter + FLIP, drop exit animation
knazir Apr 24, 2026
bd6277c
docs: session checkpoint (2026-04-24)
knazir Apr 24, 2026
b9aee79
cutover: prod domain swap — new frontend → seepluspl.us, legacy → old…
knazir Apr 24, 2026
2b519b7
frontend v2: heap viz overhaul, stack fixes, build-error UX, off-by-o…
knazir Apr 24, 2026
08f046a
settings: theme + heap density in popover, drop v2 badge, cross-platf…
knazir Apr 24, 2026
a83df49
layout + editor polish: resizable panes, Mod-Enter intercept, gutter …
knazir Apr 24, 2026
e1dfc51
public-repo prep: audit followups, doc overhaul, cleanup
knazir Apr 24, 2026
1ec63c8
relicense: MIT for the See++ app, GPL for the Valgrind submodule
knazir Apr 25, 2026
c118994
license: use the canonical OSI MIT text verbatim
knazir Apr 25, 2026
a14052b
topbar: GitHub link + drop pointer cursor on the brand
knazir Apr 25, 2026
2ae9f93
topbar: drop pointer cursor on the GitHub icon too
knazir Apr 25, 2026
88aa8a8
docs(CLAUDE.md): trim tangents and findings; keep navigational
knazir Apr 25, 2026
4d20973
fix(parser): rename frame_id to frameId in pass-5 stack-reentry guard
knazir Apr 25, 2026
7a67f0a
backend: harden auth + runner + add helmet/rate-limit
knazir Apr 25, 2026
0c17f8e
frontend(state): fix run race, clamp schema lines, drop dead branch
knazir Apr 25, 2026
17e51ea
frontend(viz): EdgeLayer hover loop + HeapGraph cross-run FLIP reset
knazir Apr 25, 2026
6d217a5
frontend(ui): admin 403 + writeStatus split + modal a11y pass
knazir Apr 25, 2026
07bb9a8
infra+docs: nginx security headers; correct docs/README quickstart
knazir Apr 25, 2026
76242f1
editor: blur the editor when a run starts
knazir Apr 25, 2026
22c503d
viz(edges): always exit chip.right and enter target.left
knazir Apr 25, 2026
163b2bf
chore: add CODEOWNERS
knazir Apr 25, 2026
c3da4ee
viz(edges): pick target side by geometry, not always left
knazir Apr 25, 2026
fa65b9d
viz(edges): pure routing module with side selection + port distribution
knazir Apr 25, 2026
19a9464
viz(edges): vertical entries + obstacle-aware side selection
knazir Apr 25, 2026
cfa6c8c
viz(layout): pluggable layout engine + ELK behind layout-engine-elk flag
knazir Apr 25, 2026
5ba9b34
chore: comment audit — drop bug-history and over-explanatory blocks
knazir Apr 25, 2026
eedfc7c
viz(layout): drop dagre and the engine-selector seam
knazir Apr 25, 2026
1ff6e96
frontend: wire Google Analytics (gtag) into the v2 build
knazir Apr 25, 2026
52ed9b3
frontend: cutover banner with dismiss + flag gate
knazir Apr 25, 2026
7af3c3c
frontend: wire 5 GA events for run / share / examples
knazir Apr 25, 2026
7b6e067
Remove one-line conditionals and loops from examples
knazir Apr 25, 2026
ba6afed
Update README.md demo screenshot to new visual
knazir Apr 25, 2026
dfa92cb
Minor CLAUDE.md tweaks
knazir Apr 25, 2026
b40a656
ci+frontend: bump GH actions; split mixed-export files for fast refresh
knazir Apr 25, 2026
e86312e
docs: add frontend/ and frontend-legacy/ CLAUDE.md
knazir Apr 25, 2026
8b3d990
review: address Copilot inline comments on PR #93
knazir Apr 25, 2026
7f64a3f
ci: drop v2 from push triggers (master-only after cutover)
knazir Apr 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
128 changes: 104 additions & 24 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,32 +1,112 @@
# A template for the environment variables used in local development.
# Create a copy of this file as ".env".
# Fill out your environment variables here.
# NEVER submit your .env file with secure access keys to Git, GitHub, etc.

# ------------------------------------------------------------------------------
# General Development Configuration
# - NODE_ENV: Set the Node environment ("development" or "production")
# ------------------------------------------------------------------------------
# Template for local development. Copy this file to `.env` and fill in your
# values. `.env` is gitignored — never commit real secrets.
#
# cp .env.example .env
#
# `.env` is read by docker-compose.yml (directly) and by localdev.sh (which
# passes --env-file .env to Compose).

# ==============================================================================
# Core
# ==============================================================================

# "development" or "production". Keep it "development" for local use —
# the DevAuthProvider and other developer affordances key on this value.
NODE_ENV=development

# ------------------------------------------------------------------------------
# Backend Configuration
# - EXEC_MODE: What mode to run the backend in ("local" or "lambda")
# - PORT: The port to expose the backend on
# - USER_CODE_FILE_PREFIX: A prefix to use for all user code files
# ------------------------------------------------------------------------------

# ==============================================================================
# Backend + code-runner
# ==============================================================================

# "local" runs user code in a Docker container spawned by the backend.
# "lambda" invokes a deployed Lambda function. Local mode needs Docker
# running; Lambda mode needs AWS_* credentials below + LAMBDA_FUNCTION_NAME.
EXEC_MODE=local

# Backend HTTP port inside its container. Host-side port is mapped 1:1 by
# docker-compose unless you override.
PORT=3000

# Filename prefix for the user's .cpp under /tmp.
USER_CODE_FILE_PREFIX=main

# ------------------------------------------------------------------------------
# AWS Configuration (Optional - only needed for Lambda mode)
# - AWS_REGION: The region your AWS cluster and services are located in
# - AWS_ACCESS_KEY_ID: Your account's AWS access key (only used outside deployed apps)
# - AWS_SECRET_ACCESS_KEY: Your account's AWS secret access key (only used outside deployed apps)
# - LAMBDA_FUNCTION_NAME: The name of your Lambda function for code execution
# ------------------------------------------------------------------------------

# ==============================================================================
# Database (Postgres — docker-compose spins it up as a sibling service)
# ==============================================================================

# The backend reads DATABASE_URL directly; docker-compose.yml builds it
# from the postgres service name + credentials. Override here only if you
# point local at an external DB.
# DATABASE_URL=postgres://spp:spp@postgres:5432/seepp_main


# ==============================================================================
# Auth — Google OAuth
# ==============================================================================
#
# Create an OAuth 2.0 Web Application client in Google Cloud Console (see
# docs/oauth-setup.md for the step-by-step). Register these redirect URIs:
#
# http://localhost:4000/api/auth/google/callback (local)
# https://frontend.test.spp.seepluspl.us/api/auth/google/callback (test)
# https://seepluspl.us/api/auth/google/callback (prod)
#
# The Client ID is public and safe to share. The Client Secret is NOT —
# if it leaks, reset it in the Google Cloud Console and update here + SSM.

GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# Where OAuth callback URLs are rooted. Override if you run the frontend
# on a non-default host/port (Google must have the resulting URI registered).
OAUTH_CALLBACK_BASE_URL=http://localhost:4000


# ==============================================================================
# Auth — sessions
# ==============================================================================

# Signs session cookies. Generate with:
# openssl rand -hex 32
# Rotating this invalidates every active session (local logs you out).
SESSION_SECRET=


# ==============================================================================
# Auth — dev-only one-click sign-in (optional)
# ==============================================================================
#
# Registers a `dev` auth provider that signs you in as dev@localhost in one
# click — no Google round-trip. Triple-gated server-side (NODE_ENV + this
# flag + absence of AWS_EXECUTION_ENV) so it cannot register in a deployed
# environment. See docs/oauth-setup.md § "Optional: one-click local
# sign-in" for safety details.

DEV_AUTH_ENABLED=


# ==============================================================================
# Admin
# ==============================================================================
#
# Users in ADMIN_EMAILS get users.is_admin = true on sign-in / upsert. Comma
# or semicolon separated; case-insensitive. Leave blank if you don't need
# anyone promoted via env (use the DevAuthProvider path locally instead).
ADMIN_EMAILS=

# When DEV_AUTH_ENABLED is on, the Dev User is auto-promoted to admin so
# you can exercise /admin without jumping through ADMIN_EMAILS. Set to
# "false" to test the non-admin code path locally. Defaults to true.
DEV_AUTH_IS_ADMIN=true


# ==============================================================================
# AWS — only needed for EXEC_MODE=lambda or SDK calls outside Fargate
# ==============================================================================

AWS_REGION=us-west-2
AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
LAMBDA_FUNCTION_NAME=spp-trace-executor-dev
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# GitHub auto-requests review from these owners on every PR.
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Default owner for everything in the repo.
* @knazir
62 changes: 62 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CI

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches: [master]

jobs:
backend:
name: Backend (build + test)
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v5

- uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: backend/package-lock.json

- name: Install
run: npm ci

- name: Test
run: npm test

- name: Build (tsc)
run: npm run build

frontend:
name: Frontend (lint + typecheck + test + build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v5

- uses: actions/setup-node@v5
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install
run: npm ci

- name: Lint
run: npm run lint

- name: Typecheck
run: npm run typecheck

- name: Test
run: npm run test

- name: Build
run: npm run build
31 changes: 27 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
# IDE
.idea/

# Claude Code
.claude/
CLAUDE.md
# Claude Code — track shared config, ignore per-user
.claude/settings.local.json
.claude/.credentials.json
.claude/commands/
.claude/scheduled_tasks.lock
.claude/scheduled_tasks.log

# Temporary Files
tmp/
Expand All @@ -17,4 +20,24 @@ tmp/

# AWS Copilot
copilot/.workspace
copilot/environments/*/secrets
copilot/environments/*/secrets

# Monorepo tooling artifacts
node_modules/
**/node_modules/
**/dist/
**/.turbo/
**/coverage/
.pnpm-store/
*.tsbuildinfo

# Playwright
**/test-results/
**/playwright-report/
**/playwright/.cache/
.playwright-mcp/

# Ad-hoc screenshots from Playwright MCP verification runs (root only)
/*.png
/*.jpeg
/*.jpg
47 changes: 47 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# See++ Agent Context

Context notes for AI coding assistants (Claude Code, Cursor, etc.). A
human reader can safely ignore this file.

## Layout

- `backend/` — Node/Express API. Parses Valgrind output into the trace JSON
the frontend consumes. Main endpoint is `POST /api/run`.
- `code-runner/` — sandboxed C++ execution.
- `local/` — Docker container (spawned by backend when `EXEC_MODE=local`).
- `lambda/` — AWS Lambda (`EXEC_MODE=lambda`).
- `SPP-Valgrind/` — git submodule, the modified Valgrind that emits
traces.
- `frontend/` — React + Vite + Tailwind + Zustand. CM6 editor + the
visualization pane.
- `frontend-legacy/` — original 2018 frontend. Reference only; do not
modify unless explicitly asked.
- `copilot/` — AWS Copilot manifests for deployed environments.
- `docs/` — architecture, deployment, guides, etc.
- `localdev.sh` — thin `docker compose` wrapper.

## Trace contract

`backend/src/parse_vg_trace.ts` translates Valgrind stdout into the
`ProgramTrace` JSON the frontend consumes. The frontend revalidates with a
Zod schema at `frontend/src/trace/schema.ts` — drift surfaces at the
boundary, not deep in the render tree. The two sides are deliberately
decoupled (no shared package).

## Running locally

```
./localdev.sh up
```

Starts backend, Postgres, frontend, and the code-runner image. Config
loaded from `.env` (copy from `.env.example`). Defaults to
`3000 / 4000 / 5432` when `.env` is absent.

## Conventions

- No trailing whitespace; no leading whitespace on blank lines.
- Tests live next to the code (`foo.ts` + `foo.test.ts`). Run with
`npx vitest run` in `frontend/` or `npm test` in `backend/`.
- Keep per-directory tooling self-contained — no root `package.json`.
- Don't commit unless asked.
Loading