My website
1# cameron.stream
2
3Personal site for [cameron.stream](https://cameron.stream). Built with Hono + JSX, server-rendered, deployed to Fly.io. Blog content is stored as `site.standard.document` records on ATProtocol (PDS), not as local files.
4
5## Setup
6
7```bash
8pnpm install
9```
10
11Create a `.env` file in the project root:
12
13```
14ATP_IDENTIFIER=cameron.stream
15ATP_PASSWORD=<bluesky-app-password>
16```
17
18The following are set in `fly.toml` for production but can be overridden locally:
19
20| Variable | Default | Description |
21|----------|---------|-------------|
22| `CAMERON_DID` | `did:plc:gfrmhdmjvxn2sjedzboeudef` | Author DID |
23| `PUBLICATION_URI` | (see fly.toml) | AT-URI of the `site.standard.publication` record |
24| `PORT` | `3002` (dev) / `8080` (prod) | Server port |
25| `HOST` | `0.0.0.0` | Server bind address |
26| `SITE_URL` | `https://cameron.stream` | Canonical site URL (used for OG tags) |
27| `SEMBLE_HANDLE` | `cameron.stream` | Bluesky handle for Semble page |
28| `ENABLE_MARGIN` | unset | Set to `"true"` to enable margin notes |
29
30## Development
31
32```bash
33pnpm dev
34```
35
36Starts the dev server at `http://localhost:3002` with file watching.
37
38## Type checking
39
40```bash
41pnpm typecheck
42```
43
44## Publishing blog posts
45
46Blog posts are published as `site.standard.document` records to your PDS:
47
48```bash
49pnpm publish
50```
51
52This runs `scripts/publish.ts`, which reads markdown files and pushes them as AT Protocol records.
53
54## Deployment
55
56Deployed to Fly.io as `cameron-stream`:
57
58```bash
59fly deploy
60```
61
62Secrets (`ATP_IDENTIFIER`, `ATP_PASSWORD`) must be set via `fly secrets set`.
63
64## Stack
65
66- **Hono** -- HTTP framework with JSX support
67- **tsx** -- TypeScript execution (no build step)
68- **marked** + **shiki** -- Markdown rendering with syntax highlighting
69- **@atproto/api** -- ATProtocol client for PDS reads/writes
70- **ioredis** -- Optional caching layer
71
72## Project structure
73
74```
75src/
76 index.tsx -- Routes and page shell
77 data.ts -- Data fetching (PDS, Bluesky API)
78 markdown.ts -- Markdown rendering pipeline
79 cache.ts -- Redis/memory cache
80 components/ -- Page components (JSX)
81public/
82 site.css -- Main stylesheet
83 host-primitives.css
84 host-theme.css
85 theme.js -- Dark/light mode toggle
86```