Skip to content

Commit 1fc88dd

Browse files
committed
Various updates
1 parent c7d4fb3 commit 1fc88dd

4 files changed

Lines changed: 159 additions & 13 deletions

File tree

CLAUDE.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
As a side-effect, it can be useful documentation for a human to understand the codebase! Though it's optimized to be read by Claude Code, so it intentionally has human-readability issues.
6+
7+
8+
## Project Overview
9+
10+
This is the main personal website of someone who goes by *simshadows* on the internet, hosted on <https://www.simshadows.com/>. Its purpose is quite broad, but sim loves sharing any and all ideas and knowledge with the world. They are an obsessive notetaker and writer, and if they put in the work to create something, they may as well put in a bit of extra work to put it on the internet. The website can be described as a "monorepo of sim's knowledge and online identity" containing blog posts, curated content, cheatsheets, notes, and various personal pages.
11+
12+
The website is fully static, built using the Astro framework.
13+
14+
15+
## Software Development Philosophy
16+
17+
This is intended to be a life-long personal project. All solutions must be easy to maintain, modify, and inevitably migrate to new frameworks/tools/techniques, or have a good reason for the design. With all proposed solutions and generated code, please include a discussion of these maintainability/flexibility tradeoffs, and if possible, provide alternative ideas and their tradeoffs.
18+
19+
We tend prefer minimizing dependencies. If you must import a new package, please justify it.
20+
21+
We want as much fail-fast as is reasonable on build-time to ensure the code works like we expect, and data is correct. Compiler warnings are set as aggressive as possible, and the code is littered with code made to throw an error and prevent a successful build if the smallest thing is wrong.
22+
23+
## Development Commands
24+
25+
### Core Development Workflow
26+
27+
- **Install dependencies**: `yarn install`
28+
- **Start dev server**: `yarn start` (runs on port 8000)
29+
- **Build for production**: `yarn build` (runs type checking, Astro check, then builds)
30+
31+
### Testing and Validation
32+
33+
- **Run tests**: `yarn test` (runs Jest test suite)
34+
- **Type checking**: `yarn typecheck` (runs Astro check and TypeScript compiler)
35+
36+
### LaTeX Compilation
37+
38+
LaTeX is used only for rendering diagrams into SVGs. LaTeX compilation is done using makefiles that are placed near the LaTeX source files. The SVG artifacts are committed in the repo, so LaTeX compilation is only done on an as-needed basis. SVG artifacts are stored close to where they are used. It's a bit of a mess so you may need to dig around yourself and figure out which `*.svg` files go with what `*.tex` files (hint: look at the makefiles).
39+
40+
I'm avoiding adding new LaTeX diagrams since the way I'm doing it is such a pain to use and maintain.
41+
42+
43+
## Directory Structure
44+
45+
- `content/`: All content collections (leveraging Astro content collections).
46+
- `public/`: Files that are copied directly to the web server unmodified.
47+
- `src/components/`: Reusable Preact/Astro components.
48+
- `src/generic-images/`: Reusable images.
49+
- `src/helpers/`: Reusable helper code. Notable files:
50+
- `./failfast-validation.ts`: Functions that handle type-narrowing and aggressively throw exceptions if something is wrong.
51+
- `./frontmatter.ts`: Convenient extraction and validation of common Markdown/MDX and Astro page frontmatter.
52+
- `./timezoneless-date.ts`: Custom timezoneless date class.
53+
- `./types.ts`: Typescript type helpers.
54+
- `./utils.ts`: General/uncategorized helper code.
55+
- `src/latex-helpers/`: Reusable LaTeX helper code. Notable files:
56+
- `./rehype-plugin/`: A Rehype plugin for rendering LaTeX from code blocks using special code block "languages":
57+
- `latex-eq`: Standard equation rendering
58+
- `latex-eq-fleqn`: Left-aligned equation rendering
59+
- `latex-gather`: Gather environment
60+
- `latex-align`: Align environment
61+
- `./general.tex`: LaTeX common code imported by actual `.tex` files to build SVGs. It's not used directly by the static web app itself.
62+
- `./katex-config*.ts`: KaTeX config, including many LaTeX macros.
63+
- `src/layouts/`: Astro layouts.
64+
- `src/pages/`: The pages in the website. Notable sections/pages/files:
65+
- `./blog/`: Blog posts (using Astro content collections).
66+
- `./[...slug].astro`: Each blog post (from the Astro content collection) has a full dedicated route (page) here.
67+
- `./c/`: Computing/Programming. Has many technical cheatsheets and notes.
68+
- `./curation/`: A feed of curated internet content (using Astro content collections). Mostly YouTube videos.
69+
- Individual posts don't have their own routes, but rather they are rendered out in the paginated feed.
70+
- `./index.astro`: The first page of the feed.
71+
- `./[page].astro`: The subsequent pages of the feed. They're all just numbered pages.
72+
- `./food/`: Food. Has a food diary, recommendations, and a wishlist.
73+
- `./g/`: Gaming.
74+
- `./h/`: Miscellaneous hobbies that don't have their own dedicated section on my website.
75+
- `./list-of-awesome/`: My list of favourite YouTube channels, websites, etc.
76+
- `./personal-finance/`: Personal finance.
77+
- `./photography/`: Photography.
78+
- `./s/`: Math and science. Notably includes some migrated math cheatsheets.
79+
- `./tech/`: Consumer technology.
80+
- `./_index-links.astro`: The main site index (tree of links to pages throughout my website).
81+
- `./index.astro`: The front page! It's just shows the main site index.
82+
- `./experimental-glob.astro`: A WIP experimental page for developing a way to automate the site index so I don't have to maintain it by hand.
83+
- `constants.ts`: All global constants.
84+
- `content.config.ts`: Configures Astro content collections.
85+
- `danger*.ts`: All functions that bypass Typescript's type-checking is centralized into this file. In most cases, it's necessary due to limitations with Typescript itself (e.g. type-narrowing unknowns into Arrays), or limitations with the tooling (e.g. Vite's `import.meta.glob` returning unknown types). I hate needing to bypass the type system, and this practice ensures that it is kept to a minimum, and it is easy to find and refactor the dangerous code.
86+
- `tech-debt.ts`: All significant tech debt is put here to make it easy to find and refactor.
87+
- `astro.config.mjs`: Astro config.
88+
- `jest.config.js`: Jest config.
89+
- `tsconfig.json`: Typescript config.
90+
91+
92+
## Code Architecture Essentials
93+
94+
### Content
95+
96+
Most of the content is `src/pages/`. The files there are a mix of webpage content/text and code to get things working, so the files can get quite huge if there's a lot of stuff on a page.
97+
98+
The other location for content is `content/`.
99+
100+
### Content Collections
101+
102+
As defined in `src/content.config.ts`, there are two Astro content collections:
103+
- `blog`: Blog posts loaded from `./content/blog/`
104+
- `curation`: Curated content loaded from `./content/curation/`
105+
106+
`src/pages/` must never use the content collections directly. The respective helper files in `src/helpers/collections/` must be used. These helpers pre-process the collections, reducing duplicate code and helps ensure that `src/pages/` is mostly concerned with the rendering of the content rather than trying to read and validate it.
107+
108+
### CSS
109+
110+
- Global styles in `src/global.css`
111+
- Normalize.css is used for CSS reset
112+
- Component-specific CSS files are co-located with components
113+

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ $ yarn build
2727

2828
## Other development tools
2929

30+
### Claude Code
31+
32+
A `CLAUDE.md` file is included.
33+
34+
### LaTeX
35+
3036
To compile the LaTeX documents, you will need:
3137

3238
- a `make` utility (such as *GNU make*),

src/pages/food/diary.mdx

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,18 @@ I sometimes try to put in diacritics/accents or native language characters, but
5959
- <It c="mains" d="2024-10-18" n="Emerald Duck"/>
6060
- <It c="entree" d="2024-10-18" n="Neua Yaang" help="Grilled Beef"/>
6161
- <It c="entree" d="2024-10-18" n="Tub Gai Yaang" help="Chicken Liver Skewers"/>
62+
- <Ve n="Bosphorus" c="Turkish" l="Wentworth Point"/>
63+
- Breakfast sets (they each include several individual menu items):
64+
- <It d="2025-10-25" n="Bosphorus Breakfast" cost="AUD 75.00"/>
65+
- *"Scrambled eggs with sujuk, menemen, cheese, mushrooms, olives, borek, salami, pastirma, smashed avocado, fresh tomatoes and cucumbers, honey with butter, jam, season fruits, home-baked bread, small teapot Turkish tea"*
66+
- Individual items (standard menu):
67+
- <It d="2025-10-25" n="Beef Gozleme" cost="AUD 18.00"/>
68+
- *"Beef, Spinach & Cheese"*
69+
- Individual items (breakfast menu on Saturdays from 10am to 2pm. Up-to-date info is on [their instagram](https://www.instagram.com/bosphorusturkishstreetfood/)):
70+
- <It c="food" d="2025-10-25" n="Menemen" cost="AUD 20.00, but I got it as part of a breakfast set"/>
71+
- *"Smashed tomatoes cooked with green pepper and eggs"*
72+
- <It c="drinks" d="2025-10-25" n="Turkish Coffee" cost="AUD 6.00"/>
73+
- <It c="drinks" d="2025-10-25" n="Turkish Tea" cost="AUD 10.00, but I got it as part of a breakfast set"/>
6274
- **Brewtopia Plus** (Café) - CBD
6375
- <It c="coffee" d="2025-03-02" n="Spanish Latte"/>
6476
- **Burger Doctor** (Burgers) - Blacktown
@@ -98,6 +110,11 @@ I sometimes try to put in diacritics/accents or native language characters, but
98110
- <It d="2022-07-16" n="Salmon Chili Basil Sauce" isDelivery cost="AUD 21.50"/>
99111
- <It d="2022-07-02" n="Satay Sauce Stir Fry, Beef" isDelivery cost="AUD 16.00"/>
100112
- <It d="2021-10-01" n="Thai Green Curry, Chicken" isDelivery cost="AUD 15.50"/>
113+
- <Ve n="Chuck Trailers" c="American; Dive Bar" l="Bondi Beach"/>
114+
- <It c="burger" d="2025-10-25" n="The One Hand Job" cost="AUD 21.00, comes with fries"/>
115+
- *"Smash brisket patty, red onion, jalapenos, high melt burger cheese, lettuce, pickles, chuck-chup & goan then sauce"*
116+
- <It c="sides" d="2025-10-25" n="Animal Fries"/>
117+
- *"Mix of fries and sweet potato fries loaded with baconnaise, chuck-chup, crack crunch & bacon bits"*
101118
- **Chungking** (Chinese, Malatang) - CBD, Haymarket
102119
- *(The food is make-your-own, so I'll just list the bases I've had.)*
103120
- 2024-05-10 - Chef's Chilli Base
@@ -359,6 +376,9 @@ I sometimes try to put in diacritics/accents or native language characters, but
359376
- <It c="mains" d="2021-04-08" n="MK II Ramen"/>
360377
- <It c="entree" d="2025-10-02" n="Ika skewer (squid skewer)" cost="AUD 11.00 for two pieces"/>
361378
- <It c="entree" d="2025-10-02" n="Kara-age chicken marinated Japanese chicken" cost="AUD 14.00 for six pieces"/>
379+
- <Ve n="Mapo" c="Gelato" l="Bondi Beach"/>
380+
- <It d="2025-10-25" n="Fiordilatte Gelato"/>
381+
- *"AKA CREAMY JERSEY MILK w\\ JERSEY CREAM and MILK by A2 and SOUTH COAST MILK (AUS)"*
362382
- <Ve n="Mappen" c="Japanese; Udon" l="CBD, George St."/>
363383
- <It d="2024-02-10" n="Ontama Wagyu Beef Bowl"/>
364384
- <It c="ramen" d="2025-07-13" n="Ramen Supernormal"/>
@@ -539,11 +559,11 @@ I sometimes try to put in diacritics/accents or native language characters, but
539559
- <It c="sides" d="2025-07-06" n="Fried Cheese Curds" cost="AUD 10.00"/>
540560
- <It c="sides" d="2025-06-29" n="Mash & Gravy"/>
541561
- *When I went on 2025-06-29, there were four spice levels. In order from mildest to spiciest: "Southern Fried", "Nash", "Hot", and "Reaper".*
542-
- **Surly's American Tavern** (American) - Surry Hills
543-
- 2025-06-14 - BBQ Platter
562+
- <Ve n="Surly's American Tavern" c="American; Dive Bar" l="Surry Hills"/>
563+
- <It d="2025-06-14" n="BBQ Platter"/>
544564
- *"serves 1 person"*
545565
- *"18 hour dry rubbed beef brisket, 12 hour pulled pork, chicken thigh, texas hotlink sausage, chicken wings, fries, slaw, pickles, onion and cornbread"*
546-
- 2025-06-14 - Poutine
566+
- <It d="2025-06-14" n="Poutine"/>
547567
- *"gravy, cheese curds"*
548568
- **Sushi Lover** (Japanese) - Parramatta
549569
- 2024-12-26 - Chicken Katsu Donburi
@@ -968,7 +988,7 @@ I sometimes try to put in diacritics/accents or native language characters, but
968988
- <It c="baked" d="2024-03-21" n="Turkish Rolls Plain"/>
969989
- <It c="baked" d="2023-08-28" n="White Choc & Cranberry Cookie"/>
970990
- <It c="cake" d="unknown" n="Orange & Poppy Seed Cake"/>
971-
- **Yappari Steak** (Japanese, Steaks) \{Sydney, CBD, Town Hall\}
991+
- <Ve n="Yappari Steak" c="Japanese; Steaks" l="CBD, Sydney"/>
972992
- **[steak]** 2025-03-20 - Mix Cut Steak
973993
- *Bite-sized pieces of three different cuts of beef, making it easy and convenient to enjoy.*
974994
- **[steak]** 2025-03-20 - Yappari Steak (Oyster Blade)
@@ -979,13 +999,22 @@ I sometimes try to put in diacritics/accents or native language characters, but
979999
- *After you order, I recommend immediately getting your sauce ready, and grab plates for each person at the table if you need them. You'll want to waste as little time as possible when the steaks arrive on the lava plate. You'll need to cut and finish the steak off yourself to the desired doneness.*
9801000
- *For my first time, I was recommended to go for the Yappari Steak. I was also recommended to try mixing their teriyaki sauce, garlic, and mayo together at the self-serve condiments station.*
9811001
- *They provide bibs for a reason. The meat juices go everywhere!*
982-
- **Yo-Chi** (Frozen Yoghurt)
983-
- *(The yoghurt is make-your-own, so I'll just list the yoghurt flavours I've had.)*
984-
- 2025-06-15 - Beechworth Honey Frozen Yoghurt
985-
- 2025-06-15 - Cinnamon Banana Frozen Yoghurt
986-
- 2024-05-05 - Classic Vanilla Frozen Yoghurt
987-
- 2024-07-27 - Salted Butterscotch Frozen Yoghurt
988-
- 2024-05-18 - Signature Tart Frozen Yoghurt
1002+
- <Ve n="Yo-Chi" c="Frozen Yoghurt"/>
1003+
- The yoghurt is make-your-own, so I'll just list the yoghurt flavours I've had and omit specific toppings:
1004+
- <It d="2025-06-15" n="Beechworth Honey Frozen Yoghurt"/>
1005+
- <It d="2025-06-15" n="Cinnamon Banana Frozen Yoghurt"/>
1006+
- <It d="2024-05-05" n="Classic Vanilla Frozen Yoghurt"/>
1007+
- <It d="2025-10-25" n="Coconut Frozen Yoghurt"/>
1008+
- <It d="2024-07-27" n="Salted Butterscotch Frozen Yoghurt"/>
1009+
- <It d="2024-05-18" n="Signature Tart Frozen Yoghurt"/>
1010+
- Special items:
1011+
- <It d="2025-10-25" n="Bowdy Bowl"/>
1012+
- This was a promotion only at Barangaroo Yo-Chi on 2025-10-25. They laid out special toppings and gave you a recipe for building your own Bowdy Bowl. I followed the recipe exclusively, including using Coconut frozen yoghurt.
1013+
- The recipe:
1014+
- *STEP 1: Choose your favourite Yo-Chi flavour (Andy recommends Coconut)*
1015+
- *STEP 2: Add the black sesame caramel sauce*
1016+
- *STEP 3: Add the toasted coconut cake and pineapple & makrut lime jam*
1017+
- *STEP 4: Finish it off with the candied hazelnuts*
9891018
- <Ve n="Zeus Street Greek" c="Greek"/>
9901019
- <It d="2025-09-11" n="The Zeus" help="Pita Wrap" isTakeout/>
9911020
- *"Chargrilled lamb, slaw, eggplant dip, mustard mayo, Bukovo flakes"*

src/pages/food/wishlist.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import Ve from "./_common/Venue"; //_
1515
- <Ve n="15cenchi" c="Japanese; Cheesecake" l="CBD, Darling Square"/>
1616
- <Ve n="Angel's Filipino Barbeque" c="Filipino; BBQ" l="Blacktown"/>
1717
- <Ve n="Azuki Bakery" c="Japanese; Bread; Cake" l="Newtown"/>
18-
- <Ve n="Bosphorus" c="Turkish" l="Wentworth Point"/>
19-
- I was recommended the turkish breakfast, but it probably only runs on Saturdays. Info is on [their instagram](https://www.instagram.com/bosphorusturkishstreetfood/).
2018
- <Ve n="Caysorn" c="Southern Thai" l="Haymarket"/>
2119
- Items I want to try:
2220
- Gang Bai-Cha-Plu Nue Pu

0 commit comments

Comments
 (0)