Public
Like
bigwordbot
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v174View latest version
- gridEdit5x5 is a vibe-coded editor for created grids with black spaces. They are accessible in blob storage
await blob.getJSON("savedGrids"); - gridRetryFill contains the core function for taking a word and embedding it in a grid.
- bluesky_bot_template is what posts the current grids to bsky.
- fabwbogglelike calls
gridRetryFilland uses Observable plot to create an svg.
drawSVG.ts- Shared SVG rendering utility withdrawSVG(board, width, height)function andboardFromString()helpersolverTownie.ts- Word puzzle solver that finds all valid words in a board using a Trie data structureviewBoardSVG.tsx- HTTP endpoint that returns SVG images of word boardsviewBoardSolutions.tsx- HTTP endpoint that returns HTML pages with board visualization and all found wordsviewBoardPlot.tsx- Alternative SVG renderer using Observable PlotsavedGrids.ts- Grid templates stored in blob storageretryFill.ts- Core algorithm for embedding words into grids
/viewBoardSVG/- Default board as SVG/viewBoardSVG/{boardString}- Custom board as SVG (e.g.,/viewBoardSVG/CATS_DOG_BIRD)/viewBoardSolutions/- Default board with word solutions as HTML/viewBoardSolutions/{boardString}- Custom board with solutions as HTML
Boards are represented as 16-character strings where:
- Letters represent playable cells
_represents blocked/black cells- Characters are arranged in a 4x4 grid (left-to-right, top-to-bottom)
Example: "CATS_DOG_BIRD" creates:
C A T S
_ D O G
_ B I R
D _ _ _
- I'm exporting the gridEdit5x5 data and saving it as a file here instead of having a call to by blob storage.
- Similarly, I'm generating board strings offline