• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
lightweight

lightweight

Glimpse

Remix of glance/Glimpse
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
/
backend
/
controllers
/
_README.md
Code
/
backend
/
controllers
/
_README.md
Search
6/14/2025
Viewing readonly version of main branch: v875
View latest version
_README.md

The files in this directory export functions that get data from and save data to Notion. Most of these functions are used by /tasks.

Every controller in this directory includes the Notion client:

import { Client } from "npm:@notionhq/client";

// Initialize Notion client
const notion = new Client({
  auth: Deno.env.get("NOTION_API_KEY"),
});

Keeping controllers in this directory and importing them into our routes keeps our API endpoints thin and easier to work with. (See the /tasks directory as an example.)

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)
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.