FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
lightweight
lightweightGlimpse
Unlisted
Like
Glimpse
Home
Code
9
.vscode
1
backend
4
frontend
6
shared
1
.cursorrules
.vtignore
INSTRUCTIONS.md
README.md
deno.json
Branches
5
Pull requests
Remixes
2
History
Environment variables
5
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.
Sign up now
Code
/
shared
/
utils
/
README.md
Code
/
shared
/
utils
/
README.md
Search
6/25/2025
Viewing readonly version of blob-reset branch: v50
View latest version
README.md

This directory is for scripts that are either front-end scripts called by HTML interfaces, or are simple string manipulators called by the backend.

Re: /controllers and /utils

In this application, we have different directories for /controllers and /utils:

AspectControllerUtil
PurposeOrchestrates business logic and workflowsProvides small, stateless helper functions
ScopeHigh-level, often involves services or side effectsLow-level, narrow in focus (e.g., string, date ops)
StateWorks with application or user-specific dataStateless – input in, output out
OutputOften returns domain-specific result objectsReturns generic, context-agnostic values
Example NamessyncDataToNotion, generateUserReportformatDate, slugify, chunkArray, debounce
Depends OnServices, repositories, other controllersPure logic, no external dependencies (ideally)
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.