Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Ali Tleis's portfolio. A Next.js site statically exported to GitHub Pages, with
- `/` is a chooser between the two views below.
- `/galaxy/` is the reading view, one scrolling page with Intro, Projects, Timeline, Stack, Off-clock, Resume and Contact. Its command palette searches the site and holds the Ask panel.
- `/studio/` lays the same content out as a video editing suite, with a timeline to scrub and a reel to play.
- `/controlpanel/` is the owner's log of visits and Ask questions. It shows only a lock screen until you sign in, and it asks search engines not to index it.
- `/mediapool/` is the owner's way into Media Pool, his own app, where the log of visits and Ask questions is read. It sends a browser that can reach the app on to it, shows anyone else a lock, and asks search engines not to index it.

## Stack

Expand Down Expand Up @@ -47,17 +47,17 @@ src/app/
page.tsx # the chooser at /
galaxy/ # the reading view
studio/ # the editing suite view
controlpanel/ # the visit and Ask log
mediapool/ # the lock in front of Media Pool
ask-context.txt/ # plain-text profile the Ask backend reads
opengraph-image.png # 1200x630 share card (+ .alt.txt for alt text)
sitemap.ts / robots.ts # generated as static files on export
globals.css # design tokens, keyframes, studio and panel styles
globals.css # design tokens, keyframes, studio and door styles
components/
SiteShell.tsx # nav, footer and command palette for the reading view
sections/ # the reading view's sections
projectCovers/ # hand-built SVG covers per project
lib/ # shared hooks and helpers
ask/ # Vercel functions for Ask, visits and the control panel
ask/ # Vercel functions for Ask and visits
scripts/ # image, search index, resume preview and TikTok helpers
public/
resume/resume.pdf # linked from the navbar and Resume section
Expand Down
38 changes: 15 additions & 23 deletions ask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,21 @@ shows up by name, a home connection as its ISP, from api.ipapi.is), the city
from Vercel's headers, the device, and an id that ties one browser's views
together.

## The control panel

The log is read at `https://alitleis.dev/controlpanel`, which unlocks with a
passkey: Face ID on the iPhone, Touch ID on a Mac, Windows Hello on a PC. The
page holds no data. `api/panel.js` sends the log only to a session that
`api/auth.js` started from a stored passkey. `lib/owner.js` explains how the
parts fit together.

- The first device sets up with the `ADMIN_PASSWORD` production variable,
and only while no passkey is stored. After that the password opens nothing.
- A Mac on the same Apple ID gets the iPhone's passkey through iCloud
Keychain. Any other device pairs with a one-time code from Devices on a
signed-in one.
- Lost every device: delete the `passkeys` hash in the Upstash console, and
setup opens to the password again.
- Named links come from Links in the panel. Whoever opens one is called by
that name, on that visit and every later one from the same browser.
- Signing in stops counting that browser's visits. `?notrack` does the same
on a browser that never signs in, and `?notrack=off` undoes it.
- Local and preview runs log to `dev:` keys, apart from production, and need
`PANEL_ORIGIN` set to the page's origin, like `http://localhost:3000`.

The tests run offline against a fake Upstash and real P-256 and Ed25519 keys:
## Reading the log

The Site screen in Media Pool, Ali's own app on his tailnet, reads the log
straight from Upstash and keeps its notes there too: the `labels` hash of
names for visitors and the `links` hash of named links. Nothing on this site
reads them. `https://alitleis.dev/mediapool` is the way in. It sends a
browser that can reach Media Pool on to it and shows anyone else a lock.

- Whoever opens a named link is called by that link's name, on that visit
and every later one from the same browser.
- A browser the /mediapool page sends on stops counting. `?notrack` does the
same anywhere, and `?notrack=off` undoes it.
- Local and preview runs log to `dev:` keys, apart from production.

The tests run offline against a fake Upstash:

```bash
node --test ask/test/*.test.js
Expand Down
2 changes: 1 addition & 1 deletion ask/api/ask.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* dead backend costs answer quality rather than the whole feature.
*
* Every question that reaches a model is logged with its outcome for
* the control panel, through lib/track.js.
* Media Pool's Site screen, through lib/track.js.
*/

import { ASKS, later, record, visitor } from "../lib/track.js";
Expand Down
91 changes: 0 additions & 91 deletions ask/api/auth.js

This file was deleted.

123 changes: 0 additions & 123 deletions ask/api/panel.js

This file was deleted.

Loading
Loading