My solutions to all years of Advent of Code
Find a file
Alex Prosser 1f4f7bc6de keep only the puzzles: tooling moved to the puzzle hub
the backend, frontend and Dockerfile now live in github.com/CodingAP/puzzle-hub, which mounts this repository through puzzlehub.json. the database moved to hub.db (migrated to the hub's schema), and the last lowercase readme.md files are renamed to README.md.
2026-11-05 12:58:32 -06:00
puzzles keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00
.gitignore keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00
deno.json keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00
deno.lock keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00
hub.db keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00
notes.md keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00
puzzlehub.json keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00
README.md keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00
template.ts keep only the puzzles: tooling moved to the puzzle hub 2026-11-05 12:58:32 -06:00

Advent of Code

These are all my solutions for the years of Advent of Code, in TypeScript.

puzzles/<year>/dayNN/   solution.ts, README.md (results table, then my writeup after %%%), examples.json (example inputs + expected answers)
puzzlehub.json          tells the puzzle hub how this repository is laid out
hub.db                  puzzle titles, submitted answers and run history (sqlite)
template.ts             what a new solution starts from

Every solution exports part1 and part2, each taking the puzzle input as a string and returning the answer.

Running them

The tooling lives in its own repository, puzzle-hub: a small Deno server with a CLI, a JSON API and a browser editor that can host any number of puzzle repositories like this one. Clone both next to each other, list this folder in the hub's hub.json, and:

deno task cli credential --source=advent-of-code --value=<your adventofcode.com session cookie>
deno task cli fetch --source=advent-of-code --year=2024 --day=1    # downloads input.txt and puzzle.md (never committed)
deno task cli run --source=advent-of-code --year=2024 --day=1
deno task serve                                                    # dashboard + editor on http://localhost:8000

My own instance runs at https://challenges.codingap.dev.

deno.json only carries the import map a few 2016 solutions need (@std/crypto).

Note for AOC moderators

Requests to adventofcode.com are made only by the hub's Advent of Code provider (advent-of-code.ts), with a User-Agent that points back to me, and only when a command or API call explicitly asks for them. Inputs and puzzle text are never committed.