Val Town is growing up! We're working on features and infra that will fundamentally unlock the scope and scale of what you can build in Val Town. We have two major efforts running in parallel: projects and scalability.
Projects are containers for multiple vals, folders, and files. The enable you to create infinitely complex real-world apps, instead of being limited to a single long val. Internal to a project, vals will use relative imports (ie ./foo/bar), so they can be forked as a unit, and merged back in as a unit. Projects will also improve Townie's ability to help write your vals in more modular files, so that it doesn't have to regenerate all the code on every change.
Scalability will enable you to run production workloads in Val Town, with usage-based pricing, custom alerts, and caps.
We hope to have both of these efforts live in the coming months. In the meantime, we've shipped many other features and improvements, including a dozen Townie upgrades, scoped API permissions, a partnership with Fal, and more.
Townie has been massively upgraded this month. We shipped some of the most common feature request and fixed the worst bugs.
This video shows me adding analytics to Cerebras Coder, a minimal Townie clone, powered by Cerebras's lightning-fast inference. The video shows switching from Haiku to Sonnet; Townie detecting a server-side error; fixing it upon request; fixing another bug; viewing older versions of the val; and a notice to start a new chat because longer chats make Townie dumber.
By far the most common feature request for Townie has been the ability to preview the older versions of HTTP vals. This is now live! There's a dropdown in the bottom of the Preview tab in Townie to select an older version to preview, with the ability to restore that version. Thanks Charlie for the tip to add the Restore button, and Matt for the feedback on the wording of the button ๐
In order to make Townie sustainable, we rolled out usage limits. Now free-tier users can try out Townie for about a dozen messages on a Haiku, a cheaper (albeit still fantastic) model. We hope this will help you get a sense of what Townie can do, and encourage you to upgrade to Pro if you want to use it regularly. If you find that you're hitting your limits as a Pro user, please reach out to me at steve@val.town with more context on your use case. We're eagerly looking for feedback on a higher-level Pro tier or usage-based pricing.
We deployed Anthropic prompt caching (try it on Val Town), which saves 40% on cost, and improves latency by up to 85% for long prompts.
We rolled out Sonnet 3.5 New, which is supposed to be even better at coding, but unfortunately had to rollback to Sonnet 3.5 Old, because the New version was resistant to writing very large blocks of code in their entirety. It added a lot of // code remains unchanged here. We fixed that issue with Anthropic's help, and are working through a couple other system prompt issues with Sonnet 3.5 New, and hope to get it rolled out in the coming weeks.
Townie now detects many client-side and server-side errors automatically, and has a clean UI to view the errors to help you decide if you want to debug them manually, dismiss them, or ask Townie to solve them for you.
At long-last we fixed bugs with the Townie code editor getting out of sync or showing "unsaved changes" when there weren't any.
If you'd like to read more about behind-the-scenes of Townie, Tom gave a talk, which he turned into a blog post: Building a Code Writing Robot.
๐ Scoped Permissions
We added API scopes to Val Town API tokens to give you more granular control over our REST API.
The API tokens page
now lets you view and configure the scope of each token.
You can also configure the scope of for each individual val on its settings page.
Learn more โก
๐ Fal Partnership
We announced a partnership with Fal, to bring their
lightning-fast image generation API to Val Town users.
Learn more โก
We've made some long-overdue updates to our pricing page.
Here's what changed:
Expanded the Pro tier from 100 to 500 HTTP val req/min โ thanks Izu for the request ๐
Listed custom domains on the Pro tier
Lowered the number of private or unlisted vals on the Free tier from 100 to 10. (We have yet to enforce this. When we enforce it, we will grandfather in any vals created before.)
Removed some stale limitations we never enforced
We don't enforce all of these limits today. For example, Free tier users can make over 10 runs per minute. We're figuring out the right balance between signalling what we can support at scale, without adding unnecessary friction for users.
Blob Storage admin
Want to view and edit the blobs stored in your Val Town Blob Storage? Now you have two great options.
We were also featured in threeYouTubevideos, which led to thousands of new subscribers. If that includes you โ welcome! Thanks AICodeKing, Julian Goldie, and Emre Kabli for the videos ๐
๐ Other updates
You can now view all your vals on your own profile page โ even private ones โ configurable via a filter โ thanks Fabian for the request ๐
Simplified and unified buttons to edit a val's name, type, etc โ thanks Fabian for the request ๐
Allow cron vals to be paused but remain cron-type - thanks Jan for the request ๐
The 'Recent vals' section on your private dashboard now shows private and unlisted vals (before it only showed your public vals) โ thanks Arti for the bug report ๐
Made HTTP Preview iframes lazy load, so your focus won't be stolen by a val that's not in view โ thanks Troy for the bug report ๐
Add Cmd+K actions for opening the focused val in the full-screen editor or in its detail page โ thanks Arti for the suggestion ๐
๐ฃ๏ธ Roadmap
Projects
Our biggest effort coming up is Projects - groups of vals, files, folders that will be forkable as a unit and mergeable as a unit, supporting relative imports, and more. Where a val is like a Github gist, a Project is like a Github repo. Projects will enable you to build infinitely complex real-world apps in Val Town. We're excited to share something hopefully in Dec 2024, and if not in Jan 2025.
We shared the above screenshot of an example Projects a couple weeks back in our Discord. One of our users, [Victor], was so inspired that he's started building larger projects in Val Town already in advance of Projects, living in the future by pretending that they already exist. His most recent large val project was NotUber, a surprisingly full-featured Uber/Lyft clone. The best part is that he built another val that acts as the 'project view' for the 8 vals that NotUber depends on. We love Victor's vision, and we can't wait to see what everyone else builds once Projects ship for real!
Scale
We're also working on Scale โ a new infra architecture that will enable you to run production workloads in Val Town, with scale to infinity, usage-based pricing, with usage alerts, and caps. Websocket-type vals will also launch with this effort.
Max built Val Town Town โ a clone of Val Town, built in Val Town! If you want to run your users' or AI-generated server-side JavaScript, now you can do that in Val Town by forking and customizing Val Town Town
Peter built a mayor_setup, a val that gives you a bird's eye view across all your vals, lets you organize vals into composable collections, batch actions on multiple vals, and uninstall itself with no trace left behind
Max built WIDE, a service to write and query unstructured data, powered by Clickhouse, powered by his new ValSession authentication method
@trob built an interactive prompt-to-code app that generates JavaScript code from prompts and allows previewing the output with user input. James forked it, and made a Three.js Scene Generator to create 3D scenes by via natural language prompts. We love when people build on each other's work!
Dan built a What did I work on today? in 6 prompts with Townie, which pulls from Github and Linear to generate a daily summary of what you worked on (tweet)
@jidun created Ms_Spangler, an AI tutor specializing in the Texas junior high curriculum that provides grade-appropriate academic support while fostering critical thinking and real-world applications
Nick built a guided breathing instructions app with techniques like 4-7-8 Breathing, Box Breathing, and Alternate Nostril Breathing to help manage stress and promote relaxation